Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
Merge branch 'merged2' into anubranch9
Browse files Browse the repository at this point in the history
  • Loading branch information
anuchandy committed Jun 27, 2012
2 parents 1627910 + 7b065c1 commit d9b57ef
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
8 changes: 5 additions & 3 deletions lib/cli/commands/account.js
Expand Up @@ -263,9 +263,11 @@ exports.init = function (cli) {
if ('Label' in storageServiceProperties) {
row.cell('Label', Buffer(storageServiceProperties.Label, 'base64').toString());
}
if ('Location' in storageServiceProperties) {
row.cell('Location', storageServiceProperties.Location);
}
// This will display affinity group GUID and GeoPrimaryLocation (if present) if Location is not present
// Affinity group or location display name is not present in the data
row.cell('Location', storageServiceProperties.Location ||
(storageServiceProperties.AffinityGroup || '') +
(storageServiceProperties.GeoPrimaryRegion ? ' (' + storageServiceProperties.GeoPrimaryRegion + ')' : ''));
});
} else {
if (log.format().json) {
Expand Down
19 changes: 15 additions & 4 deletions lib/cli/commands/vm.js
Expand Up @@ -565,7 +565,7 @@ exports.init = function(cli) {
var channel = utils.createServiceManagementService(cli.category('account').lookupSubscriptionId(options.subscription),
cli.category('account'), logger);

dnsPrefix = options.dnsPrefix.toLowerCase();
dnsPrefix = options.dnsPrefix;
// Load the roleFile if provided
if (options.role) {
role = options.role;
Expand Down Expand Up @@ -671,6 +671,11 @@ exports.init = function(cli) {
}
} else {
logger.verbose('Using Windows ProvisioningConfiguration');
if (options.userName && options.userName.toLowerCase() !== 'administrator') {
logger.warn('Only Administrator is allowed as Windows username. You specified a different value: "' +
options.userName + '". It will be ignored, and Administrator will be used.');
}

provisioningConfig = {
ConfigurationSetType: 'WindowsProvisioningConfiguration',
ComputerName: vmName,
Expand Down Expand Up @@ -930,7 +935,7 @@ exports.init = function(cli) {
var service = null;
var services = response.body;
for (var i = 0; i < services.length; i++) {
if (services[i].ServiceName.toLowerCase() === dnsPrefix) {
if (services[i].ServiceName.toLowerCase() === dnsPrefix.toLowerCase()) {
service = services[i];
break;
}
Expand Down Expand Up @@ -1003,8 +1008,14 @@ exports.init = function(cli) {
enumDeployments(channel, options, function() {
progress.end();
if (options.rsps.length === 0 && options.errs.length > 0) {
cmdCallback(options.errs[0]);
} else if (options.rsps.length > 0) {
// ignore 'ResourceNotFound' error - return no VMs in this cases. Otherwise return the error.
if (options.errs[0].code !== 'ResourceNotFound' ||
options.errs[0].message !== 'No deployments were found.') {
cmdCallback(options.errs[0]);
return;
}
}
if (options.rsps.length > 0) {
var vms = [];
for (var i = 0; i < options.rsps.length; i++) {
var roles = options.rsps[i].deploy.RoleList;
Expand Down

0 comments on commit d9b57ef

Please sign in to comment.