Browse Source

Remove nova network support from 8.0

Remove UI parts and components for nova network.
Remove NovaNetworkManager for 8.0.

Change-Id: I81b8aee4615fa1da40724a92c781e955c8bf4ecb
Closes-Bug: #1528407
tags/9.0
Andriy Popovych 4 years ago
parent
commit
426d2faecc
12 changed files with 29 additions and 307 deletions
  1. +5
    -7
      nailgun/nailgun/errors/__init__.py
  2. +1
    -27
      nailgun/nailgun/fixtures/openstack.yaml
  3. +0
    -5
      nailgun/nailgun/network/nova_network.py
  4. +2
    -1
      nailgun/nailgun/objects/cluster.py
  5. +0
    -15
      nailgun/nailgun/test/integration/test_network_manager.py
  6. +3
    -3
      nailgun/nailgun/test/unit/fuel_statistics_tests/test_installation_info.py
  7. +0
    -13
      nailgun/nailgun/test/unit/test_objects.py
  8. +0
    -30
      nailgun/static/tests/functional/test_cluster_dashboard.js
  9. +0
    -202
      nailgun/static/tests/functional/test_cluster_network.js
  10. +1
    -1
      nailgun/static/tests/functional/test_wizard.js
  11. +1
    -3
      nailgun/static/translations/core.json
  12. +16
    -0
      nailgun/static/views/wizard.js

+ 5
- 7
nailgun/nailgun/errors/__init__.py View File

@@ -88,8 +88,10 @@ default_messages = {
"DuplicatedVIPNames": ("Cannot assign VIPs for the cluster due to "
"overlapping of names of the VIPs"),
"UpdateDnsmasqTaskIsRunning": ("update_dnsmasq task is not finished "
"after the previous configuration change. "
"Please try again after a few seconds."),
"after the previous configuration change. "
"Please try again after a few seconds."),
"NovaNetworkNotSupported": ("Nova network is not supported in current "
"release"),

# RPC errors
"CannotFindTask": "Cannot find task",
@@ -114,13 +116,9 @@ default_messages = {

# unknown
"UnknownError": "Unknown error",

"UnresolvableConflict": "Unresolvable conflict",

"NodeNotBelongToCluster": "The Node doesn't belong to the Cluster",

"TaskBaseDeploymentNotAllowed":
"The task-based deployment is not allowed"
"TaskBaseDeploymentNotAllowed": "The task-based deployment is not allowed"
}



+ 1
- 27
nailgun/nailgun/fixtures/openstack.yaml View File

@@ -915,8 +915,6 @@
value: false
weight: 30
type: "hidden"
restrictions:
- condition: "cluster:net_provider == 'nova_network'"
libvirt_type:
value: "qemu"
values:
@@ -1548,7 +1546,7 @@
name: "network"
type: "object"
restrictions:
- condition: "cluster:net_provider != 'nova_network' or networking_parameters:net_manager != 'VlanManager' or settings:common.use_vcenter.value == false"
- condition: "settings:common.use_vcenter.value == false"
action: "hide"
fields:
-
@@ -1694,20 +1692,6 @@
message: "dialog.create_cluster_wizard.additional.ironic_network_mode_alert"
requires:
- name: network:neutron:core:ml2
- name: network:nova_network
bind: !!pairs
- "cluster:net_provider": "nova_network"
weight: 15
label: "dialog.create_cluster_wizard.network.nova_network"
description: "dialog.create_cluster_wizard.network.nova_network_description"
compatible:
- name: hypervisor:vmware
requires:
- name: 'hypervisor:vmware'
message: "dialog.create_cluster_wizard.network.nova_network_vcenter_alert"
incompatible:
- name: additional_service:ironic
message: "dialog.create_cluster_wizard.additional.ironic_network_mode_alert"
- name: storage:block:lvm
label: "dialog.create_cluster_wizard.storage.lvm"
description: "dialog.create_cluster_wizard.storage.default_provider"
@@ -1720,7 +1704,6 @@
- name: hypervisor:vmware
- name: network:neutron:ml2:vlan
- name: network:neutron:ml2:tun
- name: network:nova_network
incompatible:
- name: storage:block:ceph
message: "LVM not compatible with Ceph"
@@ -1736,7 +1719,6 @@
- name: hypervisor:vmware
- name: network:neutron:ml2:vlan
- name: network:neutron:ml2:tun
- name: network:nova_network
- name: storage:object:ceph
- name: storage:ephemeral:ceph
- name: storage:image:ceph
@@ -1754,7 +1736,6 @@
- name: hypervisor:vmware
- name: network:neutron:ml2:vlan
- name: network:neutron:ml2:tun
- name: network:nova_network
- name: storage:block:ceph
- name: storage:ephemeral:ceph
- name: storage:image:ceph
@@ -1769,7 +1750,6 @@
- name: hypervisor:vmware
- name: network:neutron:ml2:vlan
- name: network:neutron:ml2:tun
- name: network:nova_network
- name: storage:block:ceph
- name: storage:object:ceph
- name: storage:image:ceph
@@ -1784,7 +1764,6 @@
- name: hypervisor:vmware
- name: network:neutron:ml2:vlan
- name: network:neutron:ml2:tun
- name: network:nova_network
- name: storage:block:ceph
- name: storage:object:ceph
- name: storage:ephemeral:ceph
@@ -1799,7 +1778,6 @@
- name: hypervisor:vmware
- name: network:neutron:ml2:vlan
- name: network:neutron:ml2:tun
- name: network:nova_network
- name: storage:block:lvm
- name: storage:block:ceph
- name: storage:object:ceph
@@ -1820,7 +1798,6 @@
- name: hypervisor:vmware
- name: network:neutron:ml2:vlan
- name: network:neutron:ml2:tun
- name: network:nova_network
- name: storage:block:lvm
- name: storage:block:ceph
- name: storage:object:ceph
@@ -1840,7 +1817,6 @@
- name: hypervisor:vmware
- name: network:neutron:ml2:vlan
- name: network:neutron:ml2:tun
- name: network:nova_network
- name: storage:block:lvm
- name: storage:block:ceph
- name: storage:object:ceph
@@ -1867,8 +1843,6 @@
- name: additional_service:murano
- name: additional_service:ceilometer
incompatible:
- name: network:nova_network
message: "dialog.create_cluster_wizard.additional.ironic_network_mode_alert"
- name: network:neutron:ml2:tun
message: "dialog.create_cluster_wizard.additional.ironic_network_mode_alert"
modes: ['ha_compact']

+ 0
- 5
nailgun/nailgun/network/nova_network.py View File

@@ -18,7 +18,6 @@ from nailgun.db import db
from nailgun.db.sqlalchemy.models import NovaNetworkConfig

from nailgun.network.manager import AllocateVIPs70Mixin
from nailgun.network.manager import AllocateVIPs80Mixin
from nailgun.network.manager import AssignIPs61Mixin
from nailgun.network.manager import AssignIPs70Mixin
from nailgun.network.manager import AssignIPsLegacyMixin
@@ -86,7 +85,3 @@ class NovaNetworkManager70(
:rtype: str
"""
return network_role['default_mapping']


class NovaNetworkManager80(AllocateVIPs80Mixin, NovaNetworkManager70):
pass

+ 2
- 1
nailgun/nailgun/objects/cluster.py View File

@@ -433,7 +433,8 @@ class Cluster(NailgunObject):
return nova_network.NovaNetworkManager70

if StrictVersion(ver) >= StrictVersion('8.0'):
return nova_network.NovaNetworkManager80
raise errors.NovaNetworkNotSupported()

return nova_network.NovaNetworkManager

raise ValueError(

+ 0
- 15
nailgun/nailgun/test/integration/test_network_manager.py View File

@@ -45,7 +45,6 @@ from nailgun.network.neutron import NeutronManager70
from nailgun.network.neutron import NeutronManager80
from nailgun.network.nova_network import NovaNetworkManager
from nailgun.network.nova_network import NovaNetworkManager70
from nailgun.network.nova_network import NovaNetworkManager80
from nailgun.test.base import BaseIntegrationTest
from nailgun.test.base import fake_tasks

@@ -1284,20 +1283,6 @@ class TestNovaNetworkManager70(TestNeutronManager70):
self.assertEqual(endpoint_ip, vip)


class TestNovaNetworkManager80(TestNovaNetworkManager70):
def _create_env(self):
return self.env.create(
release_kwargs={'version': '1111-8.0'},
cluster_kwargs={
'api': False,
'net_provider': consts.CLUSTER_NET_PROVIDERS.nova_network
}
)

def test_get_network_manager(self):
self.assertIs(self.net_manager, NovaNetworkManager80)


class TestTemplateManager70(BaseNetworkManagerTest):
def setUp(self):
super(TestTemplateManager70, self).setUp()

+ 3
- 3
nailgun/nailgun/test/unit/fuel_statistics_tests/test_installation_info.py View File

@@ -117,7 +117,7 @@ class TestInstallationInfo(BaseTestCase):
cluster_kwargs={
'release_id': release[0].id,
'mode': consts.CLUSTER_MODES.ha_compact,
'net_provider': consts.CLUSTER_NET_PROVIDERS.nova_network},
'net_provider': consts.CLUSTER_NET_PROVIDERS.neutron},
nodes_kwargs=nodes_params
)
self.env.create_node({'status': consts.NODE_STATUSES.discover})
@@ -140,7 +140,7 @@ class TestInstallationInfo(BaseTestCase):
cluster_kwargs={
'release_id': release[0].id,
'mode': consts.CLUSTER_MODES.ha_compact,
'net_provider': consts.CLUSTER_NET_PROVIDERS.nova_network},
'net_provider': consts.CLUSTER_NET_PROVIDERS.neutron},
nodes_kwargs=nodes_params
)
self.env.create_node({'status': consts.NODE_STATUSES.discover})
@@ -154,7 +154,7 @@ class TestInstallationInfo(BaseTestCase):

self.assertEquals(consts.CLUSTER_MODES.ha_compact,
cluster_info['mode'])
self.assertEquals(consts.CLUSTER_NET_PROVIDERS.nova_network,
self.assertEquals(consts.CLUSTER_NET_PROVIDERS.neutron,
cluster_info['net_provider'])
self.assertEquals(consts.CLUSTER_STATUSES.new,
cluster_info['status'])

+ 0
- 13
nailgun/nailgun/test/unit/test_objects.py View File

@@ -52,7 +52,6 @@ from nailgun.network.neutron import NeutronManager80
from nailgun.network.neutron import NeutronManagerLegacy
from nailgun.network.nova_network import NovaNetworkManager61
from nailgun.network.nova_network import NovaNetworkManager70
from nailgun.network.nova_network import NovaNetworkManager80
from nailgun.network.nova_network import NovaNetworkManagerLegacy


@@ -1317,9 +1316,6 @@ class TestClusterObject(BaseTestCase):
'name': 'network:neutron:tun',
'bind': [['cluster:net_provider', 'neutron'],
['cluster:net_segment_type', 'tun']]
}, {
'name': 'network:nova_network',
'bind': [['cluster:net_provider', 'nova_network']]
}, {
'name': 'hypervisor:libvirt:kvm',
'bind': [['settings:common.libvirt_type.value', 'kvm']]
@@ -1354,14 +1350,6 @@ class TestClusterObject(BaseTestCase):
'net_provider': consts.CLUSTER_NET_PROVIDERS.neutron,
'segmentation_type': consts.NEUTRON_SEGMENT_TYPES.tun
}
}, {
'selected_components': ['network:nova_network',
'hypervisor:libvirt:kvm',
'additional_service:sahara'],
'expected_values': {
'net_provider': consts.CLUSTER_NET_PROVIDERS.nova_network,
'segmentation_type': None
}
}, {
'selected_components': ['network:neutron:test_network',
'hypervisor:libvirt:kvm',
@@ -1585,7 +1573,6 @@ class TestClusterObjectGetNetworkManager(BaseTestCase):
('2014.2.2-6.0', NovaNetworkManagerLegacy),
('2014.2.2-6.1', NovaNetworkManager61),
('2015.6.7-7.0', NovaNetworkManager70),
('2016.1.1-8.0', NovaNetworkManager80),
):
self.check_neutron_network_manager(
consts.CLUSTER_NET_PROVIDERS.nova_network,

+ 0
- 30
nailgun/static/tests/functional/test_cluster_dashboard.js View File

@@ -242,36 +242,6 @@ define([
.then(function() {
return dashboardPage.discardChanges();
});
},
'VCenter warning appears': function() {
var vCenterClusterName = clusterName + 'VCenter test';
return this.remote
.clickLinkByText('Environments')
.assertElementsAppear('a.clusterbox', 2000, 'The list of clusters is shown when navigating to Environments link')
.then(function() {
return common.createCluster(
vCenterClusterName,
{
Compute: function() {
// Selecting VCenter
return this.remote
.clickByCssSelector('.custom-tumbler input[name=hypervisor\\:vmware]');
},
'Networking Setup': function() {
// Selecting Nova Network
return this.remote
.clickByCssSelector('.custom-tumbler input[value=network\\:nova_network]');
}
}
);
})
.then(function() {
return common.addNodesToCluster(1, ['Controller']);
})
.then(function() {
return clusterPage.goToTab('Dashboard');
})
.assertElementContainsText('.warnings-block', 'VMware settings are invalid', 'VMware warning is shown');
}
};
});

+ 0
- 202
nailgun/static/tests/functional/test_cluster_network.js View File

@@ -26,208 +26,6 @@ define([
], function(_, registerSuite, assert, Common, NetworksPage, ClusterPage, ModalWindow, DashboardPage) {
'use strict';

registerSuite(function() {
var common,
networksPage,
clusterPage,
clusterName,
dashboardPage;

return {
name: 'Networks page Nova Network tests',
setup: function() {
common = new Common(this.remote);
networksPage = new NetworksPage(this.remote);
clusterPage = new ClusterPage(this.remote);
clusterName = common.pickRandomName('Test Cluster');
dashboardPage = new DashboardPage(this.remote);

return this.remote
.then(function() {
return common.getIn();
})
.then(function() {
return common.createCluster(
clusterName,
{
Compute: function() {
// select VCenter to enable Nova networking
return this.remote
.clickByCssSelector('input[name=hypervisor\\:vmware]');
},
'Networking Setup': function() {
return this.remote
.clickByCssSelector('input[value=network\\:nova_network]');
}
}
);
})
.then(function() {
return clusterPage.goToTab('Networks');
});
},
afterEach: function() {
return this.remote
.clickByCssSelector('.btn-revert-changes');
},
'Network Tab is rendered correctly': function() {
return this.remote
.assertElementExists('.nova-managers .radio-group', 'Nova Network manager radiogroup is present')
.assertElementsExist('.checkbox-group input[name=net_provider]', 2, 'Network manager options are present')
.assertElementSelected('input[value=FlatDHCPManager]', 'Flat DHCP manager is chosen')
.assertElementsExist('.network-tab h3', 3, 'All networks are present');
},
'Testing cluster networks: Save button interactions': function() {
var self = this,
cidrInitialValue,
cidrElementSelector = '.storage input[name=cidr]';
return this.remote
.findByCssSelector(cidrElementSelector)
.then(function(element) {
return element.getAttribute('value')
.then(function(value) {
cidrInitialValue = value;
});
})
.end()
.setInputValue(cidrElementSelector, '240.0.1.0/25')
.assertElementAppears(networksPage.applyButtonSelector + ':not(:disabled)', 200,
'Save changes button is enabled if there are changes')
.then(function() {
return self.remote.setInputValue(cidrElementSelector, cidrInitialValue);
})
.assertElementAppears(networksPage.applyButtonSelector + ':disabled', 200,
'Save changes button is disabled again if there are no changes');
},
'Testing cluster networks: change network manager': function() {
var amountSelector = 'input[name=fixed_networks_amount]',
sizeSelector = 'select[name=fixed_network_size]';
return this.remote
.then(function() {
return networksPage.switchNetworkManager();
})
.clickByCssSelector('.subtab-link-nova_configuration')
.assertElementExists(amountSelector, 'Amount field for a fixed network is present in VLAN mode')
.assertElementExists(sizeSelector, 'Size field for a fixed network is present in VLAN mode')
.assertElementEnabled(networksPage.applyButtonSelector, 'Save changes button is enabled after manager was changed')
.then(function() {
return networksPage.switchNetworkManager();
})
.assertElementNotExists(amountSelector, 'Amount field was hidden after revert to FlatDHCP')
.assertElementNotExists(sizeSelector, 'Size field was hidden after revert to FlatDHCP')
.assertElementDisabled(networksPage.applyButtonSelector, 'Save changes button is disabled again after revert to FlatDHCP');
},
'Testing cluster networks: network notation change': function() {
return this.remote
.clickByCssSelector('.subtab-link-default')
.assertElementAppears('.storage', 2000, 'Storage network is shown')
.assertElementSelected('.storage .cidr input[type=checkbox]', 'Storage network has "cidr" notation by default')
.assertElementNotExists('.storage .ip_ranges input[type=text]:not(:disabled)', 'It is impossible to configure IP ranges for network with "cidr" notation')
.clickByCssSelector('.storage .cidr input[type=checkbox]')
.assertElementNotExists('.storage .ip_ranges input[type=text]:disabled', 'Network notation was changed to "ip_ranges"');
},
'Testing cluster networks: VLAN range fields': function() {
return this.remote
.then(function() {
return networksPage.switchNetworkManager();
})
.clickByCssSelector('.subtab-link-nova_configuration')
.assertElementAppears('input[name=range-end_fixed_networks_vlan_start]', 2000, 'VLAN range is displayed');
},
'Testing cluster networks: save network changes': function() {
return this.remote
.then(function() {
return networksPage.switchNetworkManager();
})
.clickByCssSelector(networksPage.applyButtonSelector)
.assertElementsAppear('input:not(:disabled)', 2000, 'Inputs are not disabled')
.assertElementNotExists('.alert-error', 'Correct settings were saved successfully');
},
'Testing cluster networks: save settings with group: network': function() {
return this.remote
.clickByCssSelector('.subtab-link-network_settings')
.clickByCssSelector('input[name=auto_assign_floating_ip][type=checkbox]')
.clickByCssSelector(networksPage.applyButtonSelector)
.assertElementsAppear('input:not(:disabled)', 2000, 'Inputs are not disabled')
.assertElementDisabled(networksPage.applyButtonSelector, 'Save changes button is disabled again after successfull settings saving');
},
'Testing cluster networks: verification': function() {
return this.remote
.clickByCssSelector('.subtab-link-network_verification')
.assertElementDisabled('.verify-networks-btn', 'Verification button is disabled in case of no nodes')
.assertElementTextEquals('.alert-warning',
'At least two online nodes are required to verify environment network configuration',
'Not enough nodes warning is shown')
.clickByCssSelector('.subtab-link-default')
.then(function() {
// Adding 2 controllers
return common.addNodesToCluster(2, ['Controller']);
})
.then(function() {
return clusterPage.goToTab('Networks');
})
.setInputValue('.public input[name=gateway]', '172.16.0.2')
.clickByCssSelector('.subtab-link-network_verification')
.clickByCssSelector('.verify-networks-btn')
.assertElementAppears('.alert-danger.network-alert', 4000, 'Verification error is shown')
.assertElementAppears('.alert-danger.network-alert', 'Address intersection', 'Verification result is shown in case of address intersection')
// Testing cluster networks: verification task deletion
.then(function() {
return networksPage.switchNetworkManager();
})
.clickByCssSelector('.subtab-link-network_verification')
.assertElementNotExists('.page-control-box .alert', 'Verification task was removed after settings has been changed')
.clickByCssSelector('.btn-revert-changes')
.then(function() {
return clusterPage.goToTab('Dashboard');
})
.then(function() {
return dashboardPage.discardChanges();
}) .then(function() {
return clusterPage.goToTab('Networks');
});
},
'Check VlanID field validation': function() {
return this.remote
.clickByCssSelector('.subtab-link-default')
.assertElementAppears('.management', 2000, 'Management network appears')
.clickByCssSelector('.management .vlan-tagging input[type=checkbox]')
.clickByCssSelector('.management .vlan-tagging input[type=checkbox]')
.assertElementExists('.management .has-error input[name=vlan_start]',
'Field validation has worked properly in case of empty value');
},
'Testing cluster networks: data validation on manager change': function() {
return this.remote
.then(function() {
return networksPage.switchNetworkManager();
})
.clickByCssSelector('.subtab-link-nova_configuration')
.assertElementAppears('input[name=fixed_networks_vlan_start][type=checkbox]', 2000, 'Vlan range appearsse')
.clickByCssSelector('input[name=fixed_networks_vlan_start][type=checkbox]')
.then(function() {
return networksPage.switchNetworkManager();
})
.assertElementExists('.has-error input[name=range-start_fixed_networks_vlan_start][type=text]',
'Field validation has worked')
.assertElementDisabled(networksPage.applyButtonSelector,
'Save changes button is disabled if there is validation error')
.then(function() {
return networksPage.switchNetworkManager();
})
.clickByCssSelector('input[name=fixed_networks_vlan_start][type=checkbox]')
.assertElementNotExists('.has-error input[name=range-start_fixed_networks_vlan_start][type=text]',
'Field validation works properly');
},
'Testing cluster networks: data validation on invalid settings': function() {
return this.remote
.clickByCssSelector('.subtab-link-default')
.setInputValue('input[name=range-end_ip_ranges]', '172.16.0.2')
.clickByCssSelector(networksPage.applyButtonSelector)
.assertElementAppears('.alert-danger.network-alert', 2000, 'Validation error appears');
}
};
});

registerSuite(function() {
var common,
networksPage,

+ 1
- 1
nailgun/static/tests/functional/test_wizard.js View File

@@ -65,7 +65,7 @@ define([
.pressKeys('\uE007')
.assertElementsExist('.wizard-step.available', 5, 'All steps are available at the end')
.clickLinkByText('Compute')
.clickByCssSelector('input[name=hypervisor\\:vmware]')
.clickByCssSelector('input[name=hypervisor\\:qemu]')
.assertElementExists('.wizard-step.available', 1,
'Only one step is available after changing hypervisor');
}

+ 1
- 3
nailgun/static/translations/core.json View File

@@ -860,6 +860,7 @@
"qemu_description": "Select this option if you want to use QEMU as a hypervisor with capability of KVM acceleration.",
"vcenter_description": "Select this option if you run OpenStack on VMware vCenter.",
"vcenter_warning": "vCenter can't be deployed without QEMU-KVM option selected.",
"vcenter_requires_network_backend": "vCenter requires DVS or NSX network backend",
"empty_choice": "Please select at least one hypervisor type"
},
"network": {
@@ -868,9 +869,6 @@
"description_link": "Mirantis OpenStack Planning Guide for Network Topology",
"release_alert": "Neutron is not supported in __NameAndRelease.release_name__",
"hypervisor_alert": "Neutron is not available with vCenter as a selected compute option.",
"nova_network_vcenter_alert": "Legacy Networking (nova-network) requires vCenter to be a selected compute option.",
"nova_network": "(DEPRECATED) Legacy Networking (nova-network)",
"nova_network_description": "This option is only available if you use VMware vCenter. OpenStack is deprecating nova-network in upcoming releases.",
"neutron_gre_description": "Your network hardware must support GRE segmentation. This option supports up to 65535 networks.",
"neutron_vlan": "Neutron with VLAN segmentation (default)",
"neutron_vlan_description": "Your network hardware must be configured for VLAN segmentation. This option supports up to 4095 networks.",

+ 16
- 0
nailgun/static/views/wizard.js View File

@@ -331,14 +331,30 @@ var Compute = React.createClass({
paneName: 'Compute',
componentType: 'hypervisor',
title: i18n('dialog.create_cluster_wizard.compute.title'),
vCenterPath: 'hypervisor:vmware',
vCenterNetworkBackends: ['network:neutron:ml2:nsx', 'network:neutron:ml2:dvs'],
hasErrors(wizard) {
var allComponents = wizard.get('components'),
components = allComponents.getComponentsByType(this.componentType, {sorted: true});
return !_.any(components, (component) => component.get('enabled'));
}
},
checkVCenter(allComponents) {
// TODO remove this hack in 9.0
var hasCompatibleBackends = _.any(allComponents.models, (component) => {
return _.contains(this.constructor.vCenterNetworkBackends, component.id);
});
if (!hasCompatibleBackends) {
var vCenter = _.find(allComponents.models, (component) => component.id == this.constructor.vCenterPath);
vCenter.set({
disabled: true,
warnings: i18n('dialog.create_cluster_wizard.compute.vcenter_requires_network_backend')
});
}
},
render() {
this.processRestrictions(this.components, ['hypervisor']);
this.checkVCenter(this.props.allComponents);
return (
<div className='wizard-compute-pane'>
<ComponentCheckboxGroup

Loading…
Cancel
Save