azure-mgmt-subscription
Advanced tools
Comparing version
@@ -141,3 +141,3 @@ /* jshint latedef:false */ | ||
return this.client.pipeline(httpRequest, function (err, response, body) { | ||
if (err) { | ||
if (err !== null && err !== undefined) { | ||
return callback(err); | ||
@@ -161,3 +161,3 @@ } | ||
return xml.parseString(responseContent, options, function (err2, responseDoc) { | ||
if (err2) { | ||
if (err2 !== null && err2 !== undefined) { | ||
return callback(err2); | ||
@@ -167,4 +167,4 @@ } | ||
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) { | ||
@@ -176,3 +176,3 @@ var subscriptionsElement2 = js2xml.getElements(responseDoc, subscriptionsElement, 'SUBSCRIPTION', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE')[loweredIndex1]; | ||
var subscriptionIDElement = js2xml.getElement(responseDoc, subscriptionsElement2, 'SUBSCRIPTIONID', 'HTTP://SCHEMAS.MICROSOFT.COM/WINDOWSAZURE'); | ||
if (subscriptionIDElement) { | ||
if (subscriptionIDElement !== null && subscriptionIDElement !== undefined) { | ||
var subscriptionIDInstance = subscriptionIDElement; | ||
@@ -183,3 +183,3 @@ 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; | ||
@@ -190,3 +190,3 @@ 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; | ||
@@ -197,3 +197,3 @@ 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; | ||
@@ -204,3 +204,3 @@ 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; | ||
@@ -211,3 +211,3 @@ 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); | ||
@@ -218,3 +218,3 @@ 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); | ||
@@ -225,3 +225,3 @@ 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); | ||
@@ -232,3 +232,3 @@ 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); | ||
@@ -239,3 +239,3 @@ 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); | ||
@@ -246,3 +246,3 @@ 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); | ||
@@ -253,3 +253,3 @@ 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); | ||
@@ -260,3 +260,3 @@ 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); | ||
@@ -267,3 +267,3 @@ 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); | ||
@@ -274,3 +274,3 @@ 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); | ||
@@ -281,3 +281,3 @@ 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; | ||
@@ -288,3 +288,3 @@ 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); | ||
@@ -291,0 +291,0 @@ subscriptionInstance.created = createdTimeInstance; |
@@ -13,3 +13,3 @@ { | ||
], | ||
"version": "0.9.12", | ||
"version": "0.9.13", | ||
"description": "Microsoft Azure Subscription Management Client Library for node", | ||
@@ -16,0 +16,0 @@ "tags": [ |
@@ -24,4 +24,4 @@ # Microsoft Azure SDK for Node.js - Subscription Management | ||
* Either uploading a certificate in the [Microsoft Azure management portal](https://manage.windowsazure.com). | ||
* Or use the [Microsoft Azure Xplat-CLI](https://github.com/WindowsAzure/azure-sdk-tools-xplat). | ||
* Obtain the .pem file of your certificate. If you used [Microsoft Azure Xplat-CLI](https://github.com/WindowsAzure/azure-sdk-tools-xplat) to set it up. You can run ``azure account cert export`` to get the .pem file. | ||
* Or use the [Microsoft Azure Xplat-CLI](https://github.com/Azure/azure-xplat-cli). | ||
* Obtain the .pem file of your certificate. If you used [Microsoft Azure Xplat-CLI](https://github.com/Azure/azure-xplat-cli) to set it up. You can run ``azure account cert export`` to get the .pem file. | ||
* Open the .pem file in a text editor and **certvalue** and **keyvalue**. | ||
@@ -28,0 +28,0 @@ |
29121
3.56%