Browse Source

Remove nova networking

This is essentially dead code elimination
from manila-ui at this point since manila
and python-manilaclient dropped support
in the Ocata release.

Change-Id: I92e87282020047c7fad055cae92f2382c4193597
Partially-implements: bp remove-nova-net-plugin
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
changes/48/786748/1
Goutham Pacha Ravi 4 weeks ago
parent
commit
4edb837a1b
6 changed files with 9 additions and 28 deletions
  1. +0
    -3
      manila_ui/dashboards/admin/share_networks/templates/share_networks/_detail.html
  2. +2
    -11
      manila_ui/dashboards/project/share_networks/forms.py
  3. +0
    -4
      manila_ui/dashboards/project/share_networks/tables.py
  4. +0
    -3
      manila_ui/dashboards/project/share_networks/templates/share_networks/_detail.html
  5. +0
    -7
      manila_ui/dashboards/project/share_networks/views.py
  6. +7
    -0
      releasenotes/notes/remove-nova-net-plugin-4fdc0d944d93644f.yaml

+ 0
- 3
manila_ui/dashboards/admin/share_networks/templates/share_networks/_detail.html View File

@ -32,9 +32,6 @@
<dt>{% trans "Subnet" %}</dt>
<dd>{{ share_network.neutron_subnet}}</dd>
{% endif %}
{% if share_network.nova_net %}
<dd>{{ share_network.nova_net }}</dd>
{% endif %}
</dl>
</div>


+ 2
- 11
manila_ui/dashboards/project/share_networks/forms.py View File

@ -57,27 +57,18 @@ class Create(forms.SelfHandlingForm):
self.fields[subnet_field_name].choices = [
(' ', ' ')] + [(choice.id, choice.name_or_id)
for choice in subnet_choices]
else:
self.fields['nova_net_id'] = forms.ChoiceField(
choices=[(' ', ' ')] + [(choice.id, choice.name_or_id)
for choice in net_choices],
label=_("Nova Net"), widget=forms.Select(
attrs={'class': 'switched', 'data-slug': 'net'}))
def handle(self, request, data):
try:
send_data = {'name': data['name']}
if data['description']:
send_data['description'] = data['description']
share_net_id = data.get('neutron_net_id', data.get('nova_net_id'))
share_net_id = share_net_id.strip()
share_net_id = data.get('neutron_net_id')
if self.neutron_enabled and share_net_id:
send_data['neutron_net_id'] = share_net_id
send_data['neutron_net_id'] = share_net_id.strip()
subnet_key = 'subnet-choices-%s' % share_net_id
if subnet_key in data:
send_data['neutron_subnet_id'] = data[subnet_key]
elif not self.neutron_enabled and share_net_id:
send_data['nova_net_id'] = data['nova_net_id']
share_network = manila.share_network_create(request, **send_data)
messages.success(request, _('Successfully created share'
' network: %s') % send_data['name'])


+ 0
- 4
manila_ui/dashboards/project/share_networks/tables.py View File

@ -20,7 +20,6 @@ from openstack_dashboard.api import base
from openstack_dashboard.api import neutron
from manila_ui.api import manila
from manila_ui.api import network
DELETABLE_STATES = ("INACTIVE", "ERROR")
@ -91,9 +90,6 @@ class UpdateRow(tables.Row):
request, share_net.neutron_net_id).name_or_id
share_net.neutron_subnet = neutron.subnet_get(
request, share_net.neutron_subnet_id).name_or_id
else:
share_net.nova_net = network.network_get(
request, share_net.nova_net_id).name_or_id
return share_net


+ 0
- 3
manila_ui/dashboards/project/share_networks/templates/share_networks/_detail.html View File

@ -25,9 +25,6 @@
<dt>{% trans "Subnet" %}</dt>
<dd>{{ share_network.neutron_subnet}}</dd>
{% endif %}
{% if share_network.nova_net %}
<dd>{{ share_network.nova_net }}</dd>
{% endif %}
</dl>
</div>


+ 0
- 7
manila_ui/dashboards/project/share_networks/views.py View File

@ -24,7 +24,6 @@ from openstack_dashboard.api import base
from openstack_dashboard.api import neutron
from manila_ui.api import manila
from manila_ui.api import network
from manila_ui.dashboards.project.share_networks import forms as sn_forms
from manila_ui.dashboards.project.share_networks import tables as sn_tables
from manila_ui.dashboards.project.share_networks import tabs as sn_tabs
@ -123,12 +122,6 @@ class Detail(tabs.TabView):
except (
neutron.neutron_client.exceptions.NeutronClientException):
share_net.neutron_subnet = _("Unknown")
else:
try:
share_net.nova_net = network.network_get(
self.request, share_net.nova_net_id).name_or_id
except Exception:
share_net.nova_net = _("Unknown")
share_net.sec_services = (
manila.share_network_security_service_list(


+ 7
- 0
releasenotes/notes/remove-nova-net-plugin-4fdc0d944d93644f.yaml View File

@ -0,0 +1,7 @@
---
upgrade:
- |
Support for nova networking has been removed. Manila and the
manilaclient sdk dropped support for nova network in the Ocata release
(Feb 2017). So this should not have an impact on deployers running later
releases, and this note is only informational.

Loading…
Cancel
Save