Skip to content

Commit

Permalink
Merge "Allowed Address pair MAC should not be defaulted to interface …
Browse files Browse the repository at this point in the history
…MAC" into R3.0
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Mar 24, 2016
2 parents 3e4d9d6 + 9cabea5 commit fe43665
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/config/api-server/vnc_cfg_types.py
Expand Up @@ -554,12 +554,6 @@ def pre_dbe_create(cls, tenant_name, obj_dict, db_conn):
mac_addrs_dict = json.loads(mac_addrs_json)
obj_dict['virtual_machine_interface_mac_addresses'] = mac_addrs_dict

aap_config = obj_dict.get(
'virtual_machine_interface_allowed_address_pairs', {})
for aap in aap_config.get('allowed_address_pair', []):
if not aap.get('mac', None):
aap['mac'] = mac_addrs_dict['mac_address'][0]

if 'virtual_machine_interface_bindings' in obj_dict:
bindings = obj_dict['virtual_machine_interface_bindings']
kvps = bindings['key_value_pair']
Expand Down Expand Up @@ -643,13 +637,6 @@ def pre_dbe_update(cls, id, fq_name, obj_dict, db_conn,
msg = "VMI ref delete not allowed during update"
return (False, (409, msg))

aap_config = obj_dict.get(
'virtual_machine_interface_allowed_address_pairs', {})
for aap in aap_config.get('allowed_address_pair', []):
if not aap.get('mac', None):
aap['mac'] = read_result[
'virtual_machine_interface_mac_addresses']['mac_address'][0]

bindings = read_result.get('virtual_machine_interface_bindings', {})
kvps = bindings.get('key_value_pair', [])
kvp_dict = cls._kvp_to_dict(kvps)
Expand Down

0 comments on commit fe43665

Please sign in to comment.