Merge "RS LoadBalancer should return its ID as Ref"

This commit is contained in:
Jenkins 2013-10-22 08:09:56 +00:00 committed by Gerrit Code Review
commit 959b8bbd3a
2 changed files with 12 additions and 3 deletions

View File

@ -431,9 +431,6 @@ class CloudLoadBalancer(rackspace_resource.RackspaceResource):
except exception.StackValidationFailed as svf:
return {'Error': str(svf)}
def FnGetRefId(self):
return unicode(self.name)
def _public_ip(self):
#TODO(andrew-plunk) return list here and let caller choose ip
for ip in self.clb.get(self.resource_id).virtual_ips:

View File

@ -417,6 +417,18 @@ class LoadBalancerTest(HeatTestCase):
scheduler.TaskRunner(rsrc.create)()
self.m.VerifyAll()
def test_ref_id(self):
"""The Reference ID of the resource is the resource ID."""
template = self._set_template(self.lb_template)
rsrc, fake_loadbalancer = self._mock_loadbalancer(template,
self.lb_name,
self.expected_body)
self.m.ReplayAll()
scheduler.TaskRunner(rsrc.create)()
self.m.VerifyAll()
self.assertEqual(rsrc.FnGetRefId(), rsrc.resource_id)
def test_post_creation_error_page(self):
error_page = "REALLY BIG ERROR"