Bug fix
authorAndy Bavier <acb@cs.princeton.edu>
Wed, 20 Nov 2013 21:18:29 +0000 (16:18 -0500)
committerAndy Bavier <acb@cs.princeton.edu>
Wed, 20 Nov 2013 21:18:29 +0000 (16:18 -0500)
plugins/planetstack-net.py

index 2269e44..f47b63d 100644 (file)
@@ -257,7 +257,7 @@ def write_dnsmasq_hostsfile(dev, ports, net_id):
 # the nat:forward_ports field in the Port record.
 def set_up_port_forwarding(dev, ports):
     for port in ports:
-        if port['network_id'] == nat_net_id:
+        if port['network_id'] == nat_net_id and port['nat:forward_ports']:
             for fw in port['nat:forward_ports']:
                 ipaddr = port['fixed_ips'][0]['ip_address']
                 protocol = fw['l4_protocol']
@@ -283,6 +283,7 @@ def start():
     global quantum_username
     global quantum_password
     global quantum_tenant_name
+    global quantum_auth_url
 
     logger.log("%s: plugin starting up..." % plugin)