Browse Source

Changes:

    - Default value for management interface removed as
      'juju-br0' has been changed to 'br-eth0' in Juju 2.0
    - Updated get_mgmt_interface method
Junaid Ali 2 years ago
parent
commit
7b15952c51
2 changed files with 3 additions and 2 deletions
  1. 0
    1
      config.yaml
  2. 3
    1
      hooks/pg_gw_utils.py

+ 0
- 1
config.yaml View File

@@ -11,7 +11,6 @@ options:
11 11
     description: Public SSH key of PLUMgrid LCM which is running PG-Tools
12 12
   mgmt-interface:
13 13
     type: string
14
-    default: 'juju-br0'
15 14
     description: The interface connected to PLUMgrid Managment network.
16 15
   fabric-interfaces:
17 16
     default: 'MANAGEMENT'

+ 3
- 1
hooks/pg_gw_utils.py View File

@@ -222,7 +222,9 @@ def get_mgmt_interface():
222 222
     Returns the managment interface.
223 223
     '''
224 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 228
         return mgmt_interface
227 229
     else:
228 230
         log('Provided managment interface %s does not exist'

Loading…
Cancel
Save