From ef5ebaf73724bc294d5bf0b9b85827efe137d186 Mon Sep 17 00:00:00 2001 From: Sergey S Shinkevich Date: Wed, 18 Apr 2012 14:48:49 -0700 Subject: [PATCH] update and expand help info on new loc/aff group commands --- lib/cli/commands/disk.js | 10 +++++++++- lib/cli/commands/image.js | 10 +++++++++- lib/cli/commands/vm.js | 4 ++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/lib/cli/commands/disk.js b/lib/cli/commands/disk.js index dba0d69f2..57725592c 100644 --- a/lib/cli/commands/disk.js +++ b/lib/cli/commands/disk.js @@ -115,7 +115,11 @@ exports.init = function (cli) { if (sourcePath) { if (!blobUrl && !location && !affinityGroup) { - callback('--blob-url, --location, or --affinity-group must be specified'); + logger.error('--blob-url, --location, or --affinity-group must be specified'); + logger.help('following commands show available locations and affinity groups:'); + logger.help(' azure account location list'); + logger.help(' azure account affinity-group list'); + callback(' '); } } else { // When source-path is not specified, the user is attempting to register an @@ -129,6 +133,10 @@ exports.init = function (cli) { if (!url.parse(blobUrl).protocol) { // With partial urls, we need to know location/affinity group of the storage account. if (!location && !affinityGroup) { + logger.error('location or affinity group is required if no full URL is specified'); + logger.help('following commands show available locations and affinity groups:'); + logger.help(' azure account location list'); + logger.help(' azure account affinity-group list'); callback('--location, or --affinity-group must be specified'); } } else { diff --git a/lib/cli/commands/image.js b/lib/cli/commands/image.js index b30104e3a..b5ab99f5f 100644 --- a/lib/cli/commands/image.js +++ b/lib/cli/commands/image.js @@ -116,7 +116,11 @@ exports.init = function (cli) { if (sourcePath) { if (!blobUrl && !location && !affinityGroup) { - callback('--blob-url, --location, or --affinity-group must be specified'); + logger.error('--blob-url, --location, or --affinity-group must be specified'); + logger.help('following commands show available locations and affinity groups:'); + logger.help(' azure account location list'); + logger.help(' azure account affinity-group list'); + callback(' '); } } else { // When source-path is not specified, the user is attempting to register an @@ -130,6 +134,10 @@ exports.init = function (cli) { if (!url.parse(blobUrl).protocol) { // With partial urls, we need to know location/affinity group of the storage account. if (!location && !affinityGroup) { + logger.error('location or affinity group is required if no full URL is specified'); + logger.help('following commands show available locations and affinity groups:'); + logger.help(' azure account location list'); + logger.help(' azure account affinity-group list'); callback('--location, or --affinity-group must be specified'); } } else { diff --git a/lib/cli/commands/vm.js b/lib/cli/commands/vm.js index 1dffa75ab..483d79453 100644 --- a/lib/cli/commands/vm.js +++ b/lib/cli/commands/vm.js @@ -703,8 +703,8 @@ exports.init = function(cli) { logger.error('location or affinity group is required for a new cloud service'); logger.error('please specify --location or --affinity-group'); logger.help('following commands show available locations and affinity groups:'); - logger.help(' azure subscription locations'); - logger.help(' azure subscription affinitygroups'); + logger.help(' azure account location list'); + logger.help(' azure account affinity-group list'); cmdCallback(' '); }