update and expand help info on new loc/aff group commands

This commit is contained in:
Sergey S Shinkevich 2012-04-18 14:48:49 -07:00
Родитель 5d4260a443
Коммит ef5ebaf737
3 изменённых файлов: 20 добавлений и 4 удалений

Просмотреть файл

@ -115,7 +115,11 @@ exports.init = function (cli) {
if (sourcePath) { if (sourcePath) {
if (!blobUrl && !location && !affinityGroup) { 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 { } else {
// When source-path is not specified, the user is attempting to register an // 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) { if (!url.parse(blobUrl).protocol) {
// With partial urls, we need to know location/affinity group of the storage account. // With partial urls, we need to know location/affinity group of the storage account.
if (!location && !affinityGroup) { 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'); callback('--location, or --affinity-group must be specified');
} }
} else { } else {

Просмотреть файл

@ -116,7 +116,11 @@ exports.init = function (cli) {
if (sourcePath) { if (sourcePath) {
if (!blobUrl && !location && !affinityGroup) { 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 { } else {
// When source-path is not specified, the user is attempting to register an // 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) { if (!url.parse(blobUrl).protocol) {
// With partial urls, we need to know location/affinity group of the storage account. // With partial urls, we need to know location/affinity group of the storage account.
if (!location && !affinityGroup) { 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'); callback('--location, or --affinity-group must be specified');
} }
} else { } else {

Просмотреть файл

@ -703,8 +703,8 @@ exports.init = function(cli) {
logger.error('location or affinity group is required for a new cloud service'); logger.error('location or affinity group is required for a new cloud service');
logger.error('please specify --location or --affinity-group'); logger.error('please specify --location or --affinity-group');
logger.help('following commands show available locations and affinity groups:'); logger.help('following commands show available locations and affinity groups:');
logger.help(' azure subscription locations'); logger.help(' azure account location list');
logger.help(' azure subscription affinitygroups'); logger.help(' azure account affinity-group list');
cmdCallback(' '); cmdCallback(' ');
} }