Mailinglist Archive: yast-commit (1535 mails)
| < Previous | Next > |
[yast-commit] r59033 - /trunk/registration/src/modules/YSR.pm_web
- From: jdsn@xxxxxxxxxxxxxxxx
- Date: Wed, 14 Oct 2009 17:22:07 -0000
- Message-id: <E1My7Y7-0005v6-U0@xxxxxxxxxxxxxxxx>
Author: jdsn
Date: Wed Oct 14 19:22:07 2009
New Revision: 59033
URL: http://svn.opensuse.org/viewcvs/yast?rev=59033&view=rev
Log:
adding arguments to registration context, return standardized hash
Modified:
trunk/registration/src/modules/YSR.pm_web
Modified: trunk/registration/src/modules/YSR.pm_web
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/registration/src/modules/YSR.pm_web?rev=59033&r1=59032&r2=59033&view=diff
==============================================================================
--- trunk/registration/src/modules/YSR.pm_web (original)
+++ trunk/registration/src/modules/YSR.pm_web Wed Oct 14 19:22:07 2009
@@ -191,8 +191,7 @@
unless ( defined $ctx && ref($ctx) eq "HASH" )
{
- print "args is not a hash in YSR::statlessregister. This is a bug.
Please report this error.\n";
- return { 'error' => { 'args' => 'The call of the registration failed
because of missing arguments.' } };
+ return { 'error' => { 'ctx' => 'The context is missing or invalid.' }
};
}
# check if the system is still initialized - otherwise run init_ctx again
@@ -215,16 +214,27 @@
unless ($init_err == 0)
{
# init failed
- return { 'error' => { 'init' => 'The initialization of the
registration failed.' } };
+ return { 'error' => { 'init' => 'The initialization of the
registration failed.'
+ ,'errorcode' => $init_err
+ } };
}
}
+
+ # set arguments
+ $self->set_args($arguments);
+
+ # run registration
my $exitcode = $self->register();
+ my $errorcode = $self->get_errorcode();
+ my $readabletext = $self->get_registerReadableText();
+ my $tasklist = $exitcode == 0 ? $self->getTaskList() : '';
- return { 'success' => { 'msg' => 'This is the return string.'
- ,'exit code' => $exitcode
- ,'error code' => $self->get_errorcode()
- ,'register text' =>
$self->get_registerReadableText()
- # ,'task list' => $self->getTaskList() || ''
+
+ return { 'success' => { 'msg' => 'Successfully ran registration.'
+ ,'exitcode' => $exitcode
+ ,'errorcode' => $errorcode
+ ,'readabletext' => $readabletext
+ ,'tasklist' => $tasklist
} };
}
@@ -286,7 +296,6 @@
}
}
-
$url = '' unless defined $url;
$cert = '' unless defined $cert;
$guid = '' unless defined $guid;
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
Date: Wed Oct 14 19:22:07 2009
New Revision: 59033
URL: http://svn.opensuse.org/viewcvs/yast?rev=59033&view=rev
Log:
adding arguments to registration context, return standardized hash
Modified:
trunk/registration/src/modules/YSR.pm_web
Modified: trunk/registration/src/modules/YSR.pm_web
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/registration/src/modules/YSR.pm_web?rev=59033&r1=59032&r2=59033&view=diff
==============================================================================
--- trunk/registration/src/modules/YSR.pm_web (original)
+++ trunk/registration/src/modules/YSR.pm_web Wed Oct 14 19:22:07 2009
@@ -191,8 +191,7 @@
unless ( defined $ctx && ref($ctx) eq "HASH" )
{
- print "args is not a hash in YSR::statlessregister. This is a bug.
Please report this error.\n";
- return { 'error' => { 'args' => 'The call of the registration failed
because of missing arguments.' } };
+ return { 'error' => { 'ctx' => 'The context is missing or invalid.' }
};
}
# check if the system is still initialized - otherwise run init_ctx again
@@ -215,16 +214,27 @@
unless ($init_err == 0)
{
# init failed
- return { 'error' => { 'init' => 'The initialization of the
registration failed.' } };
+ return { 'error' => { 'init' => 'The initialization of the
registration failed.'
+ ,'errorcode' => $init_err
+ } };
}
}
+
+ # set arguments
+ $self->set_args($arguments);
+
+ # run registration
my $exitcode = $self->register();
+ my $errorcode = $self->get_errorcode();
+ my $readabletext = $self->get_registerReadableText();
+ my $tasklist = $exitcode == 0 ? $self->getTaskList() : '';
- return { 'success' => { 'msg' => 'This is the return string.'
- ,'exit code' => $exitcode
- ,'error code' => $self->get_errorcode()
- ,'register text' =>
$self->get_registerReadableText()
- # ,'task list' => $self->getTaskList() || ''
+
+ return { 'success' => { 'msg' => 'Successfully ran registration.'
+ ,'exitcode' => $exitcode
+ ,'errorcode' => $errorcode
+ ,'readabletext' => $readabletext
+ ,'tasklist' => $tasklist
} };
}
@@ -286,7 +296,6 @@
}
}
-
$url = '' unless defined $url;
$cert = '' unless defined $cert;
$guid = '' unless defined $guid;
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx
| < Previous | Next > |