Fix description for trove cluster IP attribute

According to trove docs [1] and code [2] IP is a list.

[1] https://wiki.openstack.org/wiki/Trove/Clusters-MongoDB#Show_Cluster
[2] https://github.com/openstack/trove/blob/master/trove/cluster/views.py

Change-Id: Ia3e4bd1574ecbeeb034ed8e282f1b0fd08855458
This commit is contained in:
Tetiana Lashchova 2015-06-16 13:50:55 +03:00
parent 2cc97650c5
commit 926ea3c412
2 changed files with 3 additions and 3 deletions

View File

@ -124,7 +124,7 @@ class TroveCluster(resource.Resource):
type=attributes.Schema.LIST
),
IP: attributes.Schema(
_("IP of the cluster."),
_("A list of cluster instance IPs."),
type=attributes.Schema.LIST
)
}

View File

@ -48,7 +48,7 @@ class FakeTroveCluster(object):
def __init__(self, status='ACTIVE'):
self.name = 'cluster'
self.id = '1189aa64-a471-4aa3-876a-9eb7d84089da'
self.ip = '10.0.0.1'
self.ip = ['10.0.0.1']
self.instances = [
{'id': '416b0b16-ba55-4302-bbd3-ff566032e1c1', 'status': status},
{'id': '965ef811-7c1d-47fc-89f2-a89dfdd23ef2', 'status': status},
@ -124,7 +124,7 @@ class TroveClusterTest(common.HeatTestCase):
def test_attributes(self):
tc = self._create_resource('cluster', self.rsrc_defn, self.stack)
self.assertEqual('10.0.0.1', tc.FnGetAtt('ip'))
self.assertEqual(['10.0.0.1'], tc.FnGetAtt('ip'))
self.assertEqual(['416b0b16-ba55-4302-bbd3-ff566032e1c1',
'965ef811-7c1d-47fc-89f2-a89dfdd23ef2',
'3642f41c-e8ad-4164-a089-3891bf7f2d2b'],