Remove nova-network

Co-Authored-By: jinke <jin.ke@99cloud.net>
Co-Authored-By:  caowei <cao.wei@99cloud.net>

Change-Id: I769089ef8f01935804b7b342212234539b4c366d
This commit is contained in:
caowei 2018-06-29 10:40:14 +02:00 committed by Luigi Toscano
parent a225824efc
commit cdfbaac4ed
18 changed files with 15 additions and 53 deletions

View File

@ -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 | |
+-----------------------------+---------+----------+---------+----------------+

View File

@ -1,4 +1,3 @@
network:
type: ${network_type}
private_network: ${network_private_name}
public_network: ${network_public_name}

View File

@ -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.

View File

@ -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)

View File

@ -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;
* ${<plugin>_image} - name of image for each plugin;

View File

@ -1,6 +1,5 @@
<%page args="network_public_name=''"/>
network:
type: '${network_type}'
private_network: '${network_private_name}'
public_network: '${network_public_name}'

View File

@ -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)

View File

@ -81,10 +81,6 @@ SCHEMA = {
"network": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["neutron", "nova-network"]
},
"auto_assignment_floating_ip": {
"type": "boolean"
},

View File

@ -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

View File

@ -1,5 +1,4 @@
[DEFAULT]
network_type: neutron
network_private_name: private
network_public_name: public
ci_flavor_id: '2'

View File

@ -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

View File

@ -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 = {

View File

@ -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()

View File

@ -5,7 +5,6 @@ credentials:
ssl_verify: True
network:
type: ${network_type}
private_network: ${network_private_name}
public_network: ${network_public_name}

View File

@ -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}

View File

@ -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

View File

@ -38,7 +38,6 @@ cd $SAHARA_TESTS_DIR
echo "Generating scenario tests config file"
sudo -E -u $USER tee template_vars.ini <<EOF
[DEFAULT]
network_type: ${NETWORK}
network_private_name: ${PRIVATE_NETWORK_NAME}
network_public_name: ${PUBLIC_NETWORK_NAME}
plugin_image: ${SAHARA_IMAGE_NAME}

View File

@ -35,9 +35,4 @@ echo "IMAGE_URLS=$SAHARA_IMAGE" >> $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