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
=== modified file 'tests/basic_deployment.py'
--- tests/basic_deployment.py 2015-06-25 15:12:39 +0000
+++ tests/basic_deployment.py 2015-11-18 08:00:33 +0000
@@ -12,7 +12,6 @@
12from charmhelpers.contrib.openstack.amulet.utils import (12from charmhelpers.contrib.openstack.amulet.utils import (
13 OpenStackAmuletUtils,13 OpenStackAmuletUtils,
14 DEBUG,14 DEBUG,
15 ERROR
16)15)
1716
18# Use DEBUG to turn on debug logging17# Use DEBUG to turn on debug logging
@@ -46,26 +45,14 @@
46 other_services = [45 other_services = [
47 {46 {
48 'name': 'nova-compute',47 'name': 'nova-compute',
49 'location':
50 'lp:~openstack-charmers/charms/trusty/nova-compute/vpp',
51 'constraints': {'mem': '8G'},48 'constraints': {'mem': '8G'},
52 },49 },
53 {50 {
54 'name': 'neutron-api',
55 'location': 'lp:~openstack-charmers/charms/trusty/neutron-api/'
56 'vpp'
57 },
58 {
59 'name': 'odl-controller',51 'name': 'odl-controller',
60 'location': 'lp:~sdn-charmers/charms/trusty/odl-controller/'
61 'odl-cmds',
62 'constraints': {'mem': '8G'},52 'constraints': {'mem': '8G'},
63 },53 },
64 {54 {'name': 'neutron-api'},
65 'name': 'neutron-api-odl',55 {'name': 'neutron-api-odl'},
66 'location': 'lp:~openstack-charmers/charms/trusty/'
67 'neutron-api-odl/vpp',
68 },
69 {'name': 'mysql'},56 {'name': 'mysql'},
70 {'name': 'rabbitmq-server'},57 {'name': 'rabbitmq-server'},
71 {'name': 'keystone'},58 {'name': 'keystone'},
@@ -80,8 +67,6 @@
80 relations = {67 relations = {
81 'neutron-api:neutron-plugin-api-subordinate':68 'neutron-api:neutron-plugin-api-subordinate':
82 'neutron-api-odl:neutron-plugin-api-subordinate',69 'neutron-api-odl:neutron-plugin-api-subordinate',
83 'neutron-api:neutron-plugin-api':
84 'cisco-vpp:neutron-plugin-api',
85 'nova-compute:neutron-plugin': 'cisco-vpp:neutron-plugin',70 'nova-compute:neutron-plugin': 'cisco-vpp:neutron-plugin',
86 'cisco-vpp:odl-controller': 'odl-controller:controller-api',71 'cisco-vpp:odl-controller': 'odl-controller:controller-api',
87 'neutron-api-odl:odl-controller': 'odl-controller:controller-api',72 'neutron-api-odl:odl-controller': 'odl-controller:controller-api',
@@ -113,11 +98,13 @@
113 'manage-neutron-plugin-legacy-mode': False,98 'manage-neutron-plugin-legacy-mode': False,
114 'neutron-security-groups': False,99 'neutron-security-groups': False,
115 'overlay-network-type': 'vxlan',100 'overlay-network-type': 'vxlan',
101 'openstack-origin': 'ppa:cisco-vpp/icehouse-proposed',
116 }102 }
117 nova_compute = {103 nova_compute = {
118 'enable-live-migration': False,104 'enable-live-migration': False,
119 'manage-neutron-plugin-legacy-mode': False,105 'manage-neutron-plugin-legacy-mode': False,
120 'openstack-origin': 'ppa:sdn-charmers/cisco-vpp-testing',106 'openstack-origin': 'ppa:cisco-vpp/icehouse-proposed',
107 'hugepages': '1024',
121 }108 }
122 keystone = {109 keystone = {
123 'admin-password': 'openstack',110 'admin-password': 'openstack',
@@ -128,9 +115,10 @@
128 }115 }
129 odl_controller = {116 odl_controller = {
130 'install-url': resource_addr + odl_binary,117 'install-url': resource_addr + odl_binary,
118 'profile': 'cisco-vpp',
131 }119 }
132 cisco_vpp = {120 cisco_vpp = {
133 'vpe-deb-url': resource_addr + '/vpe.deb.tgz',121 'vpe-deb-url': resource_addr + '/vpe.deb',
134 'overlay-network-type': 'vxlan',122 'overlay-network-type': 'vxlan',
135 }123 }
136 neutron_api_odl = {124 neutron_api_odl = {
@@ -268,7 +256,7 @@
268 }256 }
269 for line in output.split('\n'):257 for line in output.split('\n'):
270 columns = line.split()258 columns = line.split()
271 if expect[columns[0]] < int(columns[2]):259 if int(columns[2]) < expect[columns[0]]:
272 msg = 'Kernel setting {} too low ({} < {})'.format(260 msg = 'Kernel setting {} too low ({} < {})'.format(
273 columns[0],261 columns[0],
274 expect[columns[0]],262 expect[columns[0]],
@@ -278,7 +266,6 @@
278266
279 def test_hugepage_sysctld_settings(self):267 def test_hugepage_sysctld_settings(self):
280 unit = self.compute_sentry268 unit = self.compute_sentry
281 shmmax_conf = unit.file_contents('/etc/sysctl.d/10-shmmax.conf')
282 hugepage_conf = unit.file_contents('/etc/sysctl.d/10-hugepage.conf')269 hugepage_conf = unit.file_contents('/etc/sysctl.d/10-hugepage.conf')
283 expect = {270 expect = {
284 'vm.max_map_count': 3072,271 'vm.max_map_count': 3072,
@@ -286,11 +273,11 @@
286 'vm.hugetlb_shm_group': 0,273 'vm.hugetlb_shm_group': 0,
287 'kernel.shmmax': 2147483648,274 'kernel.shmmax': 2147483648,
288 }275 }
289 for line in shmmax_conf.split('\n') + hugepage_conf.split('\n'):276 for line in hugepage_conf.split('\n'):
290 columns = line.split('=')277 columns = line.split('=')
291 if not columns[0]:278 if not columns[0]:
292 continue279 continue
293 if expect[columns[0]] < int(columns[1]):280 if int(columns[1]) < expect[columns[0]]:
294 msg = 'Kernel setting {} too low ({} < {})'.format(281 msg = 'Kernel setting {} too low ({} < {})'.format(
295 columns[0],282 columns[0],
296 expect[columns[0]],283 expect[columns[0]],
@@ -301,7 +288,8 @@
301 def test_hugepage_mount_point(self):288 def test_hugepage_mount_point(self):
302 unit = self.compute_sentry289 unit = self.compute_sentry
303 mtab = unit.file_contents('/etc/mtab')290 mtab = unit.file_contents('/etc/mtab')
304 mnt_entry = [line for line in mtab.split('\n') if '/mnt/huge' in line]291 mpoint = '/run/hugepages/kvm'
292 mnt_entry = [line for line in mtab.split('\n') if mpoint in line]
305 if not mnt_entry:293 if not mnt_entry:
306 msg = 'Hugepage fs not found in mtab'294 msg = 'Hugepage fs not found in mtab'
307 amulet.raise_status(amulet.FAIL, msg=msg)295 amulet.raise_status(amulet.FAIL, msg=msg)
@@ -319,10 +307,10 @@
319307
320 def test_ssh_files(self):308 def test_ssh_files(self):
321 unit = self.compute_sentry309 unit = self.compute_sentry
322 unit.file('/cisco/etc/confd/ssh/ssh_host_dsa_key')310 unit.file('/opt/cisco/vpe/etc/confd/ssh/ssh_host_dsa_key')
323 unit.file('/cisco/etc/confd/ssh/ssh_host_dsa_key.pub')311 unit.file('/opt/cisco/vpe/etc/confd/ssh/ssh_host_dsa_key.pub')
324 unit.file('/cisco/etc/confd/ssh/ssh_host_rsa_key')312 unit.file('/opt/cisco/vpe/etc/confd/ssh/ssh_host_rsa_key')
325 unit.file('/cisco/etc/confd/ssh/ssh_host_rsa_key.pub')313 unit.file('/opt/cisco/vpe/etc/confd/ssh/ssh_host_rsa_key.pub')
326314
327 def test_pkg_version(self):315 def test_pkg_version(self):
328 sentry = self.compute_sentry316 sentry = self.compute_sentry
@@ -344,28 +332,6 @@
344 settings[key] = value332 settings[key] = value
345 return settings333 return settings
346334
347 def test_ml2_config(self):
348 unit = self.compute_sentry
349 ml2_conf = unit.file_contents('/etc/neutron/plugins/ml2/ml2_conf.ini')
350 expected = {
351 'type_drivers': 'vxlan',
352 'username': 'admin',
353 'mechanism_drivers': 'opendaylight',
354 'url': 'http://10.5.34.203:8080/controller/nb/v2/neutron',
355 'firewall_driver':
356 'neutron.agent.linux.firewall.NoopFirewallDriver',
357 'enable_security_group': 'False',
358 'vni_ranges': '1001:2000',
359 'tenant_network_types': 'gre,vxlan,vlan,flat',
360 'password': 'admin',
361 'tunnel_id_ranges': '1:1000',
362 }
363 settings = self.parse_config(ml2_conf)
364 for key in expected.keys():
365 if expected[key] != settings[key]:
366 msg = 'Unexpected value in ml2_conf.ini'
367 amulet.raise_status(amulet.FAIL, msg=msg)
368
369 def test_libvirt_config(self):335 def test_libvirt_config(self):
370 unit = self.compute_sentry336 unit = self.compute_sentry
371 libvirt_conf = unit.file_contents('/etc/libvirt/libvirtd.conf')337 libvirt_conf = unit.file_contents('/etc/libvirt/libvirtd.conf')

Subscribers

People subscribed via source and target branches

to all changes: