diff options
author | Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com> | 2018-05-08 17:24:10 +0200 |
---|---|---|
committer | Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com> | 2018-05-09 09:47:46 +0000 |
commit | 5a48bbcdee0b1900ef6ab0618006600104fbfb07 (patch) | |
tree | 24a0d1e1bf8eee5997597618ac1497337be0f87a /sdnvpn/lib | |
parent | 5c5eaf22dfe1f439866709712b06c76129fe16eb (diff) |
SDNVPN-99 NAT doesn't seem to work
Currently ODL is not able to accomodate both network and router in a
BGPVPN instance (https://jira.opendaylight.org/browse/NETVIRT-932 - see
the comment section). So until the fix is available, testing NAT
functionality using router without bgpvpn instance across subnets.
Change-Id: I6bedfc8e818ddd542036a87245caf4949152d66f
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
(cherry picked from commit 8ed9f216d4bee43cc214d73377b5d8291bfb9e8c)
Diffstat (limited to 'sdnvpn/lib')
-rw-r--r-- | sdnvpn/lib/openstack_utils.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sdnvpn/lib/openstack_utils.py b/sdnvpn/lib/openstack_utils.py index 990fa7c..447e87b 100644 --- a/sdnvpn/lib/openstack_utils.py +++ b/sdnvpn/lib/openstack_utils.py @@ -877,38 +877,38 @@ def create_network_full(neutron_client, logger.info("A network with name '%s' already exists..." % net_name) else: neutron_client.format = 'json' - logger.info('Creating neutron network %s...' % net_name) - network_id = create_neutron_net(neutron_client, net_name) + logger.info('Creating neutron network %s...' % net_name) + if network_id == '': + network_id = create_neutron_net(neutron_client, net_name) if not network_id: return False - logger.debug("Network '%s' created successfully" % network_id) + logger.debug('Creating Subnet....') - subnet_id = create_neutron_subnet(neutron_client, subnet_name, - cidr, network_id, dns) + if subnet_id == '': + subnet_id = create_neutron_subnet(neutron_client, subnet_name, + cidr, network_id, dns) if not subnet_id: return None - logger.debug("Subnet '%s' created successfully" % subnet_id) - logger.debug('Creating Router...') - router_id = create_neutron_router(neutron_client, router_name) + logger.debug('Creating Router...') + if router_id == '': + router_id = create_neutron_router(neutron_client, router_name) if not router_id: return None - logger.debug("Router '%s' created successfully" % router_id) + logger.debug('Adding router to subnet...') if not add_interface_router(neutron_client, router_id, subnet_id): return None - logger.debug("Interface added successfully.") logger.debug('Adding gateway to router...') if not add_gateway_router(neutron_client, router_id): return None - logger.debug("Gateway added successfully.") network_dic = {'net_id': network_id, |