Merge "RS LoadBalancer should return its ID as Ref"
This commit is contained in:
commit
959b8bbd3a
@ -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:
|
||||
|
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user