~bjornt/charms/trusty/quantum-gateway-hardcode-eth1/trunk

« back to all changes in this revision

Viewing changes to unit_tests/test_quantum_contexts.py

  • Committer: James Page
  • Date: 2014-03-14 13:16:57 UTC
  • mfrom: (43.1.7 quantum-gateway)
  • Revision ID: james.page@canonical.com-20140314131657-m0vxmdkp2rgn4eha
[jacekn,r=james-page,t=james-page] Add option to support configuration of instance MTU.

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
    @patch.object(quantum_contexts, 'get_shared_secret')
181
181
    @patch.object(quantum_contexts, 'get_host_ip')
182
182
    def test_all(self, _host_ip, _secret):
183
 
        self.config.return_value = 'ovs'
 
183
        def side_effect(arg):
 
184
            return_values = {'plugin': 'ovs',
 
185
                             'instance-mtu': 1420,
 
186
                             'openstack-origin': 'foo'}
 
187
            return return_values[arg]
 
188
        self.config.side_effect = side_effect
184
189
        self.get_os_codename_install_source.return_value = 'folsom'
185
190
        _host_ip.return_value = '10.5.0.1'
186
191
        _secret.return_value = 'testsecret'
187
192
        self.assertEquals(quantum_contexts.QuantumGatewayContext()(), {
188
193
            'shared_secret': 'testsecret',
189
194
            'local_ip': '10.5.0.1',
 
195
            'instance_mtu': 1420,
190
196
            'core_plugin': "quantum.plugins.openvswitch.ovs_quantum_plugin."
191
197
                           "OVSQuantumPluginV2",
192
198
            'plugin': 'ovs'