def create_actions(self, wan_links):
"""For an array of wan_links, create all the corresponding actions"""
- return [self.create_action(l) for l in wan_links]
+ return [self.create_action(li) for li in wan_links]
def delete_action(self, wan_link):
"""For a single wan_link create the corresponding create action"""
if instance_scenario_id:
wan_links = self.persist.get_wan_links(
instance_scenario_id=instance_scenario_id, sdn='false')
- return [self.delete_action(l) for l in wan_links]
+ return [self.delete_action(li) for li in wan_links]
def incorporate_actions(self, wim_actions, instance_action):
"""Make the instance action consider new WIM actions and make the WIM
them (e.g M = 2 -> back and forth)
"""
return [
- {'uuid': uuid('net%d%d' % (k, l)),
+ {'uuid': uuid('net%d%d' % (k, li)),
'datacenter_id': uuid('dc%d' % k),
'datacenter_tenant_id': uuid('dc-account0%d' % k),
'instance_scenario_id': uuid('nsr0'),
# ^ instance_scenario_id == NS Record id
- 'sce_net_id': uuid('vld%d' % l),
+ 'sce_net_id': uuid('vld%d' % li),
# ^ scenario net id == VLD id
'status': status,
'vim_net_id': None,
'created': True}
for k in range(num_datacenters)
- for l in range(num_links)
+ for li in range(num_links)
]
VIM nets
"""
return [
- {'uuid': uuid('wim-net%d%d%d' % (wim, instance, l)),
+ {'uuid': uuid('wim-net%d%d%d' % (wim, instance, li)),
'wim_id': uuid('wim%d' % wim),
'wim_account_id': uuid('wim-account%d' % wim),
- 'wim_internal_id': uuid('-net%d%d' % (wim, l)),
+ 'wim_internal_id': uuid('-net%d%d' % (wim, li)),
'instance_scenario_id': uuid('nsr%d' % instance),
# ^ instance_scenario_id == NS Record id
- 'sce_net_id': uuid('vld%d' % l),
+ 'sce_net_id': uuid('vld%d' % li),
# ^ scenario net id == VLD id
'status': status,
'created': False}
- for l in range(num_links)
+ for li in range(num_links)
]
for link in wan_links:
self.assertEqual(link['instance_scenario_id'], uuid('nsr0'))
# Each VLD needs a network to be created in each datacenter
- self.assertItemsEqual([l['sce_net_id'] for l in wan_links],
+ self.assertItemsEqual([li['sce_net_id'] for li in wan_links],
[uuid('vld0'), uuid('vld1')])