diff --git a/doc/source/scenario.rst b/doc/source/scenario.rst index 331db411..eebd09fe 100644 --- a/doc/source/scenario.rst +++ b/doc/source/scenario.rst @@ -63,8 +63,6 @@ The following variables are currently used by defaults templates: +-----------------------------+--------+-------------------------+ | Variable | Type | Value | +=============================+========+=========================+ -| network_type | string | neutron or nova-network | -+-----------------------------+--------+-------------------------+ | network_private_name | string | private network name | | | | for OS_PROJECT_NAME | +-----------------------------+--------+-------------------------+ @@ -381,9 +379,6 @@ This section is dictionary-type. | public_network | string | | public | name or id of | | | | | | private network| +-----------------------------+---------+----------+---------+----------------+ -| type | string | | neutron | "neutron" or | -| | | | | "nova-network" | -+-----------------------------+---------+----------+---------+----------------+ | auto_assignment_floating_ip | boolean | | False | | +-----------------------------+---------+----------+---------+----------------+ diff --git a/etc/scenario/gate/credentials.yaml.mako b/etc/scenario/gate/credentials.yaml.mako index 97de6e4c..69206e78 100644 --- a/etc/scenario/gate/credentials.yaml.mako +++ b/etc/scenario/gate/credentials.yaml.mako @@ -1,4 +1,3 @@ network: - type: ${network_type} private_network: ${network_private_name} public_network: ${network_public_name} diff --git a/releasenotes/notes/remove-nova-network-09a2afd1efd83e05.yaml b/releasenotes/notes/remove-nova-network-09a2afd1efd83e05.yaml new file mode 100644 index 00000000..0dfdc77b --- /dev/null +++ b/releasenotes/notes/remove-nova-network-09a2afd1efd83e05.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + Removed nova-network configuration. Nova network has been fully + removed from the OpenStack codebase, in all releases supported + by sahara-tests. diff --git a/sahara_tests/scenario/base.py b/sahara_tests/scenario/base.py index 1b331d9c..372342bd 100644 --- a/sahara_tests/scenario/base.py +++ b/sahara_tests/scenario/base.py @@ -573,11 +573,8 @@ class BaseTestCase(base.BaseTestCase): proxy_exist = False if self.network['public_network']: - if self.network['type'] == 'neutron': - floating_ip_pool = self.neutron.get_network_id( - self.network['public_network']) - elif not self.network['auto_assignment_floating_ip']: - floating_ip_pool = self.network['public_network'] + floating_ip_pool = self.neutron.get_network_id( + self.network['public_network']) node_groups = [] for ng in self.testcase['node_group_templates']: @@ -647,9 +644,8 @@ class BaseTestCase(base.BaseTestCase): kwargs.update(self.plugin_opts) kwargs['name'] = utils.rand_name(kwargs.get('name', 'ct')) - if self.network['type'] == 'neutron': - kwargs['net_id'] = self.neutron.get_network_id( - self.network['private_network']) + kwargs['net_id'] = self.neutron.get_network_id( + self.network['private_network']) return self.__create_cluster_template(**kwargs) diff --git a/sahara_tests/scenario/defaults/README.rst b/sahara_tests/scenario/defaults/README.rst index a2b9e0d8..00c77aec 100644 --- a/sahara_tests/scenario/defaults/README.rst +++ b/sahara_tests/scenario/defaults/README.rst @@ -11,10 +11,9 @@ Details Key values (mako variables): -* ${network_type} - network type (neutron or nova-network); * ${network_private_name}, ${network_public_name} - names of private (tenant) and public networks; * ${cluster_name} - name of cluster, which generating from $HOST-$ZUUL_CHANGE-$CLUSTER_HASH. Where: - * $HOST - host id (c1 - with neutron, c2 - with nova-network); + * $HOST - host id; * $ZUUL_CHANGE - change number; * $CLUSTER_HASH - hash, which generating for each cluster by using "uuid" python module; * ${_image} - name of image for each plugin; diff --git a/sahara_tests/scenario/defaults/credentials.yaml.mako b/sahara_tests/scenario/defaults/credentials.yaml.mako index a3e8c2e7..a22ae77d 100644 --- a/sahara_tests/scenario/defaults/credentials.yaml.mako +++ b/sahara_tests/scenario/defaults/credentials.yaml.mako @@ -1,6 +1,5 @@ <%page args="network_public_name=''"/> network: - type: '${network_type}' private_network: '${network_private_name}' public_network: '${network_public_name}' diff --git a/sahara_tests/scenario/runner.py b/sahara_tests/scenario/runner.py index 72377bb5..a9ffa745 100755 --- a/sahara_tests/scenario/runner.py +++ b/sahara_tests/scenario/runner.py @@ -47,7 +47,6 @@ def set_defaults(config): # set up network config['network'] = config.get('network', {}) net = config['network'] - net['type'] = net.get('type', 'neutron') net['private_network'] = net.get('private_network', 'private') net['auto_assignment_floating_ip'] = net.get('auto_assignment_floating_ip', False) diff --git a/sahara_tests/scenario/validation.py b/sahara_tests/scenario/validation.py index a8dee751..a7dcb361 100644 --- a/sahara_tests/scenario/validation.py +++ b/sahara_tests/scenario/validation.py @@ -81,10 +81,6 @@ SCHEMA = { "network": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": ["neutron", "nova-network"] - }, "auto_assignment_floating_ip": { "type": "boolean" }, diff --git a/sahara_tests/unit/scenario/templatevars_complete.ini b/sahara_tests/unit/scenario/templatevars_complete.ini index 1f6d1d95..b669eda2 100644 --- a/sahara_tests/unit/scenario/templatevars_complete.ini +++ b/sahara_tests/unit/scenario/templatevars_complete.ini @@ -1,5 +1,4 @@ [DEFAULT] -network_type: neutron network_private_name: private network_public_name: public vanilla_26_image: centos_sahara_vanilla_hadoop_2_6_latest diff --git a/sahara_tests/unit/scenario/templatevars_incomplete.ini b/sahara_tests/unit/scenario/templatevars_incomplete.ini index d2322419..2d7ca444 100644 --- a/sahara_tests/unit/scenario/templatevars_incomplete.ini +++ b/sahara_tests/unit/scenario/templatevars_incomplete.ini @@ -1,5 +1,4 @@ [DEFAULT] -network_type: neutron network_private_name: private network_public_name: public ci_flavor_id: '2' diff --git a/sahara_tests/unit/scenario/templatevars_nodefault.ini b/sahara_tests/unit/scenario/templatevars_nodefault.ini index b42e403f..8719f032 100644 --- a/sahara_tests/unit/scenario/templatevars_nodefault.ini +++ b/sahara_tests/unit/scenario/templatevars_nodefault.ini @@ -1,4 +1,3 @@ -network_type: neutron network_private_name: private network_public_name: public vanilla_26_image: centos_sahara_vanilla_hadoop_2_6_latest diff --git a/sahara_tests/unit/scenario/test_base.py b/sahara_tests/unit/scenario/test_base.py index f4dcd5dd..58713f4a 100644 --- a/sahara_tests/unit/scenario/test_base.py +++ b/sahara_tests/unit/scenario/test_base.py @@ -100,8 +100,7 @@ class TestBase(testtools.TestCase): 'ssl_verify': True} self.base_scenario.plugin_opts = {'plugin_name': 'vanilla', 'hadoop_version': '2.7.1'} - self.base_scenario.network = {'type': 'neutron', - 'private_network': 'changed_private', + self.base_scenario.network = {'private_network': 'changed_private', 'public_network': 'changed_public', 'auto_assignment_floating_ip': False} self.base_scenario.testcase = { diff --git a/sahara_tests/unit/scenario/test_runner.py b/sahara_tests/unit/scenario/test_runner.py index 9339cdc0..959d2451 100644 --- a/sahara_tests/unit/scenario/test_runner.py +++ b/sahara_tests/unit/scenario/test_runner.py @@ -61,7 +61,6 @@ class RunnerUnitTest(testtools.TestCase): expected_default_network = { "network": { - "type": "neutron", "private_network": "private", "public_network": "", "auto_assignment_floating_ip": False @@ -101,7 +100,6 @@ class RunnerUnitTest(testtools.TestCase): "ssl_cert": "sahara_tests/unit/scenario/dummy.crt" }, "network": { - "type": "neutron", "private_network": "changed_private", "public_network": "changed_public", "auto_assignment_floating_ip": True, @@ -185,7 +183,6 @@ class RunnerUnitTest(testtools.TestCase): expected_network = { "network": { - "type": "neutron", "private_network": "changed_private", "public_network": "changed_public", "auto_assignment_floating_ip": True, @@ -313,7 +310,7 @@ class RunnerUnitTest(testtools.TestCase): '--os-username', 'demo', '--os-password', 'demopwd', '--os-project-name', 'demo', '--os-auth-url', 'localhost/v2.0', - '--args', 'network_type:neutron', + '--args', 'network_private_name:private', 'network_public_name:public', 'vanilla_26_image:hadoop_2_6_latest', @@ -337,7 +334,7 @@ class RunnerUnitTest(testtools.TestCase): 'sahara_tests/unit/scenario/templatevars_complete.ini', 'sahara_tests/unit/scenario/vanilla2_7_1.yaml.mako', '--args', - 'network_type:test'] + 'network_private_name:'] with testtools.ExpectedException(exceptions.ValidationError): runner.main() diff --git a/sahara_tests/unit/scenario/vanilla2_7_1.yaml.mako b/sahara_tests/unit/scenario/vanilla2_7_1.yaml.mako index b75b931c..aa99523b 100644 --- a/sahara_tests/unit/scenario/vanilla2_7_1.yaml.mako +++ b/sahara_tests/unit/scenario/vanilla2_7_1.yaml.mako @@ -5,7 +5,6 @@ credentials: ssl_verify: True network: - type: ${network_type} private_network: ${network_private_name} public_network: ${network_public_name} diff --git a/tools/gate/scenario/commons b/tools/gate/scenario/commons index 23c480c8..7ef8b3d9 100644 --- a/tools/gate/scenario/commons +++ b/tools/gate/scenario/commons @@ -15,16 +15,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -export NETWORK=${1:-neutron} export PLUGIN=${2:-fake} export IS_TRANSIENT=true export AUTO_SECURITY_GROUP=true -# Normalize network name -if [[ $NETWORK == nova* ]]; then - export NETWORK="nova-network" - export IS_TRANSIENT=false - export AUTO_SECURITY_GROUP=false -fi export DEST=${DEST:-$BASE/new} export DEVSTACK_DIR=${DEVSTACK_DIR:-$DEST/devstack} diff --git a/tools/gate/scenario/dsvm-scenario-rc b/tools/gate/scenario/dsvm-scenario-rc index c499dab7..feeb5ad2 100755 --- a/tools/gate/scenario/dsvm-scenario-rc +++ b/tools/gate/scenario/dsvm-scenario-rc @@ -10,9 +10,3 @@ if [ $SAHARA_SCENARIO_GATE_PROJECT == "python-saharaclient" ] ; then export PROJECTS="openstack/python-saharaclient $PROJECTS" export DEVSTACK_PROJECT_FROM_GIT=python-saharaclient fi - -if [ $SAHARA_SCENARIO_GATE_NETWORK == "nova" ] ; then - export DEVSTACK_GATE_NEUTRON=0 -else - export DEVSTACK_GATE_NEUTRON=1 -fi diff --git a/tools/gate/scenario/post_test_hook.sh b/tools/gate/scenario/post_test_hook.sh index c8aa1240..f2a4d0fb 100755 --- a/tools/gate/scenario/post_test_hook.sh +++ b/tools/gate/scenario/post_test_hook.sh @@ -38,7 +38,6 @@ cd $SAHARA_TESTS_DIR echo "Generating scenario tests config file" sudo -E -u $USER tee template_vars.ini <> $LOCALCONF_PATH echo -e '[[post-config|$SAHARA_CONF_FILE]]\n[DEFAULT]\n' >> $LOCALCONF_PATH - -if [ "$NETWORK" == "nova-network" ]; then - echo -e 'heat_enable_wait_condition=false\n' >> $LOCALCONF_PATH -else - echo -e 'min_transient_cluster_active_time=90\n' >> $LOCALCONF_PATH -fi +echo -e 'min_transient_cluster_active_time=90\n' >> $LOCALCONF_PATH