]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
NSX: change api mapping for Service Cluster to Edge Cluster
authorarmando-migliaccio <armamig@gmail.com>
Thu, 24 Apr 2014 17:38:37 +0000 (10:38 -0700)
committerThomas Goirand <thomas@goirand.fr>
Mon, 9 Jun 2014 15:06:54 +0000 (23:06 +0800)
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
neutron/tests/unit/vmware/nsxlib/test_lsn.py

index de73bf88ea6b9074a2c211bb2424fb256591e3e0..5034969a29a677bc2c57415b665402d7ade8f4c6 100644 (file)
@@ -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,
index 953754928f7da70ad5ee98c78c58ae91a68c6a59..c8e078674514b3b79ee93e24b130c12989c1f33c 100644 (file)
@@ -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",