Skip to content

Commit

Permalink
Merge "Default ip_family is set to None instead of ipv4" into R3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Nov 10, 2016
2 parents 5a463d8 + 59a628d commit a195316
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/config/api-server/vnc_cfg_types.py
Expand Up @@ -416,8 +416,12 @@ def pre_dbe_create(cls, tenant_name, obj_dict, db_conn):
subnet_uuid = obj_dict.get('subnet_uuid')

req_ip_family = obj_dict.get("instance_ip_family")
req_ip_version = 4 # default ip v4
if req_ip_family == "v6": req_ip_version = 6
if req_ip_family == "v4":
req_ip_version = 4
elif req_ip_family == "v6":
req_ip_version = 6
else:
req_ip_version = None

# if request has ip and not g/w ip, report if already in use.
# for g/w ip, creation allowed but only can ref to router port.
Expand Down
4 changes: 2 additions & 2 deletions src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py
Expand Up @@ -3624,7 +3624,7 @@ def _ip_addr_in_net_id(self, ip_addr, net_id):
return ip_addr in net_ip_list

def _create_instance_ip(self, net_obj, port_obj, ip_addr=None,
subnet_uuid=None, ip_family="v4"):
subnet_uuid=None, ip_family=None):
ip_name = str(uuid.uuid4())
ip_obj = InstanceIp(name=ip_name)
ip_obj.uuid = ip_name
Expand All @@ -3643,7 +3643,7 @@ def _create_instance_ip(self, net_obj, port_obj, ip_addr=None,
return ip_id
# end _create_instance_ip

def _port_create_instance_ip(self, net_obj, port_obj, port_q, ip_family="v4"):
def _port_create_instance_ip(self, net_obj, port_obj, port_q, ip_family=None):
fixed_ips = port_q.get('fixed_ips')
if fixed_ips is None:
return
Expand Down

0 comments on commit a195316

Please sign in to comment.