Skip to content

Commit

Permalink
Merge "Ignore missing instance_ip_address in InstanceIp object"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Jun 1, 2015
2 parents 3a90e3c + e91754e commit 99681d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/config/api-server/vnc_cfg_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,10 @@ def dbe_create_notification(cls, obj_ids, obj_dict):

@classmethod
def dbe_delete_notification(cls, obj_ids, obj_dict):
ip_addr = obj_dict['instance_ip_address']
try:
ip_addr = obj_dict['instance_ip_address']
except KeyError:
return
vn_fq_name = obj_dict['virtual_network_refs'][0]['to']
cls.addr_mgmt.ip_free_notify(ip_addr, vn_fq_name)
# end dbe_delete_notification
Expand Down
5 changes: 3 additions & 2 deletions src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -1974,8 +1974,9 @@ def _port_vnc_to_neutron(self, port_obj, port_req_memo=None):

ip_q_dict = {}
ip_q_dict['ip_address'] = ip_addr
ip_q_dict['subnet_id'] = self._ip_address_to_subnet_id(ip_addr,
net_obj, port_req_memo)
if ip_addr:
ip_q_dict['subnet_id'] = self._ip_address_to_subnet_id(ip_addr,
net_obj, port_req_memo)

port_q_dict['fixed_ips'].append(ip_q_dict)

Expand Down

0 comments on commit 99681d2

Please sign in to comment.