web/lib/Zend/Service/WindowsAzure/CommandLine/GetAsynchronousOperation.php
changeset 1230 68c69c656a2c
parent 808 6b6c2214f778
equal deleted inserted replaced
1229:5a6b6e770365 1230:68c69c656a2c
    14  *
    14  *
    15  * @category   Zend
    15  * @category   Zend
    16  * @package    Zend_Service_Console
    16  * @package    Zend_Service_Console
    17  * @subpackage Exception
    17  * @subpackage Exception
    18  * @version    $Id$
    18  * @version    $Id$
    19  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    19  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
    20  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    20  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    21  */
    21  */
    22 
    22 
    23 /**
    23 /**
       
    24 * @see Zend_Service_Console_Command
       
    25 */
       
    26 require_once 'Zend/Service/Console/Command.php';
       
    27 
       
    28 /**
       
    29 * @see Zend_Service_WindowsAzure_Management_Client
       
    30 */
       
    31 require_once 'Zend/Service/WindowsAzure/Management/Client.php';
       
    32 
       
    33 /**
    24  * Asynchronous Operation commands
    34  * Asynchronous Operation commands
    25  * 
    35  *
    26  * @category   Zend
    36  * @category   Zend
    27  * @package    Zend_Service_WindowsAzure_CommandLine
    37  * @package    Zend_Service_WindowsAzure_CommandLine
    28  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    38  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
    29  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    39  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    30  * 
    40  *
    31  * @command-handler getasynchronousoperation
    41  * @command-handler getasynchronousoperation
    32  * @command-handler-description Windows Azure Asynchronous Operation commands
    42  * @command-handler-description Windows Azure Asynchronous Operation commands
    33  * @command-handler-header Windows Azure SDK for PHP
    43  * @command-handler-header Windows Azure SDK for PHP
    34  * @command-handler-header Copyright (c) 2009 - 2011, RealDolmen (http://www.realdolmen.com)
    44  * @command-handler-header Copyright (c) 2009 - 2011, RealDolmen (http://www.realdolmen.com)
    35  * @command-handler-footer Note: Parameters that are common across all commands can be stored 
    45  * @command-handler-footer Note: Parameters that are common across all commands can be stored
    36  * @command-handler-footer in two dedicated environment variables.
    46  * @command-handler-footer in two dedicated environment variables.
    37  * @command-handler-footer - SubscriptionId: The Windows Azure Subscription Id to operate on.
    47  * @command-handler-footer - SubscriptionId: The Windows Azure Subscription Id to operate on.
    38  * @command-handler-footer - Certificate The Windows Azure .cer Management Certificate.
    48  * @command-handler-footer - Certificate The Windows Azure .cer Management Certificate.
    39  * @command-handler-footer 
    49  * @command-handler-footer
    40  * @command-handler-footer All commands support the --ConfigurationFile or -F parameter.
    50  * @command-handler-footer All commands support the --ConfigurationFile or -F parameter.
    41  * @command-handler-footer The parameter file is a simple INI file carrying one parameter
    51  * @command-handler-footer The parameter file is a simple INI file carrying one parameter
    42  * @command-handler-footer value per line. It accepts the same parameters as one can
    52  * @command-handler-footer value per line. It accepts the same parameters as one can
    43  * @command-handler-footer use from the command line command.
    53  * @command-handler-footer use from the command line command.
    44  */
    54  */
    45 class Zend_Service_WindowsAzure_CommandLine_GetAsynchronousOperation
    55 class Zend_Service_WindowsAzure_CommandLine_GetAsynchronousOperation
    46 	extends Zend_Service_Console_Command
    56 	extends Zend_Service_Console_Command
    47 {	
    57 {
    48 	/**
    58 	/**
    49 	 * Get information for a specific asynchronous request.
    59 	 * Get information for a specific asynchronous request.
    50 	 * 
    60 	 *
    51 	 * @command-name GetInfo
    61 	 * @command-name GetInfo
    52 	 * @command-description Get information for a specific asynchronous request.
    62 	 * @command-description Get information for a specific asynchronous request.
    53 	 * @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.
    63 	 * @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.
    54 	 * @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.
    64 	 * @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.
    55 	 * @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.
    65 	 * @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.
    62 		$client = new Zend_Service_WindowsAzure_Management_Client($subscriptionId, $certificate, $certificatePassphrase);
    72 		$client = new Zend_Service_WindowsAzure_Management_Client($subscriptionId, $certificate, $certificatePassphrase);
    63 		$result = $client->getOperationStatus($requestId);
    73 		$result = $client->getOperationStatus($requestId);
    64 
    74 
    65 		$this->_displayObjectInformation($result, array('ID', 'Status', 'ErrorMessage'));
    75 		$this->_displayObjectInformation($result, array('ID', 'Status', 'ErrorMessage'));
    66 	}
    76 	}
    67 	
    77 
    68 	/**
    78 	/**
    69 	 * Wait for a specific asynchronous request to complete.
    79 	 * Wait for a specific asynchronous request to complete.
    70 	 * 
    80 	 *
    71 	 * @command-name WaitFor
    81 	 * @command-name WaitFor
    72 	 * @command-description Wait for a specific asynchronous request to complete.
    82 	 * @command-description Wait for a specific asynchronous request to complete.
    73 	 * @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.
    83 	 * @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.
    74 	 * @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.
    84 	 * @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.
    75 	 * @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.
    85 	 * @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.