Merge lp:~hopem/charms/trusty/quantum-gateway/add-configurable-flat-network into lp:~openstack-charmers/charms/trusty/quantum-gateway/next

Proposed by Edward Hope-Morley
Status: Merged
Merged at revision: 99
Proposed branch: lp:~hopem/charms/trusty/quantum-gateway/add-configurable-flat-network
Merge into: lp:~openstack-charmers/charms/trusty/quantum-gateway/next
Diff against target: 74 lines (+14/-9)
3 files modified
config.yaml (+7/-1)
hooks/quantum_contexts.py (+5/-7)
unit_tests/test_quantum_contexts.py (+2/-1)
To merge this branch: bzr merge lp:~hopem/charms/trusty/quantum-gateway/add-configurable-flat-network
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
Review via email: mp+256325@code.launchpad.net
To post a comment you must log in.
99. By Edward Hope-Morley

better desc

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #3390 quantum-gateway-next for hopem mp256325
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/3390/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #3178 quantum-gateway-next for hopem mp256325
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/3178/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #3180 quantum-gateway-next for hopem mp256325
    AMULET OK: passed

Build: http://10.245.162.77:8080/job/charm_amulet_test/3180/

Revision history for this message
Billy Olsen (billy-olsen) wrote :

Code changes look fine to me but I can't get an instance to boot when deploying the changes. I suspect its probably me setting the value incorrectly, but I'd like independent verification.

Revision history for this message
Edward Hope-Morley (hopem) wrote :

Testing now.

Revision history for this message
Liam Young (gnuoy) wrote :

LGTM, +1

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 2015-03-12 10:33:36 +0000
3+++ config.yaml 2015-04-15 14:27:07 +0000
4@@ -128,11 +128,17 @@
5 description: |
6 Space-separated list of ML2 data bridge mappings with format
7 <provider>:<bridge>.
8+ flat-network-providers:
9+ type: string
10+ default:
11+ description: |
12+ Space-delimited list of Neutron flat network providers.
13 vlan-ranges:
14 type: string
15 default: "physnet1:1000:2000"
16 description: |
17- Space-delimited list of network provider vlan id ranges.
18+ Space-delimited list of Neutron network-provider & vlan-id-ranges using
19+ format "<provider>:<start>:<end> ...".
20 # Network configuration options
21 # by default all access is over 'private-address'
22 os-data-network:
23
24=== modified file 'hooks/quantum_contexts.py'
25--- hooks/quantum_contexts.py 2015-04-10 15:45:07 +0000
26+++ hooks/quantum_contexts.py 2015-04-15 14:27:07 +0000
27@@ -23,9 +23,6 @@
28 from charmhelpers.contrib.network.ip import (
29 get_address_in_network,
30 )
31-from charmhelpers.contrib.openstack.neutron import (
32- parse_vlan_range_mappings,
33-)
34
35 DB_USER = "quantum"
36 QUANTUM_DB = "quantum"
37@@ -146,11 +143,12 @@
38 if mappings:
39 ctxt['bridge_mappings'] = ','.join(mappings.split())
40
41+ flat_providers = config('flat-network-providers')
42+ if flat_providers:
43+ ctxt['network_providers'] = ','.join(flat_providers.split())
44+
45 vlan_ranges = config('vlan-ranges')
46- vlan_range_mappings = parse_vlan_range_mappings(vlan_ranges)
47- if vlan_range_mappings:
48- providers = sorted(vlan_range_mappings.keys())
49- ctxt['network_providers'] = ','.join(providers)
50+ if vlan_ranges:
51 ctxt['vlan_ranges'] = ','.join(vlan_ranges.split())
52
53 net_dev_mtu = api_settings['network_device_mtu']
54
55=== modified file 'unit_tests/test_quantum_contexts.py'
56--- unit_tests/test_quantum_contexts.py 2015-04-10 15:45:07 +0000
57+++ unit_tests/test_quantum_contexts.py 2015-04-15 14:27:07 +0000
58@@ -125,6 +125,7 @@
59 self.test_config.set('instance-mtu', 1420)
60 self.test_config.set('vlan-ranges',
61 'physnet1:1000:2000 physnet2:2001:3000')
62+ self.test_config.set('flat-network-providers', 'physnet3 physnet4')
63 # Provided by neutron-api relation
64 _rids.return_value = ['neutron-plugin-api:0']
65 _runits.return_value = ['neutron-api/0']
66@@ -147,7 +148,7 @@
67 'l2_population': True,
68 'overlay_network_type': 'gre',
69 'bridge_mappings': 'physnet1:br-data',
70- 'network_providers': 'physnet1,physnet2',
71+ 'network_providers': 'physnet3,physnet4',
72 'vlan_ranges': 'physnet1:1000:2000,physnet2:2001:3000',
73 'network_device_mtu': 9000,
74 'veth_mtu': 9000,

Subscribers

People subscribed via source and target branches