Merge lp:~junaidali/charms/trusty/plumgrid-director/mgmt_val into lp:~plumgrid-team/charms/trusty/plumgrid-director/trunk

Proposed by Junaid Ali
Status: Merged
Merged at revision: 35
Proposed branch: lp:~junaidali/charms/trusty/plumgrid-director/mgmt_val
Merge into: lp:~plumgrid-team/charms/trusty/plumgrid-director/trunk
Diff against target: 46 lines (+7/-3)
3 files modified
config.yaml (+0/-1)
hooks/pg_dir_hooks.py (+4/-1)
hooks/pg_dir_utils.py (+3/-1)
To merge this branch: bzr merge lp:~junaidali/charms/trusty/plumgrid-director/mgmt_val
Reviewer Review Type Date Requested Status
Bilal Baqar Approve
Review via email: mp+301321@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Bilal Baqar (bbaqar) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2016-06-19 18:52:37 +0000
3+++ config.yaml 2016-07-27 19:40:09 +0000
4@@ -17,7 +17,6 @@
5 description: Public SSH key of PLUMgrid LCM which is running PG-Tools.
6 mgmt-interface:
7 type: string
8- default: 'juju-br0'
9 description: The interface connected to PLUMgrid Managment network.
10 fabric-interfaces:
11 default: 'MANAGEMENT'
12
13=== modified file 'hooks/pg_dir_hooks.py'
14--- hooks/pg_dir_hooks.py 2016-05-22 15:17:41 +0000
15+++ hooks/pg_dir_hooks.py 2016-07-27 19:40:09 +0000
16@@ -161,11 +161,14 @@
17 '''
18 if config('plumgrid-license-key') is not None:
19 count = 0
20- while (count < 10):
21+ while (count < 15):
22 if post_pg_license():
23 break
24 count += 1
25 time.sleep(15)
26+ if count == 15:
27+ raise ValueError("Error occurred while posting plumgrid license"
28+ "key. Please check plumgrid services.")
29
30
31 @hooks.hook('upgrade-charm')
32
33=== modified file 'hooks/pg_dir_utils.py'
34--- hooks/pg_dir_utils.py 2016-06-19 18:52:37 +0000
35+++ hooks/pg_dir_utils.py 2016-07-27 19:40:09 +0000
36@@ -222,7 +222,9 @@
37 Returns the managment interface.
38 '''
39 mgmt_interface = config('mgmt-interface')
40- if interface_exists(mgmt_interface):
41+ if not mgmt_interface:
42+ return get_iface_from_addr(unit_get('private-address'))
43+ elif interface_exists(mgmt_interface):
44 return mgmt_interface
45 else:
46 log('Provided managment interface %s does not exist'

Subscribers

People subscribed via source and target branches