Remove list output from "compute service set"
Replace the super class from lister.Lister to command.Command, as no need to display the status for the "set" command. Change-Id: Ibaf3c1e349633223fca19937bbd9060d4f9ecbda Closes-Bug: #1517804
This commit is contained in:
parent
cb73e781e0
commit
fad7126e79
@ -81,7 +81,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")
|
||||||
@ -113,19 +113,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