Merge "Bump microversion to 2.26"

This commit is contained in:
Jenkins 2017-01-24 17:59:05 +00:00 committed by Gerrit Code Review
commit 3868b7c0d4
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)