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 07a8751f79)
changes/41/90541/1
armando-migliaccio 2014-04-24 10:38:37 -07:00
parent 84650f8970
commit bf281cd39f
2 changed files with 3 additions and 3 deletions

View 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,

View 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",