Translate tenant_id to project_id in Octavia loadbalancer resource

Story: 2004650
Task: 28603
Change-Id: Iaead412604f53d7196949fd475f266711e11c8b5
This commit is contained in:
Ludovic Logiou 2018-12-17 14:47:18 +01:00
parent d19e0be516
commit f47748d4b6
2 changed files with 3 additions and 1 deletions

View File

@ -126,6 +126,8 @@ class LoadBalancer(octavia_base.OctaviaBase):
if self.NAME not in props: if self.NAME not in props:
props[self.NAME] = self.physical_resource_name() props[self.NAME] = self.physical_resource_name()
props['vip_subnet_id'] = props.pop(self.VIP_SUBNET) props['vip_subnet_id'] = props.pop(self.VIP_SUBNET)
if 'tenant_id' in props:
props['project_id'] = props.pop('tenant_id')
return props return props
def handle_create(self): def handle_create(self):

View File

@ -56,7 +56,7 @@ class LoadBalancerTest(common.HeatTestCase):
'vip_address': '10.0.0.4', 'vip_address': '10.0.0.4',
'vip_subnet_id': '123', 'vip_subnet_id': '123',
'provider': 'octavia', 'provider': 'octavia',
'tenant_id': '1234', 'project_id': '1234',
'admin_state_up': True, 'admin_state_up': True,
} }
} }