diff --git a/moganclient/osc/v1/flavor.py b/moganclient/osc/v1/flavor.py index d765f5e..fdf6784 100644 --- a/moganclient/osc/v1/flavor.py +++ b/moganclient/osc/v1/flavor.py @@ -68,13 +68,6 @@ class CreateFlavor(command.ShowOne): help=_("Resources to add to this flavor " "(repeat option to set multiple resources)") ) - parser.add_argument( - "--resource-traits", - metavar="", - action=parseractions.KeyValueAction, - help=_("Resource traits to add to this flavor " - "(repeat option to set multiple resource traits)") - ) return parser def take_action(self, parsed_args): @@ -91,7 +84,6 @@ class CreateFlavor(command.ShowOne): name=parsed_args.name, description=parsed_args.description, resources=parsed_args.resources, - resource_traits=parsed_args.resource_traits, is_public=is_public, disabled=parsed_args.disabled, ) @@ -148,7 +140,6 @@ class ListFlavor(command.Lister): "Is Public", "Description", "Resources", - "Resource Traits", ) columns = ( "UUID", @@ -156,7 +147,6 @@ class ListFlavor(command.Lister): "Is Public", "Description", "Resources", - "Resource Traits", ) return (column_headers, diff --git a/moganclient/tests/unit/fakes.py b/moganclient/tests/unit/fakes.py index 371b1f0..cd4aaa8 100644 --- a/moganclient/tests/unit/fakes.py +++ b/moganclient/tests/unit/fakes.py @@ -182,7 +182,6 @@ class FakeFlavor(object): "created_at": "2016-09-27T02:37:21.966342+00:00", "description": "fake_description", "resources": {"BAREMETAL_GOLD": 1}, - "resource_traits": {"BAREMETAL_GOLD": "FPGA"}, "is_public": False, "disabled": False, "name": "flavor-name-" + uuidutils.generate_uuid(dashed=False), diff --git a/moganclient/tests/unit/osc/v1/test_flavor.py b/moganclient/tests/unit/osc/v1/test_flavor.py index 48c7df4..490571d 100644 --- a/moganclient/tests/unit/osc/v1/test_flavor.py +++ b/moganclient/tests/unit/osc/v1/test_flavor.py @@ -34,7 +34,6 @@ class TestFlavor(test_base.TestBaremetalComputeV1): 'disabled', 'is_public', 'name', - 'resource_traits', 'resources', 'updated_at', 'uuid', @@ -46,7 +45,6 @@ class TestFlavor(test_base.TestBaremetalComputeV1): fake_flavor.disabled, fake_flavor.is_public, fake_flavor.name, - fake_flavor.resource_traits, fake_flavor.resources, fake_flavor.updated_at, fake_flavor.uuid, @@ -226,7 +224,6 @@ class TestFlavorList(TestFlavor): "Is Public", "Description", "Resources", - "Resource Traits", ) list_data = (( @@ -235,7 +232,6 @@ class TestFlavorList(TestFlavor): TestFlavor.fake_flavor.is_public, TestFlavor.fake_flavor.description, TestFlavor.fake_flavor.resources, - TestFlavor.fake_flavor.resource_traits, ),) def setUp(self): diff --git a/moganclient/v1/flavor.py b/moganclient/v1/flavor.py index 3331d49..8627ede 100644 --- a/moganclient/v1/flavor.py +++ b/moganclient/v1/flavor.py @@ -23,8 +23,7 @@ class Flavor(base.Resource): class FlavorManager(base.ManagerWithFind): resource_class = Flavor - def create(self, name, resources, resource_traits, is_public, disabled, - description=None): + def create(self, name, resources, is_public, disabled, description=None): url = '/flavors' data = { 'name': name, @@ -34,8 +33,6 @@ class FlavorManager(base.ManagerWithFind): } if resources: data['resources'] = resources - if resource_traits: - data['resource_traits'] = resource_traits return self._create(url, data=data) def delete(self, flavor):