Remove update_flavor method from compute
update_flavor API is not supported by nova and raises HttpException: Bad Request if called from openstacksdk, hence removed this method to cleanup the source code. Closes-Bug: 1563235 Change-Id: I1c54d0afcd8b49cac9d7342e466e6636b5c599f1
This commit is contained in:
parent
3a838c1e9a
commit
d80191cc93
@ -118,19 +118,6 @@ class Proxy(proxy2.BaseProxy):
|
||||
flv = _flavor.FlavorDetail if details else _flavor.Flavor
|
||||
return self._list(flv, paginated=True, **query)
|
||||
|
||||
def update_flavor(self, flavor, **attrs):
|
||||
"""Update a flavor
|
||||
|
||||
:param flavor: Either the ID of a flavor or a
|
||||
:class:`~openstack.compute.v2.flavor.Flavor` instance.
|
||||
:attrs kwargs: The attributes to update on the flavor represented
|
||||
by ``value``.
|
||||
|
||||
:returns: The updated flavor
|
||||
:rtype: :class:`~openstack.compute.v2.flavor.Flavor`
|
||||
"""
|
||||
return self._update(_flavor.Flavor, flavor, **attrs)
|
||||
|
||||
def delete_image(self, image, ignore_missing=True):
|
||||
"""Delete an image
|
||||
|
||||
|
@ -23,7 +23,6 @@ class Flavor(resource2.Resource):
|
||||
# capabilities
|
||||
allow_create = True
|
||||
allow_get = True
|
||||
allow_update = True
|
||||
allow_delete = True
|
||||
allow_list = True
|
||||
|
||||
|
@ -40,9 +40,9 @@ class TestFlavor(testtools.TestCase):
|
||||
self.assertEqual('compute', sot.service.service_type)
|
||||
self.assertTrue(sot.allow_create)
|
||||
self.assertTrue(sot.allow_get)
|
||||
self.assertTrue(sot.allow_update)
|
||||
self.assertTrue(sot.allow_delete)
|
||||
self.assertTrue(sot.allow_list)
|
||||
self.assertFalse(sot.allow_update)
|
||||
|
||||
self.assertDictEqual({"sort_key": "sort_key",
|
||||
"sort_dir": "sort_dir",
|
||||
|
@ -64,9 +64,6 @@ class TestComputeProxy(test_proxy_base2.TestProxyBase):
|
||||
method_kwargs={"details": False, "query": 1},
|
||||
expected_kwargs={"query": 1})
|
||||
|
||||
def test_flavor_update(self):
|
||||
self.verify_update(self.proxy.update_flavor, flavor.Flavor)
|
||||
|
||||
def test_image_delete(self):
|
||||
self.verify_delete(self.proxy.delete_image, image.Image, False)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user