Change the base class of osc.v1.DeleteHost

Since the function to delete a segment host doesn't output
resources after processing, the base class of DeleteHost class
should be the osc_lib.command.command.Command class.
This patch modified the base class of DeleteHost class and
modified so that it doesn't return an unnecessary value.

Change-Id: I2fcce95ae25be94ee5c38b876574476b77fdedff
Closes-Bug: #1656762
This commit is contained in:
Kengo Takahara 2017-02-24 17:26:59 +09:00
parent d875c0206f
commit 9a47367e20
1 changed files with 1 additions and 2 deletions

View File

@ -242,7 +242,7 @@ class UpdateHost(command.ShowOne):
return _show_host(masakari_client, parsed_args.segment_id, uuid)
class DeleteHost(command.ShowOne):
class DeleteHost(command.Command):
"""Delete a host."""
def get_parser(self, prog_name):
@ -267,7 +267,6 @@ class DeleteHost(command.ShowOne):
segment=parsed_args.segment_id)
masakari_client.delete_host(parsed_args.segment_id, uuid, False)
print('Host deleted: %s' % parsed_args.host)
return ({}, {})
def _show_host(masakari_client, segment_id, uuid):