~junaidali/charms/trusty/plumgrid-gateway/oil_bug

« back to all changes in this revision

Viewing changes to unit_tests/test_pg_gw_context.py

  • Committer: Bilal Baqar
  • Date: 2015-12-01 19:23:10 UTC
  • mfrom: (18.1.1 plumgrid-gateway)
  • Revision ID: bbaqar@plumgrid.com-20151201192310-peqnktsw4llz4tg3
Merge: Adding fabric/data network support

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
    @patch.object(charmhelpers.contrib.openstack.context,
39
39
                  'neutron_plugin_attribute')
40
40
    @patch.object(utils, 'get_mgmt_interface')
 
41
    @patch.object(utils, 'get_fabric_interface')
41
42
    @patch.object(utils, 'get_gw_interfaces')
42
 
    def test_neutroncc_context_api_rel(self, _gw_int, _mgmt_int,
43
 
                                       _npa, _pg_dir_settings,
 
43
    def test_neutroncc_context_api_rel(self, _gw_int, _fabric_int,
 
44
                                       _mgmt_int, _npa, _pg_dir_settings,
44
45
                                       _save_flag_file, _config_flag,
45
46
                                       _unit_get, _unit_priv_ip, _config,
46
47
                                       _is_clus, _https, _ens_pkgs):
59
60
        _config_flag.return_value = False
60
61
        _pg_dir_settings.return_value = {'pg_dir_ip': '192.168.100.201'}
61
62
        _mgmt_int.return_value = 'juju-br0'
 
63
        _fabric_int.return_value = 'juju-br0'
62
64
        _gw_int.return_value = ['eth1']
63
65
        napi_ctxt = context.PGGwContext()
64
66
        expect = {
72
74
            'neutron_url': 'https://192.168.100.201:9696',
73
75
            'pg_hostname': 'node0',
74
76
            'interface': 'juju-br0',
 
77
            'fabric_interface': 'juju-br0',
75
78
            'label': 'node0',
76
79
            'fabric_mode': 'host',
77
80
            'neutron_alchemy_flags': False,