Merge lp:~corey.bryant/charm-helpers/fixup-git-default-repos into lp:charm-helpers

Proposed by Corey Bryant
Status: Merged
Merged at revision: 593
Proposed branch: lp:~corey.bryant/charm-helpers/fixup-git-default-repos
Merge into: lp:charm-helpers
Diff against target: 73 lines (+20/-12)
1 file modified
charmhelpers/contrib/openstack/utils.py (+20/-12)
To merge this branch: bzr merge lp:~corey.bryant/charm-helpers/fixup-git-default-repos
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+297628@code.launchpad.net

Description of the change

This fixes up git_default_repos() to use git project names instead of service names when indexing GIT_DEFAULT_REPOS.

To post a comment you must log in.
589. By Stuart Bishop

[freyes, r=stub] Mock contrib.network.ufw.modprobe in tests as required

590. By James Page

Updates for DNS-HA support in non-api OpenStack charms.

591. By James Page

Rebase

592. By Liam Young

[gnuoy, r=james-page] Decode result of check_output in network_get_primary_address

Under python3.5 check_output returns bytes which need decoding. This change
adds the decode to network_get_primary_address and brings it in line with other
core hookenv functions.

593. By James Page

Fixes for deploy from source for openstack

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'charmhelpers/contrib/openstack/utils.py'
2--- charmhelpers/contrib/openstack/utils.py 2016-06-14 10:52:12 +0000
3+++ charmhelpers/contrib/openstack/utils.py 2016-06-16 14:23:24 +0000
4@@ -725,14 +725,15 @@
5 requirements_dir = None
6
7
8-def git_default_repos(projects):
9+def git_default_repos(projects_yaml):
10 """
11 Returns default repos if a default openstack-origin-git value is specified.
12 """
13 service = service_name()
14+ core_project = service
15
16 for default, branch in GIT_DEFAULT_BRANCHES.iteritems():
17- if projects == default:
18+ if projects_yaml == default:
19
20 # add the requirements repo first
21 repo = {
22@@ -742,34 +743,41 @@
23 }
24 repos = [repo]
25
26- # neutron and nova charms require some additional repos
27- if service == 'neutron':
28- for svc in ['neutron-fwaas', 'neutron-lbaas', 'neutron-vpnaas']:
29+ # neutron-* and nova-* charms require some additional repos
30+ if service in ['neutron-api', 'neutron-gateway',
31+ 'neutron-openvswitch']:
32+ core_project = 'neutron'
33+ for project in ['neutron-fwaas', 'neutron-lbaas',
34+ 'neutron-vpnaas']:
35 repo = {
36- 'name': svc,
37- 'repository': GIT_DEFAULT_REPOS[svc],
38+ 'name': project,
39+ 'repository': GIT_DEFAULT_REPOS[project],
40 'branch': branch,
41 }
42 repos.append(repo)
43- elif service == 'nova':
44+
45+ elif service in ['nova-cloud-controller', 'nova-compute']:
46+ core_project = 'nova'
47 repo = {
48 'name': 'neutron',
49 'repository': GIT_DEFAULT_REPOS['neutron'],
50 'branch': branch,
51 }
52 repos.append(repo)
53+ elif service == 'openstack-dashboard':
54+ core_project = 'horizon'
55
56- # finally add the current service's repo
57+ # finally add the current service's core project repo
58 repo = {
59- 'name': service,
60- 'repository': GIT_DEFAULT_REPOS[service],
61+ 'name': core_project,
62+ 'repository': GIT_DEFAULT_REPOS[core_project],
63 'branch': branch,
64 }
65 repos.append(repo)
66
67 return yaml.dump(dict(repositories=repos))
68
69- return projects
70+ return projects_yaml
71
72
73 def _git_yaml_load(projects_yaml):

Subscribers

People subscribed via source and target branches