summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunaid Ali <junaidali@plumgrid.com>2016-07-25 22:01:44 +0500
committerJunaid Ali <junaidali@plumgrid.com>2016-07-25 22:01:44 +0500
commitbcecc528eefab956643f3ccf1ba0722e2f01722d (patch)
treef996df4b6445b1244c1f9a6fb38f86a7c11ccf0a
parent6033de46ac95e2ae09ad871e46c1ff10b99871de (diff)
Changes:
- Removed default value for management interface - Updated get-mgmt method
-rw-r--r--config.yaml1
-rw-r--r--hooks/pg_gw_utils.py4
2 files changed, 3 insertions, 2 deletions
diff --git a/config.yaml b/config.yaml
index f961bb6..fa65925 100644
--- a/config.yaml
+++ b/config.yaml
@@ -11,7 +11,6 @@ options:
11 description: Public SSH key of PLUMgrid LCM which is running PG-Tools 11 description: Public SSH key of PLUMgrid LCM which is running PG-Tools
12 mgmt-interface: 12 mgmt-interface:
13 type: string 13 type: string
14 default: 'juju-br0'
15 description: The interface connected to PLUMgrid Managment network. 14 description: The interface connected to PLUMgrid Managment network.
16 fabric-interfaces: 15 fabric-interfaces:
17 default: 'MANAGEMENT' 16 default: 'MANAGEMENT'
diff --git a/hooks/pg_gw_utils.py b/hooks/pg_gw_utils.py
index 73ae795..ebd5899 100644
--- a/hooks/pg_gw_utils.py
+++ b/hooks/pg_gw_utils.py
@@ -222,7 +222,9 @@ def get_mgmt_interface():
222 Returns the managment interface. 222 Returns the managment interface.
223 ''' 223 '''
224 mgmt_interface = config('mgmt-interface') 224 mgmt_interface = config('mgmt-interface')
225 if interface_exists(mgmt_interface): 225 if not mgmt_interface:
226 return get_iface_from_addr(unit_get('private-address'))
227 elif interface_exists(mgmt_interface):
226 return mgmt_interface 228 return mgmt_interface
227 else: 229 else:
228 log('Provided managment interface %s does not exist' 230 log('Provided managment interface %s does not exist'