Skip to content

Commit fad7126

Browse files
committed
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
1 parent cb73e78 commit fad7126

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

openstackclient/compute/v2/service.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def take_action(self, parsed_args):
8181
) for s in data))
8282

8383

84-
class SetService(lister.Lister):
84+
class SetService(command.Command):
8585
"""Set service command"""
8686

8787
log = logging.getLogger(__name__ + ".SetService")
@@ -113,19 +113,10 @@ def get_parser(self, prog_name):
113113
def take_action(self, parsed_args):
114114
self.log.debug("take_action(%s)", parsed_args)
115115
compute_client = self.app.client_manager.compute
116-
columns = (
117-
"Host",
118-
"Service",
119-
"Disabled"
120-
)
121116

122117
if parsed_args.enabled:
123118
action = compute_client.services.enable
124119
else:
125120
action = compute_client.services.disable
126121

127-
data = action(parsed_args.host, parsed_args.service)
128-
return (columns,
129-
(utils.get_item_properties(
130-
s, columns,
131-
) for s in data))
122+
action(parsed_args.host, parsed_args.service)

0 commit comments

Comments
 (0)