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
=== modified file 'config.yaml'
--- config.yaml 2015-03-12 10:33:36 +0000
+++ config.yaml 2015-04-15 14:27:07 +0000
@@ -128,11 +128,17 @@
128 description: |128 description: |
129 Space-separated list of ML2 data bridge mappings with format129 Space-separated list of ML2 data bridge mappings with format
130 <provider>:<bridge>.130 <provider>:<bridge>.
131 flat-network-providers:
132 type: string
133 default:
134 description: |
135 Space-delimited list of Neutron flat network providers.
131 vlan-ranges:136 vlan-ranges:
132 type: string137 type: string
133 default: "physnet1:1000:2000"138 default: "physnet1:1000:2000"
134 description: |139 description: |
135 Space-delimited list of network provider vlan id ranges.140 Space-delimited list of Neutron network-provider & vlan-id-ranges using
141 format "<provider>:<start>:<end> ...".
136 # Network configuration options142 # Network configuration options
137 # by default all access is over 'private-address'143 # by default all access is over 'private-address'
138 os-data-network:144 os-data-network:
139145
=== modified file 'hooks/quantum_contexts.py'
--- hooks/quantum_contexts.py 2015-04-10 15:45:07 +0000
+++ hooks/quantum_contexts.py 2015-04-15 14:27:07 +0000
@@ -23,9 +23,6 @@
23from charmhelpers.contrib.network.ip import (23from charmhelpers.contrib.network.ip import (
24 get_address_in_network,24 get_address_in_network,
25)25)
26from charmhelpers.contrib.openstack.neutron import (
27 parse_vlan_range_mappings,
28)
2926
30DB_USER = "quantum"27DB_USER = "quantum"
31QUANTUM_DB = "quantum"28QUANTUM_DB = "quantum"
@@ -146,11 +143,12 @@
146 if mappings:143 if mappings:
147 ctxt['bridge_mappings'] = ','.join(mappings.split())144 ctxt['bridge_mappings'] = ','.join(mappings.split())
148145
146 flat_providers = config('flat-network-providers')
147 if flat_providers:
148 ctxt['network_providers'] = ','.join(flat_providers.split())
149
149 vlan_ranges = config('vlan-ranges')150 vlan_ranges = config('vlan-ranges')
150 vlan_range_mappings = parse_vlan_range_mappings(vlan_ranges)151 if vlan_ranges:
151 if vlan_range_mappings:
152 providers = sorted(vlan_range_mappings.keys())
153 ctxt['network_providers'] = ','.join(providers)
154 ctxt['vlan_ranges'] = ','.join(vlan_ranges.split())152 ctxt['vlan_ranges'] = ','.join(vlan_ranges.split())
155153
156 net_dev_mtu = api_settings['network_device_mtu']154 net_dev_mtu = api_settings['network_device_mtu']
157155
=== modified file 'unit_tests/test_quantum_contexts.py'
--- unit_tests/test_quantum_contexts.py 2015-04-10 15:45:07 +0000
+++ unit_tests/test_quantum_contexts.py 2015-04-15 14:27:07 +0000
@@ -125,6 +125,7 @@
125 self.test_config.set('instance-mtu', 1420)125 self.test_config.set('instance-mtu', 1420)
126 self.test_config.set('vlan-ranges',126 self.test_config.set('vlan-ranges',
127 'physnet1:1000:2000 physnet2:2001:3000')127 'physnet1:1000:2000 physnet2:2001:3000')
128 self.test_config.set('flat-network-providers', 'physnet3 physnet4')
128 # Provided by neutron-api relation129 # Provided by neutron-api relation
129 _rids.return_value = ['neutron-plugin-api:0']130 _rids.return_value = ['neutron-plugin-api:0']
130 _runits.return_value = ['neutron-api/0']131 _runits.return_value = ['neutron-api/0']
@@ -147,7 +148,7 @@
147 'l2_population': True,148 'l2_population': True,
148 'overlay_network_type': 'gre',149 'overlay_network_type': 'gre',
149 'bridge_mappings': 'physnet1:br-data',150 'bridge_mappings': 'physnet1:br-data',
150 'network_providers': 'physnet1,physnet2',151 'network_providers': 'physnet3,physnet4',
151 'vlan_ranges': 'physnet1:1000:2000,physnet2:2001:3000',152 'vlan_ranges': 'physnet1:1000:2000,physnet2:2001:3000',
152 'network_device_mtu': 9000,153 'network_device_mtu': 9000,
153 'veth_mtu': 9000,154 'veth_mtu': 9000,

Subscribers

People subscribed via source and target branches