summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-09-13 02:18:08 +0000
committerGerrit Code Review <review@openstack.org>2012-09-13 02:18:08 +0000
commit94972cfe38a48ebb352ba06c538f5da2e3641d31 (patch)
treeb9477a639fee036e50ec790f6019f7c5d4583c55
parent677f6f6873e3d4521d7382db3d78d9963a0ec27c (diff)
parent5465d13b13569db1e0dbd4255a2d68e525a43481 (diff)
downloadnova-94972cfe38a48ebb352ba06c538f5da2e3641d31.tar.gz
nova-94972cfe38a48ebb352ba06c538f5da2e3641d31.tar.xz
nova-94972cfe38a48ebb352ba06c538f5da2e3641d31.zip
Merge "fix rpcapi version."
-rw-r--r--nova/cert/rpcapi.py8
-rw-r--r--nova/compute/rpcapi.py23
-rw-r--r--nova/console/rpcapi.py8
-rw-r--r--nova/consoleauth/rpcapi.py8
-rw-r--r--nova/scheduler/rpcapi.py8
-rw-r--r--nova/tests/compute/test_rpcapi.py2
6 files changed, 53 insertions, 4 deletions
diff --git a/nova/cert/rpcapi.py b/nova/cert/rpcapi.py
index 7922c9c33..8051f2a93 100644
--- a/nova/cert/rpcapi.py
+++ b/nova/cert/rpcapi.py
@@ -33,6 +33,14 @@ class CertAPI(nova.openstack.common.rpc.proxy.RpcProxy):
1.0 - Initial version.
'''
+ #
+ # NOTE(russellb): This is the default minimum version that the server
+ # (manager) side must implement unless otherwise specified using a version
+ # argument to self.call()/cast()/etc. here. It should be left as X.0 where
+ # X is the current major API version (1.0, 2.0, ...). For more information
+ # about rpc API versioning, see the docs in
+ # openstack/common/rpc/dispatcher.py.
+ #
BASE_RPC_API_VERSION = '1.0'
def __init__(self):
diff --git a/nova/compute/rpcapi.py b/nova/compute/rpcapi.py
index 24576881f..b53cc1e7a 100644
--- a/nova/compute/rpcapi.py
+++ b/nova/compute/rpcapi.py
@@ -127,10 +127,18 @@ class ComputeAPI(nova.openstack.common.rpc.proxy.RpcProxy):
1.44 - Adds reserve_block_device_name()
2.0 - Remove 1.x backwards compat
- 2.1 - Adds orig_sys_metadata to rebuild()
+ 2.1 - Adds orig_sys_metadata to rebuild_instance()
'''
- BASE_RPC_API_VERSION = '2.1'
+ #
+ # NOTE(russellb): This is the default minimum version that the server
+ # (manager) side must implement unless otherwise specified using a version
+ # argument to self.call()/cast()/etc. here. It should be left as X.0 where
+ # X is the current major API version (1.0, 2.0, ...). For more information
+ # about rpc API versioning, see the docs in
+ # openstack/common/rpc/dispatcher.py.
+ #
+ BASE_RPC_API_VERSION = '2.0'
def __init__(self):
super(ComputeAPI, self).__init__(
@@ -340,7 +348,8 @@ class ComputeAPI(nova.openstack.common.rpc.proxy.RpcProxy):
injected_files=injected_files, image_ref=image_ref,
orig_image_ref=orig_image_ref,
orig_sys_metadata=orig_sys_metadata),
- topic=_compute_topic(self.topic, ctxt, None, instance))
+ topic=_compute_topic(self.topic, ctxt, None, instance),
+ version='2.1')
def refresh_provider_fw_rules(self, ctxt, host):
self.cast(ctxt, self.make_msg('refresh_provider_fw_rules'),
@@ -503,6 +512,14 @@ class SecurityGroupAPI(nova.openstack.common.rpc.proxy.RpcProxy):
2.0 - Remove 1.x backwards compat
'''
+ #
+ # NOTE(russellb): This is the default minimum version that the server
+ # (manager) side must implement unless otherwise specified using a version
+ # argument to self.call()/cast()/etc. here. It should be left as X.0 where
+ # X is the current major API version (1.0, 2.0, ...). For more information
+ # about rpc API versioning, see the docs in
+ # openstack/common/rpc/dispatcher.py.
+ #
BASE_RPC_API_VERSION = '2.0'
def __init__(self):
diff --git a/nova/console/rpcapi.py b/nova/console/rpcapi.py
index 6a5e2149b..a1f289bb0 100644
--- a/nova/console/rpcapi.py
+++ b/nova/console/rpcapi.py
@@ -33,6 +33,14 @@ class ConsoleAPI(nova.openstack.common.rpc.proxy.RpcProxy):
1.0 - Initial version.
'''
+ #
+ # NOTE(russellb): This is the default minimum version that the server
+ # (manager) side must implement unless otherwise specified using a version
+ # argument to self.call()/cast()/etc. here. It should be left as X.0 where
+ # X is the current major API version (1.0, 2.0, ...). For more information
+ # about rpc API versioning, see the docs in
+ # openstack/common/rpc/dispatcher.py.
+ #
BASE_RPC_API_VERSION = '1.0'
def __init__(self, topic=None):
diff --git a/nova/consoleauth/rpcapi.py b/nova/consoleauth/rpcapi.py
index 573387f48..2fafe3fd0 100644
--- a/nova/consoleauth/rpcapi.py
+++ b/nova/consoleauth/rpcapi.py
@@ -33,6 +33,14 @@ class ConsoleAuthAPI(nova.openstack.common.rpc.proxy.RpcProxy):
1.0 - Initial version.
'''
+ #
+ # NOTE(russellb): This is the default minimum version that the server
+ # (manager) side must implement unless otherwise specified using a version
+ # argument to self.call()/cast()/etc. here. It should be left as X.0 where
+ # X is the current major API version (1.0, 2.0, ...). For more information
+ # about rpc API versioning, see the docs in
+ # openstack/common/rpc/dispatcher.py.
+ #
BASE_RPC_API_VERSION = '1.0'
def __init__(self):
diff --git a/nova/scheduler/rpcapi.py b/nova/scheduler/rpcapi.py
index b7f6b3113..940fe315e 100644
--- a/nova/scheduler/rpcapi.py
+++ b/nova/scheduler/rpcapi.py
@@ -46,6 +46,14 @@ class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy):
2.0 - Remove 1.x backwards compat
'''
+ #
+ # NOTE(russellb): This is the default minimum version that the server
+ # (manager) side must implement unless otherwise specified using a version
+ # argument to self.call()/cast()/etc. here. It should be left as X.0 where
+ # X is the current major API version (1.0, 2.0, ...). For more information
+ # about rpc API versioning, see the docs in
+ # openstack/common/rpc/dispatcher.py.
+ #
BASE_RPC_API_VERSION = '2.0'
def __init__(self):
diff --git a/nova/tests/compute/test_rpcapi.py b/nova/tests/compute/test_rpcapi.py
index eb78a53e7..5728bdf91 100644
--- a/nova/tests/compute/test_rpcapi.py
+++ b/nova/tests/compute/test_rpcapi.py
@@ -227,7 +227,7 @@ class ComputeRpcAPITestCase(test.TestCase):
instance=self.fake_instance, new_pass='pass',
injected_files='files', image_ref='ref',
orig_image_ref='orig_ref',
- orig_sys_metadata='orig_sys_metadata')
+ orig_sys_metadata='orig_sys_metadata', version='2.1')
def test_reserve_block_device_name(self):
self._test_compute_api('reserve_block_device_name', 'call',