Bump microversion to 2.26

Bumping microversion in order to accomodate
server changes with regards to deprecating
nova_network.

TrivialFix

Co-Authored-By: Valeriy Ponomaryov <vponomaryov@mirantis.com>

Change-Id: Ia5557ba18748658e0006355131299de361f68c7d
This commit is contained in:
Rodrigo Barbieri 2017-01-24 15:11:47 -02:00
parent 5be13b0c1b
commit 39d6b1e124
2 changed files with 28 additions and 3 deletions

View File

@ -33,7 +33,7 @@ from openstack_dashboard.api import base
LOG = logging.getLogger(__name__)
MANILA_UI_USER_AGENT_REPR = "manila_ui_plugin_for_horizon"
MANILA_VERSION = "2.22" # requires manilaclient 1.12.0 or newer
MANILA_VERSION = "2.26" # requires manilaclient 1.12.0 or newer
MANILA_SERVICE_TYPE = "sharev2"
# API static values
@ -225,10 +225,10 @@ def share_network_list(request, detailed=False, search_opts=None):
def share_network_create(request, neutron_net_id=None, neutron_subnet_id=None,
nova_net_id=None, name=None, description=None):
name=None, description=None):
return manilaclient(request).share_networks.create(
neutron_net_id=neutron_net_id, neutron_subnet_id=neutron_subnet_id,
nova_net_id=nova_net_id, name=name, description=description)
name=name, description=description)
def share_network_get(request, share_net_id):

View File

@ -236,3 +236,28 @@ class ManilaApiTests(base.APITestCase):
api.availability_zone_list(self.request)
self.manilaclient.availability_zones.list.assert_called_once_with()
@ddt.data(
{},
{"name": "foo_name"},
{"description": "foo_desc"},
{"neutron_net_id": "foo_neutron_net_id"},
{"neutron_subnet_id": "foo_neutron_subnet_id"},
{"name": "foo_name", "description": "foo_desc",
"neutron_net_id": "foo_neutron_net_id",
"neutron_subnet_id": "foo_neutron_subnet_id"},
)
@ddt.unpack
def test_share_network_create(self, **kwargs):
expected_kwargs = {
"name": None,
"description": None,
"neutron_net_id": None,
"neutron_subnet_id": None,
}
expected_kwargs.update(kwargs)
api.share_network_create(self.request, **kwargs)
mock_sn_create = self.manilaclient.share_networks.create
mock_sn_create.assert_called_once_with(**expected_kwargs)