Update VIM automated tests to support containers
Updating the VIM automated tests to support containerized OpenStack. Changes required were: - Update config file to point to containerized keystone. - Update suspend testcase to expect a suspended instance instead of a paused instance. Now that we are using the unmodified Stein version of nova, the nova patch that changed a suspend to a pause is no longer there. Change-Id: I54338d4eef7fd51ebd905758aab398de2e3bebea Story: 2004520 Task: 29824 Signed-off-by: Bart Wensley <barton.wensley@windriver.com>
This commit is contained in:
parent
9bb5718e2f
commit
c4e9ea7385
|
@ -26,10 +26,10 @@ keyring_service=CGCS
|
|||
username=admin
|
||||
tenant=admin
|
||||
authorization_protocol=http
|
||||
authorization_ip=192.168.204.2
|
||||
authorization_ip=keystone-api.openstack.svc.cluster.local
|
||||
authorization_port=5000
|
||||
user_domain_name=Default
|
||||
project_domain_name=Default
|
||||
user_domain_name=default
|
||||
project_domain_name=default
|
||||
keyring_service=CGCS
|
||||
|
||||
[keystone]
|
||||
|
|
|
@ -85,13 +85,10 @@ def are_unpause_logs_created(logs, instance, guest_hb=False):
|
|||
def are_suspend_logs_created(logs, instance, guest_hb=False):
|
||||
"""
|
||||
Check if suspend logs have been created
|
||||
NOTE: Nova was modified to pause instances when a suspend request is
|
||||
sent, so for now, check that the instance is paused. Eventually the
|
||||
suspend API should be disabled.
|
||||
"""
|
||||
expected_logs = [{'event_log_id': fm_constants.FM_LOG_ID_VM_SUSPEND,
|
||||
'severity': fm_constants.FM_ALARM_SEVERITY_CRITICAL},
|
||||
{'event_log_id': fm_constants.FM_LOG_ID_VM_PAUSED,
|
||||
{'event_log_id': fm_constants.FM_LOG_ID_VM_SUSPENDED,
|
||||
'severity': fm_constants.FM_ALARM_SEVERITY_CRITICAL}]
|
||||
|
||||
return _instance_logs_created(logs, expected_logs, instance)
|
||||
|
|
|
@ -330,15 +330,12 @@ def instance_has_suspended(instance, log_files, alarms, event_logs, alarm_histor
|
|||
guest_hb=False):
|
||||
"""
|
||||
Returns true if the instance has suspended
|
||||
NOTE: Nova was modified to pause instances when a suspend request is
|
||||
sent, so for now, check that the instance is paused. Eventually the
|
||||
suspend API should be disabled.
|
||||
"""
|
||||
success, reason = instance_is_paused(instance)
|
||||
success, reason = instance_is_suspended(instance)
|
||||
if not success:
|
||||
return False, reason
|
||||
|
||||
if not _alarms.is_instance_pause_alarm(alarms, instance, guest_hb):
|
||||
if not _alarms.is_instance_suspend_alarm(alarms, instance, guest_hb):
|
||||
return False, "instance pause alarm is not raised"
|
||||
|
||||
if not _event_logs.are_suspend_logs_created(event_logs, instance, guest_hb):
|
||||
|
|
|
@ -435,12 +435,9 @@ class TestInstanceResume(TestInstance):
|
|||
def _do_setup(self):
|
||||
"""
|
||||
Setup test
|
||||
NOTE: Nova was modified to pause instances when a suspend request is
|
||||
sent, so for now, check that the instance is paused. Eventually the
|
||||
suspend API should be disabled.
|
||||
"""
|
||||
self._refresh_instance_data()
|
||||
return _instances.instance_is_paused(self._instance_data)
|
||||
return _instances.instance_is_suspended(self._instance_data)
|
||||
|
||||
def _do_test(self):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue