Update npm to a valid version
This commit is contained in:
Родитель
75802486cf
Коммит
306ac73053
|
@ -4,14 +4,13 @@ node_js:
|
|||
- "0.10"
|
||||
- "0.8"
|
||||
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- node_js: "0.11"
|
||||
|
||||
# setup links to submodules
|
||||
before_install:
|
||||
- npm update -g npm
|
||||
- npm install -g npm@1.4.23
|
||||
- npm run-script setup
|
||||
- npm install
|
||||
- cd ..
|
||||
|
@ -20,7 +19,7 @@ before_install:
|
|||
- git checkout dev
|
||||
- node scripts/link-to-sdk.js
|
||||
- npm install
|
||||
|
||||
|
||||
script:
|
||||
- cd ../azure-sdk-for-node
|
||||
- npm test
|
||||
|
|
|
@ -55,6 +55,7 @@ module.exports = function(grunt) {
|
|||
destDir: 'lib/services/management/lib',
|
||||
output: 'ManagementClient.js'
|
||||
},
|
||||
/*
|
||||
'Microsoft.WindowsAzure.Management.Monitoring.Specification.dll' : [
|
||||
{
|
||||
clientType: 'Microsoft.WindowsAzure.Management.Monitoring.Alerts.AlertsClient',
|
||||
|
@ -77,6 +78,7 @@ module.exports = function(grunt) {
|
|||
output: 'eventsClient.js'
|
||||
}
|
||||
],
|
||||
*/
|
||||
'Microsoft.WindowsAzure.Management.Network.Specification.dll' : {
|
||||
clientType: 'Microsoft.WindowsAzure.Management.Network.NetworkManagementClient',
|
||||
destDir: 'lib/services/networkManagement/lib',
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -118,7 +118,7 @@ var ItemOperations = ( /** @lends ItemOperations */ function() {
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = '/Microsoft.Gallery/galleryitems/' + (itemIdentity ? itemIdentity.trim() : '');
|
||||
var url2 = '/Microsoft.Gallery/galleryitems/' + (itemIdentity !== null && itemIdentity !== undefined ? itemIdentity.trim() : '');
|
||||
var baseUrl = this.client.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
if (baseUrl[baseUrl.length - 1] === '/') {
|
||||
|
@ -137,11 +137,11 @@ var ItemOperations = ( /** @lends ItemOperations */ function() {
|
|||
httpRequest.url = url2;
|
||||
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json';
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -161,83 +161,83 @@ var ItemOperations = ( /** @lends ItemOperations */ function() {
|
|||
responseDoc = JSON.parse(responseContent);
|
||||
}
|
||||
|
||||
if (responseDoc) {
|
||||
if (responseDoc !== null && responseDoc !== undefined) {
|
||||
var itemInstance = { categoryIds: [], iconFileUrls: {}, screenshotUrls: [] };
|
||||
result.item = itemInstance;
|
||||
|
||||
var identityValue = responseDoc['identity'];
|
||||
if (identityValue) {
|
||||
if (identityValue !== null && identityValue !== undefined) {
|
||||
var identityInstance = identityValue;
|
||||
itemInstance.identity = identityInstance;
|
||||
}
|
||||
|
||||
var itemNameValue = responseDoc['itemName'];
|
||||
if (itemNameValue) {
|
||||
if (itemNameValue !== null && itemNameValue !== undefined) {
|
||||
var itemNameInstance = itemNameValue;
|
||||
itemInstance.name = itemNameInstance;
|
||||
}
|
||||
|
||||
var itemDisplayNameValue = responseDoc['itemDisplayName'];
|
||||
if (itemDisplayNameValue) {
|
||||
if (itemDisplayNameValue !== null && itemDisplayNameValue !== undefined) {
|
||||
var itemDisplayNameInstance = itemDisplayNameValue;
|
||||
itemInstance.displayName = itemDisplayNameInstance;
|
||||
}
|
||||
|
||||
var publisherValue = responseDoc['publisher'];
|
||||
if (publisherValue) {
|
||||
if (publisherValue !== null && publisherValue !== undefined) {
|
||||
var publisherInstance = publisherValue;
|
||||
itemInstance.publisher = publisherInstance;
|
||||
}
|
||||
|
||||
var publisherDisplayNameValue = responseDoc['publisherDisplayName'];
|
||||
if (publisherDisplayNameValue) {
|
||||
if (publisherDisplayNameValue !== null && publisherDisplayNameValue !== undefined) {
|
||||
var publisherDisplayNameInstance = publisherDisplayNameValue;
|
||||
itemInstance.publisherDisplayName = publisherDisplayNameInstance;
|
||||
}
|
||||
|
||||
var versionValue = responseDoc['version'];
|
||||
if (versionValue) {
|
||||
if (versionValue !== null && versionValue !== undefined) {
|
||||
var versionInstance = versionValue;
|
||||
itemInstance.version = versionInstance;
|
||||
}
|
||||
|
||||
var summaryValue = responseDoc['summary'];
|
||||
if (summaryValue) {
|
||||
if (summaryValue !== null && summaryValue !== undefined) {
|
||||
var summaryInstance = summaryValue;
|
||||
itemInstance.summary = summaryInstance;
|
||||
}
|
||||
|
||||
var descriptionValue = responseDoc['description'];
|
||||
if (descriptionValue) {
|
||||
if (descriptionValue !== null && descriptionValue !== undefined) {
|
||||
var descriptionInstance = descriptionValue;
|
||||
itemInstance.description = descriptionInstance;
|
||||
}
|
||||
|
||||
var resourceGroupNameValue = responseDoc['resourceGroupName'];
|
||||
if (resourceGroupNameValue) {
|
||||
if (resourceGroupNameValue !== null && resourceGroupNameValue !== undefined) {
|
||||
var resourceGroupNameInstance = resourceGroupNameValue;
|
||||
itemInstance.resourceGroupName = resourceGroupNameInstance;
|
||||
}
|
||||
|
||||
var definitionTemplatesValue = responseDoc['definitionTemplates'];
|
||||
if (definitionTemplatesValue) {
|
||||
if (definitionTemplatesValue !== null && definitionTemplatesValue !== undefined) {
|
||||
var definitionTemplatesInstance = { deploymentTemplateFileUrls: {} };
|
||||
itemInstance.definitionTemplates = definitionTemplatesInstance;
|
||||
|
||||
var uiDefinitionFileUrlValue = definitionTemplatesValue['uiDefinitionFileUrl'];
|
||||
if (uiDefinitionFileUrlValue) {
|
||||
if (uiDefinitionFileUrlValue !== null && uiDefinitionFileUrlValue !== undefined) {
|
||||
var uiDefinitionFileUrlInstance = uiDefinitionFileUrlValue;
|
||||
definitionTemplatesInstance.uiDefinitionFileUrl = uiDefinitionFileUrlInstance;
|
||||
}
|
||||
|
||||
var defaultDeploymentTemplateIdValue = definitionTemplatesValue['defaultDeploymentTemplateId'];
|
||||
if (defaultDeploymentTemplateIdValue) {
|
||||
if (defaultDeploymentTemplateIdValue !== null && defaultDeploymentTemplateIdValue !== undefined) {
|
||||
var defaultDeploymentTemplateIdInstance = defaultDeploymentTemplateIdValue;
|
||||
definitionTemplatesInstance.defaultDeploymentTemplateId = defaultDeploymentTemplateIdInstance;
|
||||
}
|
||||
|
||||
var deploymentTemplateFileUrlsSequenceElement = definitionTemplatesValue['deploymentTemplateFileUrls'];
|
||||
if (deploymentTemplateFileUrlsSequenceElement) {
|
||||
if (deploymentTemplateFileUrlsSequenceElement !== null && deploymentTemplateFileUrlsSequenceElement !== undefined) {
|
||||
for (var property in deploymentTemplateFileUrlsSequenceElement) {
|
||||
var deploymentTemplateFileUrlsKey = property;
|
||||
var deploymentTemplateFileUrlsValue = deploymentTemplateFileUrlsSequenceElement[property];
|
||||
|
@ -247,7 +247,7 @@ var ItemOperations = ( /** @lends ItemOperations */ function() {
|
|||
}
|
||||
|
||||
var categoryIdsArray = responseDoc['categoryIds'];
|
||||
if (categoryIdsArray) {
|
||||
if (categoryIdsArray !== null && categoryIdsArray !== undefined) {
|
||||
for (var loweredIndex1 = 0; loweredIndex1 < categoryIdsArray.length; loweredIndex1 = loweredIndex1 + 1) {
|
||||
var categoryIdsValue = categoryIdsArray[loweredIndex1];
|
||||
itemInstance.categoryIds.push(categoryIdsValue);
|
||||
|
@ -255,7 +255,7 @@ var ItemOperations = ( /** @lends ItemOperations */ function() {
|
|||
}
|
||||
|
||||
var screenshotUrlsArray = responseDoc['screenshotUrls'];
|
||||
if (screenshotUrlsArray) {
|
||||
if (screenshotUrlsArray !== null && screenshotUrlsArray !== undefined) {
|
||||
for (var loweredIndex2 = 0; loweredIndex2 < screenshotUrlsArray.length; loweredIndex2 = loweredIndex2 + 1) {
|
||||
var screenshotUrlsValue = screenshotUrlsArray[loweredIndex2];
|
||||
itemInstance.screenshotUrls.push(screenshotUrlsValue);
|
||||
|
@ -263,7 +263,7 @@ var ItemOperations = ( /** @lends ItemOperations */ function() {
|
|||
}
|
||||
|
||||
var iconFileUrlsSequenceElement = responseDoc['iconFileUrls'];
|
||||
if (iconFileUrlsSequenceElement) {
|
||||
if (iconFileUrlsSequenceElement !== null && iconFileUrlsSequenceElement !== undefined) {
|
||||
for (var property2 in iconFileUrlsSequenceElement) {
|
||||
var iconFileUrlsKey = property2;
|
||||
var iconFileUrlsValue = iconFileUrlsSequenceElement[property2];
|
||||
|
@ -311,11 +311,11 @@ var ItemOperations = ( /** @lends ItemOperations */ function() {
|
|||
// Construct URL
|
||||
var url2 = '/Microsoft.Gallery/galleryitems?';
|
||||
var appendFilter = true;
|
||||
if (parameters && parameters.filter) {
|
||||
if (parameters !== null && parameters !== undefined && parameters.filter !== null && parameters.filter !== undefined) {
|
||||
appendFilter = false;
|
||||
url2 = url2 + '$filter=' + encodeURIComponent(parameters.filter ? parameters.filter.trim() : '');
|
||||
url2 = url2 + '$filter=' + encodeURIComponent(parameters.filter !== null && parameters.filter !== undefined ? parameters.filter.trim() : '');
|
||||
}
|
||||
if (parameters && parameters.top) {
|
||||
if (parameters !== null && parameters !== undefined && parameters.top !== null && parameters.top !== undefined) {
|
||||
url2 = url2 + '&$top=' + encodeURIComponent(parameters.top.toString());
|
||||
}
|
||||
var baseUrl = this.client.baseUri;
|
||||
|
@ -336,11 +336,11 @@ var ItemOperations = ( /** @lends ItemOperations */ function() {
|
|||
httpRequest.url = url2;
|
||||
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/json';
|
||||
httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
|
||||
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -360,87 +360,87 @@ var ItemOperations = ( /** @lends ItemOperations */ function() {
|
|||
responseDoc = JSON.parse(responseContent);
|
||||
}
|
||||
|
||||
if (responseDoc) {
|
||||
if (responseDoc !== null && responseDoc !== undefined) {
|
||||
var itemsArray = responseDoc;
|
||||
if (itemsArray) {
|
||||
if (itemsArray !== null && itemsArray !== undefined) {
|
||||
for (var loweredIndex1 = 0; loweredIndex1 < itemsArray.length; loweredIndex1 = loweredIndex1 + 1) {
|
||||
var itemsValue = itemsArray[loweredIndex1];
|
||||
var galleryItemInstance = { categoryIds: [], iconFileUrls: {}, screenshotUrls: [] };
|
||||
result.items.push(galleryItemInstance);
|
||||
|
||||
var identityValue = itemsValue['identity'];
|
||||
if (identityValue) {
|
||||
if (identityValue !== null && identityValue !== undefined) {
|
||||
var identityInstance = identityValue;
|
||||
galleryItemInstance.identity = identityInstance;
|
||||
}
|
||||
|
||||
var itemNameValue = itemsValue['itemName'];
|
||||
if (itemNameValue) {
|
||||
if (itemNameValue !== null && itemNameValue !== undefined) {
|
||||
var itemNameInstance = itemNameValue;
|
||||
galleryItemInstance.name = itemNameInstance;
|
||||
}
|
||||
|
||||
var itemDisplayNameValue = itemsValue['itemDisplayName'];
|
||||
if (itemDisplayNameValue) {
|
||||
if (itemDisplayNameValue !== null && itemDisplayNameValue !== undefined) {
|
||||
var itemDisplayNameInstance = itemDisplayNameValue;
|
||||
galleryItemInstance.displayName = itemDisplayNameInstance;
|
||||
}
|
||||
|
||||
var publisherValue = itemsValue['publisher'];
|
||||
if (publisherValue) {
|
||||
if (publisherValue !== null && publisherValue !== undefined) {
|
||||
var publisherInstance = publisherValue;
|
||||
galleryItemInstance.publisher = publisherInstance;
|
||||
}
|
||||
|
||||
var publisherDisplayNameValue = itemsValue['publisherDisplayName'];
|
||||
if (publisherDisplayNameValue) {
|
||||
if (publisherDisplayNameValue !== null && publisherDisplayNameValue !== undefined) {
|
||||
var publisherDisplayNameInstance = publisherDisplayNameValue;
|
||||
galleryItemInstance.publisherDisplayName = publisherDisplayNameInstance;
|
||||
}
|
||||
|
||||
var versionValue = itemsValue['version'];
|
||||
if (versionValue) {
|
||||
if (versionValue !== null && versionValue !== undefined) {
|
||||
var versionInstance = versionValue;
|
||||
galleryItemInstance.version = versionInstance;
|
||||
}
|
||||
|
||||
var summaryValue = itemsValue['summary'];
|
||||
if (summaryValue) {
|
||||
if (summaryValue !== null && summaryValue !== undefined) {
|
||||
var summaryInstance = summaryValue;
|
||||
galleryItemInstance.summary = summaryInstance;
|
||||
}
|
||||
|
||||
var descriptionValue = itemsValue['description'];
|
||||
if (descriptionValue) {
|
||||
if (descriptionValue !== null && descriptionValue !== undefined) {
|
||||
var descriptionInstance = descriptionValue;
|
||||
galleryItemInstance.description = descriptionInstance;
|
||||
}
|
||||
|
||||
var resourceGroupNameValue = itemsValue['resourceGroupName'];
|
||||
if (resourceGroupNameValue) {
|
||||
if (resourceGroupNameValue !== null && resourceGroupNameValue !== undefined) {
|
||||
var resourceGroupNameInstance = resourceGroupNameValue;
|
||||
galleryItemInstance.resourceGroupName = resourceGroupNameInstance;
|
||||
}
|
||||
|
||||
var definitionTemplatesValue = itemsValue['definitionTemplates'];
|
||||
if (definitionTemplatesValue) {
|
||||
if (definitionTemplatesValue !== null && definitionTemplatesValue !== undefined) {
|
||||
var definitionTemplatesInstance = { deploymentTemplateFileUrls: {} };
|
||||
galleryItemInstance.definitionTemplates = definitionTemplatesInstance;
|
||||
|
||||
var uiDefinitionFileUrlValue = definitionTemplatesValue['uiDefinitionFileUrl'];
|
||||
if (uiDefinitionFileUrlValue) {
|
||||
if (uiDefinitionFileUrlValue !== null && uiDefinitionFileUrlValue !== undefined) {
|
||||
var uiDefinitionFileUrlInstance = uiDefinitionFileUrlValue;
|
||||
definitionTemplatesInstance.uiDefinitionFileUrl = uiDefinitionFileUrlInstance;
|
||||
}
|
||||
|
||||
var defaultDeploymentTemplateIdValue = definitionTemplatesValue['defaultDeploymentTemplateId'];
|
||||
if (defaultDeploymentTemplateIdValue) {
|
||||
if (defaultDeploymentTemplateIdValue !== null && defaultDeploymentTemplateIdValue !== undefined) {
|
||||
var defaultDeploymentTemplateIdInstance = defaultDeploymentTemplateIdValue;
|
||||
definitionTemplatesInstance.defaultDeploymentTemplateId = defaultDeploymentTemplateIdInstance;
|
||||
}
|
||||
|
||||
var deploymentTemplateFileUrlsSequenceElement = definitionTemplatesValue['deploymentTemplateFileUrls'];
|
||||
if (deploymentTemplateFileUrlsSequenceElement) {
|
||||
if (deploymentTemplateFileUrlsSequenceElement !== null && deploymentTemplateFileUrlsSequenceElement !== undefined) {
|
||||
for (var property in deploymentTemplateFileUrlsSequenceElement) {
|
||||
var deploymentTemplateFileUrlsKey = property;
|
||||
var deploymentTemplateFileUrlsValue = deploymentTemplateFileUrlsSequenceElement[property];
|
||||
|
@ -450,7 +450,7 @@ var ItemOperations = ( /** @lends ItemOperations */ function() {
|
|||
}
|
||||
|
||||
var categoryIdsArray = itemsValue['categoryIds'];
|
||||
if (categoryIdsArray) {
|
||||
if (categoryIdsArray !== null && categoryIdsArray !== undefined) {
|
||||
for (var loweredIndex2 = 0; loweredIndex2 < categoryIdsArray.length; loweredIndex2 = loweredIndex2 + 1) {
|
||||
var categoryIdsValue = categoryIdsArray[loweredIndex2];
|
||||
galleryItemInstance.categoryIds.push(categoryIdsValue);
|
||||
|
@ -458,7 +458,7 @@ var ItemOperations = ( /** @lends ItemOperations */ function() {
|
|||
}
|
||||
|
||||
var screenshotUrlsArray = itemsValue['screenshotUrls'];
|
||||
if (screenshotUrlsArray) {
|
||||
if (screenshotUrlsArray !== null && screenshotUrlsArray !== undefined) {
|
||||
for (var loweredIndex3 = 0; loweredIndex3 < screenshotUrlsArray.length; loweredIndex3 = loweredIndex3 + 1) {
|
||||
var screenshotUrlsValue = screenshotUrlsArray[loweredIndex3];
|
||||
galleryItemInstance.screenshotUrls.push(screenshotUrlsValue);
|
||||
|
@ -466,7 +466,7 @@ var ItemOperations = ( /** @lends ItemOperations */ function() {
|
|||
}
|
||||
|
||||
var iconFileUrlsSequenceElement = itemsValue['iconFileUrls'];
|
||||
if (iconFileUrlsSequenceElement) {
|
||||
if (iconFileUrlsSequenceElement !== null && iconFileUrlsSequenceElement !== undefined) {
|
||||
for (var property2 in iconFileUrlsSequenceElement) {
|
||||
var iconFileUrlsKey = property2;
|
||||
var iconFileUrlsValue = iconFileUrlsSequenceElement[property2];
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -149,7 +149,7 @@ var SubscriptionOperations = ( /** @lends SubscriptionOperations */ function() {
|
|||
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -169,30 +169,30 @@ var SubscriptionOperations = ( /** @lends SubscriptionOperations */ function() {
|
|||
responseDoc = JSON.parse(responseContent);
|
||||
}
|
||||
|
||||
if (responseDoc) {
|
||||
if (responseDoc !== null && responseDoc !== undefined) {
|
||||
var subscriptionInstance = {};
|
||||
result.subscription = subscriptionInstance;
|
||||
|
||||
var idValue = responseDoc['id'];
|
||||
if (idValue) {
|
||||
if (idValue !== null && idValue !== undefined) {
|
||||
var idInstance = idValue;
|
||||
subscriptionInstance.id = idInstance;
|
||||
}
|
||||
|
||||
var subscriptionIdValue = responseDoc['subscriptionId'];
|
||||
if (subscriptionIdValue) {
|
||||
if (subscriptionIdValue !== null && subscriptionIdValue !== undefined) {
|
||||
var subscriptionIdInstance = subscriptionIdValue;
|
||||
subscriptionInstance.subscriptionId = subscriptionIdInstance;
|
||||
}
|
||||
|
||||
var displayNameValue = responseDoc['displayName'];
|
||||
if (displayNameValue) {
|
||||
if (displayNameValue !== null && displayNameValue !== undefined) {
|
||||
var displayNameInstance = displayNameValue;
|
||||
subscriptionInstance.displayName = displayNameInstance;
|
||||
}
|
||||
|
||||
var stateValue = responseDoc['state'];
|
||||
if (stateValue) {
|
||||
if (stateValue !== null && stateValue !== undefined) {
|
||||
var stateInstance = stateValue;
|
||||
subscriptionInstance.state = stateInstance;
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ var SubscriptionOperations = ( /** @lends SubscriptionOperations */ function() {
|
|||
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -265,34 +265,34 @@ var SubscriptionOperations = ( /** @lends SubscriptionOperations */ function() {
|
|||
responseDoc = JSON.parse(responseContent);
|
||||
}
|
||||
|
||||
if (responseDoc) {
|
||||
if (responseDoc !== null && responseDoc !== undefined) {
|
||||
var valueArray = responseDoc['value'];
|
||||
if (valueArray) {
|
||||
if (valueArray !== null && valueArray !== undefined) {
|
||||
for (var loweredIndex1 = 0; loweredIndex1 < valueArray.length; loweredIndex1 = loweredIndex1 + 1) {
|
||||
var valueValue = valueArray[loweredIndex1];
|
||||
var subscriptionInstance = {};
|
||||
result.subscriptions.push(subscriptionInstance);
|
||||
|
||||
var idValue = valueValue['id'];
|
||||
if (idValue) {
|
||||
if (idValue !== null && idValue !== undefined) {
|
||||
var idInstance = idValue;
|
||||
subscriptionInstance.id = idInstance;
|
||||
}
|
||||
|
||||
var subscriptionIdValue = valueValue['subscriptionId'];
|
||||
if (subscriptionIdValue) {
|
||||
if (subscriptionIdValue !== null && subscriptionIdValue !== undefined) {
|
||||
var subscriptionIdInstance = subscriptionIdValue;
|
||||
subscriptionInstance.subscriptionId = subscriptionIdInstance;
|
||||
}
|
||||
|
||||
var displayNameValue = valueValue['displayName'];
|
||||
if (displayNameValue) {
|
||||
if (displayNameValue !== null && displayNameValue !== undefined) {
|
||||
var displayNameInstance = displayNameValue;
|
||||
subscriptionInstance.displayName = displayNameInstance;
|
||||
}
|
||||
|
||||
var stateValue = valueValue['state'];
|
||||
if (stateValue) {
|
||||
if (stateValue !== null && stateValue !== undefined) {
|
||||
var stateInstance = stateValue;
|
||||
subscriptionInstance.state = stateInstance;
|
||||
}
|
||||
|
@ -367,7 +367,7 @@ var TenantOperations = ( /** @lends TenantOperations */ function() {
|
|||
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -387,22 +387,22 @@ var TenantOperations = ( /** @lends TenantOperations */ function() {
|
|||
responseDoc = JSON.parse(responseContent);
|
||||
}
|
||||
|
||||
if (responseDoc) {
|
||||
if (responseDoc !== null && responseDoc !== undefined) {
|
||||
var valueArray = responseDoc['value'];
|
||||
if (valueArray) {
|
||||
if (valueArray !== null && valueArray !== undefined) {
|
||||
for (var loweredIndex1 = 0; loweredIndex1 < valueArray.length; loweredIndex1 = loweredIndex1 + 1) {
|
||||
var valueValue = valueArray[loweredIndex1];
|
||||
var tenantIdDescriptionInstance = {};
|
||||
result.tenantIds.push(tenantIdDescriptionInstance);
|
||||
|
||||
var idValue = valueValue['id'];
|
||||
if (idValue) {
|
||||
if (idValue !== null && idValue !== undefined) {
|
||||
var idInstance = idValue;
|
||||
tenantIdDescriptionInstance.id = idInstance;
|
||||
}
|
||||
|
||||
var tenantIdValue = valueValue['tenantId'];
|
||||
if (tenantIdValue) {
|
||||
if (tenantIdValue !== null && tenantIdValue !== undefined) {
|
||||
var tenantIdInstance = tenantIdValue;
|
||||
tenantIdDescriptionInstance.tenantId = tenantIdInstance;
|
||||
}
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -108,7 +108,7 @@ var SchedulerManagementClient = ( /** @lends SchedulerManagementClient */ functi
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = (this.credentials.subscriptionId ? this.credentials.subscriptionId.trim() : '') + '/operations/' + requestId.trim();
|
||||
var url2 = (this.credentials.subscriptionId !== null && this.credentials.subscriptionId !== undefined ? this.credentials.subscriptionId.trim() : '') + '/operations/' + requestId.trim();
|
||||
var baseUrl = this.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
if (baseUrl[baseUrl.length - 1] === '/') {
|
||||
|
@ -131,7 +131,7 @@ var SchedulerManagementClient = ( /** @lends SchedulerManagementClient */ functi
|
|||
|
||||
// Send Request
|
||||
return this.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -150,43 +150,43 @@ var SchedulerManagementClient = ( /** @lends SchedulerManagementClient */ functi
|
|||
options.trim = false;
|
||||
options.strict = false;
|
||||
return xml.parseString(responseContent, options, function (err2, responseDoc) {
|
||||
if (err2) {
|
||||
if (err2 !== null && err2 !== undefined) {
|
||||
return callback(err2);
|
||||
}
|
||||
|
||||
var operationElement = js2xml.getElement(responseDoc, responseDoc, 'OPERATION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (operationElement) {
|
||||
if (operationElement !== null && operationElement !== undefined) {
|
||||
var idElement = js2xml.getElement(responseDoc, operationElement, 'ID', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (idElement) {
|
||||
if (idElement !== null && idElement !== undefined) {
|
||||
var idInstance = idElement;
|
||||
result.id = idInstance;
|
||||
}
|
||||
|
||||
var statusElement = js2xml.getElement(responseDoc, operationElement, 'STATUS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (statusElement) {
|
||||
if (statusElement !== null && statusElement !== undefined) {
|
||||
var statusInstance = statusElement;
|
||||
result.status = statusInstance;
|
||||
}
|
||||
|
||||
var httpStatusCodeElement = js2xml.getElement(responseDoc, operationElement, 'HTTPSTATUSCODE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (httpStatusCodeElement) {
|
||||
if (httpStatusCodeElement !== null && httpStatusCodeElement !== undefined) {
|
||||
var httpStatusCodeInstance = httpStatusCodeElement;
|
||||
result.httpStatusCode = httpStatusCodeInstance;
|
||||
}
|
||||
|
||||
var errorElement = js2xml.getElement(responseDoc, operationElement, 'ERROR', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (errorElement) {
|
||||
if (errorElement !== null && errorElement !== undefined) {
|
||||
var errorInstance = {};
|
||||
result.error = errorInstance;
|
||||
|
||||
var codeElement = js2xml.getElement(responseDoc, errorElement, 'CODE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (codeElement) {
|
||||
if (codeElement !== null && codeElement !== undefined) {
|
||||
var codeInstance = codeElement;
|
||||
errorInstance.code = codeInstance;
|
||||
}
|
||||
|
||||
var messageElement = js2xml.getElement(responseDoc, errorElement, 'MESSAGE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (messageElement) {
|
||||
if (messageElement !== null && messageElement !== undefined) {
|
||||
var messageInstance = messageElement;
|
||||
errorInstance.message = messageInstance;
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ var SchedulerManagementClient = ( /** @lends SchedulerManagementClient */ functi
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = (this.credentials.subscriptionId ? this.credentials.subscriptionId.trim() : '') + '/resourceproviders/scheduler/Properties?';
|
||||
var url2 = (this.credentials.subscriptionId !== null && this.credentials.subscriptionId !== undefined ? this.credentials.subscriptionId.trim() : '') + '/resourceproviders/scheduler/Properties?';
|
||||
url2 = url2 + 'resourceType=JobCollections';
|
||||
var baseUrl = this.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
|
@ -242,7 +242,7 @@ var SchedulerManagementClient = ( /** @lends SchedulerManagementClient */ functi
|
|||
|
||||
// Send Request
|
||||
return this.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -261,12 +261,12 @@ var SchedulerManagementClient = ( /** @lends SchedulerManagementClient */ functi
|
|||
options.trim = false;
|
||||
options.strict = false;
|
||||
return xml.parseString(responseContent, options, function (err2, responseDoc) {
|
||||
if (err2) {
|
||||
if (err2 !== null && err2 !== undefined) {
|
||||
return callback(err2);
|
||||
}
|
||||
|
||||
var resourceProviderPropertiesSequenceElement = js2xml.getElement(responseDoc, responseDoc, 'RESOURCEPROVIDERPROPERTIES', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (resourceProviderPropertiesSequenceElement) {
|
||||
if (resourceProviderPropertiesSequenceElement !== null && resourceProviderPropertiesSequenceElement !== undefined) {
|
||||
for (var loweredIndex1 = 0; loweredIndex1 < js2xml.getElements(responseDoc, resourceProviderPropertiesSequenceElement, 'RESOURCEPROVIDERPROPERTY', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE').length; loweredIndex1 = loweredIndex1 + 1) {
|
||||
var resourceProviderPropertiesElement = js2xml.getElements(responseDoc, resourceProviderPropertiesSequenceElement, 'RESOURCEPROVIDERPROPERTY', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE')[loweredIndex1];
|
||||
var resourceProviderPropertiesKey = js2xml.getElement(responseDoc, resourceProviderPropertiesElement, 'KEY', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
|
@ -299,7 +299,7 @@ var SchedulerManagementClient = ( /** @lends SchedulerManagementClient */ functi
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = (this.credentials.subscriptionId ? this.credentials.subscriptionId.trim() : '') + '/services?';
|
||||
var url2 = (this.credentials.subscriptionId !== null && this.credentials.subscriptionId !== undefined ? this.credentials.subscriptionId.trim() : '') + '/services?';
|
||||
url2 = url2 + 'service=scheduler.JobCollections';
|
||||
url2 = url2 + '&action=register';
|
||||
var baseUrl = this.baseUri;
|
||||
|
@ -324,7 +324,7 @@ var SchedulerManagementClient = ( /** @lends SchedulerManagementClient */ functi
|
|||
|
||||
// Send Request
|
||||
return this.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -360,7 +360,7 @@ var SchedulerManagementClient = ( /** @lends SchedulerManagementClient */ functi
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = (this.credentials.subscriptionId ? this.credentials.subscriptionId.trim() : '') + '/services?';
|
||||
var url2 = (this.credentials.subscriptionId !== null && this.credentials.subscriptionId !== undefined ? this.credentials.subscriptionId.trim() : '') + '/services?';
|
||||
url2 = url2 + 'service=scheduler.JobCollections';
|
||||
url2 = url2 + '&action=unregister';
|
||||
var baseUrl = this.baseUri;
|
||||
|
@ -385,7 +385,7 @@ var SchedulerManagementClient = ( /** @lends SchedulerManagementClient */ functi
|
|||
|
||||
// Send Request
|
||||
return this.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -493,9 +493,9 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
if (parameters === null || parameters === undefined) {
|
||||
return callback(new Error('parameters cannot be null.'));
|
||||
}
|
||||
if (parameters.intrinsicSettings) {
|
||||
if (parameters.intrinsicSettings.quota) {
|
||||
if (parameters.intrinsicSettings.quota.maxRecurrence) {
|
||||
if (parameters.intrinsicSettings !== null && parameters.intrinsicSettings !== undefined) {
|
||||
if (parameters.intrinsicSettings.quota !== null && parameters.intrinsicSettings.quota !== undefined) {
|
||||
if (parameters.intrinsicSettings.quota.maxRecurrence !== null && parameters.intrinsicSettings.quota.maxRecurrence !== undefined) {
|
||||
if (parameters.intrinsicSettings.quota.maxRecurrence.interval === null || parameters.intrinsicSettings.quota.maxRecurrence.interval === undefined) {
|
||||
return callback(new Error('parameters.intrinsicSettings.quota.maxRecurrence.interval cannot be null.'));
|
||||
}
|
||||
|
@ -506,7 +506,7 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = (this.client.credentials.subscriptionId ? this.client.credentials.subscriptionId.trim() : '') + '/cloudservices/' + cloudServiceName.trim() + '/resources/scheduler/JobCollections/' + jobCollectionName.trim();
|
||||
var url2 = (this.client.credentials.subscriptionId !== null && this.client.credentials.subscriptionId !== undefined ? this.client.credentials.subscriptionId.trim() : '') + '/cloudservices/' + cloudServiceName.trim() + '/resources/scheduler/JobCollections/' + jobCollectionName.trim();
|
||||
var baseUrl = this.client.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
if (baseUrl[baseUrl.length - 1] === '/') {
|
||||
|
@ -535,42 +535,42 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
var resourceElement = js2xml.createElement('Resource', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.addChildElement(requestDoc, resourceElement);
|
||||
|
||||
if (parameters.schemaVersion) {
|
||||
if (parameters.schemaVersion !== null && parameters.schemaVersion !== undefined) {
|
||||
var schemaVersionElement = js2xml.createElement('SchemaVersion', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(schemaVersionElement, parameters.schemaVersion);
|
||||
js2xml.addChildElement(resourceElement, schemaVersionElement);
|
||||
}
|
||||
|
||||
if (parameters.intrinsicSettings) {
|
||||
if (parameters.intrinsicSettings !== null && parameters.intrinsicSettings !== undefined) {
|
||||
var intrinsicSettingsElement = js2xml.createElement('IntrinsicSettings', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.addChildElement(resourceElement, intrinsicSettingsElement);
|
||||
|
||||
var planElement = js2xml.createElement('Plan', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(planElement, parameters.intrinsicSettings.plan ? parameters.intrinsicSettings.plan.toString() : 'Standard');
|
||||
js2xml.setElementValue(planElement, parameters.intrinsicSettings.plan !== null && parameters.intrinsicSettings.plan !== undefined ? parameters.intrinsicSettings.plan.toString() : 'Standard');
|
||||
js2xml.addChildElement(intrinsicSettingsElement, planElement);
|
||||
|
||||
if (parameters.intrinsicSettings.quota) {
|
||||
if (parameters.intrinsicSettings.quota !== null && parameters.intrinsicSettings.quota !== undefined) {
|
||||
var quotaElement = js2xml.createElement('Quota', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.addChildElement(intrinsicSettingsElement, quotaElement);
|
||||
|
||||
if (parameters.intrinsicSettings.quota.maxJobCount) {
|
||||
if (parameters.intrinsicSettings.quota.maxJobCount !== null && parameters.intrinsicSettings.quota.maxJobCount !== undefined) {
|
||||
var maxJobCountElement = js2xml.createElement('MaxJobCount', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(maxJobCountElement, parameters.intrinsicSettings.quota.maxJobCount.toString());
|
||||
js2xml.addChildElement(quotaElement, maxJobCountElement);
|
||||
}
|
||||
|
||||
if (parameters.intrinsicSettings.quota.maxJobOccurrence) {
|
||||
if (parameters.intrinsicSettings.quota.maxJobOccurrence !== null && parameters.intrinsicSettings.quota.maxJobOccurrence !== undefined) {
|
||||
var maxJobOccurrenceElement = js2xml.createElement('MaxJobOccurrence', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(maxJobOccurrenceElement, parameters.intrinsicSettings.quota.maxJobOccurrence.toString());
|
||||
js2xml.addChildElement(quotaElement, maxJobOccurrenceElement);
|
||||
}
|
||||
|
||||
if (parameters.intrinsicSettings.quota.maxRecurrence) {
|
||||
if (parameters.intrinsicSettings.quota.maxRecurrence !== null && parameters.intrinsicSettings.quota.maxRecurrence !== undefined) {
|
||||
var maxRecurrenceElement = js2xml.createElement('MaxRecurrence', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.addChildElement(quotaElement, maxRecurrenceElement);
|
||||
|
||||
var frequencyElement = js2xml.createElement('Frequency', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(frequencyElement, parameters.intrinsicSettings.quota.maxRecurrence.frequency ? parameters.intrinsicSettings.quota.maxRecurrence.frequency.toString() : 'Minute');
|
||||
js2xml.setElementValue(frequencyElement, parameters.intrinsicSettings.quota.maxRecurrence.frequency !== null && parameters.intrinsicSettings.quota.maxRecurrence.frequency !== undefined ? parameters.intrinsicSettings.quota.maxRecurrence.frequency.toString() : 'Minute');
|
||||
js2xml.addChildElement(maxRecurrenceElement, frequencyElement);
|
||||
|
||||
var intervalElement = js2xml.createElement('Interval', 'http://schemas.microsoft.com/windowsazure');
|
||||
|
@ -580,7 +580,7 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
}
|
||||
}
|
||||
|
||||
if (parameters.label) {
|
||||
if (parameters.label !== null && parameters.label !== undefined) {
|
||||
var labelElement = js2xml.createElement('Label', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(labelElement, new Buffer(parameters.label).toString('base64'));
|
||||
js2xml.addChildElement(resourceElement, labelElement);
|
||||
|
@ -591,7 +591,7 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
httpRequest.headers['Content-Length'] = Buffer.isBuffer(requestContent) ? requestContent.length : Buffer.byteLength(requestContent, 'UTF8');
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -638,7 +638,7 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = (this.client.credentials.subscriptionId ? this.client.credentials.subscriptionId.trim() : '') + '/cloudservices/' + cloudServiceName.trim() + '/resources/scheduler/JobCollections/' + jobCollectionName.trim();
|
||||
var url2 = (this.client.credentials.subscriptionId !== null && this.client.credentials.subscriptionId !== undefined ? this.client.credentials.subscriptionId.trim() : '') + '/cloudservices/' + cloudServiceName.trim() + '/resources/scheduler/JobCollections/' + jobCollectionName.trim();
|
||||
var baseUrl = this.client.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
if (baseUrl[baseUrl.length - 1] === '/') {
|
||||
|
@ -661,7 +661,7 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -754,9 +754,9 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
if (parameters.eTag === null || parameters.eTag === undefined) {
|
||||
return callback(new Error('parameters.eTag cannot be null.'));
|
||||
}
|
||||
if (parameters.intrinsicSettings) {
|
||||
if (parameters.intrinsicSettings.quota) {
|
||||
if (parameters.intrinsicSettings.quota.maxRecurrence) {
|
||||
if (parameters.intrinsicSettings !== null && parameters.intrinsicSettings !== undefined) {
|
||||
if (parameters.intrinsicSettings.quota !== null && parameters.intrinsicSettings.quota !== undefined) {
|
||||
if (parameters.intrinsicSettings.quota.maxRecurrence !== null && parameters.intrinsicSettings.quota.maxRecurrence !== undefined) {
|
||||
if (parameters.intrinsicSettings.quota.maxRecurrence.interval === null || parameters.intrinsicSettings.quota.maxRecurrence.interval === undefined) {
|
||||
return callback(new Error('parameters.intrinsicSettings.quota.maxRecurrence.interval cannot be null.'));
|
||||
}
|
||||
|
@ -767,7 +767,7 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = (this.client.credentials.subscriptionId ? this.client.credentials.subscriptionId.trim() : '') + '/cloudservices/' + cloudServiceName.trim() + '/resources/scheduler/JobCollections/' + jobCollectionName.trim();
|
||||
var url2 = (this.client.credentials.subscriptionId !== null && this.client.credentials.subscriptionId !== undefined ? this.client.credentials.subscriptionId.trim() : '') + '/cloudservices/' + cloudServiceName.trim() + '/resources/scheduler/JobCollections/' + jobCollectionName.trim();
|
||||
var baseUrl = this.client.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
if (baseUrl[baseUrl.length - 1] === '/') {
|
||||
|
@ -797,7 +797,7 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
var resourceElement = js2xml.createElement('Resource', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.addChildElement(requestDoc, resourceElement);
|
||||
|
||||
if (parameters.schemaVersion) {
|
||||
if (parameters.schemaVersion !== null && parameters.schemaVersion !== undefined) {
|
||||
var schemaVersionElement = js2xml.createElement('SchemaVersion', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(schemaVersionElement, parameters.schemaVersion);
|
||||
js2xml.addChildElement(resourceElement, schemaVersionElement);
|
||||
|
@ -806,36 +806,36 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
var eTagElement = js2xml.createElement('ETag', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.addChildElement(resourceElement, eTagElement);
|
||||
|
||||
if (parameters.intrinsicSettings) {
|
||||
if (parameters.intrinsicSettings !== null && parameters.intrinsicSettings !== undefined) {
|
||||
var intrinsicSettingsElement = js2xml.createElement('IntrinsicSettings', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.addChildElement(resourceElement, intrinsicSettingsElement);
|
||||
|
||||
var planElement = js2xml.createElement('Plan', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(planElement, parameters.intrinsicSettings.plan ? parameters.intrinsicSettings.plan.toString() : 'Standard');
|
||||
js2xml.setElementValue(planElement, parameters.intrinsicSettings.plan !== null && parameters.intrinsicSettings.plan !== undefined ? parameters.intrinsicSettings.plan.toString() : 'Standard');
|
||||
js2xml.addChildElement(intrinsicSettingsElement, planElement);
|
||||
|
||||
if (parameters.intrinsicSettings.quota) {
|
||||
if (parameters.intrinsicSettings.quota !== null && parameters.intrinsicSettings.quota !== undefined) {
|
||||
var quotaElement = js2xml.createElement('Quota', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.addChildElement(intrinsicSettingsElement, quotaElement);
|
||||
|
||||
if (parameters.intrinsicSettings.quota.maxJobCount) {
|
||||
if (parameters.intrinsicSettings.quota.maxJobCount !== null && parameters.intrinsicSettings.quota.maxJobCount !== undefined) {
|
||||
var maxJobCountElement = js2xml.createElement('MaxJobCount', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(maxJobCountElement, parameters.intrinsicSettings.quota.maxJobCount.toString());
|
||||
js2xml.addChildElement(quotaElement, maxJobCountElement);
|
||||
}
|
||||
|
||||
if (parameters.intrinsicSettings.quota.maxJobOccurrence) {
|
||||
if (parameters.intrinsicSettings.quota.maxJobOccurrence !== null && parameters.intrinsicSettings.quota.maxJobOccurrence !== undefined) {
|
||||
var maxJobOccurrenceElement = js2xml.createElement('MaxJobOccurrence', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(maxJobOccurrenceElement, parameters.intrinsicSettings.quota.maxJobOccurrence.toString());
|
||||
js2xml.addChildElement(quotaElement, maxJobOccurrenceElement);
|
||||
}
|
||||
|
||||
if (parameters.intrinsicSettings.quota.maxRecurrence) {
|
||||
if (parameters.intrinsicSettings.quota.maxRecurrence !== null && parameters.intrinsicSettings.quota.maxRecurrence !== undefined) {
|
||||
var maxRecurrenceElement = js2xml.createElement('MaxRecurrence', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.addChildElement(quotaElement, maxRecurrenceElement);
|
||||
|
||||
var frequencyElement = js2xml.createElement('Frequency', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(frequencyElement, parameters.intrinsicSettings.quota.maxRecurrence.frequency ? parameters.intrinsicSettings.quota.maxRecurrence.frequency.toString() : 'Minute');
|
||||
js2xml.setElementValue(frequencyElement, parameters.intrinsicSettings.quota.maxRecurrence.frequency !== null && parameters.intrinsicSettings.quota.maxRecurrence.frequency !== undefined ? parameters.intrinsicSettings.quota.maxRecurrence.frequency.toString() : 'Minute');
|
||||
js2xml.addChildElement(maxRecurrenceElement, frequencyElement);
|
||||
|
||||
var intervalElement = js2xml.createElement('Interval', 'http://schemas.microsoft.com/windowsazure');
|
||||
|
@ -845,7 +845,7 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
}
|
||||
}
|
||||
|
||||
if (parameters.label) {
|
||||
if (parameters.label !== null && parameters.label !== undefined) {
|
||||
var labelElement = js2xml.createElement('Label', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(labelElement, new Buffer(parameters.label).toString('base64'));
|
||||
js2xml.addChildElement(resourceElement, labelElement);
|
||||
|
@ -856,7 +856,7 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
httpRequest.headers['Content-Length'] = Buffer.isBuffer(requestContent) ? requestContent.length : Buffer.byteLength(requestContent, 'UTF8');
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -909,7 +909,7 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = (this.client.credentials.subscriptionId ? this.client.credentials.subscriptionId.trim() : '') + '/cloudservices/' + cloudServiceName.trim() + '/resources/scheduler/JobCollections/?';
|
||||
var url2 = (this.client.credentials.subscriptionId !== null && this.client.credentials.subscriptionId !== undefined ? this.client.credentials.subscriptionId.trim() : '') + '/cloudservices/' + cloudServiceName.trim() + '/resources/scheduler/JobCollections/?';
|
||||
url2 = url2 + 'op=checknameavailability';
|
||||
url2 = url2 + '&resourceName=' + encodeURIComponent(jobCollectionName.trim());
|
||||
var baseUrl = this.client.baseUri;
|
||||
|
@ -934,7 +934,7 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -953,14 +953,14 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
options.trim = false;
|
||||
options.strict = false;
|
||||
return xml.parseString(responseContent, options, function (err2, responseDoc) {
|
||||
if (err2) {
|
||||
if (err2 !== null && err2 !== undefined) {
|
||||
return callback(err2);
|
||||
}
|
||||
|
||||
var resourceNameAvailabilityResponseElement = js2xml.getElement(responseDoc, responseDoc, 'RESOURCENAMEAVAILABILITYRESPONSE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (resourceNameAvailabilityResponseElement) {
|
||||
if (resourceNameAvailabilityResponseElement !== null && resourceNameAvailabilityResponseElement !== undefined) {
|
||||
var isAvailableElement = js2xml.getElement(responseDoc, resourceNameAvailabilityResponseElement, 'ISAVAILABLE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (isAvailableElement) {
|
||||
if (isAvailableElement !== null && isAvailableElement !== undefined) {
|
||||
var isAvailableInstance = isAvailableElement === 'true';
|
||||
result.isAvailable = isAvailableInstance;
|
||||
}
|
||||
|
@ -1031,7 +1031,7 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
var client2 = this.client;
|
||||
|
||||
return client2.jobCollections.beginCreating(cloudServiceName, jobCollectionName, parameters, function (err, result) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var delayInSeconds = 15;
|
||||
|
@ -1042,12 +1042,12 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
var pollOperation = function () {
|
||||
setTimeout(function () {
|
||||
return client2.getOperationStatus(result.requestId, function (err2, result2) {
|
||||
if (err2) {
|
||||
if (err2 !== null && err2 !== undefined) {
|
||||
return callback(err2);
|
||||
} else {
|
||||
if (result2.status !== 'InProgress') {
|
||||
if (result2.status !== 'Succeeded') {
|
||||
if (result2.error) {
|
||||
if (result2.error !== null && result2.error !== undefined) {
|
||||
var ex = new Error(result2.error.code + ' : ' + result2.error.message);
|
||||
ex.errorCode = result2.error.code;
|
||||
ex.errorMessage = result2.error.message;
|
||||
|
@ -1094,7 +1094,7 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
var client2 = this.client;
|
||||
|
||||
return client2.jobCollections.beginDeleting(cloudServiceName, jobCollectionName, function (err, result) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var delayInSeconds = 15;
|
||||
|
@ -1105,12 +1105,12 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
var pollOperation = function () {
|
||||
setTimeout(function () {
|
||||
return client2.getOperationStatus(result.requestId, function (err2, result2) {
|
||||
if (err2) {
|
||||
if (err2 !== null && err2 !== undefined) {
|
||||
return callback(err2);
|
||||
} else {
|
||||
if (result2.status !== 'InProgress') {
|
||||
if (result2.status !== 'Succeeded') {
|
||||
if (result2.error) {
|
||||
if (result2.error !== null && result2.error !== undefined) {
|
||||
var ex = new Error(result2.error.code + ' : ' + result2.error.message);
|
||||
ex.errorCode = result2.error.code;
|
||||
ex.errorMessage = result2.error.message;
|
||||
|
@ -1164,7 +1164,7 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = (this.client.credentials.subscriptionId ? this.client.credentials.subscriptionId.trim() : '') + '/cloudservices/' + cloudServiceName.trim() + '/resources/scheduler/~/JobCollections/' + jobCollectionName.trim();
|
||||
var url2 = (this.client.credentials.subscriptionId !== null && this.client.credentials.subscriptionId !== undefined ? this.client.credentials.subscriptionId.trim() : '') + '/cloudservices/' + cloudServiceName.trim() + '/resources/scheduler/~/JobCollections/' + jobCollectionName.trim();
|
||||
var baseUrl = this.client.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
if (baseUrl[baseUrl.length - 1] === '/') {
|
||||
|
@ -1187,7 +1187,7 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -1206,83 +1206,83 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
options.trim = false;
|
||||
options.strict = false;
|
||||
return xml.parseString(responseContent, options, function (err2, responseDoc) {
|
||||
if (err2) {
|
||||
if (err2 !== null && err2 !== undefined) {
|
||||
return callback(err2);
|
||||
}
|
||||
|
||||
var resourceElement = js2xml.getElement(responseDoc, responseDoc, 'RESOURCE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (resourceElement) {
|
||||
if (resourceElement !== null && resourceElement !== undefined) {
|
||||
var nameElement = js2xml.getElement(responseDoc, resourceElement, 'NAME', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (nameElement) {
|
||||
if (nameElement !== null && nameElement !== undefined) {
|
||||
var nameInstance = nameElement;
|
||||
result.name = nameInstance;
|
||||
}
|
||||
|
||||
var eTagElement = js2xml.getElement(responseDoc, resourceElement, 'ETAG', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (eTagElement) {
|
||||
if (eTagElement !== null && eTagElement !== undefined) {
|
||||
var eTagInstance = eTagElement;
|
||||
result.eTag = eTagInstance;
|
||||
}
|
||||
|
||||
var stateElement = js2xml.getElement(responseDoc, resourceElement, 'STATE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (stateElement) {
|
||||
if (stateElement !== null && stateElement !== undefined) {
|
||||
var stateInstance = stateElement;
|
||||
result.state = stateInstance;
|
||||
}
|
||||
|
||||
var schemaVersionElement = js2xml.getElement(responseDoc, resourceElement, 'SCHEMAVERSION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (schemaVersionElement) {
|
||||
if (schemaVersionElement !== null && schemaVersionElement !== undefined) {
|
||||
var schemaVersionInstance = schemaVersionElement;
|
||||
result.schemaVersion = schemaVersionInstance;
|
||||
}
|
||||
|
||||
var promotionCodeElement = js2xml.getElement(responseDoc, resourceElement, 'PROMOTIONCODE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (promotionCodeElement) {
|
||||
if (promotionCodeElement !== null && promotionCodeElement !== undefined) {
|
||||
var promotionCodeInstance = promotionCodeElement;
|
||||
result.promotionCode = promotionCodeInstance;
|
||||
}
|
||||
|
||||
var intrinsicSettingsElement = js2xml.getElement(responseDoc, resourceElement, 'INTRINSICSETTINGS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (intrinsicSettingsElement) {
|
||||
if (intrinsicSettingsElement !== null && intrinsicSettingsElement !== undefined) {
|
||||
var intrinsicSettingsInstance = {};
|
||||
result.intrinsicSettings = intrinsicSettingsInstance;
|
||||
|
||||
var planElement = js2xml.getElement(responseDoc, intrinsicSettingsElement, 'PLAN', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (planElement) {
|
||||
if (planElement !== null && planElement !== undefined) {
|
||||
var planInstance = planElement;
|
||||
intrinsicSettingsInstance.plan = planInstance;
|
||||
}
|
||||
|
||||
var quotaElement = js2xml.getElement(responseDoc, intrinsicSettingsElement, 'QUOTA', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (quotaElement) {
|
||||
if (quotaElement !== null && quotaElement !== undefined) {
|
||||
var quotaInstance = {};
|
||||
intrinsicSettingsInstance.quota = quotaInstance;
|
||||
|
||||
var maxJobCountElement = js2xml.getElement(responseDoc, quotaElement, 'MAXJOBCOUNT', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (maxJobCountElement && (maxJobCountElement === null || maxJobCountElement === undefined || maxJobCountElement.length === 0) === false) {
|
||||
if (maxJobCountElement !== null && maxJobCountElement !== undefined && (maxJobCountElement === null || maxJobCountElement === undefined || maxJobCountElement.length === 0) === false) {
|
||||
var maxJobCountInstance = parseInt(maxJobCountElement, 10);
|
||||
quotaInstance.maxJobCount = maxJobCountInstance;
|
||||
}
|
||||
|
||||
var maxJobOccurrenceElement = js2xml.getElement(responseDoc, quotaElement, 'MAXJOBOCCURRENCE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (maxJobOccurrenceElement && (maxJobOccurrenceElement === null || maxJobOccurrenceElement === undefined || maxJobOccurrenceElement.length === 0) === false) {
|
||||
if (maxJobOccurrenceElement !== null && maxJobOccurrenceElement !== undefined && (maxJobOccurrenceElement === null || maxJobOccurrenceElement === undefined || maxJobOccurrenceElement.length === 0) === false) {
|
||||
var maxJobOccurrenceInstance = parseInt(maxJobOccurrenceElement, 10);
|
||||
quotaInstance.maxJobOccurrence = maxJobOccurrenceInstance;
|
||||
}
|
||||
|
||||
var maxRecurrenceElement = js2xml.getElement(responseDoc, quotaElement, 'MAXRECURRENCE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (maxRecurrenceElement) {
|
||||
if (maxRecurrenceElement !== null && maxRecurrenceElement !== undefined) {
|
||||
var maxRecurrenceInstance = {};
|
||||
quotaInstance.maxRecurrence = maxRecurrenceInstance;
|
||||
|
||||
var frequencyElement = js2xml.getElement(responseDoc, maxRecurrenceElement, 'FREQUENCY', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (frequencyElement) {
|
||||
if (frequencyElement !== null && frequencyElement !== undefined) {
|
||||
var frequencyInstance = frequencyElement;
|
||||
maxRecurrenceInstance.frequency = frequencyInstance;
|
||||
}
|
||||
|
||||
var intervalElement = js2xml.getElement(responseDoc, maxRecurrenceElement, 'INTERVAL', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (intervalElement) {
|
||||
if (intervalElement !== null && intervalElement !== undefined) {
|
||||
var intervalInstance = parseInt(intervalElement, 10);
|
||||
maxRecurrenceInstance.interval = intervalInstance;
|
||||
}
|
||||
|
@ -1291,36 +1291,36 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
}
|
||||
|
||||
var labelElement = js2xml.getElement(responseDoc, resourceElement, 'LABEL', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (labelElement) {
|
||||
if (labelElement !== null && labelElement !== undefined) {
|
||||
var labelInstance = new Buffer(labelElement, 'base64').toString('utf8');
|
||||
result.label = labelInstance;
|
||||
}
|
||||
|
||||
var operationStatusElement = js2xml.getElement(responseDoc, resourceElement, 'OPERATIONSTATUS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (operationStatusElement) {
|
||||
if (operationStatusElement !== null && operationStatusElement !== undefined) {
|
||||
var operationStatusInstance = {};
|
||||
result.lastOperationStatus = operationStatusInstance;
|
||||
|
||||
var errorElement = js2xml.getElement(responseDoc, operationStatusElement, 'ERROR', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (errorElement) {
|
||||
if (errorElement !== null && errorElement !== undefined) {
|
||||
var errorInstance = {};
|
||||
operationStatusInstance.responseDetails = errorInstance;
|
||||
|
||||
var httpCodeElement = js2xml.getElement(responseDoc, errorElement, 'HTTPCODE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (httpCodeElement) {
|
||||
if (httpCodeElement !== null && httpCodeElement !== undefined) {
|
||||
var httpCodeInstance = httpCodeElement;
|
||||
errorInstance.statusCode = httpCodeInstance;
|
||||
}
|
||||
|
||||
var messageElement = js2xml.getElement(responseDoc, errorElement, 'MESSAGE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (messageElement) {
|
||||
if (messageElement !== null && messageElement !== undefined) {
|
||||
var messageInstance = messageElement;
|
||||
errorInstance.message = messageInstance;
|
||||
}
|
||||
}
|
||||
|
||||
var resultElement = js2xml.getElement(responseDoc, operationStatusElement, 'RESULT', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (resultElement) {
|
||||
if (resultElement !== null && resultElement !== undefined) {
|
||||
var resultInstance = resultElement;
|
||||
operationStatusInstance.status = resultInstance;
|
||||
}
|
||||
|
@ -1395,7 +1395,7 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
var client2 = this.client;
|
||||
|
||||
return client2.jobCollections.beginUpdating(cloudServiceName, jobCollectionName, parameters, function (err, result) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var delayInSeconds = 15;
|
||||
|
@ -1406,12 +1406,12 @@ var JobCollectionOperations = ( /** @lends JobCollectionOperations */ function()
|
|||
var pollOperation = function () {
|
||||
setTimeout(function () {
|
||||
return client2.getOperationStatus(result.requestId, function (err2, result2) {
|
||||
if (err2) {
|
||||
if (err2 !== null && err2 !== undefined) {
|
||||
return callback(err2);
|
||||
} else {
|
||||
if (result2.status !== 'InProgress') {
|
||||
if (result2.status !== 'Succeeded') {
|
||||
if (result2.error) {
|
||||
if (result2.error !== null && result2.error !== undefined) {
|
||||
var ex = new Error(result2.error.code + ' : ' + result2.error.message);
|
||||
ex.errorCode = result2.error.code;
|
||||
ex.errorMessage = result2.error.message;
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -68,7 +68,7 @@ var StorageManagementClient = ( /** @lends StorageManagementClient */ function()
|
|||
this.baseUri = 'https://management.core.windows.net';
|
||||
}
|
||||
if (this.apiVersion === null || this.apiVersion === undefined) {
|
||||
this.apiVersion = '2014-05-01';
|
||||
this.apiVersion = '2014-10-01';
|
||||
}
|
||||
if (this.longRunningOperationInitialTimeout === null || this.longRunningOperationInitialTimeout === undefined) {
|
||||
this.longRunningOperationInitialTimeout = -1;
|
||||
|
@ -114,7 +114,7 @@ var StorageManagementClient = ( /** @lends StorageManagementClient */ function()
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = '/' + (this.credentials.subscriptionId ? this.credentials.subscriptionId.trim() : '') + '/operations/' + requestId.trim();
|
||||
var url2 = '/' + (this.credentials.subscriptionId !== null && this.credentials.subscriptionId !== undefined ? this.credentials.subscriptionId.trim() : '') + '/operations/' + requestId.trim();
|
||||
var baseUrl = this.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
if (baseUrl[baseUrl.length - 1] === '/') {
|
||||
|
@ -133,11 +133,11 @@ var StorageManagementClient = ( /** @lends StorageManagementClient */ function()
|
|||
httpRequest.url = url2;
|
||||
|
||||
// Set Headers
|
||||
httpRequest.headers['x-ms-version'] = '2014-05-01';
|
||||
httpRequest.headers['x-ms-version'] = '2014-10-01';
|
||||
|
||||
// Send Request
|
||||
return this.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -156,43 +156,43 @@ var StorageManagementClient = ( /** @lends StorageManagementClient */ function()
|
|||
options.trim = false;
|
||||
options.strict = false;
|
||||
return xml.parseString(responseContent, options, function (err2, responseDoc) {
|
||||
if (err2) {
|
||||
if (err2 !== null && err2 !== undefined) {
|
||||
return callback(err2);
|
||||
}
|
||||
|
||||
var operationElement = js2xml.getElement(responseDoc, responseDoc, 'OPERATION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (operationElement) {
|
||||
if (operationElement !== null && operationElement !== undefined) {
|
||||
var idElement = js2xml.getElement(responseDoc, operationElement, 'ID', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (idElement) {
|
||||
if (idElement !== null && idElement !== undefined) {
|
||||
var idInstance = idElement;
|
||||
result.id = idInstance;
|
||||
}
|
||||
|
||||
var statusElement = js2xml.getElement(responseDoc, operationElement, 'STATUS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (statusElement) {
|
||||
if (statusElement !== null && statusElement !== undefined) {
|
||||
var statusInstance = statusElement;
|
||||
result.status = statusInstance;
|
||||
}
|
||||
|
||||
var httpStatusCodeElement = js2xml.getElement(responseDoc, operationElement, 'HTTPSTATUSCODE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (httpStatusCodeElement) {
|
||||
if (httpStatusCodeElement !== null && httpStatusCodeElement !== undefined) {
|
||||
var httpStatusCodeInstance = httpStatusCodeElement;
|
||||
result.httpStatusCode = httpStatusCodeInstance;
|
||||
}
|
||||
|
||||
var errorElement = js2xml.getElement(responseDoc, operationElement, 'ERROR', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (errorElement) {
|
||||
if (errorElement !== null && errorElement !== undefined) {
|
||||
var errorInstance = {};
|
||||
result.error = errorInstance;
|
||||
|
||||
var codeElement = js2xml.getElement(responseDoc, errorElement, 'CODE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (codeElement) {
|
||||
if (codeElement !== null && codeElement !== undefined) {
|
||||
var codeInstance = codeElement;
|
||||
errorInstance.code = codeInstance;
|
||||
}
|
||||
|
||||
var messageElement = js2xml.getElement(responseDoc, errorElement, 'MESSAGE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (messageElement) {
|
||||
if (messageElement !== null && messageElement !== undefined) {
|
||||
var messageInstance = messageElement;
|
||||
errorInstance.message = messageInstance;
|
||||
}
|
||||
|
@ -248,32 +248,25 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
* in the storage account. For example:
|
||||
* http://ServiceName.blob.core.windows.net/mycontainer/.
|
||||
*
|
||||
* @param {string} [parameters.description] A description for the storage
|
||||
* account. The description may be up to 1024 characters in length.
|
||||
*
|
||||
* @param {string} parameters.label A name for the storage account, specified
|
||||
* as abase64-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 {string} [parameters.description] A description for the storage
|
||||
* account. The description may be up to 1024 characters in length.
|
||||
*
|
||||
* @param {string} [parameters.location] The location where the storage
|
||||
* account is created. Required if AffinityGroup is not specified. You can
|
||||
* include either a Location or AffinityGroup element in the request body,
|
||||
* but not both. To list available locations, use the List Locations
|
||||
* operation.
|
||||
*
|
||||
* @param {string} [parameters.affinityGroup] The name of an existing
|
||||
* affinity group in the specified subscription. Required if Location is not
|
||||
* specified. You can include either a Location or AffinityGroup element in
|
||||
* the request body, but not both. To list available affinity groups, use
|
||||
* the List Affinity Groups operation.
|
||||
*
|
||||
* @param {boolean} parameters.geoReplicationEnabled Specifies whether the
|
||||
* storage account is created with geo-replication enabled. If the element
|
||||
* is not included in the request body, the default value is true. If set to
|
||||
* true, the data in the storage account is replicated across more than one
|
||||
* geographic location to enable resilience in the face of catastrophic
|
||||
* service loss.
|
||||
* @param {string} [parameters.location] The location where the storage
|
||||
* account is created. Required if AffinityGroup is not specified. You can
|
||||
* include either a Location or AffinityGroup element in the request body,
|
||||
* but not both. To list available locations, use the List Locations
|
||||
* operation.
|
||||
*
|
||||
* @param {object} [parameters.extendedProperties] Represents the name of an
|
||||
* extended storage account property. Each extended property must have a
|
||||
|
@ -287,6 +280,11 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
* error. Each extended property value has a maximum length of 255
|
||||
* characters.
|
||||
*
|
||||
* @param {string} [parameters.accountType] Specifies whether the account
|
||||
* supports locally-redundant storage, geo-redundant storage, zone-redundant
|
||||
* storage, or read access geo-redundant storage. Possible values
|
||||
* are:'Standard_LRS', 'Standard_ZRS', 'Standard_GRS', and 'Standard_RAGRS'.
|
||||
*
|
||||
* @param {function} callback
|
||||
*
|
||||
* @returns {Stream} The response stream.
|
||||
|
@ -299,12 +297,9 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
if (parameters === null || parameters === undefined) {
|
||||
return callback(new Error('parameters cannot be null.'));
|
||||
}
|
||||
if (parameters.description && parameters.description.length > 1024) {
|
||||
if (parameters.description !== null && parameters.description !== undefined && parameters.description.length > 1024) {
|
||||
return callback(new Error('parameters.description is outside the valid range.'));
|
||||
}
|
||||
if (parameters.geoReplicationEnabled === null || parameters.geoReplicationEnabled === undefined) {
|
||||
return callback(new Error('parameters.geoReplicationEnabled cannot be null.'));
|
||||
}
|
||||
if (parameters.label === null || parameters.label === undefined) {
|
||||
return callback(new Error('parameters.label cannot be null.'));
|
||||
}
|
||||
|
@ -327,15 +322,11 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
}
|
||||
}
|
||||
// TODO: Validate parameters.name is a valid DNS name.
|
||||
var locationCount = (parameters.affinityGroup ? 1 : 0) + (parameters.location ? 1 : 0);
|
||||
if (locationCount !== 1) {
|
||||
return callback(new Error('Only one of parameters.affinityGroup, parameters.location may be provided.'));
|
||||
}
|
||||
|
||||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId ? this.client.credentials.subscriptionId.trim() : '') + '/services/storageservices';
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId !== null && this.client.credentials.subscriptionId !== undefined ? this.client.credentials.subscriptionId.trim() : '') + '/services/storageservices';
|
||||
var baseUrl = this.client.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
if (baseUrl[baseUrl.length - 1] === '/') {
|
||||
|
@ -355,7 +346,7 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/xml';
|
||||
httpRequest.headers['x-ms-version'] = '2014-05-01';
|
||||
httpRequest.headers['x-ms-version'] = '2014-10-01';
|
||||
|
||||
// Serialize Request
|
||||
var requestContent = null;
|
||||
|
@ -368,15 +359,12 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
js2xml.setElementValue(serviceNameElement, parameters.name);
|
||||
js2xml.addChildElement(createStorageServiceInputElement, serviceNameElement);
|
||||
|
||||
var labelElement = js2xml.createElement('Label', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(labelElement, new Buffer(parameters.label).toString('base64'));
|
||||
js2xml.addChildElement(createStorageServiceInputElement, labelElement);
|
||||
|
||||
if (parameters.description) {
|
||||
if (parameters.description !== null && parameters.description !== undefined) {
|
||||
var descriptionElement = js2xml.createElement('Description', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(descriptionElement, parameters.description);
|
||||
js2xml.addChildElement(createStorageServiceInputElement, descriptionElement);
|
||||
} else {
|
||||
}
|
||||
else if (parameters.description !== undefined) {
|
||||
var emptyElement = js2xml.createElement('Description', 'http://schemas.microsoft.com/windowsazure');
|
||||
var nilAttribute = js2xml.createAttribute('nil', 'http://www.w3.org/2001/XMLSchema-instance');
|
||||
js2xml.setAttributeValue(nilAttribute, 'true');
|
||||
|
@ -384,25 +372,23 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
js2xml.addChildElement(createStorageServiceInputElement, emptyElement);
|
||||
}
|
||||
|
||||
if (parameters.location) {
|
||||
var locationElement = js2xml.createElement('Location', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(locationElement, parameters.location);
|
||||
js2xml.addChildElement(createStorageServiceInputElement, locationElement);
|
||||
}
|
||||
var labelElement = js2xml.createElement('Label', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(labelElement, new Buffer(parameters.label).toString('base64'));
|
||||
js2xml.addChildElement(createStorageServiceInputElement, labelElement);
|
||||
|
||||
if (parameters.affinityGroup) {
|
||||
if (parameters.affinityGroup !== null && parameters.affinityGroup !== undefined) {
|
||||
var affinityGroupElement = js2xml.createElement('AffinityGroup', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(affinityGroupElement, parameters.affinityGroup);
|
||||
js2xml.addChildElement(createStorageServiceInputElement, affinityGroupElement);
|
||||
}
|
||||
|
||||
if (parameters.geoReplicationEnabled) {
|
||||
var geoReplicationEnabledElement = js2xml.createElement('GeoReplicationEnabled', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(geoReplicationEnabledElement, parameters.geoReplicationEnabled.toString());
|
||||
js2xml.addChildElement(createStorageServiceInputElement, geoReplicationEnabledElement);
|
||||
if (parameters.location !== null && parameters.location !== undefined) {
|
||||
var locationElement = js2xml.createElement('Location', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(locationElement, parameters.location);
|
||||
js2xml.addChildElement(createStorageServiceInputElement, locationElement);
|
||||
}
|
||||
|
||||
if (parameters.extendedProperties) {
|
||||
if (parameters.extendedProperties !== null && parameters.extendedProperties !== undefined) {
|
||||
var extendedPropertiesDictionaryElement = js2xml.createElement('ExtendedProperties', 'http://schemas.microsoft.com/windowsazure');
|
||||
for (var extendedPropertiesKey in parameters.extendedProperties) {
|
||||
var extendedPropertiesValue = parameters.extendedProperties[extendedPropertiesKey];
|
||||
|
@ -420,12 +406,18 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
js2xml.addChildElement(createStorageServiceInputElement, extendedPropertiesDictionaryElement);
|
||||
}
|
||||
|
||||
if (parameters.accountType !== null && parameters.accountType !== undefined) {
|
||||
var accountTypeElement = js2xml.createElement('AccountType', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(accountTypeElement, parameters.accountType);
|
||||
js2xml.addChildElement(createStorageServiceInputElement, accountTypeElement);
|
||||
}
|
||||
|
||||
requestContent = js2xml.serializeDocument(requestDoc);
|
||||
httpRequest.body = requestContent;
|
||||
httpRequest.headers['Content-Length'] = Buffer.isBuffer(requestContent) ? requestContent.length : Buffer.byteLength(requestContent, 'UTF8');
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -470,7 +462,7 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId ? this.client.credentials.subscriptionId.trim() : '') + '/services/storageservices/operations/isavailable/' + accountName.trim();
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId !== null && this.client.credentials.subscriptionId !== undefined ? this.client.credentials.subscriptionId.trim() : '') + '/services/storageservices/operations/isavailable/' + accountName.trim();
|
||||
var baseUrl = this.client.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
if (baseUrl[baseUrl.length - 1] === '/') {
|
||||
|
@ -489,11 +481,11 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
httpRequest.url = url2;
|
||||
|
||||
// Set Headers
|
||||
httpRequest.headers['x-ms-version'] = '2014-05-01';
|
||||
httpRequest.headers['x-ms-version'] = '2014-10-01';
|
||||
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -512,23 +504,23 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
options.trim = false;
|
||||
options.strict = false;
|
||||
return xml.parseString(responseContent, options, function (err2, responseDoc) {
|
||||
if (err2) {
|
||||
if (err2 !== null && err2 !== undefined) {
|
||||
return callback(err2);
|
||||
}
|
||||
|
||||
var availabilityResponseElement = js2xml.getElement(responseDoc, responseDoc, 'AVAILABILITYRESPONSE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (availabilityResponseElement) {
|
||||
if (availabilityResponseElement !== null && availabilityResponseElement !== undefined) {
|
||||
var resultElement = js2xml.getElement(responseDoc, availabilityResponseElement, 'RESULT', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (resultElement) {
|
||||
if (resultElement !== null && resultElement !== undefined) {
|
||||
var resultInstance = resultElement === 'true';
|
||||
result.isAvailable = resultInstance;
|
||||
}
|
||||
|
||||
var reasonElement = js2xml.getElement(responseDoc, availabilityResponseElement, 'REASON', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (reasonElement) {
|
||||
if (reasonElement !== null && reasonElement !== undefined) {
|
||||
var isNil = false;
|
||||
var nilAttribute = js2xml.getAttribute(responseDoc, reasonElement, 'NIL', 'HTTP://WWW.W3.ORG/2001/XMLSCHEMA-INSTANCE');
|
||||
if (nilAttribute) {
|
||||
if (nilAttribute !== null && nilAttribute !== undefined) {
|
||||
isNil = nilAttribute === 'true';
|
||||
}
|
||||
if (isNil === false) {
|
||||
|
@ -562,32 +554,25 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
* in the storage account. For example:
|
||||
* http://ServiceName.blob.core.windows.net/mycontainer/.
|
||||
*
|
||||
* @param {string} [parameters.description] A description for the storage
|
||||
* account. The description may be up to 1024 characters in length.
|
||||
*
|
||||
* @param {string} parameters.label A name for the storage account, specified
|
||||
* as abase64-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 {string} [parameters.description] A description for the storage
|
||||
* account. The description may be up to 1024 characters in length.
|
||||
*
|
||||
* @param {string} [parameters.location] The location where the storage
|
||||
* account is created. Required if AffinityGroup is not specified. You can
|
||||
* include either a Location or AffinityGroup element in the request body,
|
||||
* but not both. To list available locations, use the List Locations
|
||||
* operation.
|
||||
*
|
||||
* @param {string} [parameters.affinityGroup] The name of an existing
|
||||
* affinity group in the specified subscription. Required if Location is not
|
||||
* specified. You can include either a Location or AffinityGroup element in
|
||||
* the request body, but not both. To list available affinity groups, use
|
||||
* the List Affinity Groups operation.
|
||||
*
|
||||
* @param {boolean} parameters.geoReplicationEnabled Specifies whether the
|
||||
* storage account is created with geo-replication enabled. If the element
|
||||
* is not included in the request body, the default value is true. If set to
|
||||
* true, the data in the storage account is replicated across more than one
|
||||
* geographic location to enable resilience in the face of catastrophic
|
||||
* service loss.
|
||||
* @param {string} [parameters.location] The location where the storage
|
||||
* account is created. Required if AffinityGroup is not specified. You can
|
||||
* include either a Location or AffinityGroup element in the request body,
|
||||
* but not both. To list available locations, use the List Locations
|
||||
* operation.
|
||||
*
|
||||
* @param {object} [parameters.extendedProperties] Represents the name of an
|
||||
* extended storage account property. Each extended property must have a
|
||||
|
@ -601,6 +586,11 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
* error. Each extended property value has a maximum length of 255
|
||||
* characters.
|
||||
*
|
||||
* @param {string} [parameters.accountType] Specifies whether the account
|
||||
* supports locally-redundant storage, geo-redundant storage, zone-redundant
|
||||
* storage, or read access geo-redundant storage. Possible values
|
||||
* are:'Standard_LRS', 'Standard_ZRS', 'Standard_GRS', and 'Standard_RAGRS'.
|
||||
*
|
||||
* @param {function} callback
|
||||
*
|
||||
* @returns {Stream} The response stream.
|
||||
|
@ -612,7 +602,7 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
var client2 = this.client;
|
||||
|
||||
return client2.storageAccounts.beginCreating(parameters, function (err, result) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var delayInSeconds = 30;
|
||||
|
@ -623,12 +613,12 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
var pollOperation = function () {
|
||||
setTimeout(function () {
|
||||
return client2.getOperationStatus(result.requestId, function (err2, result2) {
|
||||
if (err2) {
|
||||
if (err2 !== null && err2 !== undefined) {
|
||||
return callback(err2);
|
||||
} else {
|
||||
if (result2.status !== 'InProgress') {
|
||||
if (result2.status !== 'Succeeded') {
|
||||
if (result2.error) {
|
||||
if (result2.error !== null && result2.error !== undefined) {
|
||||
var ex = new Error(result2.error.code + ' : ' + result2.error.message);
|
||||
ex.errorCode = result2.error.code;
|
||||
ex.errorMessage = result2.error.message;
|
||||
|
@ -680,7 +670,7 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId ? this.client.credentials.subscriptionId.trim() : '') + '/services/storageservices/' + accountName.trim();
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId !== null && this.client.credentials.subscriptionId !== undefined ? this.client.credentials.subscriptionId.trim() : '') + '/services/storageservices/' + accountName.trim();
|
||||
var baseUrl = this.client.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
if (baseUrl[baseUrl.length - 1] === '/') {
|
||||
|
@ -699,11 +689,11 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
httpRequest.url = url2;
|
||||
|
||||
// Set Headers
|
||||
httpRequest.headers['x-ms-version'] = '2014-05-01';
|
||||
httpRequest.headers['x-ms-version'] = '2014-10-01';
|
||||
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -748,7 +738,7 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId ? this.client.credentials.subscriptionId.trim() : '') + '/services/storageservices/' + accountName.trim();
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId !== null && this.client.credentials.subscriptionId !== undefined ? this.client.credentials.subscriptionId.trim() : '') + '/services/storageservices/' + accountName.trim();
|
||||
var baseUrl = this.client.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
if (baseUrl[baseUrl.length - 1] === '/') {
|
||||
|
@ -767,11 +757,11 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
httpRequest.url = url2;
|
||||
|
||||
// Set Headers
|
||||
httpRequest.headers['x-ms-version'] = '2014-05-01';
|
||||
httpRequest.headers['x-ms-version'] = '2014-10-01';
|
||||
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -790,37 +780,37 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
options.trim = false;
|
||||
options.strict = false;
|
||||
return xml.parseString(responseContent, options, function (err2, responseDoc) {
|
||||
if (err2) {
|
||||
if (err2 !== null && err2 !== undefined) {
|
||||
return callback(err2);
|
||||
}
|
||||
|
||||
var storageServiceElement = js2xml.getElement(responseDoc, responseDoc, 'STORAGESERVICE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (storageServiceElement) {
|
||||
if (storageServiceElement !== null && storageServiceElement !== undefined) {
|
||||
var storageServiceInstance = { extendedProperties: {} };
|
||||
result.storageAccount = storageServiceInstance;
|
||||
|
||||
var urlElement = js2xml.getElement(responseDoc, storageServiceElement, 'URL', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (urlElement) {
|
||||
if (urlElement !== null && urlElement !== undefined) {
|
||||
var urlInstance = urlElement;
|
||||
storageServiceInstance.uri = urlInstance;
|
||||
}
|
||||
|
||||
var serviceNameElement = js2xml.getElement(responseDoc, storageServiceElement, 'SERVICENAME', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (serviceNameElement) {
|
||||
if (serviceNameElement !== null && serviceNameElement !== undefined) {
|
||||
var serviceNameInstance = serviceNameElement;
|
||||
storageServiceInstance.name = serviceNameInstance;
|
||||
}
|
||||
|
||||
var storageServicePropertiesElement = js2xml.getElement(responseDoc, storageServiceElement, 'STORAGESERVICEPROPERTIES', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (storageServicePropertiesElement) {
|
||||
if (storageServicePropertiesElement !== null && storageServicePropertiesElement !== undefined) {
|
||||
var storageServicePropertiesInstance = { endpoints: [] };
|
||||
storageServiceInstance.properties = storageServicePropertiesInstance;
|
||||
|
||||
var descriptionElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'DESCRIPTION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (descriptionElement) {
|
||||
if (descriptionElement !== null && descriptionElement !== undefined) {
|
||||
var isNil = false;
|
||||
var nilAttribute = js2xml.getAttribute(responseDoc, descriptionElement, 'NIL', 'HTTP://WWW.W3.ORG/2001/XMLSCHEMA-INSTANCE');
|
||||
if (nilAttribute) {
|
||||
if (nilAttribute !== null && nilAttribute !== undefined) {
|
||||
isNil = nilAttribute === 'true';
|
||||
}
|
||||
if (isNil === false) {
|
||||
|
@ -830,76 +820,76 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
}
|
||||
|
||||
var affinityGroupElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'AFFINITYGROUP', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (affinityGroupElement) {
|
||||
if (affinityGroupElement !== null && affinityGroupElement !== undefined) {
|
||||
var affinityGroupInstance = affinityGroupElement;
|
||||
storageServicePropertiesInstance.affinityGroup = affinityGroupInstance;
|
||||
}
|
||||
|
||||
var locationElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'LOCATION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (locationElement) {
|
||||
if (locationElement !== null && locationElement !== undefined) {
|
||||
var locationInstance = locationElement;
|
||||
storageServicePropertiesInstance.location = locationInstance;
|
||||
}
|
||||
|
||||
var labelElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'LABEL', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (labelElement) {
|
||||
if (labelElement !== null && labelElement !== undefined) {
|
||||
var labelInstance = new Buffer(labelElement, 'base64').toString('utf8');
|
||||
storageServicePropertiesInstance.label = labelInstance;
|
||||
}
|
||||
|
||||
var statusElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'STATUS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (statusElement) {
|
||||
if (statusElement !== null && statusElement !== undefined) {
|
||||
var statusInstance = statusElement;
|
||||
storageServicePropertiesInstance.status = statusInstance;
|
||||
}
|
||||
|
||||
var endpointsSequenceElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'ENDPOINTS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (endpointsSequenceElement) {
|
||||
if (endpointsSequenceElement !== null && endpointsSequenceElement !== undefined) {
|
||||
for (var loweredIndex1 = 0; loweredIndex1 < js2xml.getElements(responseDoc, endpointsSequenceElement, 'ENDPOINT', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE').length; loweredIndex1 = loweredIndex1 + 1) {
|
||||
var endpointsElement = js2xml.getElements(responseDoc, endpointsSequenceElement, 'ENDPOINT', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE')[loweredIndex1];
|
||||
storageServicePropertiesInstance.endpoints.push(endpointsElement);
|
||||
}
|
||||
}
|
||||
|
||||
var geoReplicationEnabledElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'GEOREPLICATIONENABLED', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (geoReplicationEnabledElement) {
|
||||
var geoReplicationEnabledInstance = geoReplicationEnabledElement === 'true';
|
||||
storageServicePropertiesInstance.geoReplicationEnabled = geoReplicationEnabledInstance;
|
||||
}
|
||||
|
||||
var geoPrimaryRegionElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'GEOPRIMARYREGION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (geoPrimaryRegionElement) {
|
||||
if (geoPrimaryRegionElement !== null && geoPrimaryRegionElement !== undefined) {
|
||||
var geoPrimaryRegionInstance = geoPrimaryRegionElement;
|
||||
storageServicePropertiesInstance.geoPrimaryRegion = geoPrimaryRegionInstance;
|
||||
}
|
||||
|
||||
var statusOfPrimaryElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'STATUSOFPRIMARY', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (statusOfPrimaryElement && (statusOfPrimaryElement === null || statusOfPrimaryElement === undefined || statusOfPrimaryElement.length === 0) === false) {
|
||||
if (statusOfPrimaryElement !== null && statusOfPrimaryElement !== undefined && (statusOfPrimaryElement === null || statusOfPrimaryElement === undefined || statusOfPrimaryElement.length === 0) === false) {
|
||||
var statusOfPrimaryInstance = statusOfPrimaryElement;
|
||||
storageServicePropertiesInstance.statusOfGeoPrimaryRegion = statusOfPrimaryInstance;
|
||||
}
|
||||
|
||||
var lastGeoFailoverTimeElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'LASTGEOFAILOVERTIME', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (lastGeoFailoverTimeElement && (lastGeoFailoverTimeElement === null || lastGeoFailoverTimeElement === undefined || lastGeoFailoverTimeElement.length === 0) === false) {
|
||||
if (lastGeoFailoverTimeElement !== null && lastGeoFailoverTimeElement !== undefined && (lastGeoFailoverTimeElement === null || lastGeoFailoverTimeElement === undefined || lastGeoFailoverTimeElement.length === 0) === false) {
|
||||
var lastGeoFailoverTimeInstance = new Date(lastGeoFailoverTimeElement);
|
||||
storageServicePropertiesInstance.lastGeoFailoverTime = lastGeoFailoverTimeInstance;
|
||||
}
|
||||
|
||||
var geoSecondaryRegionElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'GEOSECONDARYREGION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (geoSecondaryRegionElement) {
|
||||
if (geoSecondaryRegionElement !== null && geoSecondaryRegionElement !== undefined) {
|
||||
var geoSecondaryRegionInstance = geoSecondaryRegionElement;
|
||||
storageServicePropertiesInstance.geoSecondaryRegion = geoSecondaryRegionInstance;
|
||||
}
|
||||
|
||||
var statusOfSecondaryElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'STATUSOFSECONDARY', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (statusOfSecondaryElement && (statusOfSecondaryElement === null || statusOfSecondaryElement === undefined || statusOfSecondaryElement.length === 0) === false) {
|
||||
if (statusOfSecondaryElement !== null && statusOfSecondaryElement !== undefined && (statusOfSecondaryElement === null || statusOfSecondaryElement === undefined || statusOfSecondaryElement.length === 0) === false) {
|
||||
var statusOfSecondaryInstance = statusOfSecondaryElement;
|
||||
storageServicePropertiesInstance.statusOfGeoSecondaryRegion = statusOfSecondaryInstance;
|
||||
}
|
||||
|
||||
var accountTypeElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'ACCOUNTTYPE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (accountTypeElement !== null && accountTypeElement !== undefined) {
|
||||
var accountTypeInstance = accountTypeElement;
|
||||
storageServicePropertiesInstance.accountType = accountTypeInstance;
|
||||
}
|
||||
}
|
||||
|
||||
var extendedPropertiesSequenceElement = js2xml.getElement(responseDoc, storageServiceElement, 'EXTENDEDPROPERTIES', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (extendedPropertiesSequenceElement) {
|
||||
if (extendedPropertiesSequenceElement !== null && extendedPropertiesSequenceElement !== undefined) {
|
||||
for (var loweredIndex2 = 0; loweredIndex2 < js2xml.getElements(responseDoc, extendedPropertiesSequenceElement, 'EXTENDEDPROPERTY', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE').length; loweredIndex2 = loweredIndex2 + 1) {
|
||||
var extendedPropertiesElement = js2xml.getElements(responseDoc, extendedPropertiesSequenceElement, 'EXTENDEDPROPERTY', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE')[loweredIndex2];
|
||||
var extendedPropertiesKey = js2xml.getElement(responseDoc, extendedPropertiesElement, 'NAME', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
|
@ -941,7 +931,7 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId ? this.client.credentials.subscriptionId.trim() : '') + '/services/storageservices/' + accountName.trim() + '/keys';
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId !== null && this.client.credentials.subscriptionId !== undefined ? this.client.credentials.subscriptionId.trim() : '') + '/services/storageservices/' + accountName.trim() + '/keys';
|
||||
var baseUrl = this.client.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
if (baseUrl[baseUrl.length - 1] === '/') {
|
||||
|
@ -960,11 +950,11 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
httpRequest.url = url2;
|
||||
|
||||
// Set Headers
|
||||
httpRequest.headers['x-ms-version'] = '2014-05-01';
|
||||
httpRequest.headers['x-ms-version'] = '2014-10-01';
|
||||
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -983,28 +973,28 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
options.trim = false;
|
||||
options.strict = false;
|
||||
return xml.parseString(responseContent, options, function (err2, responseDoc) {
|
||||
if (err2) {
|
||||
if (err2 !== null && err2 !== undefined) {
|
||||
return callback(err2);
|
||||
}
|
||||
|
||||
var storageServiceElement = js2xml.getElement(responseDoc, responseDoc, 'STORAGESERVICE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (storageServiceElement) {
|
||||
if (storageServiceElement !== null && storageServiceElement !== undefined) {
|
||||
var urlElement = js2xml.getElement(responseDoc, storageServiceElement, 'URL', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (urlElement) {
|
||||
if (urlElement !== null && urlElement !== undefined) {
|
||||
var urlInstance = urlElement;
|
||||
result.uri = urlInstance;
|
||||
}
|
||||
|
||||
var storageServiceKeysElement = js2xml.getElement(responseDoc, storageServiceElement, 'STORAGESERVICEKEYS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (storageServiceKeysElement) {
|
||||
if (storageServiceKeysElement !== null && storageServiceKeysElement !== undefined) {
|
||||
var primaryElement = js2xml.getElement(responseDoc, storageServiceKeysElement, 'PRIMARY', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (primaryElement) {
|
||||
if (primaryElement !== null && primaryElement !== undefined) {
|
||||
var primaryInstance = primaryElement;
|
||||
result.primaryKey = primaryInstance;
|
||||
}
|
||||
|
||||
var secondaryElement = js2xml.getElement(responseDoc, storageServiceKeysElement, 'SECONDARY', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (secondaryElement) {
|
||||
if (secondaryElement !== null && secondaryElement !== undefined) {
|
||||
var secondaryInstance = secondaryElement;
|
||||
result.secondaryKey = secondaryInstance;
|
||||
}
|
||||
|
@ -1038,7 +1028,7 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId ? this.client.credentials.subscriptionId.trim() : '') + '/services/storageservices';
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId !== null && this.client.credentials.subscriptionId !== undefined ? this.client.credentials.subscriptionId.trim() : '') + '/services/storageservices';
|
||||
var baseUrl = this.client.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
if (baseUrl[baseUrl.length - 1] === '/') {
|
||||
|
@ -1057,11 +1047,11 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
httpRequest.url = url2;
|
||||
|
||||
// Set Headers
|
||||
httpRequest.headers['x-ms-version'] = '2014-05-01';
|
||||
httpRequest.headers['x-ms-version'] = '2014-10-01';
|
||||
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -1080,39 +1070,39 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
options.trim = false;
|
||||
options.strict = false;
|
||||
return xml.parseString(responseContent, options, function (err2, responseDoc) {
|
||||
if (err2) {
|
||||
if (err2 !== null && err2 !== undefined) {
|
||||
return callback(err2);
|
||||
}
|
||||
|
||||
var storageServicesSequenceElement = js2xml.getElement(responseDoc, responseDoc, 'STORAGESERVICES', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (storageServicesSequenceElement) {
|
||||
if (storageServicesSequenceElement !== null && storageServicesSequenceElement !== undefined) {
|
||||
for (var loweredIndex1 = 0; loweredIndex1 < js2xml.getElements(responseDoc, storageServicesSequenceElement, 'STORAGESERVICE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE').length; loweredIndex1 = loweredIndex1 + 1) {
|
||||
var storageServicesElement = js2xml.getElements(responseDoc, storageServicesSequenceElement, 'STORAGESERVICE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE')[loweredIndex1];
|
||||
var storageServiceInstance = { extendedProperties: {} };
|
||||
result.storageAccounts.push(storageServiceInstance);
|
||||
|
||||
var urlElement = js2xml.getElement(responseDoc, storageServicesElement, 'URL', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (urlElement) {
|
||||
if (urlElement !== null && urlElement !== undefined) {
|
||||
var urlInstance = urlElement;
|
||||
storageServiceInstance.uri = urlInstance;
|
||||
}
|
||||
|
||||
var serviceNameElement = js2xml.getElement(responseDoc, storageServicesElement, 'SERVICENAME', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (serviceNameElement) {
|
||||
if (serviceNameElement !== null && serviceNameElement !== undefined) {
|
||||
var serviceNameInstance = serviceNameElement;
|
||||
storageServiceInstance.name = serviceNameInstance;
|
||||
}
|
||||
|
||||
var storageServicePropertiesElement = js2xml.getElement(responseDoc, storageServicesElement, 'STORAGESERVICEPROPERTIES', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (storageServicePropertiesElement) {
|
||||
if (storageServicePropertiesElement !== null && storageServicePropertiesElement !== undefined) {
|
||||
var storageServicePropertiesInstance = { endpoints: [] };
|
||||
storageServiceInstance.properties = storageServicePropertiesInstance;
|
||||
|
||||
var descriptionElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'DESCRIPTION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (descriptionElement) {
|
||||
if (descriptionElement !== null && descriptionElement !== undefined) {
|
||||
var isNil = false;
|
||||
var nilAttribute = js2xml.getAttribute(responseDoc, descriptionElement, 'NIL', 'HTTP://WWW.W3.ORG/2001/XMLSCHEMA-INSTANCE');
|
||||
if (nilAttribute) {
|
||||
if (nilAttribute !== null && nilAttribute !== undefined) {
|
||||
isNil = nilAttribute === 'true';
|
||||
}
|
||||
if (isNil === false) {
|
||||
|
@ -1122,76 +1112,76 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
}
|
||||
|
||||
var affinityGroupElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'AFFINITYGROUP', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (affinityGroupElement) {
|
||||
if (affinityGroupElement !== null && affinityGroupElement !== undefined) {
|
||||
var affinityGroupInstance = affinityGroupElement;
|
||||
storageServicePropertiesInstance.affinityGroup = affinityGroupInstance;
|
||||
}
|
||||
|
||||
var locationElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'LOCATION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (locationElement) {
|
||||
if (locationElement !== null && locationElement !== undefined) {
|
||||
var locationInstance = locationElement;
|
||||
storageServicePropertiesInstance.location = locationInstance;
|
||||
}
|
||||
|
||||
var labelElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'LABEL', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (labelElement) {
|
||||
if (labelElement !== null && labelElement !== undefined) {
|
||||
var labelInstance = new Buffer(labelElement, 'base64').toString('utf8');
|
||||
storageServicePropertiesInstance.label = labelInstance;
|
||||
}
|
||||
|
||||
var statusElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'STATUS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (statusElement) {
|
||||
if (statusElement !== null && statusElement !== undefined) {
|
||||
var statusInstance = statusElement;
|
||||
storageServicePropertiesInstance.status = statusInstance;
|
||||
}
|
||||
|
||||
var endpointsSequenceElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'ENDPOINTS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (endpointsSequenceElement) {
|
||||
if (endpointsSequenceElement !== null && endpointsSequenceElement !== undefined) {
|
||||
for (var loweredIndex2 = 0; loweredIndex2 < js2xml.getElements(responseDoc, endpointsSequenceElement, 'ENDPOINT', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE').length; loweredIndex2 = loweredIndex2 + 1) {
|
||||
var endpointsElement = js2xml.getElements(responseDoc, endpointsSequenceElement, 'ENDPOINT', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE')[loweredIndex2];
|
||||
storageServicePropertiesInstance.endpoints.push(endpointsElement);
|
||||
}
|
||||
}
|
||||
|
||||
var geoReplicationEnabledElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'GEOREPLICATIONENABLED', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (geoReplicationEnabledElement) {
|
||||
var geoReplicationEnabledInstance = geoReplicationEnabledElement === 'true';
|
||||
storageServicePropertiesInstance.geoReplicationEnabled = geoReplicationEnabledInstance;
|
||||
}
|
||||
|
||||
var geoPrimaryRegionElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'GEOPRIMARYREGION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (geoPrimaryRegionElement) {
|
||||
if (geoPrimaryRegionElement !== null && geoPrimaryRegionElement !== undefined) {
|
||||
var geoPrimaryRegionInstance = geoPrimaryRegionElement;
|
||||
storageServicePropertiesInstance.geoPrimaryRegion = geoPrimaryRegionInstance;
|
||||
}
|
||||
|
||||
var statusOfPrimaryElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'STATUSOFPRIMARY', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (statusOfPrimaryElement && (statusOfPrimaryElement === null || statusOfPrimaryElement === undefined || statusOfPrimaryElement.length === 0) === false) {
|
||||
if (statusOfPrimaryElement !== null && statusOfPrimaryElement !== undefined && (statusOfPrimaryElement === null || statusOfPrimaryElement === undefined || statusOfPrimaryElement.length === 0) === false) {
|
||||
var statusOfPrimaryInstance = statusOfPrimaryElement;
|
||||
storageServicePropertiesInstance.statusOfGeoPrimaryRegion = statusOfPrimaryInstance;
|
||||
}
|
||||
|
||||
var lastGeoFailoverTimeElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'LASTGEOFAILOVERTIME', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (lastGeoFailoverTimeElement && (lastGeoFailoverTimeElement === null || lastGeoFailoverTimeElement === undefined || lastGeoFailoverTimeElement.length === 0) === false) {
|
||||
if (lastGeoFailoverTimeElement !== null && lastGeoFailoverTimeElement !== undefined && (lastGeoFailoverTimeElement === null || lastGeoFailoverTimeElement === undefined || lastGeoFailoverTimeElement.length === 0) === false) {
|
||||
var lastGeoFailoverTimeInstance = new Date(lastGeoFailoverTimeElement);
|
||||
storageServicePropertiesInstance.lastGeoFailoverTime = lastGeoFailoverTimeInstance;
|
||||
}
|
||||
|
||||
var geoSecondaryRegionElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'GEOSECONDARYREGION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (geoSecondaryRegionElement) {
|
||||
if (geoSecondaryRegionElement !== null && geoSecondaryRegionElement !== undefined) {
|
||||
var geoSecondaryRegionInstance = geoSecondaryRegionElement;
|
||||
storageServicePropertiesInstance.geoSecondaryRegion = geoSecondaryRegionInstance;
|
||||
}
|
||||
|
||||
var statusOfSecondaryElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'STATUSOFSECONDARY', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (statusOfSecondaryElement && (statusOfSecondaryElement === null || statusOfSecondaryElement === undefined || statusOfSecondaryElement.length === 0) === false) {
|
||||
if (statusOfSecondaryElement !== null && statusOfSecondaryElement !== undefined && (statusOfSecondaryElement === null || statusOfSecondaryElement === undefined || statusOfSecondaryElement.length === 0) === false) {
|
||||
var statusOfSecondaryInstance = statusOfSecondaryElement;
|
||||
storageServicePropertiesInstance.statusOfGeoSecondaryRegion = statusOfSecondaryInstance;
|
||||
}
|
||||
|
||||
var accountTypeElement = js2xml.getElement(responseDoc, storageServicePropertiesElement, 'ACCOUNTTYPE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (accountTypeElement !== null && accountTypeElement !== undefined) {
|
||||
var accountTypeInstance = accountTypeElement;
|
||||
storageServicePropertiesInstance.accountType = accountTypeInstance;
|
||||
}
|
||||
}
|
||||
|
||||
var extendedPropertiesSequenceElement = js2xml.getElement(responseDoc, storageServicesElement, 'EXTENDEDPROPERTIES', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (extendedPropertiesSequenceElement) {
|
||||
if (extendedPropertiesSequenceElement !== null && extendedPropertiesSequenceElement !== undefined) {
|
||||
for (var loweredIndex3 = 0; loweredIndex3 < js2xml.getElements(responseDoc, extendedPropertiesSequenceElement, 'EXTENDEDPROPERTY', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE').length; loweredIndex3 = loweredIndex3 + 1) {
|
||||
var extendedPropertiesElement = js2xml.getElements(responseDoc, extendedPropertiesSequenceElement, 'EXTENDEDPROPERTY', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE')[loweredIndex3];
|
||||
var extendedPropertiesKey = js2xml.getElement(responseDoc, extendedPropertiesElement, 'NAME', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
|
@ -1243,7 +1233,7 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId ? this.client.credentials.subscriptionId.trim() : '') + '/services/storageservices/' + parameters.name.trim() + '/keys?action=regenerate';
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId !== null && this.client.credentials.subscriptionId !== undefined ? this.client.credentials.subscriptionId.trim() : '') + '/services/storageservices/' + parameters.name.trim() + '/keys?action=regenerate';
|
||||
var baseUrl = this.client.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
if (baseUrl[baseUrl.length - 1] === '/') {
|
||||
|
@ -1263,7 +1253,7 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/xml';
|
||||
httpRequest.headers['x-ms-version'] = '2014-05-01';
|
||||
httpRequest.headers['x-ms-version'] = '2014-10-01';
|
||||
|
||||
// Serialize Request
|
||||
var requestContent = null;
|
||||
|
@ -1273,7 +1263,7 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
js2xml.addChildElement(requestDoc, regenerateKeysElement);
|
||||
|
||||
var keyTypeElement = js2xml.createElement('KeyType', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(keyTypeElement, parameters.keyType ? parameters.keyType.toString() : 'Primary');
|
||||
js2xml.setElementValue(keyTypeElement, parameters.keyType !== null && parameters.keyType !== undefined ? parameters.keyType.toString() : 'Primary');
|
||||
js2xml.addChildElement(regenerateKeysElement, keyTypeElement);
|
||||
|
||||
requestContent = js2xml.serializeDocument(requestDoc);
|
||||
|
@ -1281,7 +1271,7 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
httpRequest.headers['Content-Length'] = Buffer.isBuffer(requestContent) ? requestContent.length : Buffer.byteLength(requestContent, 'UTF8');
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -1300,28 +1290,28 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
options.trim = false;
|
||||
options.strict = false;
|
||||
return xml.parseString(responseContent, options, function (err2, responseDoc) {
|
||||
if (err2) {
|
||||
if (err2 !== null && err2 !== undefined) {
|
||||
return callback(err2);
|
||||
}
|
||||
|
||||
var storageServiceElement = js2xml.getElement(responseDoc, responseDoc, 'STORAGESERVICE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (storageServiceElement) {
|
||||
if (storageServiceElement !== null && storageServiceElement !== undefined) {
|
||||
var urlElement = js2xml.getElement(responseDoc, storageServiceElement, 'URL', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (urlElement) {
|
||||
if (urlElement !== null && urlElement !== undefined) {
|
||||
var urlInstance = urlElement;
|
||||
result.uri = urlInstance;
|
||||
}
|
||||
|
||||
var storageServiceKeysElement = js2xml.getElement(responseDoc, storageServiceElement, 'STORAGESERVICEKEYS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (storageServiceKeysElement) {
|
||||
if (storageServiceKeysElement !== null && storageServiceKeysElement !== undefined) {
|
||||
var primaryElement = js2xml.getElement(responseDoc, storageServiceKeysElement, 'PRIMARY', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (primaryElement) {
|
||||
if (primaryElement !== null && primaryElement !== undefined) {
|
||||
var primaryInstance = primaryElement;
|
||||
result.primaryKey = primaryInstance;
|
||||
}
|
||||
|
||||
var secondaryElement = js2xml.getElement(responseDoc, storageServiceKeysElement, 'SECONDARY', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (secondaryElement) {
|
||||
if (secondaryElement !== null && secondaryElement !== undefined) {
|
||||
var secondaryInstance = secondaryElement;
|
||||
result.secondaryKey = secondaryInstance;
|
||||
}
|
||||
|
@ -1354,21 +1344,6 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
* base64-encoded. The name may be up to 100 characters in length. The name
|
||||
* can be used identify the storage account for your tracking purposes.
|
||||
*
|
||||
* @param {boolean} [parameters.geoReplicationEnabled] Indicates whether
|
||||
* geo-replication is enabled on the specified storage account. If set to
|
||||
* true, the data in the storage account is replicated across more than one
|
||||
* geographic location so as to enable resiliency in the face of
|
||||
* catastrophic service loss. If the element is not included in the request
|
||||
* body, the current value is left unchanged. Important: If you have enabled
|
||||
* geo-replication, you can elect to disable it by setting this element to
|
||||
* false. When disabled, your data is no longer replicated to a secondary
|
||||
* data center and any data in the secondary location will be removed.
|
||||
* Enabling geo-replication once it has been disabled will result in the
|
||||
* storage account being billed for replicating the current copy of data to
|
||||
* the secondary data center. After the existing copy of the data is
|
||||
* replicated to the secondary data center, updates are geo-replicated at no
|
||||
* additional charge.
|
||||
*
|
||||
* @param {object} [parameters.extendedProperties] Represents the name of an
|
||||
* extended storage account property. Each extended property must have a
|
||||
* defined name and a value. You can have a maximum of 50 extended property
|
||||
|
@ -1382,6 +1357,11 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
* characters. You can delete an extended property by setting the value to
|
||||
* NULL.
|
||||
*
|
||||
* @param {string} [parameters.accountType] Specifies whether the account
|
||||
* supports locally-redundant storage, geo-redundant storage, zone-redundant
|
||||
* storage, or read access geo-redundant storage. Possible values
|
||||
* are:'Standard_LRS', 'Standard_ZRS', 'Standard_GRS', and 'Standard_RAGRS'.
|
||||
*
|
||||
* @param {function} callback
|
||||
*
|
||||
* @returns {Stream} The response stream.
|
||||
|
@ -1410,14 +1390,14 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
if (parameters === null || parameters === undefined) {
|
||||
return callback(new Error('parameters cannot be null.'));
|
||||
}
|
||||
if (parameters.description && parameters.description.length > 1024) {
|
||||
if (parameters.description !== null && parameters.description !== undefined && parameters.description.length > 1024) {
|
||||
return callback(new Error('parameters.description is outside the valid range.'));
|
||||
}
|
||||
|
||||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId ? this.client.credentials.subscriptionId.trim() : '') + '/services/storageservices/' + accountName.trim();
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId !== null && this.client.credentials.subscriptionId !== undefined ? this.client.credentials.subscriptionId.trim() : '') + '/services/storageservices/' + accountName.trim();
|
||||
var baseUrl = this.client.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
if (baseUrl[baseUrl.length - 1] === '/') {
|
||||
|
@ -1437,7 +1417,7 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
|
||||
// Set Headers
|
||||
httpRequest.headers['Content-Type'] = 'application/xml';
|
||||
httpRequest.headers['x-ms-version'] = '2014-05-01';
|
||||
httpRequest.headers['x-ms-version'] = '2014-10-01';
|
||||
|
||||
// Serialize Request
|
||||
var requestContent = null;
|
||||
|
@ -1446,11 +1426,12 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
var updateStorageServiceInputElement = js2xml.createElement('UpdateStorageServiceInput', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.addChildElement(requestDoc, updateStorageServiceInputElement);
|
||||
|
||||
if (parameters.description) {
|
||||
if (parameters.description !== null && parameters.description !== undefined) {
|
||||
var descriptionElement = js2xml.createElement('Description', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(descriptionElement, parameters.description);
|
||||
js2xml.addChildElement(updateStorageServiceInputElement, descriptionElement);
|
||||
} else {
|
||||
}
|
||||
else if (parameters.description !== undefined) {
|
||||
var emptyElement = js2xml.createElement('Description', 'http://schemas.microsoft.com/windowsazure');
|
||||
var nilAttribute = js2xml.createAttribute('nil', 'http://www.w3.org/2001/XMLSchema-instance');
|
||||
js2xml.setAttributeValue(nilAttribute, 'true');
|
||||
|
@ -1458,19 +1439,13 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
js2xml.addChildElement(updateStorageServiceInputElement, emptyElement);
|
||||
}
|
||||
|
||||
if (parameters.label) {
|
||||
if (parameters.label !== null && parameters.label !== undefined) {
|
||||
var labelElement = js2xml.createElement('Label', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(labelElement, new Buffer(parameters.label).toString('base64'));
|
||||
js2xml.addChildElement(updateStorageServiceInputElement, labelElement);
|
||||
}
|
||||
|
||||
if (parameters.geoReplicationEnabled) {
|
||||
var geoReplicationEnabledElement = js2xml.createElement('GeoReplicationEnabled', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(geoReplicationEnabledElement, parameters.geoReplicationEnabled.toString());
|
||||
js2xml.addChildElement(updateStorageServiceInputElement, geoReplicationEnabledElement);
|
||||
}
|
||||
|
||||
if (parameters.extendedProperties) {
|
||||
if (parameters.extendedProperties !== null && parameters.extendedProperties !== undefined) {
|
||||
var extendedPropertiesDictionaryElement = js2xml.createElement('ExtendedProperties', 'http://schemas.microsoft.com/windowsazure');
|
||||
for (var extendedPropertiesKey in parameters.extendedProperties) {
|
||||
var extendedPropertiesValue = parameters.extendedProperties[extendedPropertiesKey];
|
||||
|
@ -1488,12 +1463,18 @@ var StorageAccountOperations = ( /** @lends StorageAccountOperations */ function
|
|||
js2xml.addChildElement(updateStorageServiceInputElement, extendedPropertiesDictionaryElement);
|
||||
}
|
||||
|
||||
if (parameters.accountType !== null && parameters.accountType !== undefined) {
|
||||
var accountTypeElement = js2xml.createElement('AccountType', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(accountTypeElement, parameters.accountType);
|
||||
js2xml.addChildElement(updateStorageServiceInputElement, accountTypeElement);
|
||||
}
|
||||
|
||||
requestContent = js2xml.serializeDocument(requestDoc);
|
||||
httpRequest.body = requestContent;
|
||||
httpRequest.headers['Content-Length'] = Buffer.isBuffer(requestContent) ? requestContent.length : Buffer.byteLength(requestContent, 'UTF8');
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
|
|
@ -116,7 +116,7 @@ var StoreManagementClient = ( /** @lends StoreManagementClient */ function() {
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = '/' + (this.credentials.subscriptionId ? this.credentials.subscriptionId.trim() : '') + '/operations/' + requestId.trim();
|
||||
var url2 = '/' + (this.credentials.subscriptionId !== null && this.credentials.subscriptionId !== undefined ? this.credentials.subscriptionId.trim() : '') + '/operations/' + requestId.trim();
|
||||
var baseUrl = this.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
if (baseUrl[baseUrl.length - 1] === '/') {
|
||||
|
@ -139,7 +139,7 @@ var StoreManagementClient = ( /** @lends StoreManagementClient */ function() {
|
|||
|
||||
// Send Request
|
||||
return this.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -158,43 +158,43 @@ var StoreManagementClient = ( /** @lends StoreManagementClient */ function() {
|
|||
options.trim = false;
|
||||
options.strict = false;
|
||||
return xml.parseString(responseContent, options, function (err2, responseDoc) {
|
||||
if (err2) {
|
||||
if (err2 !== null && err2 !== undefined) {
|
||||
return callback(err2);
|
||||
}
|
||||
|
||||
var operationElement = js2xml.getElement(responseDoc, responseDoc, 'OPERATION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (operationElement) {
|
||||
if (operationElement !== null && operationElement !== undefined) {
|
||||
var idElement = js2xml.getElement(responseDoc, operationElement, 'ID', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (idElement) {
|
||||
if (idElement !== null && idElement !== undefined) {
|
||||
var idInstance = idElement;
|
||||
result.id = idInstance;
|
||||
}
|
||||
|
||||
var statusElement = js2xml.getElement(responseDoc, operationElement, 'STATUS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (statusElement) {
|
||||
if (statusElement !== null && statusElement !== undefined) {
|
||||
var statusInstance = statusElement;
|
||||
result.status = statusInstance;
|
||||
}
|
||||
|
||||
var httpStatusCodeElement = js2xml.getElement(responseDoc, operationElement, 'HTTPSTATUSCODE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (httpStatusCodeElement) {
|
||||
if (httpStatusCodeElement !== null && httpStatusCodeElement !== undefined) {
|
||||
var httpStatusCodeInstance = httpStatusCodeElement;
|
||||
result.httpStatusCode = httpStatusCodeInstance;
|
||||
}
|
||||
|
||||
var errorElement = js2xml.getElement(responseDoc, operationElement, 'ERROR', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (errorElement) {
|
||||
if (errorElement !== null && errorElement !== undefined) {
|
||||
var errorInstance = {};
|
||||
result.error = errorInstance;
|
||||
|
||||
var codeElement = js2xml.getElement(responseDoc, errorElement, 'CODE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (codeElement) {
|
||||
if (codeElement !== null && codeElement !== undefined) {
|
||||
var codeInstance = codeElement;
|
||||
errorInstance.code = codeInstance;
|
||||
}
|
||||
|
||||
var messageElement = js2xml.getElement(responseDoc, errorElement, 'MESSAGE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (messageElement) {
|
||||
if (messageElement !== null && messageElement !== undefined) {
|
||||
var messageInstance = messageElement;
|
||||
errorInstance.message = messageInstance;
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ var AddOnOperations = ( /** @lends AddOnOperations */ function() {
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId ? this.client.credentials.subscriptionId.trim() : '') + '/CloudServices/' + cloudServiceName.trim() + '/resources/' + parameters.type.trim() + '/' + resourceName.trim() + '/' + addOnName.trim();
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId !== null && this.client.credentials.subscriptionId !== undefined ? this.client.credentials.subscriptionId.trim() : '') + '/CloudServices/' + cloudServiceName.trim() + '/resources/' + parameters.type.trim() + '/' + resourceName.trim() + '/' + addOnName.trim();
|
||||
var baseUrl = this.client.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
if (baseUrl[baseUrl.length - 1] === '/') {
|
||||
|
@ -320,7 +320,7 @@ var AddOnOperations = ( /** @lends AddOnOperations */ function() {
|
|||
js2xml.setElementValue(planElement, parameters.plan);
|
||||
js2xml.addChildElement(resourceElement, planElement);
|
||||
|
||||
if (parameters.promotionCode) {
|
||||
if (parameters.promotionCode !== null && parameters.promotionCode !== undefined) {
|
||||
var promotionCodeElement = js2xml.createElement('PromotionCode', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(promotionCodeElement, parameters.promotionCode);
|
||||
js2xml.addChildElement(resourceElement, promotionCodeElement);
|
||||
|
@ -331,7 +331,7 @@ var AddOnOperations = ( /** @lends AddOnOperations */ function() {
|
|||
httpRequest.headers['Content-Length'] = Buffer.isBuffer(requestContent) ? requestContent.length : Buffer.byteLength(requestContent, 'UTF8');
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -390,7 +390,7 @@ var AddOnOperations = ( /** @lends AddOnOperations */ function() {
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId ? this.client.credentials.subscriptionId.trim() : '') + '/CloudServices/' + cloudServiceName.trim() + '/resources/' + resourceProviderNamespace.trim() + '/' + resourceProviderType.trim() + '/' + resourceProviderName.trim();
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId !== null && this.client.credentials.subscriptionId !== undefined ? this.client.credentials.subscriptionId.trim() : '') + '/CloudServices/' + cloudServiceName.trim() + '/resources/' + resourceProviderNamespace.trim() + '/' + resourceProviderType.trim() + '/' + resourceProviderName.trim();
|
||||
var baseUrl = this.client.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
if (baseUrl[baseUrl.length - 1] === '/') {
|
||||
|
@ -413,7 +413,7 @@ var AddOnOperations = ( /** @lends AddOnOperations */ function() {
|
|||
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -465,7 +465,7 @@ var AddOnOperations = ( /** @lends AddOnOperations */ function() {
|
|||
var client2 = this.client;
|
||||
|
||||
return client2.addOns.beginCreating(cloudServiceName, resourceName, addOnName, parameters, function (err, result) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
if (result.status === 'Succeeded') {
|
||||
|
@ -479,12 +479,12 @@ var AddOnOperations = ( /** @lends AddOnOperations */ function() {
|
|||
var pollOperation = function () {
|
||||
setTimeout(function () {
|
||||
return client2.getOperationStatus(result.requestId, function (err2, result2) {
|
||||
if (err2) {
|
||||
if (err2 !== null && err2 !== undefined) {
|
||||
return callback(err2);
|
||||
} else {
|
||||
if (result2.status !== 'InProgress') {
|
||||
if (result2.status !== 'Succeeded') {
|
||||
if (result2.error) {
|
||||
if (result2.error !== null && result2.error !== undefined) {
|
||||
var ex = new Error(result2.error.code + ' : ' + result2.error.message);
|
||||
ex.errorCode = result2.error.code;
|
||||
ex.errorMessage = result2.error.message;
|
||||
|
@ -537,7 +537,7 @@ var AddOnOperations = ( /** @lends AddOnOperations */ function() {
|
|||
var client2 = this.client;
|
||||
|
||||
return client2.addOns.beginDeleting(cloudServiceName, resourceProviderNamespace, resourceProviderType, resourceProviderName, function (err, result) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
if (result.status === 'Succeeded') {
|
||||
|
@ -551,12 +551,12 @@ var AddOnOperations = ( /** @lends AddOnOperations */ function() {
|
|||
var pollOperation = function () {
|
||||
setTimeout(function () {
|
||||
return client2.getOperationStatus(result.requestId, function (err2, result2) {
|
||||
if (err2) {
|
||||
if (err2 !== null && err2 !== undefined) {
|
||||
return callback(err2);
|
||||
} else {
|
||||
if (result2.status !== 'InProgress') {
|
||||
if (result2.status !== 'Succeeded') {
|
||||
if (result2.error) {
|
||||
if (result2.error !== null && result2.error !== undefined) {
|
||||
var ex = new Error(result2.error.code + ' : ' + result2.error.message);
|
||||
ex.errorCode = result2.error.code;
|
||||
ex.errorMessage = result2.error.message;
|
||||
|
@ -636,7 +636,7 @@ var AddOnOperations = ( /** @lends AddOnOperations */ function() {
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId ? this.client.credentials.subscriptionId.trim() : '') + '/CloudServices/' + cloudServiceName.trim() + '/resources/' + parameters.type.trim() + '/' + resourceName.trim() + '/' + addOnName.trim();
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId !== null && this.client.credentials.subscriptionId !== undefined ? this.client.credentials.subscriptionId.trim() : '') + '/CloudServices/' + cloudServiceName.trim() + '/resources/' + parameters.type.trim() + '/' + resourceName.trim() + '/' + addOnName.trim();
|
||||
var baseUrl = this.client.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
if (baseUrl[baseUrl.length - 1] === '/') {
|
||||
|
@ -674,7 +674,7 @@ var AddOnOperations = ( /** @lends AddOnOperations */ function() {
|
|||
js2xml.setElementValue(planElement, parameters.plan);
|
||||
js2xml.addChildElement(resourceElement, planElement);
|
||||
|
||||
if (parameters.promotionCode) {
|
||||
if (parameters.promotionCode !== null && parameters.promotionCode !== undefined) {
|
||||
var promotionCodeElement = js2xml.createElement('PromotionCode', 'http://schemas.microsoft.com/windowsazure');
|
||||
js2xml.setElementValue(promotionCodeElement, parameters.promotionCode);
|
||||
js2xml.addChildElement(resourceElement, promotionCodeElement);
|
||||
|
@ -685,7 +685,7 @@ var AddOnOperations = ( /** @lends AddOnOperations */ function() {
|
|||
httpRequest.headers['Content-Length'] = Buffer.isBuffer(requestContent) ? requestContent.length : Buffer.byteLength(requestContent, 'UTF8');
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -774,7 +774,7 @@ var CloudServiceOperations = ( /** @lends CloudServiceOperations */ function() {
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId ? this.client.credentials.subscriptionId.trim() : '') + '/CloudServices/' + parameters.name.trim() + '/';
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId !== null && this.client.credentials.subscriptionId !== undefined ? this.client.credentials.subscriptionId.trim() : '') + '/CloudServices/' + parameters.name.trim() + '/';
|
||||
var baseUrl = this.client.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
if (baseUrl[baseUrl.length - 1] === '/') {
|
||||
|
@ -824,7 +824,7 @@ var CloudServiceOperations = ( /** @lends CloudServiceOperations */ function() {
|
|||
httpRequest.headers['Content-Length'] = Buffer.isBuffer(requestContent) ? requestContent.length : Buffer.byteLength(requestContent, 'UTF8');
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -874,7 +874,7 @@ var CloudServiceOperations = ( /** @lends CloudServiceOperations */ function() {
|
|||
var client2 = this.client;
|
||||
|
||||
return client2.cloudServices.beginCreating(parameters, function (err, result) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
if (result.status === 'Succeeded') {
|
||||
|
@ -888,12 +888,12 @@ var CloudServiceOperations = ( /** @lends CloudServiceOperations */ function() {
|
|||
var pollOperation = function () {
|
||||
setTimeout(function () {
|
||||
return client2.getOperationStatus(result.requestId, function (err2, result2) {
|
||||
if (err2) {
|
||||
if (err2 !== null && err2 !== undefined) {
|
||||
return callback(err2);
|
||||
} else {
|
||||
if (result2.status !== 'InProgress') {
|
||||
if (result2.status !== 'Succeeded') {
|
||||
if (result2.error) {
|
||||
if (result2.error !== null && result2.error !== undefined) {
|
||||
var ex = new Error(result2.error.code + ' : ' + result2.error.message);
|
||||
ex.errorCode = result2.error.code;
|
||||
ex.errorMessage = result2.error.message;
|
||||
|
@ -938,7 +938,7 @@ var CloudServiceOperations = ( /** @lends CloudServiceOperations */ function() {
|
|||
// Tracing
|
||||
|
||||
// Construct URL
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId ? this.client.credentials.subscriptionId.trim() : '') + '/CloudServices/';
|
||||
var url2 = '/' + (this.client.credentials.subscriptionId !== null && this.client.credentials.subscriptionId !== undefined ? this.client.credentials.subscriptionId.trim() : '') + '/CloudServices/';
|
||||
var baseUrl = this.client.baseUri;
|
||||
// Trim '/' character from the end of baseUrl and beginning of url.
|
||||
if (baseUrl[baseUrl.length - 1] === '/') {
|
||||
|
@ -961,7 +961,7 @@ var CloudServiceOperations = ( /** @lends CloudServiceOperations */ function() {
|
|||
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -980,117 +980,117 @@ var CloudServiceOperations = ( /** @lends CloudServiceOperations */ function() {
|
|||
options.trim = false;
|
||||
options.strict = false;
|
||||
return xml.parseString(responseContent, options, function (err2, responseDoc) {
|
||||
if (err2) {
|
||||
if (err2 !== null && err2 !== undefined) {
|
||||
return callback(err2);
|
||||
}
|
||||
|
||||
var cloudServicesSequenceElement = js2xml.getElement(responseDoc, responseDoc, 'CLOUDSERVICES', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (cloudServicesSequenceElement) {
|
||||
if (cloudServicesSequenceElement !== null && cloudServicesSequenceElement !== undefined) {
|
||||
for (var loweredIndex1 = 0; loweredIndex1 < js2xml.getElements(responseDoc, cloudServicesSequenceElement, 'CLOUDSERVICE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE').length; loweredIndex1 = loweredIndex1 + 1) {
|
||||
var cloudServicesElement = js2xml.getElements(responseDoc, cloudServicesSequenceElement, 'CLOUDSERVICE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE')[loweredIndex1];
|
||||
var cloudServiceInstance = { resources: [] };
|
||||
result.cloudServices.push(cloudServiceInstance);
|
||||
|
||||
var nameElement = js2xml.getElement(responseDoc, cloudServicesElement, 'NAME', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (nameElement) {
|
||||
if (nameElement !== null && nameElement !== undefined) {
|
||||
var nameInstance = nameElement;
|
||||
cloudServiceInstance.name = nameInstance;
|
||||
}
|
||||
|
||||
var labelElement = js2xml.getElement(responseDoc, cloudServicesElement, 'LABEL', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (labelElement) {
|
||||
if (labelElement !== null && labelElement !== undefined) {
|
||||
var labelInstance = new Buffer(labelElement, 'base64').toString('utf8');
|
||||
cloudServiceInstance.label = labelInstance;
|
||||
}
|
||||
|
||||
var descriptionElement = js2xml.getElement(responseDoc, cloudServicesElement, 'DESCRIPTION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (descriptionElement) {
|
||||
if (descriptionElement !== null && descriptionElement !== undefined) {
|
||||
var descriptionInstance = descriptionElement;
|
||||
cloudServiceInstance.description = descriptionInstance;
|
||||
}
|
||||
|
||||
var geoRegionElement = js2xml.getElement(responseDoc, cloudServicesElement, 'GEOREGION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (geoRegionElement) {
|
||||
if (geoRegionElement !== null && geoRegionElement !== undefined) {
|
||||
var geoRegionInstance = geoRegionElement;
|
||||
cloudServiceInstance.geoRegion = geoRegionInstance;
|
||||
}
|
||||
|
||||
var resourcesSequenceElement = js2xml.getElement(responseDoc, cloudServicesElement, 'RESOURCES', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (resourcesSequenceElement) {
|
||||
if (resourcesSequenceElement !== null && resourcesSequenceElement !== undefined) {
|
||||
for (var loweredIndex2 = 0; loweredIndex2 < js2xml.getElements(responseDoc, resourcesSequenceElement, 'RESOURCE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE').length; loweredIndex2 = loweredIndex2 + 1) {
|
||||
var resourcesElement = js2xml.getElements(responseDoc, resourcesSequenceElement, 'RESOURCE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE')[loweredIndex2];
|
||||
var resourceInstance = { outputItems: {}, usageLimits: [] };
|
||||
cloudServiceInstance.resources.push(resourceInstance);
|
||||
|
||||
var resourceProviderNamespaceElement = js2xml.getElement(responseDoc, resourcesElement, 'RESOURCEPROVIDERNAMESPACE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (resourceProviderNamespaceElement) {
|
||||
if (resourceProviderNamespaceElement !== null && resourceProviderNamespaceElement !== undefined) {
|
||||
var resourceProviderNamespaceInstance = resourceProviderNamespaceElement;
|
||||
resourceInstance.namespace = resourceProviderNamespaceInstance;
|
||||
}
|
||||
|
||||
var typeElement = js2xml.getElement(responseDoc, resourcesElement, 'TYPE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (typeElement) {
|
||||
if (typeElement !== null && typeElement !== undefined) {
|
||||
var typeInstance = typeElement;
|
||||
resourceInstance.type = typeInstance;
|
||||
}
|
||||
|
||||
var nameElement2 = js2xml.getElement(responseDoc, resourcesElement, 'NAME', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (nameElement2) {
|
||||
if (nameElement2 !== null && nameElement2 !== undefined) {
|
||||
var nameInstance2 = nameElement2;
|
||||
resourceInstance.name = nameInstance2;
|
||||
}
|
||||
|
||||
var planElement = js2xml.getElement(responseDoc, resourcesElement, 'PLAN', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (planElement) {
|
||||
if (planElement !== null && planElement !== undefined) {
|
||||
var planInstance = planElement;
|
||||
resourceInstance.plan = planInstance;
|
||||
}
|
||||
|
||||
var schemaVersionElement = js2xml.getElement(responseDoc, resourcesElement, 'SCHEMAVERSION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (schemaVersionElement) {
|
||||
if (schemaVersionElement !== null && schemaVersionElement !== undefined) {
|
||||
var schemaVersionInstance = schemaVersionElement;
|
||||
resourceInstance.schemaVersion = schemaVersionInstance;
|
||||
}
|
||||
|
||||
var eTagElement = js2xml.getElement(responseDoc, resourcesElement, 'ETAG', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (eTagElement) {
|
||||
if (eTagElement !== null && eTagElement !== undefined) {
|
||||
var eTagInstance = eTagElement;
|
||||
resourceInstance.eTag = eTagInstance;
|
||||
}
|
||||
|
||||
var stateElement = js2xml.getElement(responseDoc, resourcesElement, 'STATE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (stateElement) {
|
||||
if (stateElement !== null && stateElement !== undefined) {
|
||||
var stateInstance = stateElement;
|
||||
resourceInstance.state = stateInstance;
|
||||
}
|
||||
|
||||
var usageMetersSequenceElement = js2xml.getElement(responseDoc, resourcesElement, 'USAGEMETERS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (usageMetersSequenceElement) {
|
||||
if (usageMetersSequenceElement !== null && usageMetersSequenceElement !== undefined) {
|
||||
for (var loweredIndex3 = 0; loweredIndex3 < js2xml.getElements(responseDoc, usageMetersSequenceElement, 'USAGEMETER', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE').length; loweredIndex3 = loweredIndex3 + 1) {
|
||||
var usageMetersElement = js2xml.getElements(responseDoc, usageMetersSequenceElement, 'USAGEMETER', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE')[loweredIndex3];
|
||||
var usageMeterInstance = {};
|
||||
resourceInstance.usageLimits.push(usageMeterInstance);
|
||||
|
||||
var nameElement3 = js2xml.getElement(responseDoc, usageMetersElement, 'NAME', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (nameElement3) {
|
||||
if (nameElement3 !== null && nameElement3 !== undefined) {
|
||||
var nameInstance3 = nameElement3;
|
||||
usageMeterInstance.name = nameInstance3;
|
||||
}
|
||||
|
||||
var unitElement = js2xml.getElement(responseDoc, usageMetersElement, 'UNIT', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (unitElement) {
|
||||
if (unitElement !== null && unitElement !== undefined) {
|
||||
var unitInstance = unitElement;
|
||||
usageMeterInstance.unit = unitInstance;
|
||||
}
|
||||
|
||||
var includedElement = js2xml.getElement(responseDoc, usageMetersElement, 'INCLUDED', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (includedElement) {
|
||||
if (includedElement !== null && includedElement !== undefined) {
|
||||
var includedInstance = parseInt(includedElement, 10);
|
||||
usageMeterInstance.amountIncluded = includedInstance;
|
||||
}
|
||||
|
||||
var usedElement = js2xml.getElement(responseDoc, usageMetersElement, 'USED', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (usedElement) {
|
||||
if (usedElement !== null && usedElement !== undefined) {
|
||||
var usedInstance = parseInt(usedElement, 10);
|
||||
usageMeterInstance.amountUsed = usedInstance;
|
||||
}
|
||||
|
@ -1098,7 +1098,7 @@ var CloudServiceOperations = ( /** @lends CloudServiceOperations */ function() {
|
|||
}
|
||||
|
||||
var outputItemsSequenceElement = js2xml.getElement(responseDoc, resourcesElement, 'OUTPUTITEMS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (outputItemsSequenceElement) {
|
||||
if (outputItemsSequenceElement !== null && outputItemsSequenceElement !== undefined) {
|
||||
for (var loweredIndex4 = 0; loweredIndex4 < js2xml.getElements(responseDoc, outputItemsSequenceElement, 'OUTPUTITEM', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE').length; loweredIndex4 = loweredIndex4 + 1) {
|
||||
var outputItemsElement = js2xml.getElements(responseDoc, outputItemsSequenceElement, 'OUTPUTITEM', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE')[loweredIndex4];
|
||||
var outputItemsKey = js2xml.getElement(responseDoc, outputItemsElement, 'KEY', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
|
@ -1108,18 +1108,18 @@ var CloudServiceOperations = ( /** @lends CloudServiceOperations */ function() {
|
|||
}
|
||||
|
||||
var operationStatusElement = js2xml.getElement(responseDoc, resourcesElement, 'OPERATIONSTATUS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (operationStatusElement) {
|
||||
if (operationStatusElement !== null && operationStatusElement !== undefined) {
|
||||
var operationStatusInstance = {};
|
||||
resourceInstance.status = operationStatusInstance;
|
||||
|
||||
var typeElement2 = js2xml.getElement(responseDoc, operationStatusElement, 'TYPE', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (typeElement2) {
|
||||
if (typeElement2 !== null && typeElement2 !== undefined) {
|
||||
var typeInstance2 = typeElement2;
|
||||
operationStatusInstance.type = typeInstance2;
|
||||
}
|
||||
|
||||
var resultElement = js2xml.getElement(responseDoc, operationStatusElement, 'RESULT', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (resultElement) {
|
||||
if (resultElement !== null && resultElement !== undefined) {
|
||||
var resultInstance = resultElement;
|
||||
operationStatusInstance.result = resultInstance;
|
||||
}
|
||||
|
|
|
@ -138,7 +138,7 @@ var SubscriptionOperations = ( /** @lends SubscriptionOperations */ function() {
|
|||
|
||||
// Send Request
|
||||
return this.client.pipeline(httpRequest, function (err, response, body) {
|
||||
if (err) {
|
||||
if (err !== null && err !== undefined) {
|
||||
return callback(err);
|
||||
}
|
||||
var statusCode = response.statusCode;
|
||||
|
@ -157,116 +157,116 @@ var SubscriptionOperations = ( /** @lends SubscriptionOperations */ function() {
|
|||
options.trim = false;
|
||||
options.strict = false;
|
||||
return xml.parseString(responseContent, options, function (err2, responseDoc) {
|
||||
if (err2) {
|
||||
if (err2 !== null && err2 !== undefined) {
|
||||
return callback(err2);
|
||||
}
|
||||
|
||||
var subscriptionsElement = js2xml.getElement(responseDoc, responseDoc, 'SUBSCRIPTIONS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (subscriptionsElement) {
|
||||
if (subscriptionsElement) {
|
||||
if (subscriptionsElement !== null && subscriptionsElement !== undefined) {
|
||||
if (subscriptionsElement !== null && subscriptionsElement !== undefined) {
|
||||
for (var loweredIndex1 = 0; loweredIndex1 < js2xml.getElements(responseDoc, subscriptionsElement, 'SUBSCRIPTION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE').length; loweredIndex1 = loweredIndex1 + 1) {
|
||||
var subscriptionsElement2 = js2xml.getElements(responseDoc, subscriptionsElement, 'SUBSCRIPTION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE')[loweredIndex1];
|
||||
var subscriptionInstance = {};
|
||||
result.subscriptions.push(subscriptionInstance);
|
||||
|
||||
var subscriptionIDElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'SUBSCRIPTIONID', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (subscriptionIDElement) {
|
||||
if (subscriptionIDElement !== null && subscriptionIDElement !== undefined) {
|
||||
var subscriptionIDInstance = subscriptionIDElement;
|
||||
subscriptionInstance.subscriptionId = subscriptionIDInstance;
|
||||
}
|
||||
|
||||
var subscriptionNameElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'SUBSCRIPTIONNAME', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (subscriptionNameElement) {
|
||||
if (subscriptionNameElement !== null && subscriptionNameElement !== undefined) {
|
||||
var subscriptionNameInstance = subscriptionNameElement;
|
||||
subscriptionInstance.subscriptionName = subscriptionNameInstance;
|
||||
}
|
||||
|
||||
var subscriptionStatusElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'SUBSCRIPTIONSTATUS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (subscriptionStatusElement) {
|
||||
if (subscriptionStatusElement !== null && subscriptionStatusElement !== undefined) {
|
||||
var subscriptionStatusInstance = subscriptionStatusElement;
|
||||
subscriptionInstance.subscriptionStatus = subscriptionStatusInstance;
|
||||
}
|
||||
|
||||
var accountAdminLiveEmailIdElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'ACCOUNTADMINLIVEEMAILID', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (accountAdminLiveEmailIdElement) {
|
||||
if (accountAdminLiveEmailIdElement !== null && accountAdminLiveEmailIdElement !== undefined) {
|
||||
var accountAdminLiveEmailIdInstance = accountAdminLiveEmailIdElement;
|
||||
subscriptionInstance.accountAdminLiveEmailId = accountAdminLiveEmailIdInstance;
|
||||
}
|
||||
|
||||
var serviceAdminLiveEmailIdElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'SERVICEADMINLIVEEMAILID', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (serviceAdminLiveEmailIdElement) {
|
||||
if (serviceAdminLiveEmailIdElement !== null && serviceAdminLiveEmailIdElement !== undefined) {
|
||||
var serviceAdminLiveEmailIdInstance = serviceAdminLiveEmailIdElement;
|
||||
subscriptionInstance.serviceAdminLiveEmailId = serviceAdminLiveEmailIdInstance;
|
||||
}
|
||||
|
||||
var maxCoreCountElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'MAXCORECOUNT', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (maxCoreCountElement) {
|
||||
if (maxCoreCountElement !== null && maxCoreCountElement !== undefined) {
|
||||
var maxCoreCountInstance = parseInt(maxCoreCountElement, 10);
|
||||
subscriptionInstance.maximumCoreCount = maxCoreCountInstance;
|
||||
}
|
||||
|
||||
var maxStorageAccountsElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'MAXSTORAGEACCOUNTS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (maxStorageAccountsElement) {
|
||||
if (maxStorageAccountsElement !== null && maxStorageAccountsElement !== undefined) {
|
||||
var maxStorageAccountsInstance = parseInt(maxStorageAccountsElement, 10);
|
||||
subscriptionInstance.maximumStorageAccounts = maxStorageAccountsInstance;
|
||||
}
|
||||
|
||||
var maxHostedServicesElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'MAXHOSTEDSERVICES', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (maxHostedServicesElement) {
|
||||
if (maxHostedServicesElement !== null && maxHostedServicesElement !== undefined) {
|
||||
var maxHostedServicesInstance = parseInt(maxHostedServicesElement, 10);
|
||||
subscriptionInstance.maximumHostedServices = maxHostedServicesInstance;
|
||||
}
|
||||
|
||||
var currentCoreCountElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'CURRENTCORECOUNT', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (currentCoreCountElement) {
|
||||
if (currentCoreCountElement !== null && currentCoreCountElement !== undefined) {
|
||||
var currentCoreCountInstance = parseInt(currentCoreCountElement, 10);
|
||||
subscriptionInstance.currentCoreCount = currentCoreCountInstance;
|
||||
}
|
||||
|
||||
var currentStorageAccountsElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'CURRENTSTORAGEACCOUNTS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (currentStorageAccountsElement) {
|
||||
if (currentStorageAccountsElement !== null && currentStorageAccountsElement !== undefined) {
|
||||
var currentStorageAccountsInstance = parseInt(currentStorageAccountsElement, 10);
|
||||
subscriptionInstance.currentStorageAccounts = currentStorageAccountsInstance;
|
||||
}
|
||||
|
||||
var currentHostedServicesElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'CURRENTHOSTEDSERVICES', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (currentHostedServicesElement) {
|
||||
if (currentHostedServicesElement !== null && currentHostedServicesElement !== undefined) {
|
||||
var currentHostedServicesInstance = parseInt(currentHostedServicesElement, 10);
|
||||
subscriptionInstance.currentHostedServices = currentHostedServicesInstance;
|
||||
}
|
||||
|
||||
var maxVirtualNetworkSitesElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'MAXVIRTUALNETWORKSITES', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (maxVirtualNetworkSitesElement) {
|
||||
if (maxVirtualNetworkSitesElement !== null && maxVirtualNetworkSitesElement !== undefined) {
|
||||
var maxVirtualNetworkSitesInstance = parseInt(maxVirtualNetworkSitesElement, 10);
|
||||
subscriptionInstance.maximumVirtualNetworkSites = maxVirtualNetworkSitesInstance;
|
||||
}
|
||||
|
||||
var maxLocalNetworkSitesElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'MAXLOCALNETWORKSITES', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (maxLocalNetworkSitesElement) {
|
||||
if (maxLocalNetworkSitesElement !== null && maxLocalNetworkSitesElement !== undefined) {
|
||||
var maxLocalNetworkSitesInstance = parseInt(maxLocalNetworkSitesElement, 10);
|
||||
subscriptionInstance.maximumLocalNetworkSites = maxLocalNetworkSitesInstance;
|
||||
}
|
||||
|
||||
var maxDnsServersElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'MAXDNSSERVERS', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (maxDnsServersElement) {
|
||||
if (maxDnsServersElement !== null && maxDnsServersElement !== undefined) {
|
||||
var maxDnsServersInstance = parseInt(maxDnsServersElement, 10);
|
||||
subscriptionInstance.maximumDnsServers = maxDnsServersInstance;
|
||||
}
|
||||
|
||||
var maxExtraVIPCountElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'MAXEXTRAVIPCOUNT', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (maxExtraVIPCountElement) {
|
||||
if (maxExtraVIPCountElement !== null && maxExtraVIPCountElement !== undefined) {
|
||||
var maxExtraVIPCountInstance = parseInt(maxExtraVIPCountElement, 10);
|
||||
subscriptionInstance.maximumExtraVirtualIPCount = maxExtraVIPCountInstance;
|
||||
}
|
||||
|
||||
var aADTenantIDElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'AADTENANTID', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (aADTenantIDElement) {
|
||||
if (aADTenantIDElement !== null && aADTenantIDElement !== undefined) {
|
||||
var aADTenantIDInstance = aADTenantIDElement;
|
||||
subscriptionInstance.activeDirectoryTenantId = aADTenantIDInstance;
|
||||
}
|
||||
|
||||
var createdTimeElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'CREATEDTIME', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE');
|
||||
if (createdTimeElement) {
|
||||
if (createdTimeElement !== null && createdTimeElement !== undefined) {
|
||||
var createdTimeInstance = new Date(createdTimeElement);
|
||||
subscriptionInstance.created = createdTimeInstance;
|
||||
}
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,22 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Hydra.Generator" version="1.0.5309.32163-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Management.Compute.Specification" version="2.0.5281.42265-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Management.Scheduler.Specification" version="1.0.5281.27788-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Management.CloudServices.Specification" version="1.0.5368.26114-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Management.Specification" version="1.0.5275.27152-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Management.Sql.Specification" version="1.0.5275.27155-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Management.Storage.Specification" version="1.0.5275.27155-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Management.WebSites.Specification" version="3.0.5275.27157-prerelease" targetFramework="portable-net45+sl50+win+wp80" />
|
||||
<package id="Microsoft.WindowsAzure.WebSitesExtensions.Specification" version="3.0.5289.24852-prerelease" targetFramework="portable-net45+sl50+win+wp80" />
|
||||
<package id="Microsoft.WindowsAzure.Management.Store.Specification" version="1.0.5275.27156-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Management.Network.Specification" version="2.0.5275.27153-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Management.ServiceBus.Specification" version="1.0.5275.27154-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Subscriptions.Specification" version="1.0.5275.27156-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.Azure.Management.Resources.Specification" version="1.0.5344.21895-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.Azure.Gallery.Specification" version="1.0.5275.27151-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Management.Monitoring2.Specification" version="1.0.5275.27153-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.Azure.Management.WebSites.Specification" version="2.0.5282.18047-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.Azure.Management.Authorization.Specification" version="1.0.5344.21457-prerelease" targetFramework="portable-net45+sl50+win+wp80" />
|
||||
<package id="Microsoft.Azure.Graph.RBAC.Specification" version="1.0.5373.17666-prerelease" targetFramework="portable-net45+sl50+win+wp80" />
|
||||
<package id="Hyak.Generator" version="1.0.5400.37276-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Management.Compute.Specification" version="2.0.5427.16699-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Management.Scheduler.Specification" version="1.0.5427.16701-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Management.CloudServices.Specification" version="1.0.5427.16699-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Management.Specification" version="1.0.5427.16700-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Management.Sql.Specification" version="1.0.5427.16701-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Management.Storage.Specification" version="1.0.5427.16701-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Management.WebSites.Specification" version="3.0.5427.16702-prerelease" targetFramework="portable-net45+sl50+win+wp80" />
|
||||
<package id="Microsoft.WindowsAzure.WebSitesExtensions.Specification" version="3.0.5427.16704-prerelease" targetFramework="portable-net45+sl50+win+wp80" />
|
||||
<package id="Microsoft.WindowsAzure.Management.Store.Specification" version="1.0.5427.16702-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Management.Network.Specification" version="2.0.5427.16701-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Management.ServiceBus.Specification" version="1.0.5427.16701-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Subscriptions.Specification" version="1.0.5427.16702-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.Azure.Management.Resources.Specification" version="1.0.5427.16701-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.Azure.Gallery.Specification" version="1.0.5427.16700-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.WindowsAzure.Management.Monitoring.Specification" version="1.0.5427.16701-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.Azure.Management.WebSites.Specification" version="2.0.5427.16702-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
|
||||
<package id="Microsoft.Azure.Management.Authorization.Specification" version="1.0.5427.16704-prerelease" targetFramework="portable-net45+sl50+win+wp80" />
|
||||
<package id="Microsoft.Azure.Graph.RBAC.Specification" version="1.0.5427.16705-prerelease" targetFramework="portable-net45+sl50+win+wp80" />
|
||||
</packages>
|
||||
|
|
|
@ -114,7 +114,7 @@ module.exports = function(grunt) {
|
|||
});
|
||||
|
||||
grunt.registerMultiTask('hydra', 'Run hydra code generator', function () {
|
||||
var hydraExePath = newest(grunt.file.expand('./packages/Hydra.Generator.*/tools/hydra.exe'));
|
||||
var hydraExePath = newest(grunt.file.expand('./packages/Hyak.Generator.*/tools/hyak.exe'));
|
||||
var specDllName = this.target;
|
||||
var specPath = newest(grunt.file.expand('./packages/**/tools/' + specDllName));
|
||||
var args;
|
||||
|
|
Загрузка…
Ссылка в новой задаче