How to use unmanage_snapshot method in tempest

Best Python code snippet using tempest_python

test_share_snapshots.py

Source:test_share_snapshots.py Github

copy

Full Screen

1# Copyright 2015 EMC Corporation2# All Rights Reserved.3#4# Licensed under the Apache License, Version 2.0 (the "License"); you may5# not use this file except in compliance with the License. You may obtain6# a copy of the License at7#8# http://www.apache.org/licenses/LICENSE-2.09#10# Unless required by applicable law or agreed to in writing, software11# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT12# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the13# License for the specific language governing permissions and limitations14# under the License.15import ddt16import mock17from oslo_serialization import jsonutils18import six19import webob20from manila.api.v2 import share_snapshots21from manila.common import constants22from manila import context23from manila import db24from manila import exception25from manila import policy26from manila.share import api as share_api27from manila import test28from manila.tests.api.contrib import stubs29from manila.tests.api import fakes30from manila.tests import db_utils31from manila.tests import fake_share32MIN_MANAGE_SNAPSHOT_API_VERSION = '2.12'33def get_fake_manage_body(share_id=None, provider_location=None,34 driver_options=None, **kwargs):35 fake_snapshot = {36 'share_id': share_id,37 'provider_location': provider_location,38 'driver_options': driver_options,39 }40 fake_snapshot.update(kwargs)41 return {'snapshot': fake_snapshot}42@ddt.ddt43class ShareSnapshotAPITest(test.TestCase):44 """Share Snapshot API Test."""45 def setUp(self):46 super(self.__class__, self).setUp()47 self.controller = share_snapshots.ShareSnapshotsController()48 self.mock_object(share_api.API, 'get', stubs.stub_share_get)49 self.mock_object(share_api.API, 'get_all_snapshots',50 stubs.stub_snapshot_get_all_by_project)51 self.mock_object(share_api.API, 'get_snapshot',52 stubs.stub_snapshot_get)53 self.mock_object(share_api.API, 'snapshot_update',54 stubs.stub_snapshot_update)55 self.snp_example = {56 'share_id': 100,57 'size': 12,58 'force': False,59 'display_name': 'updated_snapshot_name',60 'display_description': 'updated_snapshot_description',61 }62 def test_snapshot_create(self):63 self.mock_object(share_api.API, 'create_snapshot',64 stubs.stub_snapshot_create)65 body = {66 'snapshot': {67 'share_id': 'fakeshareid',68 'force': False,69 'name': 'displaysnapname',70 'description': 'displaysnapdesc',71 }72 }73 req = fakes.HTTPRequest.blank('/snapshots')74 res_dict = self.controller.create(req, body)75 expected = fake_share.expected_snapshot(id=200)76 self.assertEqual(expected, res_dict)77 @ddt.data(0, False)78 def test_snapshot_create_no_support(self, snapshot_support):79 self.mock_object(share_api.API, 'create_snapshot')80 self.mock_object(81 share_api.API,82 'get',83 mock.Mock(return_value={'snapshot_support': snapshot_support}))84 body = {85 'snapshot': {86 'share_id': 100,87 'force': False,88 'name': 'fake_share_name',89 'description': 'fake_share_description',90 }91 }92 req = fakes.HTTPRequest.blank('/snapshots')93 self.assertRaises(94 webob.exc.HTTPUnprocessableEntity,95 self.controller.create, req, body)96 self.assertFalse(share_api.API.create_snapshot.called)97 def test_snapshot_create_no_body(self):98 body = {}99 req = fakes.HTTPRequest.blank('/snapshots')100 self.assertRaises(webob.exc.HTTPUnprocessableEntity,101 self.controller.create,102 req,103 body)104 def test_snapshot_delete(self):105 self.mock_object(share_api.API, 'delete_snapshot',106 stubs.stub_snapshot_delete)107 req = fakes.HTTPRequest.blank('/snapshots/200')108 resp = self.controller.delete(req, 200)109 self.assertEqual(202, resp.status_int)110 def test_snapshot_delete_nofound(self):111 self.mock_object(share_api.API, 'get_snapshot',112 stubs.stub_snapshot_get_notfound)113 req = fakes.HTTPRequest.blank('/snapshots/200')114 self.assertRaises(webob.exc.HTTPNotFound,115 self.controller.delete,116 req,117 200)118 def test_snapshot_show(self):119 req = fakes.HTTPRequest.blank('/snapshots/200')120 res_dict = self.controller.show(req, 200)121 expected = fake_share.expected_snapshot(id=200)122 self.assertEqual(expected, res_dict)123 def test_snapshot_show_nofound(self):124 self.mock_object(share_api.API, 'get_snapshot',125 stubs.stub_snapshot_get_notfound)126 req = fakes.HTTPRequest.blank('/snapshots/200')127 self.assertRaises(webob.exc.HTTPNotFound,128 self.controller.show,129 req, '200')130 def test_snapshot_list_summary(self):131 self.mock_object(share_api.API, 'get_all_snapshots',132 stubs.stub_snapshot_get_all_by_project)133 req = fakes.HTTPRequest.blank('/snapshots')134 res_dict = self.controller.index(req)135 expected = {136 'snapshots': [137 {138 'name': 'displaysnapname',139 'id': 2,140 'links': [141 {142 'href': 'http://localhost/v1/fake/'143 'snapshots/2',144 'rel': 'self'145 },146 {147 'href': 'http://localhost/fake/snapshots/2',148 'rel': 'bookmark'149 }150 ],151 }152 ]153 }154 self.assertEqual(expected, res_dict)155 def _snapshot_list_summary_with_search_opts(self, use_admin_context):156 search_opts = fake_share.search_opts()157 # fake_key should be filtered for non-admin158 url = '/snapshots?fake_key=fake_value'159 for k, v in search_opts.items():160 url = url + '&' + k + '=' + v161 req = fakes.HTTPRequest.blank(url, use_admin_context=use_admin_context)162 snapshots = [163 {'id': 'id1', 'display_name': 'n1', 'status': 'fake_status', },164 {'id': 'id2', 'display_name': 'n2', 'status': 'fake_status', },165 {'id': 'id3', 'display_name': 'n3', 'status': 'fake_status', },166 ]167 self.mock_object(share_api.API, 'get_all_snapshots',168 mock.Mock(return_value=snapshots))169 result = self.controller.index(req)170 search_opts_expected = {171 'display_name': search_opts['name'],172 'status': search_opts['status'],173 'share_id': search_opts['share_id'],174 }175 if use_admin_context:176 search_opts_expected.update({'fake_key': 'fake_value'})177 share_api.API.get_all_snapshots.assert_called_once_with(178 req.environ['manila.context'],179 sort_key=search_opts['sort_key'],180 sort_dir=search_opts['sort_dir'],181 search_opts=search_opts_expected,182 )183 self.assertEqual(1, len(result['snapshots']))184 self.assertEqual(snapshots[1]['id'], result['snapshots'][0]['id'])185 self.assertEqual(186 snapshots[1]['display_name'], result['snapshots'][0]['name'])187 def test_snapshot_list_summary_with_search_opts_by_non_admin(self):188 self._snapshot_list_summary_with_search_opts(use_admin_context=False)189 def test_snapshot_list_summary_with_search_opts_by_admin(self):190 self._snapshot_list_summary_with_search_opts(use_admin_context=True)191 def _snapshot_list_detail_with_search_opts(self, use_admin_context):192 search_opts = fake_share.search_opts()193 # fake_key should be filtered for non-admin194 url = '/shares/detail?fake_key=fake_value'195 for k, v in search_opts.items():196 url = url + '&' + k + '=' + v197 req = fakes.HTTPRequest.blank(url, use_admin_context=use_admin_context)198 snapshots = [199 {'id': 'id1', 'display_name': 'n1', 'status': 'fake_status', },200 {201 'id': 'id2',202 'display_name': 'n2',203 'status': 'fake_status',204 'share_id': 'fake_share_id',205 },206 {'id': 'id3', 'display_name': 'n3', 'status': 'fake_status', },207 ]208 self.mock_object(share_api.API, 'get_all_snapshots',209 mock.Mock(return_value=snapshots))210 result = self.controller.detail(req)211 search_opts_expected = {212 'display_name': search_opts['name'],213 'status': search_opts['status'],214 'share_id': search_opts['share_id'],215 }216 if use_admin_context:217 search_opts_expected.update({'fake_key': 'fake_value'})218 share_api.API.get_all_snapshots.assert_called_once_with(219 req.environ['manila.context'],220 sort_key=search_opts['sort_key'],221 sort_dir=search_opts['sort_dir'],222 search_opts=search_opts_expected,223 )224 self.assertEqual(1, len(result['snapshots']))225 self.assertEqual(snapshots[1]['id'], result['snapshots'][0]['id'])226 self.assertEqual(227 snapshots[1]['display_name'], result['snapshots'][0]['name'])228 self.assertEqual(229 snapshots[1]['status'], result['snapshots'][0]['status'])230 self.assertEqual(231 snapshots[1]['share_id'], result['snapshots'][0]['share_id'])232 def test_share_list_detail_with_search_opts_by_non_admin(self):233 self._snapshot_list_detail_with_search_opts(use_admin_context=False)234 def test_share_list_detail_with_search_opts_by_admin(self):235 self._snapshot_list_detail_with_search_opts(use_admin_context=True)236 def test_snapshot_list_detail(self):237 env = {'QUERY_STRING': 'name=Share+Test+Name'}238 req = fakes.HTTPRequest.blank('/shares/detail', environ=env)239 res_dict = self.controller.detail(req)240 expected_s = fake_share.expected_snapshot(id=2)241 expected = {'snapshots': [expected_s['snapshot']]}242 self.assertEqual(expected, res_dict)243 def test_snapshot_updates_description(self):244 snp = self.snp_example245 body = {"snapshot": snp}246 req = fakes.HTTPRequest.blank('/snapshot/1')247 res_dict = self.controller.update(req, 1, body)248 self.assertEqual(snp["display_name"], res_dict['snapshot']["name"])249 def test_snapshot_updates_display_descr(self):250 snp = self.snp_example251 body = {"snapshot": snp}252 req = fakes.HTTPRequest.blank('/snapshot/1')253 res_dict = self.controller.update(req, 1, body)254 self.assertEqual(snp["display_description"],255 res_dict['snapshot']["description"])256 def test_share_not_updates_size(self):257 snp = self.snp_example258 body = {"snapshot": snp}259 req = fakes.HTTPRequest.blank('/snapshot/1')260 res_dict = self.controller.update(req, 1, body)261 self.assertNotEqual(snp["size"], res_dict['snapshot']["size"])262@ddt.ddt263class ShareSnapshotAdminActionsAPITest(test.TestCase):264 def setUp(self):265 super(self.__class__, self).setUp()266 self.controller = share_snapshots.ShareSnapshotsController()267 self.flags(rpc_backend='manila.openstack.common.rpc.impl_fake')268 self.admin_context = context.RequestContext('admin', 'fake', True)269 self.member_context = context.RequestContext('fake', 'fake')270 self.resource_name = self.controller.resource_name271 self.manage_request = fakes.HTTPRequest.blank(272 '/snapshots/manage', use_admin_context=True,273 version=MIN_MANAGE_SNAPSHOT_API_VERSION)274 self.snapshot_id = 'fake'275 self.unmanage_request = fakes.HTTPRequest.blank(276 '/snapshots/%s/unmanage' % self.snapshot_id,277 use_admin_context=True,278 version=MIN_MANAGE_SNAPSHOT_API_VERSION)279 def _get_context(self, role):280 return getattr(self, '%s_context' % role)281 def _setup_snapshot_data(self, snapshot=None, version='2.7'):282 if snapshot is None:283 share = db_utils.create_share()284 snapshot = db_utils.create_snapshot(285 status=constants.STATUS_AVAILABLE, share_id=share['id'])286 req = fakes.HTTPRequest.blank('/v2/fake/snapshots/%s/action' %287 snapshot['id'], version=version)288 return snapshot, req289 def _reset_status(self, ctxt, model, req, db_access_method,290 valid_code, valid_status=None, body=None, version='2.7'):291 if float(version) > 2.6:292 action_name = 'reset_status'293 else:294 action_name = 'os-reset_status'295 if body is None:296 body = {action_name: {'status': constants.STATUS_ERROR}}297 req.method = 'POST'298 req.headers['content-type'] = 'application/json'299 req.headers['X-Openstack-Manila-Api-Version'] = version300 req.body = six.b(jsonutils.dumps(body))301 req.environ['manila.context'] = ctxt302 resp = req.get_response(fakes.app())303 # validate response code and model status304 self.assertEqual(valid_code, resp.status_int)305 if valid_code == 404:306 self.assertRaises(exception.NotFound,307 db_access_method,308 ctxt,309 model['id'])310 else:311 actual_model = db_access_method(ctxt, model['id'])312 self.assertEqual(valid_status, actual_model['status'])313 @ddt.data(*fakes.fixture_reset_status_with_different_roles)314 @ddt.unpack315 def test_snapshot_reset_status_with_different_roles(self, role, valid_code,316 valid_status, version):317 ctxt = self._get_context(role)318 snapshot, req = self._setup_snapshot_data(version=version)319 self._reset_status(ctxt, snapshot, req, db.share_snapshot_get,320 valid_code, valid_status, version=version)321 @ddt.data(322 ({'os-reset_status': {'x-status': 'bad'}}, '2.6'),323 ({'reset_status': {'x-status': 'bad'}}, '2.7'),324 ({'os-reset_status': {'status': 'invalid'}}, '2.6'),325 ({'reset_status': {'status': 'invalid'}}, '2.7'),326 )327 @ddt.unpack328 def test_snapshot_invalid_reset_status_body(self, body, version):329 snapshot, req = self._setup_snapshot_data(version=version)330 self._reset_status(self.admin_context, snapshot, req,331 db.share_snapshot_get, 400,332 constants.STATUS_AVAILABLE, body, version=version)333 def _force_delete(self, ctxt, model, req, db_access_method, valid_code,334 version='2.7'):335 if float(version) > 2.6:336 action_name = 'force_delete'337 else:338 action_name = 'os-force_delete'339 req.method = 'POST'340 req.headers['content-type'] = 'application/json'341 req.headers['X-Openstack-Manila-Api-Version'] = version342 req.body = six.b(jsonutils.dumps({action_name: {}}))343 req.environ['manila.context'] = ctxt344 resp = req.get_response(fakes.app())345 # Validate response346 self.assertEqual(valid_code, resp.status_int)347 @ddt.data(*fakes.fixture_force_delete_with_different_roles)348 @ddt.unpack349 def test_snapshot_force_delete_with_different_roles(self, role, resp_code,350 version):351 ctxt = self._get_context(role)352 snapshot, req = self._setup_snapshot_data(version=version)353 self._force_delete(ctxt, snapshot, req, db.share_snapshot_get,354 resp_code, version=version)355 def test_snapshot_force_delete_missing(self):356 ctxt = self._get_context('admin')357 snapshot, req = self._setup_snapshot_data(snapshot={'id': 'fake'})358 self._force_delete(ctxt, snapshot, req, db.share_snapshot_get, 404)359 @ddt.data(360 {},361 {'snapshots': {}},362 {'snapshot': get_fake_manage_body(share_id='xxxxxxxx')},363 {'snapshot': get_fake_manage_body(provider_location='xxxxxxxx')}364 )365 def test_snapshot_manage_invalid_body(self, body):366 self.mock_policy_check = self.mock_object(367 policy, 'check_policy', mock.Mock(return_value=True))368 self.assertRaises(webob.exc.HTTPUnprocessableEntity,369 self.controller.manage,370 self.manage_request,371 body)372 self.mock_policy_check.assert_called_once_with(373 self.manage_request.environ['manila.context'],374 self.resource_name, 'manage_snapshot')375 @ddt.data(376 get_fake_manage_body(name='foo', description='bar'),377 get_fake_manage_body(display_name='foo', description='bar'),378 get_fake_manage_body(name='foo', display_description='bar'),379 get_fake_manage_body(display_name='foo', display_description='bar'),380 get_fake_manage_body(display_name='foo', display_description='bar'),381 )382 def test_snapshot_manage(self, data):383 self.mock_policy_check = self.mock_object(384 policy, 'check_policy', mock.Mock(return_value=True))385 data['snapshot']['share_id'] = 'fake'386 data['snapshot']['provider_location'] = 'fake_volume_snapshot_id'387 data['snapshot']['driver_options'] = {}388 return_snapshot = {'id': 'fake_snap'}389 self.mock_object(390 share_api.API, 'manage_snapshot', mock.Mock(391 return_value=return_snapshot))392 share_snapshot = {393 'share_id': 'fake',394 'provider_location': 'fake_volume_snapshot_id',395 'display_name': 'foo',396 'display_description': 'bar',397 }398 actual_result = self.controller.manage(self.manage_request, data)399 share_api.API.manage_snapshot.assert_called_once_with(400 mock.ANY, share_snapshot, data['snapshot']['driver_options'])401 self.assertEqual(return_snapshot['id'],402 actual_result['snapshot']['id'])403 self.mock_policy_check.assert_called_once_with(404 self.manage_request.environ['manila.context'],405 self.resource_name, 'manage_snapshot')406 @ddt.data(exception.ShareNotFound(share_id='fake'),407 exception.ShareSnapshotNotFound(snapshot_id='fake'),408 exception.ManageInvalidShareSnapshot(reason='error'))409 def test_manage_exception(self, exception_type):410 self.mock_policy_check = self.mock_object(411 policy, 'check_policy', mock.Mock(return_value=True))412 body = get_fake_manage_body(413 share_id='fake', provider_location='fake_volume_snapshot_id',414 driver_options={})415 self.mock_object(416 share_api.API, 'manage_snapshot', mock.Mock(417 side_effect=exception_type))418 if isinstance(exception_type, exception.ManageInvalidShareSnapshot):419 http_ex = webob.exc.HTTPConflict420 else:421 http_ex = webob.exc.HTTPNotFound422 self.assertRaises(http_ex,423 self.controller.manage,424 self.manage_request, body)425 self.mock_policy_check.assert_called_once_with(426 self.manage_request.environ['manila.context'],427 self.resource_name, 'manage_snapshot')428 @ddt.data('1.0', '2.6', '2.11')429 def test_manage_version_not_found(self, version):430 body = get_fake_manage_body(431 share_id='fake', provider_location='fake_volume_snapshot_id',432 driver_options={})433 fake_req = fakes.HTTPRequest.blank(434 '/snapshots/manage', use_admin_context=True,435 version=version)436 self.assertRaises(exception.VersionNotFoundForAPIMethod,437 self.controller.manage,438 fake_req, body)439 def test_snapshot_unmanage_share_server(self):440 self.mock_policy_check = self.mock_object(441 policy, 'check_policy', mock.Mock(return_value=True))442 share = {'status': constants.STATUS_AVAILABLE, 'id': 'bar_id',443 'share_server_id': 'fake_server_id'}444 self.mock_object(share_api.API, 'get', mock.Mock(return_value=share))445 snapshot = {'status': constants.STATUS_AVAILABLE, 'id': 'foo_id',446 'share_id': 'bar_id'}447 self.mock_object(share_api.API, 'get_snapshot',448 mock.Mock(return_value=snapshot))449 self.assertRaises(webob.exc.HTTPForbidden,450 self.controller.unmanage,451 self.unmanage_request,452 snapshot['id'])453 self.controller.share_api.get_snapshot.assert_called_once_with(454 self.unmanage_request.environ['manila.context'], snapshot['id'])455 self.controller.share_api.get.assert_called_once_with(456 self.unmanage_request.environ['manila.context'], share['id'])457 self.mock_policy_check.assert_called_once_with(458 self.unmanage_request.environ['manila.context'],459 self.resource_name, 'unmanage_snapshot')460 @ddt.data(*constants.TRANSITIONAL_STATUSES)461 def test_snapshot_unmanage_with_transitional_state(self, status):462 self.mock_policy_check = self.mock_object(463 policy, 'check_policy', mock.Mock(return_value=True))464 share = {'status': constants.STATUS_AVAILABLE, 'id': 'bar_id'}465 self.mock_object(share_api.API, 'get', mock.Mock(return_value=share))466 snapshot = {'status': status, 'id': 'foo_id', 'share_id': 'bar_id'}467 self.mock_object(468 self.controller.share_api, 'get_snapshot',469 mock.Mock(return_value=snapshot))470 self.assertRaises(471 webob.exc.HTTPForbidden,472 self.controller.unmanage, self.unmanage_request, snapshot['id'])473 self.controller.share_api.get_snapshot.assert_called_once_with(474 self.unmanage_request.environ['manila.context'], snapshot['id'])475 self.controller.share_api.get.assert_called_once_with(476 self.unmanage_request.environ['manila.context'], share['id'])477 self.mock_policy_check.assert_called_once_with(478 self.unmanage_request.environ['manila.context'],479 self.resource_name, 'unmanage_snapshot')480 def test_snapshot_unmanage(self):481 self.mock_policy_check = self.mock_object(482 policy, 'check_policy', mock.Mock(return_value=True))483 share = {'status': constants.STATUS_AVAILABLE, 'id': 'bar_id',484 'host': 'fake_host'}485 self.mock_object(share_api.API, 'get', mock.Mock(return_value=share))486 snapshot = {'status': constants.STATUS_AVAILABLE, 'id': 'foo_id',487 'share_id': 'bar_id'}488 self.mock_object(share_api.API, 'get_snapshot',489 mock.Mock(return_value=snapshot))490 self.mock_object(share_api.API, 'unmanage_snapshot', mock.Mock())491 actual_result = self.controller.unmanage(self.unmanage_request,492 snapshot['id'])493 self.assertEqual(202, actual_result.status_int)494 self.controller.share_api.get_snapshot.assert_called_once_with(495 self.unmanage_request.environ['manila.context'], snapshot['id'])496 share_api.API.unmanage_snapshot.assert_called_once_with(497 mock.ANY, snapshot, 'fake_host')498 self.mock_policy_check.assert_called_once_with(499 self.unmanage_request.environ['manila.context'],500 self.resource_name, 'unmanage_snapshot')501 def test_unmanage_share_not_found(self):502 self.mock_policy_check = self.mock_object(503 policy, 'check_policy', mock.Mock(return_value=True))504 self.mock_object(505 share_api.API, 'get', mock.Mock(506 side_effect=exception.ShareNotFound(share_id='fake')))507 snapshot = {'status': constants.STATUS_AVAILABLE, 'id': 'foo_id',508 'share_id': 'bar_id'}509 self.mock_object(share_api.API, 'get_snapshot',510 mock.Mock(return_value=snapshot))511 self.mock_object(share_api.API, 'unmanage_snapshot', mock.Mock())512 self.assertRaises(webob.exc.HTTPNotFound,513 self.controller.unmanage,514 self.unmanage_request, 'foo_id')515 self.mock_policy_check.assert_called_once_with(516 self.unmanage_request.environ['manila.context'],517 self.resource_name, 'unmanage_snapshot')518 def test_unmanage_snapshot_not_found(self):519 self.mock_policy_check = self.mock_object(520 policy, 'check_policy', mock.Mock(return_value=True))521 share = {'status': constants.STATUS_AVAILABLE, 'id': 'bar_id'}522 self.mock_object(share_api.API, 'get', mock.Mock(return_value=share))523 self.mock_object(524 share_api.API, 'get_snapshot', mock.Mock(525 side_effect=exception.ShareSnapshotNotFound(526 snapshot_id='foo_id')))527 self.mock_object(share_api.API, 'unmanage_snapshot', mock.Mock())528 self.assertRaises(webob.exc.HTTPNotFound,529 self.controller.unmanage,530 self.unmanage_request, 'foo_id')531 self.mock_policy_check.assert_called_once_with(532 self.unmanage_request.environ['manila.context'],533 self.resource_name, 'unmanage_snapshot')534 @ddt.data('1.0', '2.6', '2.11')535 def test_unmanage_version_not_found(self, version):536 snapshot_id = 'fake'537 fake_req = fakes.HTTPRequest.blank(538 '/snapshots/%s/unmanage' % snapshot_id,539 use_admin_context=True,540 version=version)541 self.assertRaises(exception.VersionNotFoundForAPIMethod,542 self.controller.unmanage,...

Full Screen

Full Screen

share_snapshots.py

Source:share_snapshots.py Github

copy

Full Screen

...52 "unmanaged. Snapshot '%(s_id)s' is in '%(state)s' "53 "state.") % {'state': snapshot['status'],54 's_id': snapshot['id']}55 raise exc.HTTPForbidden(explanation=msg)56 self.share_api.unmanage_snapshot(context, snapshot, share['host'])57 except (exception.ShareSnapshotNotFound, exception.ShareNotFound) as e:58 raise exc.HTTPNotFound(explanation=six.text_type(e))59 return webob.Response(status_int=202)60 @wsgi.Controller.authorize('manage_snapshot')61 def _manage(self, req, body):62 """Instruct Manila to manage an existing snapshot.63 Required HTTP Body:64 {65 "snapshot":66 {67 "share_id": <Manila share id>,68 "provider_location": <A string parameter that identifies the69 snapshot on the backend>70 }...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run tempest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful