70
70
nova_config = {'config-flags': 'auto_assign_floating_ip=False',
71
71
'enable-live-migration': 'False'}
73
release = self._get_openstack_release_string()
74
reqs_branch = 'stable/' + release
73
amulet_http_proxy = os.environ.get('AMULET_HTTP_PROXY')
75
reqs_repo = 'git://github.com/openstack/requirements'
76
nova_repo = 'git://github.com/openstack/nova'
75
77
if self._get_openstack_release() == self.trusty_icehouse:
76
nova_branch = release + '-eol'
78
nova_branch = 'stable/' + release
79
amulet_http_proxy = os.environ.get('AMULET_HTTP_PROXY')
78
reqs_repo = 'git://github.com/coreycb/requirements'
79
nova_repo = 'git://github.com/coreycb/nova'
81
branch = 'stable/' + self._get_openstack_release_string()
80
83
openstack_origin_git = {
82
85
{'name': 'requirements',
83
'repository': 'git://github.com/openstack/requirements',
84
'branch': reqs_branch},
86
'repository': reqs_repo,
86
'repository': 'git://github.com/openstack/nova',
87
'branch': nova_branch},
89
'repository': nova_repo,
89
92
'directory': '/mnt/openstack-git',
90
93
'http_proxy': amulet_http_proxy,
182
185
if self._get_openstack_release() >= self.precise_folsom:
183
186
endpoint_vol['id'] = u.not_null
184
187
endpoint_id['id'] = u.not_null
185
expected = {'s3': [endpoint_vol], 'compute': [endpoint_vol],
186
'ec2': [endpoint_vol], 'identity': [endpoint_id]}
188
if self._get_openstack_release() >= self.trusty_kilo:
189
expected = {'compute': [endpoint_vol], 'identity': [endpoint_id]}
191
expected = {'s3': [endpoint_vol], 'compute': [endpoint_vol],
192
'ec2': [endpoint_vol], 'identity': [endpoint_id]}
187
193
actual = self.keystone_demo.service_catalog.get_endpoints()
189
195
ret = u.validate_svc_catalog_endpoint_data(expected, actual)
382
394
mysql_relation['db_host'],
385
expected = {'dhcpbridge_flagfile': '/etc/nova/nova.conf',
386
'dhcpbridge': '/usr/bin/nova-dhcpbridge',
387
'logdir': '/var/log/nova',
388
'state_path': '/var/lib/nova',
389
'lock_path': '/var/lock/nova',
390
'force_dhcp_release': 'True',
391
'libvirt_use_virtio_for_bridges': 'True',
393
'use_syslog': 'False',
394
'ec2_private_dns_show_ip': 'True',
395
'api_paste_config': '/etc/nova/api-paste.ini',
396
'enabled_apis': 'ec2,osapi_compute,metadata',
397
'auth_strategy': 'keystone',
398
'compute_driver': 'libvirt.LibvirtDriver',
399
'sql_connection': db_uri,
399
'dhcpbridge_flagfile': '/etc/nova/nova.conf',
400
'dhcpbridge': '/usr/bin/nova-dhcpbridge',
401
'logdir': '/var/log/nova',
402
'state_path': '/var/lib/nova',
403
'force_dhcp_release': 'True',
405
'use_syslog': 'False',
406
'ec2_private_dns_show_ip': 'True',
407
'api_paste_config': '/etc/nova/api-paste.ini',
408
'enabled_apis': 'ec2,osapi_compute,metadata',
409
'auth_strategy': 'keystone',
410
'flat_interface': 'eth1',
411
'network_manager': 'nova.network.manager.FlatDHCPManager',
412
'volume_api_class': 'nova.volume.cinder.API',
415
if self._get_openstack_release() < self.trusty_kilo:
417
expected[d]['lock_path'] = '/var/lock/nova'
418
expected[d]['libvirt_use_virtio_for_bridges'] = 'True'
419
expected[d]['compute_driver'] = 'libvirt.LibvirtDriver'
420
expected[d]['sql_connection'] = db_uri
421
expected[d]['rabbit_userid'] = 'nova'
422
expected[d]['rabbit_virtual_host'] = 'openstack'
423
expected[d]['rabbit_password'] = rabbitmq_relation['password']
424
expected[d]['rabbit_host'] = rabbitmq_relation['hostname']
425
expected[d]['glance_api_servers'] = glance_relation['glance-api-server']
428
'oslo_concurrency': {
429
'lock_path': '/var/lock/nova'
437
oslo_messaging_rabbit = {
438
'oslo_messaging_rabbit': {
400
439
'rabbit_userid': 'nova',
401
440
'rabbit_virtual_host': 'openstack',
402
441
'rabbit_password': rabbitmq_relation['password'],
403
442
'rabbit_host': rabbitmq_relation['hostname'],
404
'glance_api_servers': glance_relation['glance-api-server'],
405
'flat_interface': 'eth1',
406
'network_manager': 'nova.network.manager.FlatDHCPManager',
407
'volume_api_class': 'nova.volume.cinder.API'}
447
'api_servers': glance_relation['glance-api-server']
450
expected.update(oslo_concurrency)
451
expected.update(database)
452
expected.update(oslo_messaging_rabbit)
453
expected.update(glance)
409
ret = u.validate_config_data(unit, conf, 'DEFAULT', expected)
411
message = "nova config error: {}".format(ret)
412
amulet.raise_status(amulet.FAIL, msg=message)
455
for section, pairs in expected.iteritems():
456
ret = u.validate_config_data(unit, conf, section, pairs)
458
message = "nova config error: {}".format(ret)
459
amulet.raise_status(amulet.FAIL, msg=message)
414
461
def test_image_instance_create(self):
415
462
"""Create an image/instance, verify they exist, and delete them."""