Merge "Remove -l param from ccp status command"

This commit is contained in:
Jenkins 2017-02-08 08:16:51 +00:00 committed by Gerrit Code Review
commit 9275638dd5
2 changed files with 4 additions and 9 deletions

View File

@ -211,22 +211,17 @@ class ShowStatus(lister.Lister):
parser = super(ShowStatus, self).get_parser(*args, **kwargs)
parser.set_defaults(**CONF.action._dict)
parser.add_argument("-l", "--long",
action="store_true",
help="show all components status")
parser.add_argument("-s", "--short",
action="store_true",
help="show cluster status (ready or not)")
help="show only state (ok/wip/not deployed)")
parser.add_argument("components",
nargs="*",
help="CCP conponents to show status")
help="CCP components to show status")
return parser
def take_action(self, parsed_args):
config.load_component_defaults()
if parsed_args.long:
return status.show_long_status()
elif parsed_args.short:
if parsed_args.short:
return status.show_short_status(parsed_args.components)
else:
return status.show_long_status(parsed_args.components)

View File

@ -107,7 +107,7 @@ def show_long_status(components=None):
def show_short_status(components=None):
states = get_pod_states(components)
if not states:
status = "no cluster"
status = "not deployed"
else:
status = ST_OK if all(map(is_app_ready, states.values())) else ST_WIP
return ("status",), ((status,),)