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
This commit is contained in:
commit
ae1ad48788
@ -17,7 +17,6 @@ options:
|
||||
description: Public SSH key of PLUMgrid LCM which is running PG-Tools.
|
||||
mgmt-interface:
|
||||
type: string
|
||||
default: 'juju-br0'
|
||||
description: The interface connected to PLUMgrid Managment network.
|
||||
fabric-interfaces:
|
||||
default: 'MANAGEMENT'
|
||||
|
@ -166,6 +166,9 @@ def start():
|
||||
break
|
||||
count += 1
|
||||
time.sleep(15)
|
||||
if count == 10:
|
||||
raise ValueError("Error occurred while posting plumgrid license"
|
||||
"key. Please check plumgrid services.")
|
||||
|
||||
|
||||
@hooks.hook('upgrade-charm')
|
||||
|
@ -222,7 +222,9 @@ def get_mgmt_interface():
|
||||
Returns the managment interface.
|
||||
'''
|
||||
mgmt_interface = config('mgmt-interface')
|
||||
if interface_exists(mgmt_interface):
|
||||
if not mgmt_interface:
|
||||
return get_iface_from_addr(unit_get('private-address'))
|
||||
elif interface_exists(mgmt_interface):
|
||||
return mgmt_interface
|
||||
else:
|
||||
log('Provided managment interface %s does not exist'
|
||||
|
Loading…
x
Reference in New Issue
Block a user