refactor: Drop meaningless 'api' attribute from NeutronCommand class
'api' attribute in NeutronCommand class was required by OpenStackCommand class. It is now meaningless. Partial-Bug: #1532258 Change-Id: I7fa24cc1011e5ee0ce1c8956edae785cfb4b9408
This commit is contained in:
@@ -384,9 +384,6 @@ class NeutronCommandMeta(abc.ABCMeta):
|
||||
@six.add_metaclass(NeutronCommandMeta)
|
||||
class NeutronCommand(command.Command):
|
||||
|
||||
# TODO(amotoki): Get rid of 'api' attribute. There is no such convention
|
||||
# in OpenStack client. It may be an ancient convention though.
|
||||
api = 'network'
|
||||
values_specs = []
|
||||
json_indent = None
|
||||
resource = None
|
||||
@@ -456,7 +453,6 @@ class NeutronCommand(command.Command):
|
||||
class CreateCommand(NeutronCommand, show.ShowOne):
|
||||
"""Create a resource for a given tenant."""
|
||||
|
||||
api = 'network'
|
||||
log = None
|
||||
|
||||
def get_parser(self, prog_name):
|
||||
@@ -498,7 +494,6 @@ class CreateCommand(NeutronCommand, show.ShowOne):
|
||||
class UpdateCommand(NeutronCommand):
|
||||
"""Update resource's information."""
|
||||
|
||||
api = 'network'
|
||||
log = None
|
||||
allow_names = True
|
||||
|
||||
@@ -553,7 +548,6 @@ class UpdateCommand(NeutronCommand):
|
||||
class DeleteCommand(NeutronCommand):
|
||||
"""Delete a given resource."""
|
||||
|
||||
api = 'network'
|
||||
log = None
|
||||
allow_names = True
|
||||
|
||||
@@ -599,7 +593,6 @@ class DeleteCommand(NeutronCommand):
|
||||
class ListCommand(NeutronCommand, lister.Lister):
|
||||
"""List resources that belong to a given tenant."""
|
||||
|
||||
api = 'network'
|
||||
log = None
|
||||
_formatters = {}
|
||||
list_columns = []
|
||||
@@ -705,7 +698,6 @@ class ListCommand(NeutronCommand, lister.Lister):
|
||||
class ShowCommand(NeutronCommand, show.ShowOne):
|
||||
"""Show information of a given resource."""
|
||||
|
||||
api = 'network'
|
||||
log = None
|
||||
allow_names = True
|
||||
|
||||
|
@@ -90,7 +90,6 @@ class DeleteFloatingIP(neutronV20.DeleteCommand):
|
||||
class AssociateFloatingIP(neutronV20.NeutronCommand):
|
||||
"""Create a mapping between a floating IP and a fixed IP."""
|
||||
|
||||
api = 'network'
|
||||
resource = 'floatingip'
|
||||
|
||||
def get_parser(self, prog_name):
|
||||
@@ -126,7 +125,6 @@ class AssociateFloatingIP(neutronV20.NeutronCommand):
|
||||
class DisassociateFloatingIP(neutronV20.NeutronCommand):
|
||||
"""Remove a mapping from a floating IP to a fixed IP."""
|
||||
|
||||
api = 'network'
|
||||
resource = 'floatingip'
|
||||
|
||||
def get_parser(self, prog_name):
|
||||
|
@@ -37,7 +37,6 @@ def get_tenant_id(args, client):
|
||||
class DeleteQuota(neutronV20.NeutronCommand):
|
||||
"""Delete defined quotas of a given tenant."""
|
||||
|
||||
api = 'network'
|
||||
resource = 'quota'
|
||||
|
||||
def get_parser(self, prog_name):
|
||||
@@ -70,7 +69,6 @@ class DeleteQuota(neutronV20.NeutronCommand):
|
||||
class ListQuota(neutronV20.NeutronCommand, lister.Lister):
|
||||
"""List quotas of all tenants who have non-default quota values."""
|
||||
|
||||
api = 'network'
|
||||
resource = 'quota'
|
||||
|
||||
def get_parser(self, prog_name):
|
||||
@@ -98,7 +96,6 @@ class ShowQuota(neutronV20.NeutronCommand, show.ShowOne):
|
||||
"""Show quotas of a given tenant.
|
||||
|
||||
"""
|
||||
api = 'network'
|
||||
resource = "quota"
|
||||
|
||||
def get_parser(self, prog_name):
|
||||
|
@@ -138,7 +138,6 @@ class UpdateRouter(neutronV20.UpdateCommand):
|
||||
class RouterInterfaceCommand(neutronV20.NeutronCommand):
|
||||
"""Based class to Add/Remove router interface."""
|
||||
|
||||
api = 'network'
|
||||
resource = 'router'
|
||||
|
||||
def call_api(self, neutron_client, router_id, body):
|
||||
@@ -211,7 +210,6 @@ class RemoveInterfaceRouter(RouterInterfaceCommand):
|
||||
class SetGatewayRouter(neutronV20.NeutronCommand):
|
||||
"""Set the external network gateway for a router."""
|
||||
|
||||
api = 'network'
|
||||
resource = 'router'
|
||||
|
||||
def get_parser(self, prog_name):
|
||||
@@ -264,7 +262,6 @@ class SetGatewayRouter(neutronV20.NeutronCommand):
|
||||
class RemoveGatewayRouter(neutronV20.NeutronCommand):
|
||||
"""Remove an external network gateway from a router."""
|
||||
|
||||
api = 'network'
|
||||
resource = 'router'
|
||||
|
||||
def get_parser(self, prog_name):
|
||||
|
Reference in New Issue
Block a user