Merge lp:~matsubara/charms/trusty/nova-compute-power/trusty into lp:~zulcss/charms/trusty/nova-compute-power/trusty

Proposed by Diogo Matsubara
Status: Needs review
Proposed branch: lp:~matsubara/charms/trusty/nova-compute-power/trusty
Merge into: lp:~zulcss/charms/trusty/nova-compute-power/trusty
Diff against target: 95 lines (+24/-9)
4 files modified
README (+3/-3)
config.yaml (+15/-0)
hooks/fabfile.py (+1/-1)
hooks/nova_compute_proxy.py (+5/-5)
To merge this branch: bzr merge lp:~matsubara/charms/trusty/nova-compute-power/trusty
Reviewer Review Type Date Requested Status
Chuck Short Pending
Review via email: mp+237297@code.launchpad.net

Description of the change

Fixes to nova_compute_proxy.py to avoid install hook errors:

- fix variable name typo: s/self.respository/self.repository/
- remove trailing command from ssh_key argument as this makes it be interpreted as a tuple
- remove _ from self.key_filename attribute
- remove unnecessary key argument from POWERProxy._write_key() method

To post a comment you must log in.
80. By Diogo Matsubara

add openstack-origin to config.yaml to avoid charmhelpers errors

Revision history for this message
Diogo Matsubara (matsubara) wrote :

Added openstack-origin option to config.yaml to avoid charmhelpers errors such as http://pastebin.ubuntu.com/8508559/ and http://pastebin.ubuntu.com/8510347/

81. By Diogo Matsubara

fix command to create bridge in the power host

82. By Diogo Matsubara

fix typos in README file

Unmerged revisions

82. By Diogo Matsubara

fix typos in README file

81. By Diogo Matsubara

fix command to create bridge in the power host

80. By Diogo Matsubara

add openstack-origin to config.yaml to avoid charmhelpers errors

79. By Diogo Matsubara

small fixes to charm to avoid install errors: typo in var name, trailing comma, private attribute, unnecessary arg for write_key() method

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README'
2--- README 2014-06-20 19:13:19 +0000
3+++ README 2014-10-29 18:12:02 +0000
4@@ -8,9 +8,9 @@
5
6 * Generate a ssh key that the charm can use to login to the compute node
7 to start installing RPMS and configuration file
8-* A yum repoistiory which contains the apprioate IBM Openstack Icehouse
9+* A yum repository which contains the appropriate IBM Openstack Icehouse
10 RPMs.
11-* Sudo password-les configured for the user on the compute node.
12+* Sudo password-less configured for the user on the compute node.
13
14 Once you have this setup you must configure the charm as follow:
15
16@@ -18,7 +18,7 @@
17 charm.
18 2. Create a config.yaml that has the following:
19
20- * power-user: username used to access and configure the power node.
21+ * power-user: username used to access and configure the power node.
22 * power-repo: Yum repository url.
23 * power-hosts: IP address of power node
24
25
26=== modified file 'config.yaml'
27--- config.yaml 2014-06-16 15:18:37 +0000
28+++ config.yaml 2014-10-29 18:12:02 +0000
29@@ -1,4 +1,19 @@
30 options:
31+ openstack-origin:
32+ default: distro
33+ type: string
34+ description: |
35+ Repository from which to install. May be one of the following:
36+ distro (default), ppa:somecustom/ppa, a deb url sources entry,
37+ or a supported Cloud Archive release pocket.
38+
39+ Supported Cloud Archive sources include: cloud:precise-folsom,
40+ cloud:precise-folsom/updates, cloud:precise-folsom/staging,
41+ cloud:precise-folsom/proposed.
42+
43+ Note that updating this setting to a source that is known to
44+ provide a later version of OpenStack will trigger a software
45+ upgrade.
46 openstack-release:
47 type: string
48 default: icehouse
49
50=== modified file 'hooks/fabfile.py'
51--- hooks/fabfile.py 2014-06-16 15:18:37 +0000
52+++ hooks/fabfile.py 2014-10-29 18:12:02 +0000
53@@ -34,7 +34,7 @@
54
55
56 def add_bridge():
57- sudo('ovs-vsctl -- --may-exist add br-int')
58+ sudo('ovs-vsctl -- --may-exist add-br br-int')
59
60
61 def enable_shell(user):
62
63=== modified file 'hooks/nova_compute_proxy.py'
64--- hooks/nova_compute_proxy.py 2014-06-16 15:57:42 +0000
65+++ hooks/nova_compute_proxy.py 2014-10-29 18:12:02 +0000
66@@ -62,16 +62,16 @@
67 if None in [user, ssh_key, hosts, repository]:
68 raise Exception('Missing configuration')
69 self.user = user
70- self.ssh_key = ssh_key,
71+ self.ssh_key = ssh_key
72 self.hosts = hosts.split()
73- self.respository = repository
74+ self.repository = repository
75 self.password = password
76 self.conf_path = os.path.join('/var/lib/charm',
77 service_name())
78- self._key_filename = self._write_key()
79+ self.key_filename = self._write_key()
80 self._init_fabric()
81
82- def _write_key(self, key):
83+ def _write_key(self):
84 return os.path.join(charm_dir(), 'files', self.ssh_key)
85
86 def _init_fabric(self):
87@@ -89,7 +89,7 @@
88
89 def _setup_yum(self):
90 log('Setup yum')
91- context = {'yum_repo': self.respository}
92+ context = {'yum_repo': self.repository}
93 _, filename = tempfile.mkstemp()
94 with open(filename, 'w') as f:
95 f.write(_render_template('yum.template', context))

Subscribers

People subscribed via source and target branches

to all changes: