Merge "Remove list output from "compute service set""
This commit is contained in:
commit
b220f4b667
@ -80,7 +80,7 @@ class ListService(lister.Lister):
|
|||||||
) for s in data))
|
) for s in data))
|
||||||
|
|
||||||
|
|
||||||
class SetService(lister.Lister):
|
class SetService(command.Command):
|
||||||
"""Set service command"""
|
"""Set service command"""
|
||||||
|
|
||||||
log = logging.getLogger(__name__ + ".SetService")
|
log = logging.getLogger(__name__ + ".SetService")
|
||||||
@ -112,19 +112,10 @@ class SetService(lister.Lister):
|
|||||||
def take_action(self, parsed_args):
|
def take_action(self, parsed_args):
|
||||||
self.log.debug("take_action(%s)", parsed_args)
|
self.log.debug("take_action(%s)", parsed_args)
|
||||||
compute_client = self.app.client_manager.compute
|
compute_client = self.app.client_manager.compute
|
||||||
columns = (
|
|
||||||
"Host",
|
|
||||||
"Service",
|
|
||||||
"Disabled"
|
|
||||||
)
|
|
||||||
|
|
||||||
if parsed_args.enabled:
|
if parsed_args.enabled:
|
||||||
action = compute_client.services.enable
|
action = compute_client.services.enable
|
||||||
else:
|
else:
|
||||||
action = compute_client.services.disable
|
action = compute_client.services.disable
|
||||||
|
|
||||||
data = action(parsed_args.host, parsed_args.service)
|
action(parsed_args.host, parsed_args.service)
|
||||||
return (columns,
|
|
||||||
(utils.get_item_properties(
|
|
||||||
s, columns,
|
|
||||||
) for s in data))
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user