[microversions] Increase max version to 2.12

2.12 - Exposes VIF net-id attribute in os-virtual-interfaces. User will be
able to get Virtual Interfaces net-id in Virtual Interfaces list and can
determine in which network a Virtual Interface is plugged into.

novaclient.base.Resource class is a parent class of VirtualInterface resource.
Since `Resource` is a universal interface for any resources and doesn't
require hard-code attributes which describe partial resource, there are no
required changes to support this microversion in "novaclient as a lib".

"novaclient as CLI" doesn't provide an interface for VirtualInterface yet
(see bug 1522424 for more details). When it will be implemented, we will need
to check that new attribute is displayed correctly.

Based on the fact that 1522424 is not resolved and novaclient.base.Resource
class has enough tests, this patch doesn't require any tests.

Also this patch fixes representation of VirtualInterface resource.

Change-Id: I18cf23847d3b2b01f5a6ffae2ebc4bede54babce
This commit is contained in:
Andrey Kurilin 2015-12-07 18:06:13 +02:00 committed by Andrey Kurilin
parent 529a492126
commit 0ec6bedf42
3 changed files with 4 additions and 2 deletions

View File

@ -25,4 +25,4 @@ API_MIN_VERSION = api_versions.APIVersion("2.1")
# when client supported the max version, and bumped sequentially, otherwise
# the client may break due to server side new version may include some
# backward incompatible change.
API_MAX_VERSION = api_versions.APIVersion("2.11")
API_MAX_VERSION = api_versions.APIVersion("2.12")

View File

@ -2535,6 +2535,8 @@ class ShellTest(utils.TestCase):
5, # Not implemented when test added, should not apply to adds.
7, # doesn't require any changes in novaclient
9, # doesn't require any changes in novaclient
# TODO(andreykurilin): remove 12 when 1522424 will be resolved
12, # doesn't require any changes in novaclient
])
versions_supported = set(range(0,
novaclient.API_MAX_VERSION.ver_minor + 1))

View File

@ -22,7 +22,7 @@ from novaclient import base
class VirtualInterface(base.Resource):
def __repr__(self):
pass
return "<VirtualInterface>"
class VirtualInterfaceManager(base.ManagerWithFind):