summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunaid Ali <junaidali@plumgrid.com>2016-06-09 22:42:20 +0500
committerJunaid Ali <junaidali@plumgrid.com>2016-06-09 22:42:20 +0500
commit50e520dce78913d304d4757c975bfe34faf2f294 (patch)
tree0c6cfcb125070d7e4527fd69a7c647e56ede4ff7
parent1c19fadbc4b8bdad7d66666c629d11728d43c741 (diff)
parentcc85394f86d7c9400359de12482ecf14129ebc9c (diff)
Increased wait time after libvirt is started
-rw-r--r--hooks/pg_gw_utils.py22
-rw-r--r--templates/kilo/ifcs.conf1
2 files changed, 6 insertions, 17 deletions
diff --git a/hooks/pg_gw_utils.py b/hooks/pg_gw_utils.py
index cb9250e..5f216ee 100644
--- a/hooks/pg_gw_utils.py
+++ b/hooks/pg_gw_utils.py
@@ -285,22 +285,12 @@ def get_gw_interfaces():
285 Gateway node can have multiple interfaces. This function parses json 285 Gateway node can have multiple interfaces. This function parses json
286 provided in config to get all gateway interfaces for this node. 286 provided in config to get all gateway interfaces for this node.
287 ''' 287 '''
288 node_interfaces = [] 288 interface = config('external-interfaces')
289 try: 289 if not interface_exists(interface):
290 all_interfaces = json.loads(config('external-interfaces')) 290 log('Provided gateway interface %s does not exist'
291 except ValueError: 291 % interface)
292 raise ValueError("Invalid json provided for gateway interfaces") 292 raise ValueError('Provided gateway interface does not exist')
293 hostname = get_unit_hostname() 293 return interface
294 if hostname in all_interfaces:
295 node_interfaces = all_interfaces[hostname].split(',')
296 elif 'DEFAULT' in all_interfaces:
297 node_interfaces = all_interfaces['DEFAULT'].split(',')
298 for interface in node_interfaces:
299 if not interface_exists(interface):
300 log('Provided gateway interface %s does not exist'
301 % interface)
302 raise ValueError('Provided gateway interface does not exist')
303 return node_interfaces
304 294
305 295
306def ensure_mtu(): 296def ensure_mtu():
diff --git a/templates/kilo/ifcs.conf b/templates/kilo/ifcs.conf
index e7535cb..88c7091 100644
--- a/templates/kilo/ifcs.conf
+++ b/templates/kilo/ifcs.conf
@@ -4,4 +4,3 @@
4{{ dev }} = access_phys 4{{ dev }} = access_phys
5{% endfor -%} 5{% endfor -%}
6{% endif -%} 6{% endif -%}
7