Fixing issue of not showing proper message in case of no endpoints

This commit is contained in:
Anu Chandy 2012-05-08 17:13:21 -07:00
Родитель 57a6412382
Коммит 4c91fe786c
1 изменённых файлов: 10 добавлений и 6 удалений

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

@ -1307,7 +1307,7 @@ exports.init = function(cli) {
ConfigurationSets: configurationSets
};
progress = cli.progress('Updating nework configuration');
progress = cli.progress('Updating network configuration');
utils.doServiceManagementOperation(channel, 'modifyRole', found.svc, found.deploy.Name,
options.name, vmRole, function(error, response) {
progress.end();
@ -1356,11 +1356,15 @@ exports.init = function(cli) {
// got unique role under a deployment and service, list the endpoints
if (found) {
logger.table(found.roleInstance.InstanceEndpoints, function(row, item) {
row.cell('Name', item.Name);
row.cell('External Port', item.PublicPort);
row.cell('Local Port', item.LocalPort);
});
if (!found.roleInstance.InstanceEndpoints || found.roleInstance.InstanceEndpoints.length === 0) {
logger.info('No endpoints found');
} else {
logger.table(found.roleInstance.InstanceEndpoints, function(row, item) {
row.cell('Name', item.Name);
row.cell('External Port', item.PublicPort);
row.cell('Local Port', item.LocalPort);
});
}
} else {
return cmdCallback('No VMs found');
}