python-manilaclient 6.3.0__py3-none-any.whl → 6.4.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -63,6 +63,7 @@ class SessionClient(adapter.LegacyJsonAdapter):
63
63
  # that toggle sticky headers such as the experimental API header.
64
64
  self.default_headers = {}
65
65
  kwargs['default_microversion'] = api_version.get_string()
66
+ kwargs.setdefault('connect_retries', 1)
66
67
  self._logger = logging.getLogger(__name__)
67
68
  super().__init__(**kwargs)
68
69
 
@@ -349,6 +349,7 @@ class OSCClientTestBase(base.ClientTestBase):
349
349
  share,
350
350
  name=None,
351
351
  description=None,
352
+ properties=None,
352
353
  wait=True,
353
354
  force=None,
354
355
  add_cleanup=True,
@@ -360,6 +361,9 @@ class OSCClientTestBase(base.ClientTestBase):
360
361
 
361
362
  if description:
362
363
  cmd += f' --description {description}'
364
+ if properties:
365
+ for key, value in properties.items():
366
+ cmd += f' --property {key}={value}'
363
367
  if wait:
364
368
  cmd += ' --wait'
365
369
  if force:
@@ -13,6 +13,8 @@
13
13
  import json
14
14
 
15
15
  from manilaclient.tests.functional.osc import base
16
+ from tempest.lib.common.utils import data_utils
17
+ from tempest.lib import exceptions as tempest_exceptions
16
18
 
17
19
 
18
20
  class ShareSnapshotCLITest(base.OSCClientTestBase):
@@ -229,3 +231,136 @@ class ShareSnapshotCLITest(base.OSCClientTestBase):
229
231
  self.openstack,
230
232
  f'share snapshot delete {snapshot["id"]} --force --wait',
231
233
  )
234
+
235
+ def test_share_snapshot_create_with_metadata(self):
236
+ share = self.create_share()
237
+
238
+ snapshot_name = data_utils.rand_name("snapshot")
239
+
240
+ snapshot = self.create_snapshot(
241
+ share["id"],
242
+ name=snapshot_name,
243
+ properties={
244
+ "key1": "value1",
245
+ "key2": "value2",
246
+ },
247
+ )
248
+
249
+ self.assertEqual(share["id"], snapshot["share_id"])
250
+ self.assertEqual(snapshot_name, snapshot["name"])
251
+
252
+ show_result = self.dict_result(
253
+ 'share snapshot', f'show {snapshot["id"]}'
254
+ )
255
+
256
+ self.assertNotIn(show_result['properties'], [{}, "", None])
257
+
258
+ self.assertEqual(
259
+ "key1='value1', key2='value2'", show_result['properties']
260
+ )
261
+
262
+ def test_share_snapshot_show_metadata(self):
263
+ share = self.create_share()
264
+
265
+ snapshot_name = data_utils.rand_name("snapshot")
266
+
267
+ snapshot = self.create_snapshot(
268
+ share["id"],
269
+ name=snapshot_name,
270
+ )
271
+
272
+ self.dict_result(
273
+ 'share snapshot set',
274
+ f'{snapshot["id"]} --property key1=value1 --property key2=value2',
275
+ )
276
+
277
+ show_result = self.dict_result(
278
+ 'share snapshot show', f'{snapshot["id"]}'
279
+ )
280
+
281
+ self.assertEqual(snapshot["id"], show_result["id"])
282
+ self.assertEqual(snapshot_name, show_result["name"])
283
+
284
+ self.assertNotIn(show_result['properties'], [{}, "", None])
285
+
286
+ show_properties = dict(
287
+ item.split('=') for item in show_result['properties'].split(', ')
288
+ )
289
+
290
+ self.assertIn('key1', show_properties)
291
+ self.assertIn('key2', show_properties)
292
+ self.assertEqual("'value1'", show_properties['key1'])
293
+ self.assertEqual("'value2'", show_properties['key2'])
294
+
295
+ self.assertRaises(
296
+ tempest_exceptions.CommandFailed,
297
+ self.dict_result,
298
+ 'share snapshot show',
299
+ '00000000-0000-0000-0000-000000000000',
300
+ )
301
+
302
+ def test_share_snapshot_set_metadata(self):
303
+ share = self.create_share()
304
+
305
+ snapshot_name = data_utils.rand_name("snapshot")
306
+
307
+ snapshot = self.create_snapshot(
308
+ share["id"], name=snapshot_name, add_cleanup=True
309
+ )
310
+
311
+ self.dict_result(
312
+ 'share snapshot set',
313
+ f'{snapshot["id"]} --property key1=value1 --property key2=value2',
314
+ )
315
+
316
+ show_result = self.dict_result(
317
+ 'share snapshot show', f'{snapshot["id"]}'
318
+ )
319
+
320
+ self.assertNotIn(show_result['properties'], [{}, "", None])
321
+ show_properties = dict(
322
+ item.split('=') for item in show_result['properties'].split(', ')
323
+ )
324
+ self.assertIn('key1', show_properties)
325
+ self.assertIn('key2', show_properties)
326
+ self.assertEqual("'value1'", show_properties['key1'])
327
+ self.assertEqual("'value2'", show_properties['key2'])
328
+
329
+ self.assertRaises(
330
+ tempest_exceptions.CommandFailed,
331
+ self.openstack,
332
+ f'share snapshot set {snapshot["id"]} --property xyzzy',
333
+ )
334
+
335
+ def test_share_snapshot_unset_metadata(self):
336
+ share = self.create_share()
337
+
338
+ snapshot_name = data_utils.rand_name("snapshot")
339
+
340
+ snapshot = self.create_snapshot(
341
+ share["id"],
342
+ name=snapshot_name,
343
+ )
344
+
345
+ self.dict_result(
346
+ 'share snapshot set',
347
+ f'{snapshot["id"]} --property key1=value1 --property key2=value2',
348
+ )
349
+
350
+ self.assertRaises(
351
+ tempest_exceptions.CommandFailed,
352
+ self.dict_result,
353
+ 'share snapshot unset',
354
+ f'{snapshot["id"]} --property invalid_key',
355
+ )
356
+
357
+ self.dict_result(
358
+ 'share snapshot unset',
359
+ f'{snapshot["id"]} --property key1 --property key2',
360
+ )
361
+
362
+ show_result = self.dict_result(
363
+ 'share snapshot show', f'{snapshot["id"]}'
364
+ )
365
+
366
+ self.assertIn(show_result['properties'], [{}, "", None])
@@ -334,6 +334,10 @@ class SessionClientTest(utils.TestCase):
334
334
  self.max_version.get_string(), cl.default_microversion
335
335
  )
336
336
 
337
+ def test_init_sets_default_connect_retries(self):
338
+ cl = self._get_client()
339
+ self.assertEqual(1, cl.connect_retries)
340
+
337
341
  def test_get_returns_parsed_body(self):
338
342
  cl = self._get_client()
339
343
 
@@ -19,16 +19,16 @@ places where actual behavior differs from the spec.
19
19
  """
20
20
 
21
21
 
22
- def assert_has_keys(dictonary, required=None, optional=None):
22
+ def assert_has_keys(dictionary, required=None, optional=None):
23
23
  if required is None:
24
24
  required = []
25
25
  if optional is None:
26
26
  optional = []
27
27
  for k in required:
28
28
  try:
29
- assert k in dictonary
29
+ assert k in dictionary
30
30
  except AssertionError:
31
- extra_keys = set(dictonary).difference(set(required + optional))
31
+ extra_keys = set(dictionary).difference(set(required + optional))
32
32
  raise AssertionError(f"found unexpected keys: {list(extra_keys)}")
33
33
 
34
34
 
@@ -1,23 +1,22 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-manilaclient
3
- Version: 6.3.0
3
+ Version: 6.4.0
4
4
  Summary: Client library for OpenStack Shared File System Storage
5
5
  Author-email: OpenStack <openstack-discuss@lists.openstack.org>
6
- License: Apache-2.0
6
+ License-Expression: Apache-2.0
7
7
  Project-URL: Homepage, https://docs.openstack.org/python-manilaclient/
8
8
  Project-URL: Repository, https://opendev.org/openstack/python-manilaclient/
9
9
  Classifier: Environment :: OpenStack
10
10
  Classifier: Intended Audience :: Information Technology
11
11
  Classifier: Intended Audience :: System Administrators
12
- Classifier: License :: OSI Approved :: Apache Software License
13
12
  Classifier: Operating System :: POSIX :: Linux
14
13
  Classifier: Programming Language :: Python
15
14
  Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.10
17
15
  Classifier: Programming Language :: Python :: 3.11
18
16
  Classifier: Programming Language :: Python :: 3.12
19
17
  Classifier: Programming Language :: Python :: 3.13
20
- Requires-Python: >=3.10
18
+ Classifier: Programming Language :: Python :: 3.14
19
+ Requires-Python: >=3.11
21
20
  Description-Content-Type: text/x-rst
22
21
  License-File: LICENSE
23
22
  License-File: AUTHORS
@@ -34,18 +33,12 @@ Requires-Dist: debtcollector>=1.2.0
34
33
  Dynamic: license-file
35
34
  Dynamic: requires-dist
36
35
 
37
- ========================
38
- Team and repository tags
39
- ========================
40
-
41
- .. image:: https://governance.openstack.org/tc/badges/python-manilaclient.svg
42
- :target: https://governance.openstack.org/tc/reference/tags/index.html
43
-
44
- .. Change things from this point on
45
-
36
+ ===========================================
46
37
  Python bindings to the OpenStack Manila API
47
38
  ===========================================
48
39
 
40
+ .. image:: https://governance.openstack.org/tc/badges/python-manilaclient.svg
41
+
49
42
  .. only: html
50
43
 
51
44
  .. image:: https://img.shields.io/pypi/v/python-manilaclient.svg
@@ -10,7 +10,7 @@ manilaclient/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
10
10
  manilaclient/common/_i18n.py,sha256=-ia90LTyuQwvJXncEvUZTmoFk7n3_5B3Cib28B1nev0,1131
11
11
  manilaclient/common/cliutils.py,sha256=t_YqF3MdFYjcvLLGXj7sgol85R_61Thn8JVD6D2r2XE,8158
12
12
  manilaclient/common/constants.py,sha256=pj6gEsxlcl-4o9oh3huyDZRw4BxJuotgIn1qhMw9wc8,4425
13
- manilaclient/common/httpclient.py,sha256=K8oCyVCktD84YzJhUs_96Cavb733aEstFIklcIovgg4,11570
13
+ manilaclient/common/httpclient.py,sha256=fKyy0ZbKP53_dflj5mo1uRWei0j1Ny2BtdvBkjSe4LM,11618
14
14
  manilaclient/common/apiclient/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  manilaclient/common/apiclient/exceptions.py,sha256=6Uw_i42j87W6gKEVaaXofsMz1psSH0B8uJja7xpzObU,12824
16
16
  manilaclient/common/apiclient/utils.py,sha256=xkV33H7GwSqjPC3rjPfUiUtJZigmHuLtk4swBEJuS-4,2827
@@ -53,7 +53,7 @@ manilaclient/tests/functional/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
53
53
  manilaclient/tests/functional/exceptions.py,sha256=bNpdFSmsxeQwoOL5H9sLL6l7htGMGjlNmid8huhqdpc,2323
54
54
  manilaclient/tests/functional/utils.py,sha256=7q7sFuaiP9hIAqebJdH8l9hJuCjkhsWuP1QC8AGMIMQ,5118
55
55
  manilaclient/tests/functional/osc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
56
- manilaclient/tests/functional/osc/base.py,sha256=wv7lhpXvpeQvt4pdUaQ88ei7MRhHFc8iEH1SCK2QbI0,18904
56
+ manilaclient/tests/functional/osc/base.py,sha256=OBpKO_NugdMVOI51hUrdm-X4zm8nVQla_PT803GbxL4,19054
57
57
  manilaclient/tests/functional/osc/test_availability_zones.py,sha256=d8szUUmwytJEYXbKuGMPAkpBfF6YMi-CcS63LGkVOb0,921
58
58
  manilaclient/tests/functional/osc/test_messages.py,sha256=-KkvykprKfYPWV-c9HiQQCg_Fz-aInUhaQ5bHYYZKF8,4543
59
59
  manilaclient/tests/functional/osc/test_qos_types.py,sha256=yZmi_NuUC5dvWK7WIYgugnwSIDvRRWDBpM8JZjUjA-Y,4906
@@ -71,20 +71,20 @@ manilaclient/tests/functional/osc/test_share_replica_export_locations.py,sha256=
71
71
  manilaclient/tests/functional/osc/test_share_replicas.py,sha256=Fs_tIP7wq96MJB3RMPtGCgvPdBG_0ce9H_sPLbF2Bxw,4946
72
72
  manilaclient/tests/functional/osc/test_share_services.py,sha256=7koQtw6sHIzVnOqVCbQUEQWihagaPa81MaUcOHtm_GA,2250
73
73
  manilaclient/tests/functional/osc/test_share_snapshot_instances.py,sha256=J56HskwUqCa4wtcPpP56_IvFP3ixM2I59p-NHiznkRM,3371
74
- manilaclient/tests/functional/osc/test_share_snapshots.py,sha256=_qxaHOArn39VpVOc5PB6jzV9pDotEVRUL77jVDmU-xM,7725
74
+ manilaclient/tests/functional/osc/test_share_snapshots.py,sha256=r-6gKi4bFBhzqC281aPrvf2Qe4YovdRt2sPe6u5p_Ig,11861
75
75
  manilaclient/tests/functional/osc/test_share_transfers.py,sha256=GAM0XDRDgGVyt5qZLpeIRrTXXM8HuhcoQpDDrlS25Qk,3614
76
76
  manilaclient/tests/functional/osc/test_share_types.py,sha256=Oeu2pxTwXZp5lLWfGsXxe3y8-7TzEfTRAxzhwgYTjXM,5367
77
77
  manilaclient/tests/functional/osc/test_shares.py,sha256=RJMWRhZux7SHS1eeMXg1M1uv7iMks_ZM7Uu2TU9zvcs,8759
78
78
  manilaclient/tests/functional/osc/test_shares_group_type.py,sha256=uL88ncYaynubZCpFqUSl3Eb7ui6fSNiMxDZ9V563VMw,6179
79
79
  manilaclient/tests/unit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
80
- manilaclient/tests/unit/fakes.py,sha256=nilNtM4x-CVvhxMYa6SXdECXzegC8TQnj-l4gqlsxvk,2871
80
+ manilaclient/tests/unit/fakes.py,sha256=7K6zZu-d3nNOnEV6Two2mXf8xdFQ1nFObR6brJBCPWw,2874
81
81
  manilaclient/tests/unit/test_api_versions.py,sha256=zJtUbMKNNG1T05kMXNm-HvzqpK5A3SlrOedvfzH9xyk,14486
82
82
  manilaclient/tests/unit/test_base.py,sha256=pR9ZXVpZFGK52yrlmrWcDk7VqKIDaBgyQuirIwzqsKE,2712
83
83
  manilaclient/tests/unit/test_client.py,sha256=E70RbT7Bda6ch38QJpNnKSDowLxwWx7ItJsnTnoEB2Y,5461
84
84
  manilaclient/tests/unit/test_functional_utils.py,sha256=xRfuohLT8ZFcb92PPU9atkLHt4WPvT_pl-8cnPH9H5Q,7975
85
85
  manilaclient/tests/unit/utils.py,sha256=oH6VLrvB3arZ4bbjVNCp6ZliLjsC5yEZQz9sLl4k2Es,3130
86
86
  manilaclient/tests/unit/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
87
- manilaclient/tests/unit/common/test_httpclient.py,sha256=17539jwVKN5kB4If2f31oj3BaXavyaWb6MqHr7xVRiw,16221
87
+ manilaclient/tests/unit/common/test_httpclient.py,sha256=EWJpVYTXQ7gbw3SLM-aAtdrIByXE9D0wq9Iv7NSbPn0,16356
88
88
  manilaclient/tests/unit/common/apiclient/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
89
89
  manilaclient/tests/unit/osc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
90
90
  manilaclient/tests/unit/osc/osc_fakes.py,sha256=CRcsn9mAfl53y_t_cF72Np-VW978yGx7Vuc5TLJth9E,6506
@@ -218,11 +218,11 @@ manilaclient/v2/share_types.py,sha256=N8YIO1qzghAV__ywUeQjiRPlX59AQyut_mbJG3403Q
218
218
  manilaclient/v2/shares.py,sha256=7NVwSFGUBrGDNuJBTYSpzIDRVUYWtX6aocdBtB1VGdA,39515
219
219
  manilaclient/v2/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
220
220
  manilaclient/v2/contrib/list_extensions.py,sha256=_JSrPBEca2oR3dUbRNDBahAqo9V4bAEpNx0Si2gOWN4,1448
221
- python_manilaclient-6.3.0.dist-info/licenses/AUTHORS,sha256=N7n6h_Ag4R0lsA0kA5bh8XBnfovt3mls4z07o4_DyKY,8253
222
- python_manilaclient-6.3.0.dist-info/licenses/LICENSE,sha256=0vWIdNcdtTV9HZ7UlIezDadLSry5oS_2BzPolooTi4Y,11837
223
- python_manilaclient-6.3.0.dist-info/METADATA,sha256=4gh6_6cbSA9XINDKyGJavw5Vdu_pi5_wLZWf2MKhJ2k,5481
224
- python_manilaclient-6.3.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
225
- python_manilaclient-6.3.0.dist-info/entry_points.txt,sha256=krquuT_dgByNW9LwxJ71A7rAnir2tLKb7a7-OivCQK0,12276
226
- python_manilaclient-6.3.0.dist-info/pbr.json,sha256=Lpp2N_bF6Z8Kjm_RB5OUYyRzL-S9WIDjh_eSasbFO3E,46
227
- python_manilaclient-6.3.0.dist-info/top_level.txt,sha256=qaZZFY6QOsBxs6dp1YW7M0XnIHyctWinAWIOOrnA0pQ,13
228
- python_manilaclient-6.3.0.dist-info/RECORD,,
221
+ python_manilaclient-6.4.0.dist-info/licenses/AUTHORS,sha256=f2tq0PCZnXIdp5rjEWM4pAvjOjU_1yZxji6pRnYOvVk,8329
222
+ python_manilaclient-6.4.0.dist-info/licenses/LICENSE,sha256=0vWIdNcdtTV9HZ7UlIezDadLSry5oS_2BzPolooTi4Y,11837
223
+ python_manilaclient-6.4.0.dist-info/METADATA,sha256=GnAbcHgdqF5_a8S3XlMM22UiA10sAcoZJEXRFPQkHJY,5285
224
+ python_manilaclient-6.4.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
225
+ python_manilaclient-6.4.0.dist-info/entry_points.txt,sha256=krquuT_dgByNW9LwxJ71A7rAnir2tLKb7a7-OivCQK0,12276
226
+ python_manilaclient-6.4.0.dist-info/pbr.json,sha256=NHDixoEG0GH6HlqfFcpVbgr8VmtlyZjOApJrxRGMRCI,46
227
+ python_manilaclient-6.4.0.dist-info/top_level.txt,sha256=qaZZFY6QOsBxs6dp1YW7M0XnIHyctWinAWIOOrnA0pQ,13
228
+ python_manilaclient-6.4.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (84.0.0)
2
+ Generator: setuptools (84.2.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -62,6 +62,7 @@ Hongbin Lu <hongbin.lu@huawei.com>
62
62
  Ian Wienand <iwienand@redhat.com>
63
63
  Igor Malinovskiy <imalinovskiy@mirantis.com>
64
64
  Insitu <insitupeter@gmail.com>
65
+ Ivan Anfimov <lazekteam@gmail.com>
65
66
  Jacek Tomasiak <jacek.tomasiak@gmail.com>
66
67
  James E. Blair <jeblair@redhat.com>
67
68
  Jan Jasek <jjasek@redhat.com>
@@ -180,6 +181,7 @@ lkuchlan <lkuchlan@redhat.com>
180
181
  llmtech-dev <llm.tech.developer@gmail.com>
181
182
  luke.li <lilu7189@fiberhome.com>
182
183
  maaoyu <maaoyu@inspur.com>
184
+ marissa0204 <gallegomaria0204@gmail.com>
183
185
  mark.sturdevant <mark.sturdevant@hpe.com>
184
186
  medhac1403 <medhaj06@gmail.com>
185
187
  melakualehegn <melakualehegn34@gmail.com>
@@ -0,0 +1 @@
1
+ {"git_version": "263f6ad", "is_release": true}
@@ -1 +0,0 @@
1
- {"git_version": "870fccd", "is_release": true}