Browse Source

NetApp cDOT driver skip vserver route with no gateway

Skip route creation if user decided to configure neutron network
without a gateway.

Closes-Bug: #1777126
Change-Id: Ic54e3aa7fc8327464110fff40d02c690d8b19122
changes/90/539990/4
Maurice Schreiber 4 years ago
committed by Goutham Pacha Ravi
parent
commit
a7c4eb9c19
  1. 2
      manila/share/drivers/netapp/dataontap/client/client_cmode.py
  2. 5
      manila/tests/share/drivers/netapp/dataontap/client/test_client_cmode.py
  3. 5
      releasenotes/notes/bug-1777126-netapp-skip-route-setup-if-no-gateway-e841635dcd20fd12.yaml

2
manila/share/drivers/netapp/dataontap/client/client_cmode.py

@ -659,6 +659,8 @@ class NetAppCmodeClient(client_base.NetAppBaseClient):
@na_utils.trace
def create_route(self, gateway, destination=None):
if not gateway:
return
if not destination:
if ':' in gateway:
destination = '::/0'

5
manila/tests/share/drivers/netapp/dataontap/client/test_client_cmode.py

@ -1249,6 +1249,11 @@ class NetAppClientCmodeTestCase(test.TestCase):
self.client.send_request.assert_called_once_with(
'net-routes-create', expected_api_args)
def test_create_route_without_gateway(self):
self.mock_object(self.client, 'send_request')
self.client.create_route(None, destination=fake.SUBNET)
self.assertFalse(self.client.send_request.called)
def test_ensure_broadcast_domain_for_port_domain_match(self):
port_info = {

5
releasenotes/notes/bug-1777126-netapp-skip-route-setup-if-no-gateway-e841635dcd20fd12.yaml

@ -0,0 +1,5 @@
---
fixes:
- The NetApp driver has been fixed to not enforce route creation when the
share network provided has no gateway. See `Launchpad bug 1777126
<https://bugs.launchpad.net/manila/+bug/1777126>`_ for details.
Loading…
Cancel
Save