~junaidali/charms/xenial/plumgrid-gateway/custom-lxc

« back to all changes in this revision

Viewing changes to unit_tests/test_pg_gw_context.py

  • Committer: Bilal Baqar
  • Date: 2016-03-14 06:43:21 UTC
  • mfrom: (18.4.2 plumgrid-gateway)
  • Revision ID: bbaqar@plumgrid.com-20160314064321-af3xlaktrkakgbbh
Made the following changes:
1. Reordered file and module imports
2. Sorted director IPs
3. Added unit fqdn in /etc/hosts of plumgrid-lxc
4. Loading plumgrid specific iptables on install
5. Added temporary upgrade hook to load iptables
6. stop_pg() is being used in restart_pg()
7. persistant iptables

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
import charmhelpers
6
6
 
7
7
TO_PATCH = [
8
 
    'get_unit_hostname',
 
8
    'gethostname',
 
9
    'getfqdn'
9
10
]
10
11
 
11
12
 
55
56
        _npa.side_effect = mock_npa
56
57
        _unit_get.return_value = '192.168.100.201'
57
58
        _unit_priv_ip.return_value = '192.168.100.201'
58
 
        self.get_unit_hostname.return_value = 'node0'
 
59
        self.gethostname.return_value = 'node0'
 
60
        self.getfqdn.return_value = 'node0'
59
61
        _is_clus.return_value = False
60
62
        _config_flag.return_value = False
61
63
        _pg_dir_settings.return_value = {'pg_dir_ip': '192.168.100.201'}
73
75
            'neutron_security_groups': None,
74
76
            'neutron_url': 'https://192.168.100.201:9696',
75
77
            'pg_hostname': 'node0',
 
78
            'pg_fqdn': 'node0',
76
79
            'interface': 'juju-br0',
77
80
            'fabric_interface': 'juju-br0',
78
81
            'label': 'node0',