diff -r 877f952ae2bd -r 6b6c2214f778 web/lib/Zend/Service/WindowsAzure/CommandLine/GetAsynchronousOperation.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Service/WindowsAzure/CommandLine/GetAsynchronousOperation.php Thu Mar 21 19:52:38 2013 +0100 @@ -0,0 +1,88 @@ +" -cert:"mycert.pem" -r:"dab87a4b70e94a36805f5af2d20fc593" + */ + public function getInfoCommand($subscriptionId, $certificate, $certificatePassphrase, $requestId) + { + $client = new Zend_Service_WindowsAzure_Management_Client($subscriptionId, $certificate, $certificatePassphrase); + $result = $client->getOperationStatus($requestId); + + $this->_displayObjectInformation($result, array('ID', 'Status', 'ErrorMessage')); + } + + /** + * Wait for a specific asynchronous request to complete. + * + * @command-name WaitFor + * @command-description Wait for a specific asynchronous request to complete. + * @command-parameter-for $subscriptionId Zend_Service_Console_Command_ParameterSource_Argv|Zend_Service_Console_Command_ParameterSource_ConfigFile|Zend_Service_Console_Command_ParameterSource_Env --SubscriptionId|-sid Required. This is the Windows Azure Subscription Id to operate on. + * @command-parameter-for $certificate Zend_Service_Console_Command_ParameterSource_Argv|Zend_Service_Console_Command_ParameterSource_ConfigFile|Zend_Service_Console_Command_ParameterSource_Env --Certificate|-cert Required. This is the .pem certificate that user has uploaded to Windows Azure subscription as Management Certificate. + * @command-parameter-for $certificatePassphrase Zend_Service_Console_Command_ParameterSource_Argv|Zend_Service_Console_Command_ParameterSource_ConfigFile|Zend_Service_Console_Command_ParameterSource_Prompt --Passphrase|-p Required. The certificate passphrase. If not specified, a prompt will be displayed. + * @command-parameter-for $requestId Zend_Service_Console_Command_ParameterSource_Argv|Zend_Service_Console_Command_ParameterSource_ConfigFile --RequestId|-r Required. The value returned by a call that starts an asynchronous operation to monitor. + * @command-parameter-for $interval Zend_Service_Console_Command_ParameterSource_Argv|Zend_Service_Console_Command_ParameterSource_ConfigFile --Interval|-i Optional. The interval between two status checks (in milliseconds). + * @command-example Wait for a specific asynchronous operation: + * @command-example WaitFor -sid:"" -cert:"mycert.pem" -r:"dab87a4b70e94a36805f5af2d20fc593" + */ + public function waitForCommand($subscriptionId, $certificate, $certificatePassphrase, $requestId, $interval = 250) + { + $client = new Zend_Service_WindowsAzure_Management_Client($subscriptionId, $certificate, $certificatePassphrase); + $client->waitForOperation($requestId, $interval); + } +} + +Zend_Service_Console_Command::bootstrap($_SERVER['argv']); \ No newline at end of file