From 0aa1a274d221a1c994ec9fa1fb49f7b557c58c46 Mon Sep 17 00:00:00 2001 From: Denis Deryabin Date: Fri, 5 Feb 2016 17:15:45 +0300 Subject: [PATCH] fix for bonding autotest Closes-Bug: #1538585 Change-Id: Ib0d747b0f5b266d5de2da0f5c879121c3ea88886 --- plugin_test/helpers/plugin.py | 38 ++++++++++++++------------- plugin_test/tests/test_integration.py | 9 ++++--- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/plugin_test/helpers/plugin.py b/plugin_test/helpers/plugin.py index f1ae6e91d..92fe3bb86 100644 --- a/plugin_test/helpers/plugin.py +++ b/plugin_test/helpers/plugin.py @@ -24,25 +24,27 @@ from settings import VSRX_TEMPLATE_PATH import openstack -BOND_CONFIG = [{ - 'mac': None, - 'mode': 'active-backup', - 'name': 'lnx-bond0', - 'slaves': [ - {'name': 'eth4'}, - {'name': 'eth2'}, - ], - 'state': None, - 'type': 'bond', - 'assigned_networks': []}] -INTERFACES = { - 'eth0': ['fuelweb_admin'], - 'eth1': ['public'], - 'eth3': ['private'], - 'lnx-bond0': ['management', - 'storage' - ] +BOND_CONFIG = [ + { + 'mac': None, + 'mode': 'active-backup', + 'name': 'lnx-bond0', + 'slaves': [ + {'name': 'eth3'}, + {'name': 'eth4'}, + ], + 'state': None, + 'type': 'bond', + 'assigned_networks': [] } +] + +INTERFACES = { + 'eth0': ['fuelweb_admin', 'storage'], + 'eth1': ['public'], + 'eth2': ['management'], + 'lnx-bond0': ['private'] +} def upload_contrail_packages(obj): diff --git a/plugin_test/tests/test_integration.py b/plugin_test/tests/test_integration.py index d55760467..16ab5cba1 100644 --- a/plugin_test/tests/test_integration.py +++ b/plugin_test/tests/test_integration.py @@ -338,6 +338,9 @@ class IntegrationTests(TestBasic): # enable plugin in contrail settings plugin.activate_plugin(self) + # configure vlan on storage and management interfaces + openstack.assign_vlan(self, private=101, storage=102) + self.fuel_web.update_nodes( self.cluster_id, { @@ -363,9 +366,9 @@ class IntegrationTests(TestBasic): for node in cluster_nodes: self.fuel_web.update_node_networks( - node['id'], interfaces_dict=deepcopy(plugin.INTERFACES), - raw_data=deepcopy(plugin.BOND_CONFIG) - ) + node['id'], + interfaces_dict=deepcopy(plugin.INTERFACES), + raw_data=deepcopy(plugin.BOND_CONFIG)) openstack.deploy_cluster(self)