Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #609 from WindowsAzure/dev

8/17 Release
  • Loading branch information...
commit aa2dfd7b0fa7a20f3f35749d6d22868b8b31d7eb 2 parents ab88dd3 + 8597e70
@jcookems jcookems authored
Showing with 7,252 additions and 636 deletions.
  1. +8 −3 Defaults.php
  2. +64 −21 README.md
  3. +2 −2 WindowsAzure/Blob/BlobRestProxy.php
  4. +2 −2 WindowsAzure/Blob/Models/BlobBlockType.php
  5. +5 −2 WindowsAzure/Common/Internal/Atom/AtomBase.php
  6. +5 −5 WindowsAzure/Common/Internal/ConnectionStringParser.php
  7. +74 −5 WindowsAzure/Common/Internal/Resources.php
  8. +82 −1 WindowsAzure/Common/Internal/Utilities.php
  9. +1 −30 WindowsAzure/ServiceBus/Models/Action.php
  10. +1 −29 WindowsAzure/ServiceBus/Models/Filter.php
  11. +6 −6 WindowsAzure/ServiceBus/Models/RuleDescription.php
  12. +0 −3  WindowsAzure/ServiceBus/Models/RuleInfo.php
  13. +30 −0 WindowsAzure/ServiceBus/Models/SqlFilter.php
  14. +29 −0 WindowsAzure/ServiceBus/Models/SqlRuleAction.php
  15. +355 −26 WindowsAzure/ServiceManagement/Internal/IServiceManagement.php
  16. +31 −13 WindowsAzure/ServiceManagement/{Models → Internal}/Service.php
  17. +151 −0 WindowsAzure/ServiceManagement/Internal/WindowsAzureService.php
  18. +14 −5 WindowsAzure/ServiceManagement/Models/AffinityGroup.php
  19. +124 −0 WindowsAzure/ServiceManagement/Models/ChangeDeploymentConfigurationOptions.php
  20. +113 −0 WindowsAzure/ServiceManagement/Models/CreateDeploymentOptions.php
  21. +1 −1  WindowsAzure/ServiceManagement/Models/{CreateStorageServiceOptions.php → CreateServiceOptions.php}
  22. +560 −0 WindowsAzure/ServiceManagement/Models/Deployment.php
  23. +61 −0 WindowsAzure/ServiceManagement/Models/DeploymentSlot.php
  24. +61 −0 WindowsAzure/ServiceManagement/Models/DeploymentStatus.php
  25. +2 −14 WindowsAzure/ServiceManagement/Models/GetAffinityGroupPropertiesResult.php
  26. +106 −0 WindowsAzure/ServiceManagement/Models/GetDeploymentOptions.php
  27. +84 −0 WindowsAzure/ServiceManagement/Models/GetDeploymentResult.php
  28. +77 −0 WindowsAzure/ServiceManagement/Models/GetHostedServicePropertiesOptions.php
  29. +87 −0 WindowsAzure/ServiceManagement/Models/GetHostedServicePropertiesResult.php
  30. +4 −101 WindowsAzure/ServiceManagement/Models/GetStorageServicePropertiesResult.php
  31. +115 −0 WindowsAzure/ServiceManagement/Models/HostedService.php
  32. +152 −0 WindowsAzure/ServiceManagement/Models/InputEndpoint.php
  33. +99 −0 WindowsAzure/ServiceManagement/Models/ListHostedServicesResult.php
  34. +5 −16 WindowsAzure/ServiceManagement/Models/ListStorageServicesResult.php
  35. +61 −0 WindowsAzure/ServiceManagement/Models/Mode.php
  36. +125 −0 WindowsAzure/ServiceManagement/Models/Role.php
  37. +341 −0 WindowsAzure/ServiceManagement/Models/RoleInstance.php
  38. +66 −33 WindowsAzure/ServiceManagement/Models/StorageService.php
  39. +1 −1  WindowsAzure/ServiceManagement/Models/{UpdateStorageServiceOptions.php → UpdateServiceOptions.php}
  40. +16 −39 WindowsAzure/ServiceManagement/Models/{ServiceProperties.php → UpgradeDeploymentOptions.php}
  41. +163 −0 WindowsAzure/ServiceManagement/Models/UpgradeStatus.php
  42. +947 −52 WindowsAzure/ServiceManagement/ServiceManagementRestProxy.php
  43. +3 −2 WindowsAzure/Table/Internal/MimeReaderWriter.php
  44. +21 −4 WindowsAzure/WindowsAzure.php
  45. +10 −0 changelog.txt
  46. +3 −3 examples/Client/CloudSubscription.php
  47. +73 −31 package.xml
  48. +23 −5 tests/WindowsAzureTests.php
  49. +14 −0 tests/framework/RestProxyTestBase.php
  50. +311 −14 tests/framework/ServiceManagementRestProxyTestBase.php
  51. +44 −0 tests/framework/TestResources.php
  52. +38 −3 tests/unit/WindowsAzure/Common/Internal/UtilitiesTest.php
  53. +57 −0 tests/unit/WindowsAzure/ServiceBus/models/ActionTest.php
  54. +2 −24 tests/unit/WindowsAzure/ServiceBus/models/FilterTest.php
  55. +22 −0 tests/unit/WindowsAzure/ServiceBus/models/SqlFilterTest.php
  56. +23 −24 tests/unit/WindowsAzure/ServiceManagement/{Models → Internal}/ServiceTest.php
  57. +76 −0 tests/unit/WindowsAzure/ServiceManagement/Internal/WindowsAzureServiceTest.php
  58. +76 −0 tests/unit/WindowsAzure/ServiceManagement/Models/ChangeDeploymentConfigurationOptionsTest.php
  59. +74 −0 tests/unit/WindowsAzure/ServiceManagement/Models/CreateDeploymentOptionsTest.php
  60. +15 −15 tests/unit/WindowsAzure/ServiceManagement/Models/CreateStorageServiceOptionsTest.php
  61. +64 −0 tests/unit/WindowsAzure/ServiceManagement/Models/DeploymentSlotTest.php
  62. +14 −20 tests/unit/WindowsAzure/ServiceManagement/Models/{ServicePropertiesTest.php → DeploymentStatusTest.php}
  63. +280 −0 tests/unit/WindowsAzure/ServiceManagement/Models/DeploymentTest.php
  64. +74 −0 tests/unit/WindowsAzure/ServiceManagement/Models/GetDeploymentOptionsTest.php
  65. +58 −0 tests/unit/WindowsAzure/ServiceManagement/Models/GetDeploymentResultTest.php
  66. +58 −0 tests/unit/WindowsAzure/ServiceManagement/Models/GetHostedServicePropertiesOptionsTest.php
  67. +58 −0 tests/unit/WindowsAzure/ServiceManagement/Models/GetHostedServicePropertiesResultTest.php
  68. +1 −54 tests/unit/WindowsAzure/ServiceManagement/Models/GetStorageServicePropertiesResultTest.php
  69. +57 −0 tests/unit/WindowsAzure/ServiceManagement/Models/HostedServiceTest.php
  70. +91 −0 tests/unit/WindowsAzure/ServiceManagement/Models/InputEndpointTest.php
  71. +57 −0 tests/unit/WindowsAzure/ServiceManagement/Models/ListHostedServicesResultTest.php
  72. +2 −4 tests/unit/WindowsAzure/ServiceManagement/Models/ListStorageServicesResultTest.php
  73. +70 −0 tests/unit/WindowsAzure/ServiceManagement/Models/ModeTest.php
  74. +176 −0 tests/unit/WindowsAzure/ServiceManagement/Models/RoleInstanceTest.php
  75. +74 −0 tests/unit/WindowsAzure/ServiceManagement/Models/RoleTest.php
  76. +34 −0 tests/unit/WindowsAzure/ServiceManagement/Models/StorageServiceTest.php
  77. +9 −9 ...owsAzure/ServiceManagement/Models/{UpdateStorageServiceOptionsTest.php → UpdateServiceOptionsTest.php}
  78. +57 −0 tests/unit/WindowsAzure/ServiceManagement/Models/UpgradeDeploymentOptionsTest.php
  79. +91 −0 tests/unit/WindowsAzure/ServiceManagement/Models/UpgradeStatusTest.php
  80. +811 −14 tests/unit/WindowsAzure/ServiceManagement/ServiceManagementRestProxyTest.php
View
11 Defaults.php
@@ -32,8 +32,8 @@
const CHANNEL_GET_CONTAINER = 'get';
const CHANNEL_REST_CONTAINER = 'rest';
const PACKAGE_NAME = 'WindowsAzure';
-const PACKAGE_RELEASE_VERSION = '0.3.0';
-const PACKAGE_API_VERSION = '0.3.0';
+const PACKAGE_RELEASE_VERSION = '0.3.1';
+const PACKAGE_API_VERSION = '0.3.1';
const PACKAGE_RELEASE_STATE = 'beta';
const PACKAGE_API_STATE = 'beta';
const PACKAGE_MIN_PHP_VERSION = '5.3.0';
@@ -47,7 +47,12 @@
It is build as a thin REST call wrapper where each server call maps to a single method call within the library.
';
const PACKAGE_RELEASE_NOTES = '
-- Added Cloud Configuration Manager.
+- Added additional API support for Service Management:
+ * Operations on Hosted Services
+ > create, update, delete, list, get properties
+ * Operations on Deployments
+ > deployment: create, get, delete, swap, change configuration, update status, upgrade, rollback
+ > role instance: reboot, reimage
';
$dependencies = array(
array('required', 'HTTP_Request2', 'pear.php.net'),
View
85 README.md
@@ -30,8 +30,12 @@ Windows Azure tables, blobs, queues, service bus (queues and topics), service ru
* query and set the status of the current role
* REST API Version: 2011-03-08
* Service Management
- * create, update, delete, list, regenerate keys for storage accounts
- * create, update, delete, list affinity groups
+ * storage accounts: create, update, delete, list, regenerate keys
+ * affinity groups: create, update, delete, list, get properties
+ * locations: list
+ * hosted services: create, update, delete, list, get properties
+ * deployment: create, get, delete, swap, change configuration, update status, upgrade, rollback
+ * role instance: reboot, reimage
* REST API Version: 2011-10-01
@@ -43,9 +47,9 @@ To get the source code from GitHub, type
git clone https://github.com/WindowsAzure/azure-sdk-for-php.git
cd ./azure-sdk-for-php
-**Note**
-
-The PHP Client Libraries for Windows Azure have a dependency on the [HTTP_Request2](http://pear.php.net/package/HTTP_Request2), [Mail_mime](http://pear.php.net/package/Mail_mime), and [Mail_mimeDecode](http://pear.php.net/package/Mail_mimeDecode) PEAR packages. The recommended way to resolve these dependencies is to install them using the [PEAR package manager](http://pear.php.net/manual/en/installation.php).
+> **Note**
+>
+> The PHP Client Libraries for Windows Azure have a dependency on the [HTTP_Request2](http://pear.php.net/package/HTTP_Request2), [Mail_mime](http://pear.php.net/package/Mail_mime), and [Mail_mimeDecode](http://pear.php.net/package/Mail_mimeDecode) PEAR packages. The recommended way to resolve these dependencies is to install them using the [PEAR package manager](http://pear.php.net/manual/en/installation.php).
##Install via Composer
@@ -71,10 +75,9 @@ The PHP Client Libraries for Windows Azure have a dependency on the [HTTP_Reques
php composer.phar install
- <div class="dev-callout">
- <b>Note</b>
- <p>On Windows, you will also need to add the Git executable to your PATH environment variable.</p>
- </div>
+ > **Note**
+ >
+ > On Windows, you will also need to add the Git executable to your PATH environment variable.
##Install as a PEAR package
@@ -87,7 +90,7 @@ To install the PHP Client Libraries for Windows Azure as a PEAR package, follow
pear channel-discover pear.windowsazure.com
3. Install the PEAR package:
- pear install pear.windowsazure.com/WindowsAzure-0.3.0
+ pear install pear.windowsazure.com/WindowsAzure-0.3.1
# Usage
@@ -558,25 +561,65 @@ To create the .cer certificate, execute this:
openssl x509 -inform pem -in mycert.pem -outform der -out mycert.cer
### List Available Locations
-
- $serviceManagementRestProxy->listLocations();
- $locations = $result->getLocations();
- foreach($locations as $location){
- echo $location->getName()."<br />";
- }
+```PHP
+$serviceManagementRestProxy->listLocations();
+$locations = $result->getLocations();
+foreach($locations as $location){
+ echo $location->getName()."<br />";
+}
+```
### Create a Storage Service
To create a storage service, you need a name for the service (between 3 and 24 lowercase characters and unique within Windows Azure), a label (a base-64 encoded name for the service, up to 100 characters), and either a location or an affinity group. Providing a description for the service is optional.
- $name = "mystorageservice";
- $label = base64_encode($name);
- $options = new CreateStorageServiceOptions();
- $options->setLocation('West US');
- $result = $serviceManagementRestProxy->createStorageService($name, $label, $options);
+```PHP
+$name = "mystorageservice";
+$label = base64_encode($name);
+$options = new CreateStorageServiceOptions();
+$options->setLocation('West US');
+
+$result = $serviceManagementRestProxy->createStorageService($name, $label, $options);
+```
+### Create a Cloud Service
+
+A cloud service is also known as a hosted service (from earlier versions of Windows Azure). The **createHostedServices** method allows you to create a new hosted service by providing a hosted service name (which must be unique in Windows Azure), a label (the base 64-endcoded hosted service name), and a **CreateServiceOptions** object which allows you to set the location *or* the affinity group for your service.
+
+```PHP
+$name = "myhostedservice";
+$label = base64_encode($name);
+$options = new CreateServiceOptions();
+$options->setLocation('West US');
+// Instead of setLocation, you can use setAffinityGroup to set an affinity group.
+
+$result = $serviceManagementRestProxy->createHostedService($name, $label, $options);
+```
+
+### Create a Deployment
+
+To make a new deployment to Azure you must store the package file in a Windows Azure Blob Storage account under the same subscription as the hosted service to which the package is being uploaded. You can create a deployment package with the [Windows Azure PowerShell cmdlets](https://www.windowsazure.com/en-us/develop/php/how-to-guides/powershell-cmdlets/), or with the [cspack commandline tool](http://msdn.microsoft.com/en-us/library/windowsazure/gg432988.aspx).
+
+```PHP
+$hostedServiceName = "myhostedservice";
+$deploymentName = "v1";
+$slot = DeploymentSlot::PRODUCTION;
+$packageUrl = "URL_for_.cspkg_file";
+$configuration = file_get_contents('path_to_.cscfg_file');
+$label = base64_encode($hostedServiceName);
+
+$result = $serviceManagementRestProxy->createDeployment($hostedServiceName,
+ $deploymentName,
+ $slot,
+ $packageUrl,
+ $configuration,
+ $label);
+
+$status = $serviceManagementRestProxy->getOperationStatus($result);
+echo "Operation status: ".$status->getStatus()."<br />";
+```
**For more examples please see the [Windows Azure PHP Developer Center](http://www.windowsazure.com/en-us/develop/php)**
View
4 WindowsAzure/Blob/BlobRestProxy.php
@@ -337,7 +337,7 @@ private function _addCreateBlobOptionalHeaders($options, $headers)
private function _addOptionalRangeHeader($headers, $start, $end)
{
if (!is_null($start) || !is_null($end)) {
- $range = $start . '-' . $end;
+ $range = $start . '-' . $end;
$rangeValue = 'bytes=' . $range;
$this->addOptionalHeader($headers, Resources::RANGE, $rangeValue);
}
@@ -2064,7 +2064,7 @@ public function deleteBlob($container, $blob, $options = null)
);
}
- $headers = $this->addOptionalAccessConditionHeader(
+ $headers = $this->addOptionalAccessConditionHeader(
$headers, $options->getAccessCondition()
);
View
4 WindowsAzure/Blob/Models/BlobBlockType.php
@@ -54,10 +54,10 @@ public static function isValid($type)
case self::COMMITTED_TYPE:
case self::LATEST_TYPE:
case self::UNCOMMITTED_TYPE:
- return true;
+ return true;
default:
- return false;
+ return false;
}
}
}
View
7 WindowsAzure/Common/Internal/Atom/AtomBase.php
@@ -276,8 +276,11 @@ protected function processLinkNode($xmlArray)
*
* @return none
*/
- protected function writeOptionalAttribute($xmlWriter, $attributeName, $attributeValue)
- {
+ protected function writeOptionalAttribute(
+ $xmlWriter,
+ $attributeName,
+ $attributeValue
+ ) {
Validate::notNull($xmlWriter, 'xmlWriter');
Validate::isString($attributeName, 'attributeName');
View
10 WindowsAzure/Common/Internal/ConnectionStringParser.php
@@ -122,7 +122,7 @@ private function _parse()
switch ($this->_state) {
case ParserState::EXPECT_KEY:
- $key = $this->_extractKey();
+ $key = $this->_extractKey();
$this->_state = ParserState::EXPECT_ASSIGNMENT;
break;
@@ -132,11 +132,11 @@ private function _parse()
break;
case ParserState::EXPECT_VALUE:
- $value = $this->_extractValue();
- $this->_state = ParserState::EXPECT_SEPARATOR;
+ $value = $this->_extractValue();
+ $this->_state = ParserState::EXPECT_SEPARATOR;
$connectionStringValues[$key] = $value;
- $key = null;
- $value = null;
+ $key = null;
+ $value = null;
break;
default:
View
79 WindowsAzure/Common/Internal/Resources.php
@@ -87,8 +87,8 @@ class Resources
const INVALID_BLOB_PAT_MSG = 'The provided access type is invalid.';
const INVALID_SVC_PROP_MSG = 'The provided service properties is invalid.';
const UNKNOWN_SRILZER_MSG = 'The provided serializer type is unknown';
- const INVALID_CSA_OPT_MSG = 'Must provide valid location or affinity group.';
- const INVALID_USA_OPT_MSG = 'Must provide either description or label.';
+ const INVALID_CREATE_SERVICE_OPTIONS_MSG = 'Must provide valid location or affinity group.';
+ const INVALID_UPDATE_SERVICE_OPTIONS_MSG = 'Must provide either description or label.';
const INVALID_CONFIG_MSG = 'Config object must be of type Configuration';
const INVALID_ACH_MSG = 'The provided access condition header is invalid';
const INVALID_RECEIVE_MODE_MSG = 'The receive message option is in neither RECEIVE_AND_DELETE nor PEEK_LOCK mode.';
@@ -107,6 +107,10 @@ class Resources
const ERROR_CONNECTION_STRING_MISSING_CHARACTER = "Missing %s character";
const ERROR_EMPTY_SETTINGS = 'No keys were found in the connection string';
const MISSING_LOCK_LOCATION_MSG = 'The lock location of the brokered message is missing.';
+ const INVALID_SLOT = "The provided deployment slot '%s' is not valid. Only 'staging' and 'production' are accepted.";
+ const INVALID_DEPLOYMENT_LOCATOR_MSG = 'A slot or deployment name must be provided.';
+ const INVALID_CHANGE_MODE_MSG = "The change mode must be 'Auto' or 'Manual'. Use Mode class constants for that purpose.";
+ const INVALID_DEPLOYMENT_STATUS_MSG = "The change mode must be 'Running' or 'Suspended'. Use DeploymentStatus class constants for that purpose.";
// HTTP Headers
const X_MS_HEADER_PREFIX = 'x-ms-';
@@ -152,6 +156,7 @@ class Resources
const CONTENT_ENCODING = 'content-encoding';
const CONTENT_LANGUAGE = 'content-language';
const CONTENT_LENGTH = 'content-length';
+ const CONTENT_LENGTH_NO_SPACE = 'contentlength';
const CONTENT_MD5 = 'content-md5';
const CONTENT_TYPE = 'content-type';
const CONTENT_ID = 'content-id';
@@ -254,6 +259,17 @@ class Resources
const QP_NEXT_PK = 'NextPartitionKey';
const QP_NEXT_RK = 'NextRowKey';
const QP_ACTION = 'action';
+ const QP_EMBED_DETAIL = 'embed-detail';
+
+ // Query parameter values
+ const QPV_REGENERATE = 'regenerate';
+ const QPV_CONFIG = 'config';
+ const QPV_STATUS = 'status';
+ const QPV_UPGRADE = 'upgrade';
+ const QPV_WALK_UPGRADE_DOMAIN = 'walkupgradedomain';
+ const QPV_REBOOT = 'reboot';
+ const QPV_REIMAGE = 'reimage';
+ const QPV_ROLLBACK = 'rollback';
// Request body content types
const URL_ENCODED_CONTENT_TYPE = 'application/x-www-form-urlencoded';
@@ -290,6 +306,61 @@ class Resources
const XTAG_KEY_TYPE = 'KeyType';
const XTAG_STORAGE_SERVICE_KEYS = 'StorageServiceKeys';
const XTAG_ERROR = 'Error';
+ const XTAG_HOSTED_SERVICE = 'HostedService';
+ const XTAG_HOSTED_SERVICE_PROPERTIES = 'HostedServiceProperties';
+ const XTAG_CREATE_HOSTED_SERVICE = 'CreateHostedService';
+ const XTAG_CREATE_STORAGE_SERVICE_INPUT = 'CreateStorageServiceInput';
+ const XTAG_UPDATE_STORAGE_SERVICE_INPUT = 'UpdateStorageServiceInput';
+ const XTAG_CREATE_AFFINITY_GROUP = 'CreateAffinityGroup';
+ const XTAG_UPDATE_AFFINITY_GROUP = 'UpdateAffinityGroup';
+ const XTAG_UPDATE_HOSTED_SERVICE = 'UpdateHostedService';
+ const XTAG_PACKAGE_URL = 'PackageUrl';
+ const XTAG_CONFIGURATION = 'Configuration';
+ const XTAG_START_DEPLOYMENT = 'StartDeployment';
+ const XTAG_TREAT_WARNINGS_AS_ERROR = 'TreatWarningsAsError';
+ const XTAG_CREATE_DEPLOYMENT = 'CreateDeployment';
+ const XTAG_DEPLOYMENT_SLOT = 'DeploymentSlot';
+ const XTAG_PRIVATE_ID = 'PrivateID';
+ const XTAG_ROLE_INSTANCE_LIST = 'RoleInstanceList';
+ const XTAG_UPGRADE_DOMAIN_COUNT = 'UpgradeDomainCount';
+ const XTAG_ROLE_LIST = 'RoleList';
+ const XTAG_SDK_VERSION = 'SdkVersion';
+ const XTAG_INPUT_ENDPOINT_LIST = 'InputEndpointList';
+ const XTAG_LOCKED = 'Locked';
+ const XTAG_ROLLBACK_ALLOWED = 'RollbackAllowed';
+ const XTAG_UPGRADE_STATUS = 'UpgradeStatus';
+ const XTAG_UPGRADE_TYPE = 'UpgradeType';
+ const XTAG_CURRENT_UPGRADE_DOMAIN_STATE = 'CurrentUpgradeDomainState';
+ const XTAG_CURRENT_UPGRADE_DOMAIN = 'CurrentUpgradeDomain';
+ const XTAG_ROLE_NAME = 'RoleName';
+ const XTAG_INSTANCE_NAME = 'InstanceName';
+ const XTAG_INSTANCE_STATUS = 'InstanceStatus';
+ const XTAG_INSTANCE_UPGRADE_DOMAIN = 'InstanceUpgradeDomain';
+ const XTAG_INSTANCE_FAULT_DOMAIN = 'InstanceFaultDomain';
+ const XTAG_INSTANCE_SIZE = 'InstanceSize';
+ const XTAG_INSTANCE_STATE_DETAILS = 'InstanceStateDetails';
+ const XTAG_INSTANCE_ERROR_CODE = 'InstanceErrorCode';
+ const XTAG_OS_VERSION = 'OsVersion';
+ const XTAG_ROLE_INSTANCE = 'RoleInstance';
+ const XTAG_ROLE = 'Role';
+ const XTAG_INPUT_ENDPOINT = 'InputEndpoint';
+ const XTAG_VIP = 'Vip';
+ const XTAG_PORT = 'Port';
+ const XTAG_DEPLOYMENT = 'Deployment';
+ const XTAG_DEPLOYMENTS = 'Deployments';
+ const XTAG_REGENERATE_KEYS = 'RegenerateKeys';
+ const XTAG_SWAP = 'Swap';
+ const XTAG_PRODUCTION = 'Production';
+ const XTAG_SOURCE_DEPLOYMENT = 'SourceDeployment';
+ const XTAG_CHANGE_CONFIGURATION = 'ChangeConfiguration';
+ const XTAG_MODE = 'Mode';
+ const XTAG_UPDATE_DEPLOYMENT_STATUS = 'UpdateDeploymentStatus';
+ const XTAG_ROLE_TO_UPGRADE = 'RoleToUpgrade';
+ const XTAG_FORCE = 'Force';
+ const XTAG_UPGRADE_DEPLOYMENT = 'UpgradeDeployment';
+ const XTAG_UPGRADE_DOMAIN = 'UpgradeDomain';
+ const XTAG_WALK_UPGRADE_DOMAIN = 'WalkUpgradeDomain';
+ const XTAG_ROLLBACK_UPDATE_OR_UPGRADE = 'RollbackUpdateOrUpgrade';
// Service Bus
const LIST_TOPICS_PATH = '$Resources/Topics';
@@ -342,6 +413,4 @@ class Resources
const CONNECT_TIMEOUT = 'connect_timeout';
// @codingStandardsIgnoreEnd
-}
-
-
+}
View
83 WindowsAzure/Common/Internal/Utilities.php
@@ -521,6 +521,87 @@ public static function tryGetValueInsensitive($key, $haystack, $default = null)
$array = array_change_key_case($haystack);
return Utilities::tryGetValue($array, strtolower($key), $default);
}
-}
+
+ /**
+ * Returns a string representation of a version 4 GUID, which uses random
+ * numbers.There are 6 reserved bits, and the GUIDs have this format:
+ * xxxxxxxx-xxxx-4xxx-[8|9|a|b]xxx-xxxxxxxxxxxx
+ * where 'x' is a hexadecimal digit, 0-9a-f.
+ *
+ * See http://tools.ietf.org/html/rfc4122 for more information.
+ *
+ * Note: This function is available on all platforms, while the
+ * com_create_guid() is only available for Windows.
+ *
+ * @static
+ *
+ * @return string A new GUID.
+ */
+ public static function getGuid()
+ {
+ return sprintf('%04x%04x-%04x-%04x-%02x%02x-%04x%04x%04x',
+ mt_rand(0, 65535),
+ mt_rand(0, 65535), // 32 bits for "time_low"
+ mt_rand(0, 65535), // 16 bits for "time_mid"
+ mt_rand(0, 4096) + 16384, // 16 bits for "time_hi_and_version", with
+ // the most significant 4 bits being 0100
+ // to indicate randomly generated version
+ mt_rand(0, 64) + 128, // 8 bits for "clock_seq_hi", with
+ // the most significant 2 bits being 10,
+ // required by version 4 GUIDs.
+ mt_rand(0, 256), // 8 bits for "clock_seq_low"
+ mt_rand(0, 65535), // 16 bits for "node 0" and "node 1"
+ mt_rand(0, 65535), // 16 bits for "node 2" and "node 3"
+ mt_rand(0, 65535) // 16 bits for "node 4" and "node 5"
+ );
+ }
+
+ /**
+ * Creates a list of objects of type $class from the provided array using static
+ * create method.
+ *
+ * @param array $parsed The object in array representation
+ * @param string $class The class name. Must have static method create.
+ *
+ * @static
+ *
+ * @return array
+ */
+ public static function createInstanceList($parsed, $class)
+ {
+ $list = array();
+
+ foreach ($parsed as $value) {
+ $list[] = $class::create($value);
+ }
+
+ return $list;
+ }
+
+ /**
+ * Takes a string and return if it ends with the specified character/string.
+ *
+ * @param string $haystack The string to search in.
+ * @param string $needle postfix to match.
+ * @param boolean $ignoreCase Set true to ignore case during the comparison;
+ * otherwise, false
+ *
+ * @static
+ *
+ * @return boolean
+ */
+ public static function endsWith($haystack, $needle, $ignoreCase = false)
+ {
+ if ($ignoreCase) {
+ $haystack = strtolower($haystack);
+ $needle = strtolower($needle);
+ }
+ $length = strlen($needle);
+ if ($length == 0) {
+ return true;
+ }
+ return (substr($haystack, -$length) === $needle);
+ }
+}
View
31 WindowsAzure/ServiceBus/Models/Action.php
@@ -45,13 +45,6 @@ class Action
protected $attributes;
/**
- * The compatibility level.
- *
- * @var string
- */
- private $_compatibilityLevel;
-
- /**
* Creates an Action instance with default parameter.
*/
public function __construct()
@@ -61,28 +54,6 @@ public function __construct()
}
/**
- * Gets the compatibility level.
- *
- * @return string
- */
- public function getCompatibilityLevel()
- {
- return $this->_compatibilityLevel;
- }
-
- /**
- * Sets the compatibility level.
- *
- * @param string $compatibilityLevel The level of compatibility.
- *
- * @return none
- */
- public function setCompatibilityLevel($compatibilityLevel)
- {
- $this->_compatibilityLevel = $compatibilityLevel;
- }
-
- /**
* Gets the attributes.
*
* @return array
@@ -100,7 +71,7 @@ public function getAttributes()
*
* @return none
*/
- public function setAttribute($key, $value)
+ protected function setAttribute($key, $value)
{
$this->attributes[$key] = $value;
}
View
30 WindowsAzure/ServiceBus/Models/Filter.php
@@ -45,13 +45,6 @@ class Filter
protected $attributes;
/**
- * The compatibility level of the filter.
- *
- * @var string
- */
- private $_compatibilityLevel;
-
- /**
* Creates a filter with default parameters.
*/
public function __construct()
@@ -104,31 +97,10 @@ public function getAttributes()
*
* @return none
*/
- public function setAttribute($key, $value)
+ protected function setAttribute($key, $value)
{
$this->attributes[$key] = $value;
}
- /**
- * Gets the compatibility level.
- *
- * @return string
- */
- public function getCompatibilityLevel()
- {
- return $this->_compatibilityLevel;
- }
-
- /**
- * Sets the compatibility level.
- *
- * @param string $compatibilityLevel The compatibility level.
- *
- * @return none
- */
- public function setCompatibilityLevel($compatibilityLevel)
- {
- $this->_compatibilityLevel = $compatibilityLevel;
- }
}
View
12 WindowsAzure/ServiceBus/Models/RuleDescription.php
@@ -117,18 +117,18 @@ public static function create($ruleDescriptionXml)
(string)$filterItemArray['SqlExpression']
);
}
+ if (array_key_exists('CompatibilityLevel', $filterItemArray)) {
+ $filter->setCompatibilityLevel(
+ (integer)$filterItemArray['CompatibilityLevel']
+ );
+ }
+
break;
default :
$filter = new Filter();
}
- if (array_key_exists('CompatibilityLevel', $filterItemArray)) {
- $filter->setCompatibilityLevel(
- (integer)$filterItemArray['CompatibilityLevel']
- );
- }
-
$ruleDescription->setFilter($filter);
}
View
3  WindowsAzure/ServiceBus/Models/RuleInfo.php
@@ -271,7 +271,6 @@ public function withSqlFilter($sqlExpression)
public function withTrueFilter()
{
$filter = new TrueFilter();
- $filter->setCompatibilityLevel(20);
$this->_ruleDescription->setFilter($filter);
}
@@ -283,7 +282,6 @@ public function withTrueFilter()
public function withFalseFilter()
{
$filter = new FalseFilter();
- $filter->setCompatibilityLevel(20);
$this->_ruleDescription->setFilter($filter);
}
@@ -295,7 +293,6 @@ public function withFalseFilter()
public function withEmptyRuleAction()
{
$action = new EmptyRuleAction();
- $action->setCompatibilityLevel(20);
$this->_ruleDescription->setAction($action);
}
View
30 WindowsAzure/ServiceBus/Models/SqlFilter.php
@@ -49,6 +49,14 @@ class SqlFilter extends Filter
private $_sqlExpression;
/**
+ * The compatibility level of the filter.
+ *
+ * @var string
+ */
+ private $_compatibilityLevel;
+
+
+ /**
* Creates a SQL filter with default parameters.
*/
public function __construct()
@@ -80,5 +88,27 @@ public function setSqlExpression($sqlExpression)
$this->_sqlExpression = $sqlExpression;
}
+ /**
+ * Gets the compatibility level.
+ *
+ * @return string
+ */
+ public function getCompatibilityLevel()
+ {
+ return $this->_compatibilityLevel;
+ }
+
+ /**
+ * Sets the compatibility level.
+ *
+ * @param string $compatibilityLevel The compatibility level.
+ *
+ * @return none
+ */
+ public function setCompatibilityLevel($compatibilityLevel)
+ {
+ $this->_compatibilityLevel = $compatibilityLevel;
+ }
+
}
View
29 WindowsAzure/ServiceBus/Models/SqlRuleAction.php
@@ -47,6 +47,13 @@ class SqlRuleAction extends Action
*/
private $_sqlExpression;
+ /**
+ * The compatibility level.
+ *
+ * @var string
+ */
+ private $_compatibilityLevel;
+
/**
* Creates a SQL Rule Action instance with default parameters.
*/
@@ -78,5 +85,27 @@ public function setSqlExpression($sqlExpression)
$this->_sqlExpression = $sqlExpression;
}
+ /**
+ * Gets the compatibility level.
+ *
+ * @return string
+ */
+ public function getCompatibilityLevel()
+ {
+ return $this->_compatibilityLevel;
+ }
+
+ /**
+ * Sets the compatibility level.
+ *
+ * @param string $compatibilityLevel The level of compatibility.
+ *
+ * @return none
+ */
+ public function setCompatibilityLevel($compatibilityLevel)
+ {
+ $this->_compatibilityLevel = $compatibilityLevel;
+ }
+
}
View
381 WindowsAzure/ServiceManagement/Internal/IServiceManagement.php
@@ -41,7 +41,7 @@
/**
* Lists the storage accounts available under the current subscription.
*
- * @return Models\ListStorageServicesResult
+ * @return ListStorageServicesResult
*
* @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460787.aspx
*/
@@ -56,7 +56,7 @@ public function listStorageServices();
*
* @param string $name The storage account name.
*
- * @return Models\GetStorageServicePropertiesResult
+ * @return GetStorageServicePropertiesResult
*
* @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460802.aspx
*/
@@ -68,7 +68,7 @@ public function getStorageServiceProperties($name);
*
* @param string $name The storage account name.
*
- * @return Models\GetStorageServiceKeysResult
+ * @return GetStorageServiceKeysResult
*
* @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460785.aspx
*/
@@ -82,7 +82,7 @@ public function getStorageServiceKeys($name);
* @param string $name The storage account name.
* @param string $keyType Specifies which key to regenerate.
*
- * @return Models\GetStorageServiceKeysResult
+ * @return GetStorageServiceKeysResult
*
* @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460795.aspx
*/
@@ -98,14 +98,14 @@ public function regenerateStorageServiceKeys($name, $keyType);
* in the response for this operation; if successful, it will be
* status code 200 (OK).
*
- * @param string $name The storage account name.
- * @param string $label Name for the storage
+ * @param string $name The storage account name.
+ * @param string $label Name for the storage
* account specified as a base64-encoded string. The name may be up to 100
* characters in length. The name can be used identify the storage account for
* your tracking purposes.
- * @param Models\CreateStorageServiceOptions $options The optional parameters.
+ * @param CreateServiceOptions $options The optional parameters.
*
- * @return Models\AsynchronousOperationResult
+ * @return AsynchronousOperationResult
*
* @see http://msdn.microsoft.com/en-us/library/windowsazure/hh264518.aspx
*/
@@ -126,8 +126,8 @@ public function deleteStorageService($name);
* Updates the label and/or the description for a storage account in Windows
* Azure.
*
- * @param string $name The storage account name.
- * @param Models\UpdateStorageServiceOptions $options The optional parameters.
+ * @param string $name The storage account name.
+ * @param UpdateServiceOptions $options The optional parameters.
*
* @return none
*
@@ -138,7 +138,7 @@ public function updateStorageService($name, $options);
/**
* Lists the affinity groups associated with the specified subscription.
*
- * @return Models\ListAffinityGroupsResult
+ * @return ListAffinityGroupsResult
*
* @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460797.aspx
*/
@@ -147,13 +147,13 @@ public function listAffinityGroups();
/**
* Creates a new affinity group for the specified subscription.
*
- * @param string $name The affinity group name.
- * @param string $label A base-64 encoded name for
+ * @param string $name The affinity group name.
+ * @param string $label A base-64 encoded name for
* the affinity group. The name can be up to 100 characters in length.
- * @param string $location The data center location
+ * @param string $location The data center location
* where the affinity group will be created. To list available locations, use
* the listLocations API.
- * @param Models\CreateAffinityGroupOptions $options The optional parameters.
+ * @param CreateAffinityGroupOptions $options The optional parameters.
*
* @return none
*
@@ -176,9 +176,9 @@ public function deleteAffinityGroup($name);
* Updates the label and/or the description for an affinity group for the
* specified subscription.
*
- * @param string $name The affinity group name.
- * @param string $label The affinity group label.
- * @param Models\CreateAffinityGroupOptions $options The optional parameters.
+ * @param string $name The affinity group name.
+ * @param string $label The affinity group label.
+ * @param CreateAffinityGroupOptions $options The optional parameters.
*
* @return none
*
@@ -191,7 +191,7 @@ public function updateAffinityGroup($name, $label, $options = null);
*
* @param string $name The affinity group name.
*
- * @return Models\GetAffinityGroupPropertiesResult
+ * @return GetAffinityGroupPropertiesResult
*
* @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460789.aspx
*/
@@ -200,7 +200,7 @@ public function getAffinityGroupProperties($name);
/**
* Lists all of the data center locations that are valid for your subscription.
*
- * @return Models\ListLocationsResult
+ * @return ListLocationsResult
*
* @see http://msdn.microsoft.com/en-us/library/windowsazure/gg441293.aspx
*/
@@ -211,13 +211,342 @@ public function listLocations();
* operation, you can call Get Operation Status to determine whether the
* operation has succeeded, failed, or is still in progress.
*
- * @param string $requestId The request ID for the request you wish to track.
+ * @param AsynchronousOperationResult $requestInfo The request information for
+ * the REST call you want to track.
*
- * @return Models\GetOperationStatusResult
+ * @return GetOperationStatusResult
*
* @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460783.aspx
*/
- public function getOperationStatus($requestId);
-}
-
-
+ public function getOperationStatus($requestInfo);
+
+ /**
+ * Lists the hosted services available under the current subscription.
+ *
+ * @return ListHostedServicesResult
+ *
+ * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460781.aspx
+ */
+ public function listHostedServices();
+
+ /**
+ * Creates a new hosted service in Windows Azure.
+ *
+ * @param string $name The name for the hosted service
+ * that is unique within Windows Azure. This name is the DNS prefix name and can
+ * be used to access the hosted service.
+ * @param string $label The name for the hosted service
+ * that is base-64 encoded. The name can be used identify the storage account for
+ * your tracking purposes.
+ * @param CreateServiceOptions $options The optional parameters.
+ *
+ * @return none
+ *
+ * @see http://msdn.microsoft.com/en-us/library/windowsazure/gg441304.aspx
+ */
+ public function createHostedService($name, $label, $options);
+
+ /**
+ * updates the label and/or the description for a hosted service in Windows
+ * Azure.
+ *
+ * @param string $name The name for the hosted service that is
+ * unique within Windows Azure.
+ * @param UpdateServiceOptions $options The optional parameters.
+ *
+ * @return none
+ *
+ * @see http://msdn.microsoft.com/en-us/library/windowsazure/gg441303.aspx
+ */
+ public function updateHostedService($name, $options);
+
+ /**
+ * Deletes the specified hosted service from Windows Azure.
+ *
+ * Before you can delete a hosted service, you must delete any deployments it
+ * has. Attempting to delete a hosted service that has deployments results in
+ * an error. You can call the deleteDeployment API to delete a hosted service's
+ * deployments.
+ *
+ * @param string $name The name for the hosted service.
+ *
+ * @return none
+ *
+ * @see http://msdn.microsoft.com/en-us/library/windowsazure/gg441305.aspx
+ */
+ public function deleteHostedService($name);
+
+ /**
+ * Retrieves system properties for the specified hosted service. These properties
+ * include the service name and service type; the name of the affinity group to
+ * which the service belongs, or its location if it is not part of an affinity
+ * group; and optionally, information on the service's deployments.
+ *
+ * @param string $name The name for the hosted
+ * service.
+ * @param GetHostedServicePropertiesOptions $options The optional parameters.
+ *
+ * @return GetHostedServicePropertiesResult
+ *
+ * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460806.aspx
+ */
+ public function getHostedServiceProperties($name, $options = null);
+
+ /**
+ * Uploads a new service package and creates a new deployment on staging or
+ * production.
+ *
+ * The createDeployment API is an asynchronous operation. To determine whether
+ * the management service has finished processing the request, call
+ * getOperationStatus API.
+ *
+ * @param string $name The name for the hosted service
+ * that is unique within Windows Azure.
+ * @param string $deploymentName The name for the deployment.
+ * The deployment name must be unique among other deployments for the hosted
+ * service.
+ * @param string $slot The name of the deployment slot
+ * This can be "production" or "staging".
+ * @param string $packageUrl The URL that refers to the
+ * location of the service package in the Blob service. The service package can
+ * be located in a storage account beneath the same subscription.
+ * @param string $configuration The base-64 encoded service
+ * configuration file for the deployment.
+ * @param string $label The name for the hosted service
+ * that is base-64 encoded. The name can be up to 100 characters in length. It is
+ * recommended that the label be unique within the subscription. The name can be
+ * used identify the hosted service for your tracking purposes.
+ * @param CreateDeploymentOptions $options The optional parameters.
+ *
+ * @return AsynchronousOperationResult
+ *
+ * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460813.aspx
+ */
+ public function createDeployment(
+ $name,
+ $deploymentName,
+ $slot,
+ $packageUrl,
+ $configuration,
+ $label,
+ $options = null
+ );
+
+ /**
+ * Returns configuration information, status, and system properties for a
+ * deployment.
+ *
+ * The getDeployment API can be used to retrieve information for a specific
+ * deployment or for all deployments in the staging or production environment.
+ * If you want to retrieve information about a specific deployment, you must
+ * first get the unique name for the deployment. This unique name is part of the
+ * response when you make a request to get all deployments in an environment.
+ *
+ * @param string $name The hosted service name.
+ * @param GetDeploymentOptions $options The optional parameters.
+ *
+ * @return GetDeploymentResult
+ *
+ * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460804.aspx
+ */
+ public function getDeployment($name, $options);
+
+ /**
+ * Initiates a virtual IP swap between the staging and production deployment
+ * environments for a service. If the service is currently running in the staging
+ * environment, it will be swapped to the production environment. If it is
+ * running in the production environment, it will be swapped to staging.
+ *
+ * You can swap VIPs only if the number of endpoints specified by the service
+ * definition is identical for both deployments. For example, if you add an HTTPS
+ * endpoint to a web role that previously exposed only an HTTP endpoint, you
+ * cannot upgrade your service using a VIP swap; you must delete your production
+ * deployment and redeploy instead. You can obtain information about endpoints
+ * that are used by using the Get Deployment operation.
+ *
+ * @param string $name The hosted service name.
+ * @param string $source The name of the source deployment.
+ * @param string $destination The name of the destination deployment.
+ *
+ * @return AsynchronousOperationResult
+ *
+ * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460814.aspx
+ */
+ public function swapDeployment($name, $source, $destination);
+
+ /**
+ * Deletes the specified deployment.
+ *
+ * Note that you can delete a deployment either by specifying the deployment
+ * environment (staging or production), or by specifying the deployment's unique
+ * name.
+ *
+ * @param string $name The hosted service name.
+ * @param GetDeploymentOptions $options The optional parameters.
+ *
+ * @return AsynchronousOperationResult
+ *
+ * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460815.aspx
+ */
+ public function deleteDeployment($name, $options);
+
+ /**
+ * Initiates a change to the deployment configuration.
+ *
+ * Note that you can change a deployment's configuration either by specifying the
+ * deployment environment (staging or production), or by specifying the
+ * deployment's unique name.
+ *
+ * @param string $name The hosted service
+ * name.
+ * @param string|resource $configuration The configuration
+ * file contents or file stream,
+ * @param ChangeDeploymentConfigurationOptions $options The optional
+ * parameters.
+ *
+ * @return AsynchronousOperationResult
+ *
+ * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460809.aspx
+ */
+ public function changeDeploymentConfiguration($name, $configuration, $options);
+
+ /**
+ * Initiates a change in deployment status.
+ *
+ * Note that you can change deployment status either by specifying the deployment
+ * environment (staging or production), or by specifying the deployment's unique
+ * name.
+ *
+ * @param string $name The hosted service name.
+ * @param string $status The change to initiate to the
+ * deployment status.
+ * Possible values include Running or Suspended.
+ * @param GetDeploymentOptions $options The optional parameters.
+ *
+ * @return AsynchronousOperationResult
+ *
+ * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460808.aspx
+ */
+ public function updateDeploymentStatus($name, $status, $options);
+
+ /**
+ * Initiates an upgrade to a deployment.
+ *
+ * Note that you can upgrade a deployment either by specifying the deployment
+ * environment (staging or production), or by specifying the deployment's unique
+ * name.
+ *
+ * @param string $name The hosted service name.
+ * @param string $mode The type of upgrade to initiate
+ * If not specified the default value is Auto. If set to Manual,
+ * walkUpgradeDomain API must be called to apply the update. If set to Auto, the
+ * Windows Azure platform will automatically apply the update to each Upgrade
+ * Domain in sequence.
+ * @param string $packageUrl The URL that refers to the
+ * location of the service package in the Blob service. The service package can
+ * be located in a storage account beneath the same subscription.
+ * @param string $configuration The base-64 encoded service
+ * configuration file for the deployment.
+ * @param string $label The name for the hosted service
+ * that is base-64 encoded. The name may be up to 100 characters in length.
+ * @param boolean $force Specifies whether the rollback
+ * should proceed even when it will cause local data to be lost from some role
+ * instances. True if the rollback should proceed; otherwise false if the
+ * rollback should fail.
+ * @param UpgradeDeploymentOptions $options The optional parameters.
+ *
+ * @return AsynchronousOperationResult
+ *
+ * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460793.aspx
+ */
+ public function upgradeDeployment(
+ $name,
+ $mode,
+ $packageUrl,
+ $configuration,
+ $label,
+ $force,
+ $options
+ );
+
+ /**
+ * Specifies the next upgrade domain to be walked during manual in-place upgrade
+ * or configuration change.
+ *
+ * Note that you can walk an upgrade domain either by specifying the deployment
+ * environment (staging or production), or by specifying the deployment's unique
+ * name.
+ *
+ * @param string $name The hosted service name.
+ * @param integer $upgradeDomain The integer value that
+ * identifies the upgrade domain to walk. Upgrade domains are identified with a
+ * zero-based index: the first upgrade domain has an ID of 0, the second has an
+ * ID of 1, and so on.
+ * @param GetDeploymentOptions $options The optional parameters.
+ *
+ * @return AsynchronousOperationResult
+ *
+ * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460800.aspx
+ */
+ public function walkUpgradeDomain($name, $upgradeDomain, $options);
+
+ /**
+ * Requests a reboot of a role instance that is running in a deployment.
+ *
+ * Note that you can reboot role instance either by specifying the deployment
+ * environment (staging or production), or by specifying the deployment's unique
+ * name.
+ *
+ * @param string $name The hosted service name.
+ * @param string $roleName The role instance name.
+ * @param GetDeploymentOptions $options The optional parameters.
+ *
+ * @return AsynchronousOperationResult
+ *
+ * @see http://msdn.microsoft.com/en-us/library/windowsazure/gg441298.aspx
+ */
+ public function rebootRoleInstance($name, $roleName, $options);
+
+ /**
+ * Requests a reimage of a role instance that is running in a deployment.
+ *
+ * Note that you can reimage role instance either by specifying the deployment
+ * environment (staging or production), or by specifying the deployment's unique
+ * name.
+ *
+ * @param string $name The hosted service name.
+ * @param string $roleName The role instance name.
+ * @param GetDeploymentOptions $options The optional parameters.
+ *
+ * @return AsynchronousOperationResult
+ *
+ * @see http://msdn.microsoft.com/en-us/library/windowsazure/gg441292.aspx
+ */
+ public function reimageRoleInstance($name, $roleName, $options);
+
+ /**
+ * Cancels an in progress configuration change (update) or upgrade and returns
+ * the deployment to its state before the upgrade or configuration change was
+ * started.
+ *
+ * Note that you can rollback update or upgrade either by specifying the
+ * deployment environment (staging or production), or by specifying the
+ * deployment's unique name.
+ *
+ * @param string $name The hosted service name.
+ * @param string $mode Specifies whether the rollback
+ * should proceed automatically or not. Auto, The rollback proceeds without
+ * further user input. Manual, You must call the walkUpgradeDomain API to apply
+ * the rollback to each upgrade domain.
+ * @param boolean $force Specifies whether the rollback
+ * should proceed even when it will cause local data to be lost from some role
+ * instances. True if the rollback should proceed; otherwise false if the
+ * rollback should fail.
+ * @param GetDeploymentOptions $options The optional parameters.
+ *
+ * @return none
+ *
+ * @see http://msdn.microsoft.com/en-us/library/windowsazure/hh403977.aspx
+ */
+ public function rollbackUpdateOrUpgrade($name, $mode, $force, $options);
+}
View
44 WindowsAzure/ServiceManagement/Models/Service.php → WindowsAzure/ServiceManagement/Internal/Service.php
@@ -15,14 +15,14 @@
* PHP version 5
*
* @category Microsoft
- * @package WindowsAzure\ServiceManagement\Models
+ * @package WindowsAzure\ServiceManagement\Internal
* @author Azure PHP SDK <azurephpsdk@microsoft.com>
* @copyright 2012 Microsoft Corporation
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
* @link https://github.com/windowsazure/azure-sdk-for-php
*/
-namespace WindowsAzure\ServiceManagement\Models;
+namespace WindowsAzure\ServiceManagement\Internal;
use WindowsAzure\Common\Internal\Resources;
use WindowsAzure\Common\Internal\Utilities;
use WindowsAzure\Common\Internal\Serialization\XmlSerializer;
@@ -31,7 +31,7 @@
* Windows Azure service basic elements.
*
* @category Microsoft
- * @package WindowsAzure\ServiceManagement\Models
+ * @package WindowsAzure\ServiceManagement\Internal
* @author Azure PHP SDK <azurephpsdk@microsoft.com>
* @copyright 2012 Microsoft Corporation
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
@@ -68,15 +68,35 @@ class Service
/**
* Creates Service object from the given raw array.
*
- * @param array $raw The service members in array representation.
+ * @param array $sources The list of sources that has the row XML.
*/
- public function __construct($raw = null)
+ public function __construct($sources = array())
{
- $this->setLabel(Utilities::tryGetValue($raw, Resources::XTAG_LABEL));
- $this->setLocation(Utilities::tryGetValue($raw, Resources::XTAG_LOCATION));
- $this->setDescription(
- Utilities::tryGetValue($raw, Resources::XTAG_DESCRIPTION)
- );
+ foreach ($sources as $source) {
+ $this->setLabel(
+ Utilities::tryGetValue(
+ $source,
+ Resources::XTAG_LABEL,
+ $this->getLabel()
+ )
+ );
+
+ $this->setLocation(
+ Utilities::tryGetValue(
+ $source,
+ Resources::XTAG_LOCATION,
+ $this->getLocation()
+ )
+ );
+
+ $this->setDescription(
+ Utilities::tryGetValue(
+ $source,
+ Resources::XTAG_DESCRIPTION,
+ $this->getDescription()
+ )
+ );
+ }
}
/**
@@ -244,6 +264,4 @@ public function serialize($serializer)
return $serialized;
}
-}
-
-
+}
View
151 WindowsAzure/ServiceManagement/Internal/WindowsAzureService.php
@@ -0,0 +1,151 @@
+<?php
+
+/**
+ * LICENSE: Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP version 5
+ *
+ * @category Microsoft
+ * @package WindowsAzure\ServiceManagement\Internal
+ * @author Azure PHP SDK <azurephpsdk@microsoft.com>
+ * @copyright 2012 Microsoft Corporation
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
+ * @link https://github.com/windowsazure/azure-sdk-for-php
+ */
+
+namespace WindowsAzure\ServiceManagement\Internal;
+use WindowsAzure\Common\Internal\Resources;
+use WindowsAzure\Common\Internal\Utilities;
+
+/**
+ * Base class for all windows azure provided services.
+ *
+ * @category Microsoft
+ * @package WindowsAzure\ServiceManagement\Internal
+ * @author Azure PHP SDK <azurephpsdk@microsoft.com>
+ * @copyright 2012 Microsoft Corporation
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
+ * @version Release: @package_version@
+ * @link https://github.com/windowsazure/azure-sdk-for-php
+ */
+class WindowsAzureService extends Service
+{
+ /**
+ * @var string
+ */
+ private $_affinityGroup;
+
+ /**
+ * @var string
+ */
+ private $_url;
+
+ /**
+ * Constructs new storage service object.
+ *
+ * @param array $sources The list of sources that has the row XML.
+ */
+ public function __construct($sources = array())
+ {
+ parent::__construct($sources);
+
+ foreach ($sources as $source) {
+ $this->setName(
+ Utilities::tryGetValue(
+ $source,
+ Resources::XTAG_SERVICE_NAME,
+ $this->getName()
+ )
+ );
+
+ $this->setAffinityGroup(
+ Utilities::tryGetValue(
+ $source,
+ Resources::XTAG_AFFINITY_GROUP,
+ $this->getAffinityGroup()
+ )
+ );
+
+ $this->setUrl(
+ Utilities::tryGetValue(
+ $source,
+ Resources::XTAG_URL,
+ $this->getUrl()
+ )
+ );
+ }
+ }
+
+ /**
+ * Gets the affinityGroup name.
+ *
+ * @return string
+ */
+ public function getAffinityGroup()
+ {
+ return $this->_affinityGroup;
+ }
+
+ /**
+ * Sets the affinityGroup name.
+ *
+ * @param string $affinityGroup The affinityGroup name.
+ *
+ * @return none
+ */
+ public function setAffinityGroup($affinityGroup)
+ {
+ $this->_affinityGroup = $affinityGroup;
+ }
+
+ /**
+ * Gets the url name.
+ *
+ * @return string
+ */
+ public function getUrl()
+ {
+ return $this->_url;
+ }
+
+ /**
+ * Sets the url name.
+ *
+ * @param string $url The url name.
+ *
+ * @return none
+ */
+ public function setUrl($url)
+ {
+ $this->_url = $url;
+ }
+
+ /**
+ * Converts the current object into ordered array representation.
+ *
+ * @return array
+ */
+ protected function toArray()
+ {
+ $arr = parent::toArray();
+ Utilities::addIfNotEmpty(
+ Resources::XTAG_SERVICE_NAME, $this->getName(),
+ $arr
+ );
+ Utilities::addIfNotEmpty(
+ Resources::XTAG_AFFINITY_GROUP, $this->getAffinityGroup(),
+ $arr
+ );
+
+ return $arr;
+ }
+}
View
19 WindowsAzure/ServiceManagement/Models/AffinityGroup.php
@@ -25,6 +25,7 @@
namespace WindowsAzure\ServiceManagement\Models;
use WindowsAzure\Common\Internal\Resources;
use WindowsAzure\Common\Internal\Utilities;
+use WindowsAzure\ServiceManagement\Internal\Service;
/**
* The affinity group class.
@@ -41,13 +42,21 @@ class AffinityGroup extends Service
{
/**
* Constructs new affinity group object.
- *
- * @param array $raw The array representation for affinity group.
*/
- public function __construct($raw = null)
+ public function __construct()
{
- parent::__construct($raw);
- $this->setName(Utilities::tryGetValue($raw, Resources::XTAG_NAME));
+ $sources = func_get_args();
+ parent::__construct($sources);
+
+ foreach ($sources as $source) {
+ $this->setName(
+ Utilities::tryGetValue(
+ $source,
+ Resources::XTAG_NAME,
+ $this->getName()
+ )
+ );
+ }
}
/**
View
124 WindowsAzure/ServiceManagement/Models/ChangeDeploymentConfigurationOptions.php
@@ -0,0 +1,124 @@
+<?php
+
+/**
+ * LICENSE: Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP version 5
+ *
+ * @category Microsoft
+ * @package WindowsAzure\ServiceManagement\Models
+ * @author Azure PHP SDK <azurephpsdk@microsoft.com>
+ * @copyright 2012 Microsoft Corporation
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
+ * @link https://github.com/windowsazure/azure-sdk-for-php
+ */
+
+namespace WindowsAzure\ServiceManagement\Models;
+use WindowsAzure\Common\Internal\Validate;
+use WindowsAzure\Common\Internal\Resources;
+
+/**
+ * The optional parameters for changeDeploymentConfiguration API.
+ *
+ * @category Microsoft
+ * @package WindowsAzure\ServiceManagement\Models
+ * @author Azure PHP SDK <azurephpsdk@microsoft.com>
+ * @copyright 2012 Microsoft Corporation
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
+ * @version Release: @package_version@
+ * @link https://github.com/windowsazure/azure-sdk-for-php
+ */
+class ChangeDeploymentConfigurationOptions extends GetDeploymentOptions
+{
+ /**
+ * Indicates whether to treat package validation warnings as errors.
+ *
+ * @var boolean
+ */
+ private $_treatWarningsAsErrors;
+
+ /**
+ * If not specified the default value is Auto. If set to Manual,
+ * WalkUpgradeDomain must be called to apply the update. If set to Auto, the
+ * Windows Azure platform will automatically apply the update To each upgrade
+ * domain for the service.
+ *
+ * @var string
+ */
+ private $_mode;
+
+ /**
+ * Constructs new ChangeDeploymentConfigurationOptions instance.
+ */
+ public function __construct()
+ {
+ $this->_treatWarningsAsErrors = false;
+ }
+
+ /**
+ * Gets treat warnings as errors flag.
+ *
+ * If not specified the default value is false. If set to true, the update will
+ * be blocked when warnings are encountered.
+ *
+ * @return boolean
+ */
+ public function getTreatWarningsAsErrors()
+ {
+ return $this->_treatWarningsAsErrors;
+ }
+
+ /**
+ * Sets treat warnings as errors flag.
+ *
+ * @param boolean $treatWarningsAsErrors Indicates whether to treat package
+ * validation warnings as errors.
+ *
+ * @return none
+ */
+ public function setTreatWarningsAsErrors($treatWarningsAsErrors)
+ {
+ Validate::isBoolean($treatWarningsAsErrors, 'treatWarningsAsErrors');
+
+ $this->_treatWarningsAsErrors = $treatWarningsAsErrors;
+ }
+
+ /**
+ * Gets change mode.
+ *
+ * If not specified the default value is Auto. If set to Manual,
+ * WalkUpgradeDomain must be called to apply the update. If set to Auto, the
+ * Windows Azure platform will automatically apply the update To each upgrade
+ * domain for the service.
+ *
+ * @return string
+ */
+ public function getMode()
+ {
+ return $this->_mode;
+ }
+
+ /**
+ * Sets mode.
+ *
+ * @param string $mode The change mode.
+ *
+ * @return none
+ */
+ public function setMode($mode)
+ {
+ Validate::isString($mode, 'mode');
+ Validate::isTrue(Mode::isValid($mode), Resources::INVALID_CHANGE_MODE_MSG);
+
+ $this->_mode = $mode;
+ }
+}
View
113 WindowsAzure/ServiceManagement/Models/CreateDeploymentOptions.php
@@ -0,0 +1,113 @@
+<?php
+
+/**
+ * LICENSE: Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP version 5
+ *
+ * @category Microsoft
+ * @package WindowsAzure\ServiceManagement\Models
+ * @author Azure PHP SDK <azurephpsdk@microsoft.com>
+ * @copyright 2012 Microsoft Corporation
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
+ * @link https://github.com/windowsazure/azure-sdk-for-php
+ */
+
+namespace WindowsAzure\ServiceManagement\Models;
+use WindowsAzure\Common\Internal\Validate;
+
+/**
+ * The optional parameters for createDeployment API.
+ *
+ * @category Microsoft
+ * @package WindowsAzure\ServiceManagement\Models
+ * @author Azure PHP SDK <azurephpsdk@microsoft.com>
+ * @copyright 2012 Microsoft Corporation
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
+ * @version Release: @package_version@
+ * @link https://github.com/windowsazure/azure-sdk-for-php
+ */
+class CreateDeploymentOptions
+{
+ /**
+ * Indicates whether to start the deployment immediately after it is created.
+ *
+ * @var boolean
+ */
+ private $_startDeployment;
+
+ /**
+ * Indicates whether to treat package validation warnings as errors.
+ *
+ * @var boolean
+ */
+ private $_treatWarningsAsErrors;
+
+ /**
+ * Constructs new CreateDeploymentOptions instance.
+ */
+ public function __construct()
+ {
+ $this->_startDeployment = false;
+ $this->_treatWarningsAsErrors = false;
+ }
+
+ /**
+ * Gets start deployment flag.
+ *
+ * @return boolean
+ */
+ public function getStartDeployment()
+ {
+ return $this->_startDeployment;
+ }
+
+ /**
+ * Sets start deployment flag.
+ *
+ * @param boolean $startDeployment Indicates whether to start the deployment
+ * immediately after it is created.
+ *
+ * @return none
+ */
+ public function setStartDeployment($startDeployment)
+ {
+ Validate::isBoolean($startDeployment, 'startDeployment');
+
+ $this->_startDeployment = $startDeployment;
+ }
+
+ /**
+ * Gets treat warnings as errors flag.
+ *
+ * @return boolean
+ */
+ public function getTreatWarningsAsErrors()
+ {
+ return $this->_treatWarningsAsErrors;
+ }
+
+ /**
+ * Sets treat warnings as errors flag.
+ *
+ * @param boolean $treatWarningsAsErrors Indicates whether to treat package
+ * validation warnings as errors.
+ *
+ * @return none
+ */
+ public function setTreatWarningsAsErrors($treatWarningsAsErrors)
+ {
+ Validate::isBoolean($treatWarningsAsErrors, 'treatWarningsAsErrors');
+
+ $this->_treatWarningsAsErrors = $treatWarningsAsErrors;
+ }
+}
View
2  ...Management/Models/CreateStorageServiceOptions.php → ...ServiceManagement/Models/CreateServiceOptions.php
@@ -36,7 +36,7 @@
* @version Release: @package_version@
* @link https://github.com/windowsazure/azure-sdk-for-php
*/
-class CreateStorageServiceOptions
+class CreateServiceOptions
{
/**
* @var string
View
560 WindowsAzure/ServiceManagement/Models/Deployment.php
@@ -0,0 +1,560 @@
+<?php
+
+/**
+ * LICENSE: Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * PHP version 5
+ *
+ * @category Microsoft
+ * @package WindowsAzure\ServiceManagement\Models
+ * @author Azure PHP SDK <azurephpsdk@microsoft.com>
+ * @copyright 2012 Microsoft Corporation
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
+ * @link https://github.com/windowsazure/azure-sdk-for-php
+ */
+
+namespace WindowsAzure\ServiceManagement\Models;
+use WindowsAzure\Common\Internal\Resources;
+use WindowsAzure\Common\Internal\Utilities;
+
+/**
+ * Represents a Windows Azure deployment.
+ *
+ * @category Microsoft
+ * @package WindowsAzure\ServiceManagement\Models
+ * @author Azure PHP SDK <azurephpsdk@microsoft.com>
+ * @copyright 2012 Microsoft Corporation
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
+ * @version Release: @package_version@
+ * @link https://github.com/windowsazure/azure-sdk-for-php
+ */
+class Deployment
+{
+ /**
+ * @var string
+ */
+ private $_name;
+
+ /**
+ * @var string
+ */
+ private $_slot;
+
+ /**
+ * @var string
+ */
+ private $_privateId;
+
+ /**
+ * @var string
+ */
+ private $_status;
+
+ /**
+ * @var string
+ */
+ private $_label;
+
+ /**
+ * @var string
+ */
+ private $_configuration;
+
+ /**
+ * @var array
+ */
+ private $_roleInstanceList;
+
+ /**
+ * @var integer
+ */
+ private $_upgradeDomainCount;
+
+ /**
+ * @var array
+ */
+ private $_roleList;
+
+ /**
+ * @var string
+ */
+ private $_sdkVersion;
+
+ /**
+ * @var array
+ */
+ private $_inputEndpointList;
+
+ /**
+ * @var boolean
+ */
+ private $_locked;
+
+ /**
+ * @var boolean
+ */
+ private $_rollbackAllowed;
+
+ /**
+ * @var UpgradeStatus
+ */
+ private $_upgradeStatus;
+
+ /**
+ * Creates a new Deployment from parsed response body.
+ *
+ * @param array $parsed The parsed response body in array representation.
+ *
+ * @return Deployment
+ */
+ public static function create($parsed)
+ {
+ $result = new Deployment();
+ $name = Utilities::tryGetValue($parsed, Resources::XTAG_NAME);
+ $label = Utilities::tryGetValue($parsed, Resources::XTAG_LABEL);
+ $url = Utilities::tryGetValue($parsed, Resources::XTAG_URL);
+ $locked = Utilities::tryGetValue(
+ $parsed,
+ Resources::XTAG_LOCKED
+ );
+ $rollbackAllowed = Utilities::tryGetValue(
+ $parsed,
+ Resources::XTAG_ROLLBACK_ALLOWED
+ );
+ $sdkVersion = Utilities::tryGetValue(
+ $parsed,
+ Resources::XTAG_SDK_VERSION
+ );
+ $inputEndpointList = Utilities::tryGetKeysChainValue(
+ $parsed,
+ Resources::XTAG_INPUT_ENDPOINT_LIST,
+ Resources::XTAG_INPUT_ENDPOINT
+ );
+ $roleList = Utilities::tryGetKeysChainValue(
+ $parsed,
+ Resources::XTAG_ROLE_LIST,
+ Resources::XTAG_ROLE
+ );
+ $roleInstanceList = Utilities::tryGetKeysChainValue(
+ $parsed,
+ Resources::XTAG_ROLE_INSTANCE_LIST,
+ Resources::XTAG_ROLE_INSTANCE
+ );
+ $status = Utilities::tryGetValue(
+ $parsed,
+ Resources::XTAG_STATUS
+ );
+ $slot = Utilities::tryGetValue(
+ $parsed,
+ Resources::XTAG_DEPLOYMENT_SLOT
+ );
+ $privateId = Utilities::tryGetValue(
+ $parsed,
+ Resources::XTAG_PRIVATE_ID
+ );
+ $configuration = Utilities::tryGetValue(
+ $parsed,
+ Resources::XTAG_CONFIGURATION
+ );
+ $upgradeDomainCount = Utilities::tryGetValue(
+ $parsed,
+ Resources::XTAG_UPGRADE_DOMAIN_COUNT
+ );
+ $upgradeStatus = Utilities::tryGetArray(
+ Resources::XTAG_UPGRADE_STATUS,
+ $parsed
+ );
+
+ $result->setConfiguration($configuration);
+ $result->setLabel($label);
+ $result->setLocked(Utilities::toBoolean($locked));
+ $result->setName($name);
+ $result->setPrivateId($privateId);
+ $result->setRollbackAllowed(Utilities::toBoolean($rollbackAllowed));
+ $result->setSdkVersion($sdkVersion);
+ $result->setSlot($slot);
+ $result->setStatus($status);
+ $result->setUpgradeDomainCount(intval($upgradeDomainCount));
+ $result->setUpgradeStatus(UpgradeStatus::create($upgradeStatus));
+ $result->setUrl($url);
+ $result->setRoleInstanceList(
+ Utilities::createInstanceList(
+ Utilities::getArray($roleInstanceList),
+ 'WindowsAzure\ServiceManagement\Models\RoleInstance'
+ )
+ );
+ $result->setRoleList(
+ Utilities::createInstanceList(
+ Utilities::getArray($roleList),
+ 'WindowsAzure\ServiceManagement\Models\Role'
+ )
+ );
+ $result->setInputEndpointList(
+ Utilities::createInstanceList(
+ Utilities::getArray($inputEndpointList),
+ 'WindowsAzure\ServiceManagement\Models\InputEndpoint'
+ )
+ );
+
+ return $result;
+ }
+
+ /**
+ * Gets the deployment name.
+ *
+ * The user-supplied name for this deployment.
+ *
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->_name;
+ }
+
+ /**
+ * Sets the deployment name.
+ *
+ * @param string $name The deployment name.
+ *
+ * @return none
+ */
+ public function setName($name)
+ {
+ $this->_name = $name;
+ }
+
+ /**
+ * Gets the deployment slot.
+ *
+ * The environment to which the hosted service is deployed, either staging or
+ * production.
+ *
+ * @return string
+ */
+ public function getSlot()
+ {
+ return $this->_slot;
+ }
+
+ /**
+ * Sets the deployment slot.
+ *
+ * @param string $slot The deployment slot.
+ *
+ * @return none
+ */
+ public function setSlot($slot)
+ {
+ $this->_slot = $slot;
+ }
+
+ /**
+ * Gets the deployment label.
+ *
+ * The user-supplied name of the deployment returned as a base-64 encoded string.
+ * This name can be used identify the deployment for your tracking purposes.
+ *
+ * @return string
+ */
+ public function getLabel()
+ {
+ return $this->_label;
+ }
+
+ /**
+ * Sets the deployment label.
+ *
+ * @param string $label The deployment label.
+ *
+ * @return none
+ */
+ public function setLabel($label)
+ {
+ $this->_label = $label;
+ }
+
+ /**
+ * Gets the deployment private Id.
+ *
+ * A unique identifier generated internally by Windows Azure for this deployment.
+ *
+ * @return string
+ */
+ public function getPrivateId()
+ {
+ return $this->_privateId;
+ }
+
+ /**
+ * Sets the deployment private Id.
+ *
+ * @param string $privateId The deployment privateId.
+ *
+ * @return none
+ */
+ public function setPrivateId($privateId)
+ {
+ $this->_privateId = $privateId;
+ }
+
+ /**
+ * Gets the deployment status.
+ *
+ * The status of the deployment. Possible values are: Running, Suspended,
+ * RunningTransitioning, SuspendedTransitioning, Starting, Suspending, Deploying,
+ * Deploying.
+ *
+ * @return string
+ */
+ public function getStatus()
+ {
+ return $this->_status;
+ }
+
+ /**
+ * Sets the deployment status.
+ *
+ * @param string $status The deployment status.
+ *
+ * @return none
+ */
+ public function setStatus($status)
+ {
+