Merge lp:~gnuoy/charms/trusty/cisco-vpp/amulet into lp:~openstack-charmers/charms/trusty/cisco-vpp/next

Proposed by Liam Young
Status: Merged
Merged at revision: 115
Proposed branch: lp:~gnuoy/charms/trusty/cisco-vpp/amulet
Merge into: lp:~openstack-charmers/charms/trusty/cisco-vpp/next
Diff against target: 161 lines (+16/-50)
1 file modified
tests/basic_deployment.py (+16/-50)
To merge this branch: bzr merge lp:~gnuoy/charms/trusty/cisco-vpp/amulet
Reviewer Review Type Date Requested Status
OpenStack Charmers Pending
Review via email: mp+277787@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/basic_deployment.py'
2--- tests/basic_deployment.py 2015-06-25 15:12:39 +0000
3+++ tests/basic_deployment.py 2015-11-18 08:00:33 +0000
4@@ -12,7 +12,6 @@
5 from charmhelpers.contrib.openstack.amulet.utils import (
6 OpenStackAmuletUtils,
7 DEBUG,
8- ERROR
9 )
10
11 # Use DEBUG to turn on debug logging
12@@ -46,26 +45,14 @@
13 other_services = [
14 {
15 'name': 'nova-compute',
16- 'location':
17- 'lp:~openstack-charmers/charms/trusty/nova-compute/vpp',
18 'constraints': {'mem': '8G'},
19 },
20 {
21- 'name': 'neutron-api',
22- 'location': 'lp:~openstack-charmers/charms/trusty/neutron-api/'
23- 'vpp'
24- },
25- {
26 'name': 'odl-controller',
27- 'location': 'lp:~sdn-charmers/charms/trusty/odl-controller/'
28- 'odl-cmds',
29 'constraints': {'mem': '8G'},
30 },
31- {
32- 'name': 'neutron-api-odl',
33- 'location': 'lp:~openstack-charmers/charms/trusty/'
34- 'neutron-api-odl/vpp',
35- },
36+ {'name': 'neutron-api'},
37+ {'name': 'neutron-api-odl'},
38 {'name': 'mysql'},
39 {'name': 'rabbitmq-server'},
40 {'name': 'keystone'},
41@@ -80,8 +67,6 @@
42 relations = {
43 'neutron-api:neutron-plugin-api-subordinate':
44 'neutron-api-odl:neutron-plugin-api-subordinate',
45- 'neutron-api:neutron-plugin-api':
46- 'cisco-vpp:neutron-plugin-api',
47 'nova-compute:neutron-plugin': 'cisco-vpp:neutron-plugin',
48 'cisco-vpp:odl-controller': 'odl-controller:controller-api',
49 'neutron-api-odl:odl-controller': 'odl-controller:controller-api',
50@@ -113,11 +98,13 @@
51 'manage-neutron-plugin-legacy-mode': False,
52 'neutron-security-groups': False,
53 'overlay-network-type': 'vxlan',
54+ 'openstack-origin': 'ppa:cisco-vpp/icehouse-proposed',
55 }
56 nova_compute = {
57 'enable-live-migration': False,
58 'manage-neutron-plugin-legacy-mode': False,
59- 'openstack-origin': 'ppa:sdn-charmers/cisco-vpp-testing',
60+ 'openstack-origin': 'ppa:cisco-vpp/icehouse-proposed',
61+ 'hugepages': '1024',
62 }
63 keystone = {
64 'admin-password': 'openstack',
65@@ -128,9 +115,10 @@
66 }
67 odl_controller = {
68 'install-url': resource_addr + odl_binary,
69+ 'profile': 'cisco-vpp',
70 }
71 cisco_vpp = {
72- 'vpe-deb-url': resource_addr + '/vpe.deb.tgz',
73+ 'vpe-deb-url': resource_addr + '/vpe.deb',
74 'overlay-network-type': 'vxlan',
75 }
76 neutron_api_odl = {
77@@ -268,7 +256,7 @@
78 }
79 for line in output.split('\n'):
80 columns = line.split()
81- if expect[columns[0]] < int(columns[2]):
82+ if int(columns[2]) < expect[columns[0]]:
83 msg = 'Kernel setting {} too low ({} < {})'.format(
84 columns[0],
85 expect[columns[0]],
86@@ -278,7 +266,6 @@
87
88 def test_hugepage_sysctld_settings(self):
89 unit = self.compute_sentry
90- shmmax_conf = unit.file_contents('/etc/sysctl.d/10-shmmax.conf')
91 hugepage_conf = unit.file_contents('/etc/sysctl.d/10-hugepage.conf')
92 expect = {
93 'vm.max_map_count': 3072,
94@@ -286,11 +273,11 @@
95 'vm.hugetlb_shm_group': 0,
96 'kernel.shmmax': 2147483648,
97 }
98- for line in shmmax_conf.split('\n') + hugepage_conf.split('\n'):
99+ for line in hugepage_conf.split('\n'):
100 columns = line.split('=')
101 if not columns[0]:
102 continue
103- if expect[columns[0]] < int(columns[1]):
104+ if int(columns[1]) < expect[columns[0]]:
105 msg = 'Kernel setting {} too low ({} < {})'.format(
106 columns[0],
107 expect[columns[0]],
108@@ -301,7 +288,8 @@
109 def test_hugepage_mount_point(self):
110 unit = self.compute_sentry
111 mtab = unit.file_contents('/etc/mtab')
112- mnt_entry = [line for line in mtab.split('\n') if '/mnt/huge' in line]
113+ mpoint = '/run/hugepages/kvm'
114+ mnt_entry = [line for line in mtab.split('\n') if mpoint in line]
115 if not mnt_entry:
116 msg = 'Hugepage fs not found in mtab'
117 amulet.raise_status(amulet.FAIL, msg=msg)
118@@ -319,10 +307,10 @@
119
120 def test_ssh_files(self):
121 unit = self.compute_sentry
122- unit.file('/cisco/etc/confd/ssh/ssh_host_dsa_key')
123- unit.file('/cisco/etc/confd/ssh/ssh_host_dsa_key.pub')
124- unit.file('/cisco/etc/confd/ssh/ssh_host_rsa_key')
125- unit.file('/cisco/etc/confd/ssh/ssh_host_rsa_key.pub')
126+ unit.file('/opt/cisco/vpe/etc/confd/ssh/ssh_host_dsa_key')
127+ unit.file('/opt/cisco/vpe/etc/confd/ssh/ssh_host_dsa_key.pub')
128+ unit.file('/opt/cisco/vpe/etc/confd/ssh/ssh_host_rsa_key')
129+ unit.file('/opt/cisco/vpe/etc/confd/ssh/ssh_host_rsa_key.pub')
130
131 def test_pkg_version(self):
132 sentry = self.compute_sentry
133@@ -344,28 +332,6 @@
134 settings[key] = value
135 return settings
136
137- def test_ml2_config(self):
138- unit = self.compute_sentry
139- ml2_conf = unit.file_contents('/etc/neutron/plugins/ml2/ml2_conf.ini')
140- expected = {
141- 'type_drivers': 'vxlan',
142- 'username': 'admin',
143- 'mechanism_drivers': 'opendaylight',
144- 'url': 'http://10.5.34.203:8080/controller/nb/v2/neutron',
145- 'firewall_driver':
146- 'neutron.agent.linux.firewall.NoopFirewallDriver',
147- 'enable_security_group': 'False',
148- 'vni_ranges': '1001:2000',
149- 'tenant_network_types': 'gre,vxlan,vlan,flat',
150- 'password': 'admin',
151- 'tunnel_id_ranges': '1:1000',
152- }
153- settings = self.parse_config(ml2_conf)
154- for key in expected.keys():
155- if expected[key] != settings[key]:
156- msg = 'Unexpected value in ml2_conf.ini'
157- amulet.raise_status(amulet.FAIL, msg=msg)
158-
159 def test_libvirt_config(self):
160 unit = self.compute_sentry
161 libvirt_conf = unit.file_contents('/etc/libvirt/libvirtd.conf')

Subscribers

People subscribed via source and target branches

to all changes: