Rename end_points to endpoints in API

Should be merged simultaneously with:
https://review.openstack.org/#/c/196289/
https://review.openstack.org/#/c/199317/

Change-Id: I5e962a9b8ee0fcf9f3db849d7a7f0d8a7d22802f
Partial-Bug: 1439799
This commit is contained in:
dagnello
2015-06-26 16:54:48 -07:00
committed by Min Pae
parent 9550e8020e
commit 69dd317df9
5 changed files with 15 additions and 15 deletions

View File

@@ -100,7 +100,7 @@ class Cluster(base.APIBase):
volume_size = wtypes.IntegerType(minimum=0, maximum=sys.maxint)
"Volume size for nodes in cluster"
end_points = wtypes.wsattr([EndPoint], default=[])
endpoints = wtypes.wsattr([EndPoint], default=[])
"List of endpoints on accessing node"
@@ -116,7 +116,7 @@ def get_complete_cluster(context, cluster_id):
# construct api cluster object
cluster = Cluster(**cluster_as_dict)
cluster.end_points = []
cluster.endpoints = []
cluster_nodes = objects.Node.get_nodes_by_cluster_id(context, cluster_id)
@@ -129,7 +129,7 @@ def get_complete_cluster(context, cluster_id):
node_endpoints_dict = [EndPoint(**obj_endpoint.as_dict()) for
obj_endpoint in node_endpoints]
cluster.end_points.extend(node_endpoints_dict)
cluster.endpoints.extend(node_endpoints_dict)
return cluster

View File

@@ -89,7 +89,7 @@ class TestGetCluster(api.APITest,
# verify all endpoints in cluster
all_endpoints = test_utils.get_endpoints_in_cluster(self.context,
cluster['id'])
self.validate_endpoint_values(all_endpoints, data["end_points"])
self.validate_endpoint_values(all_endpoints, data["endpoints"])
class TestDeleteCluster(api.APITest,
@@ -176,7 +176,7 @@ class TestListClusters(api.APITest,
all_endpoints = test_utils.get_endpoints_in_cluster(self.context,
cluster.id)
self.validate_endpoint_values(all_endpoints,
data[0]["end_points"])
data[0]["endpoints"])
def test_multiple(self):
num_of_clusters = 5
@@ -196,7 +196,7 @@ class TestListClusters(api.APITest,
all_endpoints = test_utils.get_endpoints_in_cluster(self.context,
clusters[i].id)
self.validate_endpoint_values(all_endpoints,
data[i]["end_points"])
data[i]["endpoints"])
class TestCreateCluster(api.APITest,

View File

@@ -65,7 +65,7 @@ Instructions
| Field | Value |
+------------+-------------------------------------------+
| created_at | 2015-06-02T21:29:15+00:00 |
| end_points | [] |
| endpoints | [] |
| flavor | 8795 |
| id | b7ed9907-2d37-41e6-b70c-22eb1ea44777 |
| name | cluster_01 |
@@ -76,7 +76,7 @@ Instructions
$ openstack message-broker cluster list
+--------------------------------------+------------+----------+------------+
| id | name | status | end_points |
| id | name | status | endpoints |
+--------------------------------------+------------+----------+------------+
| b7ed9907-2d37-41e6-b70c-22eb1ea44777 | cluster_01 | BUILDING | [] |
+--------------------------------------+------------+----------+------------+
@@ -86,7 +86,7 @@ Instructions
| Field | Value |
+------------+------------------------------------------------+
| created_at | 2015-06-02T21:29:15+00:00 |
| end_points | [{u'type': u'AMQP', u'uri': u'10.0.0.5:5672'}] |
| endpoints | [{u'type': u'AMQP', u'uri': u'10.0.0.5:5672'}] |
| flavor | 8795 |
| id | b7ed9907-2d37-41e6-b70c-22eb1ea44777 |
| name | cluster_01 |

View File

@@ -65,7 +65,7 @@ Create Cluster
],
"created_at": "2015-06-03T21:49:49+00:00",
"volume_size": 1048576,
"end_points": [],
"endpoints": [],
"flavor": "101",
"id": "2c3c66ba-721b-4443-bc81-55d986848c68",
"size": 3
@@ -76,7 +76,7 @@ Create Cluster
:form network_id: a list of UUID of network id's
:form created_at: create cluster request received timestamp
:form volume_size: volume size used for each node
:form end_points: list of endpoints for each node
:form endpoints: list of endpoints for each node
:form flavor: node flavor
:form id: the UUID of the cluster
:form size: size of the cluster
@@ -117,7 +117,7 @@ Get Cluster
"created_at": "2015-06-03T22:44:17+00:00",
"updated_at": "2015-06-03T22:47:15+00:00",
"volume_size": 1048576,
"end_points": [
"endpoints": [
{
"type": "AMQP",
"uri": "10.0.0.9:5672"
@@ -173,7 +173,7 @@ List Clusters
"created_at": "2015-06-03T22:44:17+00:00",
"updated_at": "2015-06-04T00:31:16+00:00",
"volume_size": 1048576,
"end_points": [
"endpoints": [
{
"type": "AMQP",
"uri": "10.0.0.9:5672"
@@ -199,7 +199,7 @@ List Clusters
],
"created_at": "2015-05-13T21:23:15+00:00",
"updated_at": "2015-05-13T21:30:15+00:00",
"end_points": [
"endpoints": [
{
"type": "AMQP",
"uri": "10.0.0.7:5672"

View File

@@ -154,7 +154,7 @@ class CueClusters(cue_utils.CueScenario):
ssh.wait()
# run rabbitmq_test script
endpoint = cluster.end_points[0]
endpoint = cluster.endpoints[0]
uri = endpoint['uri'].split(':')
rabbitmq_username = "rabbitmq"
rabbitmq_password = cluster['id']