Fix scale tests for vCenter
Change-Id: Ia1530ba3e562592b1c0fdf32dc9de370c1370d2f Closes-bug: #1581464
This commit is contained in:
parent
b011f4eb80
commit
b2a521336e
|
@ -41,6 +41,7 @@ from system_test import deferred_decorator
|
|||
|
||||
from system_test.actions.ostf_actions import HealthCheckActions
|
||||
from system_test.actions.plugins_actions import PluginsActions
|
||||
from system_test.actions.vcenter_actions import VMwareActions
|
||||
|
||||
from system_test.core.discover import load_yaml
|
||||
from system_test.helpers.decorators import make_snapshot_if_step_fail
|
||||
|
@ -240,7 +241,8 @@ class PrepareActions(object):
|
|||
|
||||
|
||||
# noinspection PyUnresolvedReferences
|
||||
class BaseActions(PrepareActions, HealthCheckActions, PluginsActions):
|
||||
class BaseActions(PrepareActions, HealthCheckActions, PluginsActions,
|
||||
VMwareActions):
|
||||
"""Basic actions for acceptance cases
|
||||
|
||||
For choosing action order use actions_order variable, set list of actions
|
||||
|
@ -501,7 +503,9 @@ class BaseActions(PrepareActions, HealthCheckActions, PluginsActions):
|
|||
self._add_node([node])
|
||||
if node.get('vmware_vcenter'):
|
||||
nova_computes = node['vmware_vcenter']['nova-compute']
|
||||
dvs_settings = node['vmware_dvs']
|
||||
self.add_vmware_nova_compute(nova_computes)
|
||||
self.update_dvs_plugin_settings(dvs_settings)
|
||||
elif node['action'] == 'delete':
|
||||
self._del_node([node])
|
||||
if 'compute-vmware' in node['roles']:
|
||||
|
@ -553,8 +557,9 @@ class BaseActions(PrepareActions, HealthCheckActions, PluginsActions):
|
|||
0]["nova_computes"]
|
||||
|
||||
comp_vmware_nodes = self.fuel_web.get_nailgun_cluster_nodes_by_roles(
|
||||
self.cluster_id, ['compute-vmware'],
|
||||
role_status='pending_deletion')
|
||||
self.cluster_id, ['compute-vmware'])
|
||||
comp_vmware_nodes = [node for node in comp_vmware_nodes if
|
||||
node['pending_deletion'] is True]
|
||||
|
||||
for node, nova_comp in itertools.product(comp_vmware_nodes,
|
||||
vcenter_data):
|
||||
|
|
|
@ -81,3 +81,21 @@ class HealthCheckActions(object):
|
|||
test_sets=['ha'],
|
||||
should_fail=getattr(self, 'ostf_tests_should_failed', 0),
|
||||
failed_test_name=getattr(self, 'failed_test_name', None))
|
||||
|
||||
@deferred_decorator([make_snapshot_if_step_fail])
|
||||
@action
|
||||
def health_check_platform(self):
|
||||
"""Run health checker Platform
|
||||
|
||||
Skip action if cluster doesn't exist
|
||||
"""
|
||||
if self.cluster_id is None:
|
||||
raise SkipTest(
|
||||
"The cluster_id is not specified, can not run ostf"
|
||||
)
|
||||
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=self.cluster_id,
|
||||
test_sets=['tests_platform'],
|
||||
should_fail=getattr(self, 'ostf_tests_should_failed', 0),
|
||||
failed_test_name=getattr(self, 'failed_test_name', None))
|
||||
|
|
|
@ -57,14 +57,20 @@ class VMwareActions(object):
|
|||
self.plugin_name),
|
||||
msg)
|
||||
|
||||
dvs_settings = self.full_config['template']['cluster_template'][
|
||||
'settings']['vmware_dvs']
|
||||
self.update_dvs_plugin_settings(dvs_settings)
|
||||
|
||||
def update_dvs_plugin_settings(self, dvs_settings):
|
||||
"""Update plugin settings
|
||||
:param dvs_settings: dict
|
||||
"""
|
||||
|
||||
options = {
|
||||
'vmware_dvs_fw_driver/value': self.full_config[
|
||||
'template']['cluster_template']['settings']['vmware_dvs'][
|
||||
'dvs_fw_driver'],
|
||||
'vmware_dvs_net_maps/value': self.full_config[
|
||||
'template']['cluster_template']['settings']['vmware_dvs'][
|
||||
'dvswitch_name']
|
||||
'vmware_dvs_fw_driver/value': dvs_settings['dvs_fw_driver'],
|
||||
'vmware_dvs_net_maps/value': dvs_settings['dvswitch_name']
|
||||
}
|
||||
|
||||
self.fuel_web.update_plugin_settings(
|
||||
self.cluster_id, self.plugin_name, self.plugin_version, options,
|
||||
enabled=True)
|
||||
|
|
|
@ -103,9 +103,9 @@ class ScaleWithVMware(ActionTest, BaseActions, VMwareActions):
|
|||
|
||||
@testcase(groups=['system_test',
|
||||
'system_test.vcenter',
|
||||
'system_test.vcenter.scale_vcenter_dvs_skipsrvcheck'])
|
||||
class ScaleWithVMwareSkipSrvCheck(ActionTest, BaseActions, VMwareActions):
|
||||
"""Deploy and scale cluster with vCenter and dvs plugin
|
||||
'system_test.vcenter.deploy_vcenter_dvs_run_platform_ostf'])
|
||||
class DeployWithVMwareRunPlatformOSTF(ActionTest, BaseActions, VMwareActions):
|
||||
"""Deploy cluster with vCenter and dvs plugin. Run platform OSTF.
|
||||
|
||||
Scenario:
|
||||
1. Upload plugin to the master node
|
||||
|
@ -114,21 +114,17 @@ class ScaleWithVMwareSkipSrvCheck(ActionTest, BaseActions, VMwareActions):
|
|||
4. Configure dvs settings (depends on yaml config)
|
||||
5. Add nodes (depends on yaml config)
|
||||
6. Configure vmware settings (depends on yaml config)
|
||||
7. Run network verification
|
||||
8. Deploy the cluster
|
||||
9. Add/Delete nodes
|
||||
10. Redeploy cluster
|
||||
11. Run OSTF
|
||||
7. Deploy the cluster
|
||||
8. Run OSTF
|
||||
9. Run OSTF (platform tests)
|
||||
|
||||
Duration 3h 00min
|
||||
Snapshot scale_vcenter_dvs
|
||||
Duration 2h 20min
|
||||
Snapshot deploy_vcenter_dvs
|
||||
"""
|
||||
|
||||
plugin_name = "fuel-plugin-vmware-dvs"
|
||||
plugin_path = DVS_PLUGIN_PATH
|
||||
plugin_version = DVS_PLUGIN_VERSION
|
||||
ostf_tests_should_failed = 1
|
||||
failed_test_name = ['Check that required services are running']
|
||||
|
||||
actions_order = [
|
||||
'prepare_env_with_plugin',
|
||||
|
@ -138,9 +134,8 @@ class ScaleWithVMwareSkipSrvCheck(ActionTest, BaseActions, VMwareActions):
|
|||
'configure_vcenter',
|
||||
'network_check',
|
||||
'deploy_cluster',
|
||||
'scale_node',
|
||||
'deploy_changes',
|
||||
'health_check_sanity_smoke_ha'
|
||||
'health_check_sanity_smoke_ha',
|
||||
'health_check_platform'
|
||||
]
|
||||
|
||||
|
||||
|
|
|
@ -44,4 +44,7 @@ template:
|
|||
- cluster: Cluster2
|
||||
srv_name: srv_cluster2
|
||||
datastore: .*
|
||||
target_node: compute-vmware
|
||||
target_node: compute-vmware
|
||||
vmware_dvs:
|
||||
dvswitch_name: !os_env DVS_NAME, Cluster1:dvSwitch;Cluster2:dvSwitch
|
||||
dvs_fw_driver: false
|
Loading…
Reference in New Issue