Changes:
- Removed default value for management interface - Updated get-mgmt method
This commit is contained in:
parent
6033de46ac
commit
bcecc528ee
@ -11,7 +11,6 @@ options:
|
|||||||
description: Public SSH key of PLUMgrid LCM which is running PG-Tools
|
description: Public SSH key of PLUMgrid LCM which is running PG-Tools
|
||||||
mgmt-interface:
|
mgmt-interface:
|
||||||
type: string
|
type: string
|
||||||
default: 'juju-br0'
|
|
||||||
description: The interface connected to PLUMgrid Managment network.
|
description: The interface connected to PLUMgrid Managment network.
|
||||||
fabric-interfaces:
|
fabric-interfaces:
|
||||||
default: 'MANAGEMENT'
|
default: 'MANAGEMENT'
|
||||||
|
@ -222,7 +222,9 @@ def get_mgmt_interface():
|
|||||||
Returns the managment interface.
|
Returns the managment interface.
|
||||||
'''
|
'''
|
||||||
mgmt_interface = config('mgmt-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
|
return mgmt_interface
|
||||||
else:
|
else:
|
||||||
log('Provided managment interface %s does not exist'
|
log('Provided managment interface %s does not exist'
|
||||||
|
Loading…
Reference in New Issue
Block a user