From ff9846a51a59f5788377285725fce26e66b6945d Mon Sep 17 00:00:00 2001 From: armando-migliaccio Date: Thu, 24 Apr 2014 10:38:37 -0700 Subject: [PATCH] NSX: change api mapping for Service Cluster to Edge Cluster NSX 4.2 GA has tweaked the naming for certain resources. Edge Cluster vs Service CLuster is one of them. Closes-bug: #1312822 Change-Id: Id4ddd99128c5e82e7a40c2d9e7385b272549cc3e (cherry picked from commit 07a8751f799ede6b3d4868d8268148f21e17a47a) --- neutron/plugins/vmware/nsxlib/lsn.py | 4 ++-- neutron/tests/unit/vmware/nsxlib/test_lsn.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/neutron/plugins/vmware/nsxlib/lsn.py b/neutron/plugins/vmware/nsxlib/lsn.py index de73bf88e..5034969a2 100644 --- a/neutron/plugins/vmware/nsxlib/lsn.py +++ b/neutron/plugins/vmware/nsxlib/lsn.py @@ -30,7 +30,7 @@ HTTP_POST = "POST" HTTP_DELETE = "DELETE" HTTP_PUT = "PUT" -SERVICECLUSTER_RESOURCE = "service-cluster" +SERVICECLUSTER_RESOURCE = "edge-cluster" LSERVICESNODE_RESOURCE = "lservices-node" LSERVICESNODEPORT_RESOURCE = "lport/%s" % LSERVICESNODE_RESOURCE SUPPORTED_METADATA_OPTIONS = ['metadata_proxy_shared_secret'] @@ -54,7 +54,7 @@ def service_cluster_exists(cluster, svc_cluster_id): def lsn_for_network_create(cluster, network_id): lsn_obj = { - "service_cluster_uuid": cluster.default_service_cluster_uuid, + "edge_cluster_uuid": cluster.default_service_cluster_uuid, "tags": utils.get_tags(n_network_id=network_id) } return do_request(HTTP_POST, diff --git a/neutron/tests/unit/vmware/nsxlib/test_lsn.py b/neutron/tests/unit/vmware/nsxlib/test_lsn.py index 953754928..c8e078674 100644 --- a/neutron/tests/unit/vmware/nsxlib/test_lsn.py +++ b/neutron/tests/unit/vmware/nsxlib/test_lsn.py @@ -64,7 +64,7 @@ class LSNTestCase(base.BaseTestCase): def test_lsn_for_network_create(self): net_id = "foo_network_id" tags = utils.get_tags(n_network_id=net_id) - obj = {"service_cluster_uuid": "foo", "tags": tags} + obj = {"edge_cluster_uuid": "foo", "tags": tags} lsnlib.lsn_for_network_create(self.cluster, net_id) self.mock_request.assert_called_once_with( "POST", "/ws.v1/lservices-node", -- 2.45.2