Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-manilaclient for
openSUSE:Factory checked in at 2024-03-25 21:11:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-manilaclient (Old)
and /work/SRC/openSUSE:Factory/.python-manilaclient.new.1905 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-manilaclient"
Mon Mar 25 21:11:22 2024 rev:24 rq:1161189 version:4.8.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-manilaclient/python-manilaclient.changes
2024-01-15 22:19:20.143079305 +0100
+++
/work/SRC/openSUSE:Factory/.python-manilaclient.new.1905/python-manilaclient.changes
2024-03-25 21:18:05.455214338 +0100
@@ -1,0 +2,13 @@
+Sun Mar 24 20:08:53 UTC 2024 - [email protected]
+
+- update to version 4.8.0
+ - Bump hacking
+ - Fix share force delete case
+ - Update python classifier in setup.cfg
+ - reno: Update master for unmaintained/yoga
+ - CLI for disable service reason
+ - Fix "per_share_gigabytes" in "openstack quota set"
+ - [OSC] Add OSC Functional Tests Snapshot Instances
+ - Fix list call when search_opts isn't provided
+
+-------------------------------------------------------------------
Old:
----
python-manilaclient-4.7.0.tar.gz
New:
----
python-manilaclient-4.8.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-manilaclient.spec ++++++
--- /var/tmp/diff_new_pack.1Ne8bJ/_old 2024-03-25 21:18:06.267244203 +0100
+++ /var/tmp/diff_new_pack.1Ne8bJ/_new 2024-03-25 21:18:06.271244351 +0100
@@ -17,13 +17,13 @@
Name: python-manilaclient
-Version: 4.7.0
+Version: 4.8.0
Release: 0
Summary: Client Library for OpenStack Share API
License: Apache-2.0
Group: Development/Languages/Python
URL: https://docs.openstack.org/python-manilaclient
-Source0:
https://files.pythonhosted.org/packages/source/p/python-manilaclient/python-manilaclient-4.7.0.tar.gz
+Source0:
https://files.pythonhosted.org/packages/source/p/python-manilaclient/python-manilaclient-4.8.0.tar.gz
BuildRequires: openstack-macros
BuildRequires: python3-ddt
BuildRequires: python3-fixtures
@@ -76,13 +76,13 @@
This package contains auto-generated documentation.
%prep
-%autosetup -p1 -n python-manilaclient-4.7.0
+%autosetup -p1 -n python-manilaclient-4.8.0
%py_req_cleanup
%build
%{py3_build}
-PBR_VERSION=4.7.0 %sphinx_build -b html doc/source doc/build/html
+PBR_VERSION=4.8.0 %sphinx_build -b html doc/source doc/build/html
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
++++++ python-manilaclient-4.7.0.tar.gz -> python-manilaclient-4.8.0.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-manilaclient-4.7.0/AUTHORS
new/python-manilaclient-4.8.0/AUTHORS
--- old/python-manilaclient-4.7.0/AUTHORS 2023-11-20 08:06:08.000000000
+0100
+++ new/python-manilaclient-4.8.0/AUTHORS 2024-03-01 10:55:55.000000000
+0100
@@ -98,6 +98,7 @@
Stephen Finucane <[email protected]>
Sun Jun <[email protected]>
Swapnil Kulkarni (coolsvap) <[email protected]>
+Takashi Kajinami <[email protected]>
Takashi Kajinami <[email protected]>
Thomas Bechtold <[email protected]>
Tom Barron <[email protected]>
@@ -165,6 +166,7 @@
pengyuesheng <[email protected]>
qingszhao <[email protected]>
ricolin <[email protected]>
+sdailey <[email protected]>
shu-mutou <[email protected]>
silvacarloss <[email protected]>
sneha.gaddam <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-manilaclient-4.7.0/ChangeLog
new/python-manilaclient-4.8.0/ChangeLog
--- old/python-manilaclient-4.7.0/ChangeLog 2023-11-20 08:06:08.000000000
+0100
+++ new/python-manilaclient-4.8.0/ChangeLog 2024-03-01 10:55:55.000000000
+0100
@@ -1,12 +1,24 @@
CHANGES
=======
+4.8.0
+-----
+
+* CLI for disable service reason
+* reno: Update master for unmaintained/yoga
+* Fix share force delete case
+* Bump hacking
+* Fix "per\_share\_gigabytes" in "openstack quota set"
+* Fix list call when search\_opts isn't provided
+* Update python classifier in setup.cfg
+
4.7.0
-----
* Fix default share type resolution in OSC
* Fix "test\_share\_access\_show" osc functional test
* Fix decoder path and add transfer commands
+* [OSC] Add OSC Functional Tests Snapshot Instances
* Update master for stable/2023.2
4.6.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-manilaclient-4.7.0/PKG-INFO
new/python-manilaclient-4.8.0/PKG-INFO
--- old/python-manilaclient-4.7.0/PKG-INFO 2023-11-20 08:06:08.849259900
+0100
+++ new/python-manilaclient-4.8.0/PKG-INFO 2024-03-01 10:55:55.633288000
+0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: python-manilaclient
-Version: 4.7.0
+Version: 4.8.0
Summary: Client library for OpenStack Manila API.
Home-page: https://docs.openstack.org/python-manilaclient/latest/
Author: OpenStack
@@ -128,4 +128,6 @@
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/manilaclient/api_versions.py
new/python-manilaclient-4.8.0/manilaclient/api_versions.py
--- old/python-manilaclient-4.7.0/manilaclient/api_versions.py 2023-11-20
08:05:46.000000000 +0100
+++ new/python-manilaclient-4.8.0/manilaclient/api_versions.py 2024-03-01
10:55:26.000000000 +0100
@@ -27,7 +27,7 @@
LOG = logging.getLogger(__name__)
-MAX_VERSION = '2.82'
+MAX_VERSION = '2.83'
MIN_VERSION = '2.0'
DEPRECATED_VERSION = '1.0'
_VERSIONED_METHOD_MAP = {}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/manilaclient/common/cliutils.py
new/python-manilaclient-4.8.0/manilaclient/common/cliutils.py
--- old/python-manilaclient-4.7.0/manilaclient/common/cliutils.py
2023-11-20 08:05:46.000000000 +0100
+++ new/python-manilaclient-4.8.0/manilaclient/common/cliutils.py
2024-03-01 10:55:26.000000000 +0100
@@ -251,8 +251,8 @@
return getattr(f, 'service_type', None)
-def pretty_choice_list(l):
- return ', '.join("'%s'" % i for i in l)
+def pretty_choice_list(choices):
+ return ', '.join("'%s'" % choice for choice in choices)
def exit(msg=''):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/manilaclient/osc/v2/quotas.py
new/python-manilaclient-4.8.0/manilaclient/osc/v2/quotas.py
--- old/python-manilaclient-4.7.0/manilaclient/osc/v2/quotas.py 2023-11-20
08:05:46.000000000 +0100
+++ new/python-manilaclient-4.8.0/manilaclient/osc/v2/quotas.py 2024-03-01
10:55:26.000000000 +0100
@@ -160,7 +160,6 @@
"gigabytes": parsed_args.gigabytes,
"snapshot_gigabytes": parsed_args.snapshot_gigabytes,
"share_networks": parsed_args.share_networks,
- "per_share_gigabytes": parsed_args.per_share_gigabytes,
}
if parsed_args.share_type is not None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/manilaclient/osc/v2/services.py
new/python-manilaclient-4.8.0/manilaclient/osc/v2/services.py
--- old/python-manilaclient-4.7.0/manilaclient/osc/v2/services.py
2023-11-20 08:05:46.000000000 +0100
+++ new/python-manilaclient-4.8.0/manilaclient/osc/v2/services.py
2024-03-01 10:55:26.000000000 +0100
@@ -13,6 +13,7 @@
from osc_lib import exceptions
from osc_lib import utils as osc_utils
+from manilaclient import api_versions
from manilaclient.common._i18n import _
@@ -44,9 +45,20 @@
action='store_true',
help=_('Disable share service'),
)
+ parser.add_argument(
+ "--disable-reason",
+ metavar="<reason>",
+ help=_("Reason for disabling the service "
+ "(should be used with --disable option)")
+ )
return parser
def take_action(self, parsed_args):
+ if parsed_args.disable_reason and not parsed_args.disable:
+ msg = _("Cannot specify option --disable-reason without "
+ "--disable specified.")
+ raise exceptions.CommandError(msg)
+
share_client = self.app.client_manager.share
if parsed_args.enable:
@@ -58,9 +70,19 @@
"Failed to enable service: %s" % e))
if parsed_args.disable:
+ if parsed_args.disable_reason:
+ if share_client.api_version < api_versions.APIVersion("2.83"):
+ raise exceptions.CommandError(
+ "Service disable reason can be specified only with "
+ "manila API version >= 2.83")
try:
- share_client.services.disable(
- parsed_args.host, parsed_args.binary)
+ if parsed_args.disable_reason:
+ share_client.services.disable(
+ parsed_args.host, parsed_args.binary,
+ disable_reason=parsed_args.disable_reason)
+ else:
+ share_client.services.disable(
+ parsed_args.host, parsed_args.binary)
except Exception as e:
raise exceptions.CommandError(_(
"Failed to disable service: %s" % e))
@@ -127,6 +149,8 @@
'State',
'Updated At'
]
+ if share_client.api_version >= api_versions.APIVersion("2.83"):
+ columns.append('Disabled Reason')
data = (osc_utils.get_dict_properties(
service._info, columns) for service in services)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/manilaclient/osc/v2/share.py
new/python-manilaclient-4.8.0/manilaclient/osc/v2/share.py
--- old/python-manilaclient-4.7.0/manilaclient/osc/v2/share.py 2023-11-20
08:05:46.000000000 +0100
+++ new/python-manilaclient-4.8.0/manilaclient/osc/v2/share.py 2024-03-01
10:55:26.000000000 +0100
@@ -350,7 +350,7 @@
if parsed_args.force:
share_client.shares.force_delete(share_obj)
- if parsed_args.soft:
+ elif parsed_args.soft:
if share_client.api_version >= api_versions.APIVersion(
'2.69'):
share_client.shares.soft_delete(share_obj)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/manilaclient/tests/functional/base.py
new/python-manilaclient-4.8.0/manilaclient/tests/functional/base.py
--- old/python-manilaclient-4.7.0/manilaclient/tests/functional/base.py
2023-11-20 08:05:46.000000000 +0100
+++ new/python-manilaclient-4.8.0/manilaclient/tests/functional/base.py
2024-03-01 10:55:26.000000000 +0100
@@ -98,7 +98,7 @@
res["deleted"] = False
if "client" not in res:
res["client"] = cls.get_cleanup_client()
- if not(res["deleted"]):
+ if not res["deleted"]:
res_id = res["id"]
client = res["client"]
deletion_params = res.get("deletion_params")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/manilaclient/tests/functional/osc/base.py
new/python-manilaclient-4.8.0/manilaclient/tests/functional/osc/base.py
--- old/python-manilaclient-4.7.0/manilaclient/tests/functional/osc/base.py
2023-11-20 08:05:46.000000000 +0100
+++ new/python-manilaclient-4.8.0/manilaclient/tests/functional/osc/base.py
2024-03-01 10:55:26.000000000 +0100
@@ -145,7 +145,7 @@
snapshot_id=None, properties=None, share_network=None,
description=None, public=False, share_type=None,
availability_zone=None, share_group=None,
- add_cleanup=True, client=None,
+ add_cleanup=True, client=None, wait=None,
wait_for_status='available'):
name = name or data_utils.rand_name('autotest_share_name')
@@ -174,6 +174,8 @@
cmd = cmd + ' --availability-zone %s' % availability_zone
if share_group:
cmd = cmd + ' --share-group %s' % share_group
+ if wait:
+ cmd = cmd + ' --wait'
share_object = self.dict_result('share', cmd, client=client)
self._wait_for_object_status(
@@ -422,7 +424,7 @@
if availability_zone:
cmd += f' --availability-zone {availability_zone}'
if restart_check:
- cmd += f' --restart-check'
+ cmd += ' --restart-check'
check_result = self.dict_result('share', cmd)
return check_result
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/manilaclient/tests/functional/osc/test_resource_locks.py
new/python-manilaclient-4.8.0/manilaclient/tests/functional/osc/test_resource_locks.py
---
old/python-manilaclient-4.7.0/manilaclient/tests/functional/osc/test_resource_locks.py
2023-11-20 08:05:46.000000000 +0100
+++
new/python-manilaclient-4.8.0/manilaclient/tests/functional/osc/test_resource_locks.py
2024-03-01 10:55:26.000000000 +0100
@@ -109,7 +109,7 @@
'lock list --lock-context user '
f' --resource {self.share["id"]}')
self.assertEqual(2, len(locks))
- self.assertNotIn(lock_3['id'], [l['ID'] for l in locks])
+ self.assertNotIn(lock_3['id'], [lock['ID'] for lock in locks])
locks = self.listing_result('share',
'lock list --lock-context user'
@@ -118,9 +118,9 @@
' --sort-dir desc '
' --limit 1')
self.assertEqual(1, len(locks))
- self.assertIn(lock_2['id'], [l['ID'] for l in locks])
- self.assertNotIn(lock_1['id'], [l['ID'] for l in locks])
- self.assertNotIn(lock_3['id'], [l['ID'] for l in locks])
+ self.assertIn(lock_2['id'], [lock['ID'] for lock in locks])
+ self.assertNotIn(lock_1['id'], [lock['ID'] for lock in locks])
+ self.assertNotIn(lock_3['id'], [lock['ID'] for lock in locks])
def test_lock_set_unset_lock_reason(self):
lock = self.create_resource_lock(self.share['id'],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/manilaclient/tests/functional/osc/test_share_access_rules.py
new/python-manilaclient-4.8.0/manilaclient/tests/functional/osc/test_share_access_rules.py
---
old/python-manilaclient-4.7.0/manilaclient/tests/functional/osc/test_share_access_rules.py
2023-11-20 08:05:46.000000000 +0100
+++
new/python-manilaclient-4.8.0/manilaclient/tests/functional/osc/test_share_access_rules.py
2024-03-01 10:55:26.000000000 +0100
@@ -186,7 +186,7 @@
output = self.openstack(
'share',
params=f'access list {share["id"]} --access-to {access_to_filter}',
- flags=f'--os-share-api-version 2.82')
+ flags='--os-share-api-version 2.82')
access_rule_list = self.parser.listing(output)
self.assertTrue(len(access_rule_list) == 1)
@@ -214,7 +214,7 @@
self.assertEqual(access_rule_show['created_at'],
access_rule['created_at'])
self.assertEqual(access_rule_show['properties'], '')
- self.assertTrue('updated_at' in access_rule_show)
+ self.assertIn('updated_at', access_rule_show)
class SetShareAccessTestCase(base.OSCClientTestBase):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/manilaclient/tests/functional/osc/test_share_services.py
new/python-manilaclient-4.8.0/manilaclient/tests/functional/osc/test_share_services.py
---
old/python-manilaclient-4.7.0/manilaclient/tests/functional/osc/test_share_services.py
2023-11-20 08:05:46.000000000 +0100
+++
new/python-manilaclient-4.8.0/manilaclient/tests/functional/osc/test_share_services.py
2024-03-01 10:55:26.000000000 +0100
@@ -45,11 +45,12 @@
first_service = service[0]
self.openstack(f'share service set {first_service["Host"]} '
f'{first_service["Binary"]} '
- '--disable')
+ '--disable --disable-reason test')
result = self.listing_result('share service',
'list --status disabled')
self.assertEqual(first_service['ID'], result[0]['ID'])
self.assertEqual('disabled', result[0]['Status'])
+ self.assertEqual('test', result[0]['Disabled Reason'])
# enable the share service again
self.openstack(f'share service set {first_service["Host"]} '
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/manilaclient/tests/functional/osc/test_share_snapshot_instances.py
new/python-manilaclient-4.8.0/manilaclient/tests/functional/osc/test_share_snapshot_instances.py
---
old/python-manilaclient-4.7.0/manilaclient/tests/functional/osc/test_share_snapshot_instances.py
1970-01-01 01:00:00.000000000 +0100
+++
new/python-manilaclient-4.8.0/manilaclient/tests/functional/osc/test_share_snapshot_instances.py
2024-03-01 10:55:26.000000000 +0100
@@ -0,0 +1,75 @@
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+from manilaclient.tests.functional.osc import base
+
+
+class ShareSnapshotInstancesCLITest(base.OSCClientTestBase):
+
+ def test_openstack_share_snapshot_instance_list(self):
+ share = self.create_share()
+ snapshot = self.create_snapshot(share['id'])
+ share_snapshot_instances_list = self.listing_result(
+ 'share snapshot instance', 'list --detailed')
+ self.assertTableStruct(share_snapshot_instances_list, [
+ 'ID',
+ 'Snapshot ID',
+ 'Status',
+ 'Created At',
+ 'Updated At',
+ 'Share ID',
+ 'Share Instance ID',
+ 'Progress',
+ 'Provider Location'
+ ])
+ self.assertIn(snapshot['id'],
+ [item['Snapshot ID'] for item in (
+ share_snapshot_instances_list)])
+
+ def test_openstack_share_snapshot_instance_show(self):
+ share = self.create_share()
+ snapshot = self.create_snapshot(share['id'], wait=True)
+
+ share_snapshot_instance = self.listing_result(
+ "share snapshot instance", f'list --snapshot {snapshot["id"]}')
+ result = self.dict_result('share snapshot instance',
+ f'show {share_snapshot_instance[0]["ID"]}')
+
+ self.assertEqual(share_snapshot_instance[0]['ID'], result['id'])
+ self.assertEqual(share_snapshot_instance[0]['Snapshot ID'],
+ result['snapshot_id'])
+
+ listing_result = self.listing_result(
+ 'share snapshot instance', f'show '
+ f'{share_snapshot_instance[0]["ID"]}')
+ self.assertTableStruct(listing_result, [
+ 'Field',
+ 'Value'
+ ])
+
+ def test_openstack_share_snapshot_instance_set(self):
+ share = self.create_share()
+ snapshot = self.create_snapshot(share['id'], wait=True)
+ share_snapshot_instance = self.listing_result(
+ "share snapshot instance", f'list --snapshot {snapshot["id"]}')
+ result1 = self.dict_result('share snapshot instance',
+ f'show {share_snapshot_instance[0]["ID"]}')
+ self.assertEqual(share_snapshot_instance[0]['ID'], result1['id'])
+ self.assertEqual(snapshot['id'], result1['snapshot_id'])
+ self.assertEqual('available', result1['status'])
+
+ self.openstack('share snapshot instance set '
+ f'{share_snapshot_instance[0]["ID"]} --status error')
+ result2 = self.dict_result('share snapshot instance',
+ f'show {share_snapshot_instance[0]["ID"]}')
+ self.assertEqual(share_snapshot_instance[0]["ID"], result2['id'])
+ self.assertEqual('error', result2['status'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/manilaclient/tests/unit/fakes.py
new/python-manilaclient-4.8.0/manilaclient/tests/unit/fakes.py
--- old/python-manilaclient-4.7.0/manilaclient/tests/unit/fakes.py
2023-11-20 08:05:46.000000000 +0100
+++ new/python-manilaclient-4.8.0/manilaclient/tests/unit/fakes.py
2024-03-01 10:55:26.000000000 +0100
@@ -65,7 +65,7 @@
break
assert found, 'Expected %s %s; got %s' % (
- expected, self.client.callstack)
+ expected[0], expected[1], self.client.callstack)
if body is not None:
try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/manilaclient/tests/unit/osc/v2/test_quotas.py
new/python-manilaclient-4.8.0/manilaclient/tests/unit/osc/v2/test_quotas.py
--- old/python-manilaclient-4.7.0/manilaclient/tests/unit/osc/v2/test_quotas.py
2023-11-20 08:05:46.000000000 +0100
+++ new/python-manilaclient-4.8.0/manilaclient/tests/unit/osc/v2/test_quotas.py
2024-03-01 10:55:26.000000000 +0100
@@ -78,8 +78,7 @@
share_networks=None,
shares=40,
snapshot_gigabytes=None,
- snapshots=None,
- per_share_gigabytes=None)
+ snapshots=None)
self.assertIsNone(result)
mock_find_resource.assert_not_called()
self.quotas_mock.assert_not_called()
@@ -107,7 +106,6 @@
shares=40,
snapshot_gigabytes=None,
snapshots=None,
- per_share_gigabytes=None,
tenant_id=self.project.id,
user_id=None)
self.assertIsNone(result)
@@ -135,7 +133,6 @@
shares=None,
snapshot_gigabytes=None,
snapshots=None,
- per_share_gigabytes=None,
tenant_id=self.project.id,
user_id=None)
self.assertIsNone(result)
@@ -164,7 +161,6 @@
shares=None,
snapshot_gigabytes=None,
snapshots=None,
- per_share_gigabytes=None,
tenant_id=self.project.id,
user_id=None)
self.assertIsNone(result)
@@ -195,7 +191,6 @@
snapshot_gigabytes=None,
snapshots=None,
tenant_id=self.project.id,
- per_share_gigabytes=None,
user_id=None)
self.assertIsNone(result)
@@ -290,7 +285,6 @@
shares=None,
snapshot_gigabytes=None,
snapshots=None,
- per_share_gigabytes=None,
tenant_id=self.project.id,
user_id=None)
self.assertIsNone(result)
@@ -308,6 +302,22 @@
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
+ self.assertRaises(
+ exceptions.CommandError, self.cmd.take_action, parsed_args)
+
+ def test_quota_set_per_share_gigabytes_exception(self):
+ self.app.client_manager.share.api_version = api_versions.APIVersion(
+ '2.61')
+ arglist = [
+ self.project.id,
+ '--per-share-gigabytes', '10',
+ ]
+ verifylist = [
+ ('project', self.project.id),
+ ('per_share_gigabytes', 10)
+ ]
+
+ parsed_args = self.check_parser(self.cmd, arglist, verifylist)
self.assertRaises(
exceptions.CommandError, self.cmd.take_action, parsed_args)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/manilaclient/tests/unit/osc/v2/test_services.py
new/python-manilaclient-4.8.0/manilaclient/tests/unit/osc/v2/test_services.py
---
old/python-manilaclient-4.7.0/manilaclient/tests/unit/osc/v2/test_services.py
2023-11-20 08:05:46.000000000 +0100
+++
new/python-manilaclient-4.8.0/manilaclient/tests/unit/osc/v2/test_services.py
2024-03-01 10:55:26.000000000 +0100
@@ -10,9 +10,11 @@
# License for the specific language governing permissions and limitations
# under the License.
#
+import ddt
from osc_lib import exceptions
from osc_lib import utils as oscutils
+from manilaclient import api_versions
from manilaclient.osc import utils
from manilaclient.osc.v2 import services as osc_services
from manilaclient.tests.unit.osc.v2 import fakes as manila_fakes
@@ -96,6 +98,33 @@
self.share_service.binary)
self.assertIsNone(result)
+ def test_service_set_disable_with_reason(self):
+ self.app.client_manager.share.api_version = api_versions.APIVersion(
+ "2.83")
+ reason = 'earthquake'
+ arglist = [
+ '--disable',
+ '--disable-reason', reason,
+ self.share_service.host,
+ self.share_service.binary,
+ ]
+ verifylist = [
+ ('host', self.share_service.host),
+ ('binary', self.share_service.binary),
+ ('disable', True),
+ ('disable_reason', reason),
+ ]
+ parsed_args = self.check_parser(self.cmd, arglist, verifylist)
+
+ result = self.cmd.take_action(parsed_args)
+
+ self.services_mock.disable.assert_called_with(
+ self.share_service.host,
+ self.share_service.binary,
+ disable_reason=reason
+ )
+ self.assertIsNone(result)
+
def test_share_service_set_disable_exception(self):
arglist = [
self.share_service.host,
@@ -116,6 +145,7 @@
parsed_args)
[email protected]
class TestShareServiceList(TestShareService):
columns = [
@@ -127,22 +157,31 @@
'state',
'updated_at'
]
+ columns_with_reason = columns + ['disabled_reason']
column_headers = utils.format_column_headers(columns)
+ column_headers_with_reason = utils.format_column_headers(
+ columns_with_reason)
def setUp(self):
super(TestShareServiceList, self).setUp()
self.services_list = (
- manila_fakes.FakeShareService.create_fake_services()
+ manila_fakes.FakeShareService.create_fake_services(
+ {'disabled_reason': ''})
)
self.services_mock.list.return_value = self.services_list
self.values = (oscutils.get_dict_properties(
i._info, self.columns) for i in self.services_list)
+ self.values_with_reason = (oscutils.get_dict_properties(
+ i._info, self.columns_with_reason) for i in self.services_list)
self.cmd = osc_services.ListShareService(self.app, None)
- def test_share_service_list(self):
+ @ddt.data('2.82', '2.83')
+ def test_share_service_list(self, version):
+ self.app.client_manager.share.api_version = api_versions.APIVersion(
+ version)
arglist = []
verifylist = []
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
@@ -157,10 +196,17 @@
'state': None,
'zone': None
})
- self.assertEqual(self.column_headers, columns)
- self.assertEqual(list(self.values), list(data))
-
- def test_share_service_list_host_status(self):
+ if api_versions.APIVersion(version) >= api_versions.APIVersion("2.83"):
+ self.assertEqual(self.column_headers_with_reason, columns)
+ self.assertEqual(list(self.values_with_reason), list(data))
+ else:
+ self.assertEqual(self.column_headers, columns)
+ self.assertEqual(list(self.values), list(data))
+
+ @ddt.data('2.82', '2.83')
+ def test_share_service_list_host_status(self, version):
+ self.app.client_manager.share.api_version = api_versions.APIVersion(
+ version)
arglist = [
'--host', self.services_list[0].host,
'--status', self.services_list[1].status
@@ -181,10 +227,17 @@
'state': None,
'zone': None
})
- self.assertEqual(self.column_headers, columns)
- self.assertEqual(list(self.values), list(data))
-
- def test_share_service_list_binary_state_zone(self):
+ if api_versions.APIVersion(version) >= api_versions.APIVersion("2.83"):
+ self.assertEqual(self.column_headers_with_reason, columns)
+ self.assertEqual(list(self.values_with_reason), list(data))
+ else:
+ self.assertEqual(self.column_headers, columns)
+ self.assertEqual(list(self.values), list(data))
+
+ @ddt.data('2.82', '2.83')
+ def test_share_service_list_binary_state_zone(self, version):
+ self.app.client_manager.share.api_version = api_versions.APIVersion(
+ version)
arglist = [
'--binary', self.services_list[0].binary,
'--state', self.services_list[1].state,
@@ -207,5 +260,9 @@
'state': self.services_list[1].state,
'zone': self.services_list[1].zone
})
- self.assertEqual(self.column_headers, columns)
- self.assertEqual(list(self.values), list(data))
+ if api_versions.APIVersion(version) >= api_versions.APIVersion("2.83"):
+ self.assertEqual(self.column_headers_with_reason, columns)
+ self.assertEqual(list(self.values_with_reason), list(data))
+ else:
+ self.assertEqual(self.column_headers, columns)
+ self.assertEqual(list(self.values), list(data))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/manilaclient/tests/unit/osc/v2/test_share.py
new/python-manilaclient-4.8.0/manilaclient/tests/unit/osc/v2/test_share.py
--- old/python-manilaclient-4.7.0/manilaclient/tests/unit/osc/v2/test_share.py
2023-11-20 08:05:46.000000000 +0100
+++ new/python-manilaclient-4.8.0/manilaclient/tests/unit/osc/v2/test_share.py
2024-03-01 10:55:26.000000000 +0100
@@ -425,6 +425,8 @@
result = self.cmd.take_action(parsed_args)
self.shares_mock.delete.assert_called_with(shares[0], None)
+ self.shares_mock.soft_delete.assert_not_called()
+ self.shares_mock.force_delete.assert_not_called()
self.assertIsNone(result)
def test_share_delete_many(self):
@@ -481,6 +483,8 @@
result = self.cmd.take_action(parsed_args)
self.shares_mock.force_delete.assert_called_once_with(shares[0])
+ self.shares_mock.delete.assert_not_called()
+ self.shares_mock.soft_delete.assert_not_called()
self.assertIsNone(result)
def test_share_delete_with_soft(self):
@@ -500,6 +504,8 @@
result = self.cmd.take_action(parsed_args)
self.shares_mock.soft_delete.assert_called_once_with(shares[0])
+ self.shares_mock.delete.assert_not_called()
+ self.shares_mock.force_delete.assert_not_called()
self.assertIsNone(result)
def test_share_delete_wrong_name(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/manilaclient/tests/unit/v2/fakes.py
new/python-manilaclient-4.8.0/manilaclient/tests/unit/v2/fakes.py
--- old/python-manilaclient-4.7.0/manilaclient/tests/unit/v2/fakes.py
2023-11-20 08:05:46.000000000 +0100
+++ new/python-manilaclient-4.8.0/manilaclient/tests/unit/v2/fakes.py
2024-03-01 10:55:26.000000000 +0100
@@ -1087,7 +1087,7 @@
return (200, {}, {'extra_specs': {'k': 'v'}})
def delete_types_1_extra_specs_k(self, **kw):
- return(204, {}, None)
+ return (204, {}, None)
def delete_types_1(self, **kw):
return (202, {}, None)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/manilaclient/tests/unit/v2/test_limits.py
new/python-manilaclient-4.8.0/manilaclient/tests/unit/v2/test_limits.py
--- old/python-manilaclient-4.7.0/manilaclient/tests/unit/v2/test_limits.py
2023-11-20 08:05:46.000000000 +0100
+++ new/python-manilaclient-4.8.0/manilaclient/tests/unit/v2/test_limits.py
2024-03-01 10:55:26.000000000 +0100
@@ -160,5 +160,5 @@
api.client.get.assert_called_once_with('/limits')
self.assertIsInstance(lim, limits.Limits)
- for l in lim.absolute:
- self.assertEqual(l1, l)
+ for li in lim.absolute:
+ self.assertEqual(l1, li)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/manilaclient/tests/unit/v2/test_share_networks.py
new/python-manilaclient-4.8.0/manilaclient/tests/unit/v2/test_share_networks.py
---
old/python-manilaclient-4.7.0/manilaclient/tests/unit/v2/test_share_networks.py
2023-11-20 08:05:46.000000000 +0100
+++
new/python-manilaclient-4.8.0/manilaclient/tests/unit/v2/test_share_networks.py
2024-03-01 10:55:26.000000000 +0100
@@ -50,7 +50,7 @@
api_version = api_versions.APIVersion(microversion)
values = self.values.copy()
if (api_version >= api_versions.APIVersion("2.26")):
- del(values['nova_net_id'])
+ del values['nova_net_id']
body_expected = {share_networks.RESOURCE_NAME: values}
manager = share_networks.ShareNetworkManager(
@@ -123,7 +123,7 @@
api_version = api_versions.APIVersion(microversion)
values = self.values.copy()
if (api_version >= api_versions.APIVersion("2.26")):
- del(values['nova_net_id'])
+ del values['nova_net_id']
body_expected = {share_networks.RESOURCE_NAME: values}
manager = share_networks.ShareNetworkManager(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/manilaclient/v2/services.py
new/python-manilaclient-4.8.0/manilaclient/v2/services.py
--- old/python-manilaclient-4.7.0/manilaclient/v2/services.py 2023-11-20
08:05:46.000000000 +0100
+++ new/python-manilaclient-4.8.0/manilaclient/v2/services.py 2024-03-01
10:55:26.000000000 +0100
@@ -66,19 +66,27 @@
def enable(self, host, binary): # noqa
return self._do_enable(host, binary, RESOURCE_PATH)
- def _do_disable(self, host, binary, resource_path=RESOURCE_PATH):
+ def _do_disable(self, host, binary, resource_path=RESOURCE_PATH,
+ disable_reason=None):
"""Disable the service specified by hostname and binary."""
body = {"host": host, "binary": binary}
+ if disable_reason:
+ body["disabled_reason"] = disable_reason
return self._update("%s/disable" % resource_path, body)
@api_versions.wraps("1.0", "2.6")
def disable(self, host, binary):
return self._do_disable(host, binary, RESOURCE_PATH_LEGACY)
- @api_versions.wraps("2.7") # noqa
+ @api_versions.wraps("2.7", "2.82") # noqa
def disable(self, host, binary): # noqa
return self._do_disable(host, binary, RESOURCE_PATH)
+ @api_versions.wraps("2.83") # noqa
+ def disable(self, host, binary, disable_reason=None): # noqa
+ return self._do_disable(host, binary, RESOURCE_PATH,
+ disable_reason=disable_reason)
+
def server_api_version(self, url_append=""):
"""Returns the API Version supported by the server.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-manilaclient-4.7.0/manilaclient/v2/shares.py
new/python-manilaclient-4.8.0/manilaclient/v2/shares.py
--- old/python-manilaclient-4.7.0/manilaclient/v2/shares.py 2023-11-20
08:05:46.000000000 +0100
+++ new/python-manilaclient-4.8.0/manilaclient/v2/shares.py 2024-03-01
10:55:26.000000000 +0100
@@ -357,6 +357,8 @@
def list(self, detailed=True, search_opts=None, # noqa
sort_key=None, sort_dir=None, return_raw=False):
"""Get a list of all shares."""
+ if search_opts is None:
+ search_opts = {}
search_opts.pop("is_soft_deleted", None)
return self.do_list(detailed=detailed, search_opts=search_opts,
sort_key=sort_key, sort_dir=sort_dir,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-manilaclient-4.7.0/manilaclient/v2/shell.py
new/python-manilaclient-4.8.0/manilaclient/v2/shell.py
--- old/python-manilaclient-4.7.0/manilaclient/v2/shell.py 2023-11-20
08:05:46.000000000 +0100
+++ new/python-manilaclient-4.8.0/manilaclient/v2/shell.py 2024-03-01
10:55:26.000000000 +0100
@@ -4884,6 +4884,7 @@
share = _find_share(cs, args.share)
_print_share(cs, share)
+
@cliutils.arg('share', metavar='<share>',
help='Name or ID of share to shrink.')
@cliutils.arg('new_size',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/python_manilaclient.egg-info/PKG-INFO
new/python-manilaclient-4.8.0/python_manilaclient.egg-info/PKG-INFO
--- old/python-manilaclient-4.7.0/python_manilaclient.egg-info/PKG-INFO
2023-11-20 08:06:08.000000000 +0100
+++ new/python-manilaclient-4.8.0/python_manilaclient.egg-info/PKG-INFO
2024-03-01 10:55:55.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: python-manilaclient
-Version: 4.7.0
+Version: 4.8.0
Summary: Client library for OpenStack Manila API.
Home-page: https://docs.openstack.org/python-manilaclient/latest/
Author: OpenStack
@@ -128,4 +128,6 @@
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/python_manilaclient.egg-info/SOURCES.txt
new/python-manilaclient-4.8.0/python_manilaclient.egg-info/SOURCES.txt
--- old/python-manilaclient-4.7.0/python_manilaclient.egg-info/SOURCES.txt
2023-11-20 08:06:08.000000000 +0100
+++ new/python-manilaclient-4.8.0/python_manilaclient.egg-info/SOURCES.txt
2024-03-01 10:55:55.000000000 +0100
@@ -123,6 +123,7 @@
manilaclient/tests/functional/osc/test_share_replica_export_locations.py
manilaclient/tests/functional/osc/test_share_replicas.py
manilaclient/tests/functional/osc/test_share_services.py
+manilaclient/tests/functional/osc/test_share_snapshot_instances.py
manilaclient/tests/functional/osc/test_share_snapshots.py
manilaclient/tests/functional/osc/test_share_transfers.py
manilaclient/tests/functional/osc/test_share_types.py
@@ -363,6 +364,8 @@
releasenotes/notes/bug-1980985-dont-use-share-type-with-snapshot-ref-de0331c640afbbd3.yaml
releasenotes/notes/bug-1999775-add-os-key-0cfc95c7b480df05.yaml
releasenotes/notes/bug-2030686-fix-default-share-lookup-cc7e592a0dc855e1.yaml
+releasenotes/notes/bug-2047249-fix-osc-quota-set-per-share-gigabytes-fcff7f8ce2cc3c75.yaml
+releasenotes/notes/bug-2051737-fix-share-force-delete-request-6d2578fb7da61e3f.yaml
releasenotes/notes/bug-share-access-list-3cf3114doe40k599.yaml
releasenotes/notes/bug_1570085_fix-905786b797379309.yaml
releasenotes/notes/bug_1603387_fix_env_variable_8ed5450aab41aa5f.yaml
@@ -395,6 +398,7 @@
releasenotes/notes/support-create-share-from-snapshot-extra-spec-cdba92f179c1c5c6.yaml
releasenotes/notes/support-share-server-migration-9804752270c6b153.yaml
releasenotes/notes/support-show-type-6380b7c539c95ba8.yaml
+releasenotes/notes/support_add_disabled_reason_to_services-08cb52e4711745c7.yaml
releasenotes/notes/type-create-extra-specs-691572762357ef3b.yaml
releasenotes/notes/update-api-version-create-share-from-snapshot-another-pool-or-backend-694cfda84a41c4ff.yaml
releasenotes/notes/v2-0-0-deprecated-opts-removal-863565618535733d.yaml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/python_manilaclient.egg-info/pbr.json
new/python-manilaclient-4.8.0/python_manilaclient.egg-info/pbr.json
--- old/python-manilaclient-4.7.0/python_manilaclient.egg-info/pbr.json
2023-11-20 08:06:08.000000000 +0100
+++ new/python-manilaclient-4.8.0/python_manilaclient.egg-info/pbr.json
2024-03-01 10:55:55.000000000 +0100
@@ -1 +1 @@
-{"git_version": "64f5814", "is_release": true}
\ No newline at end of file
+{"git_version": "06e96b7", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/releasenotes/notes/bug-2047249-fix-osc-quota-set-per-share-gigabytes-fcff7f8ce2cc3c75.yaml
new/python-manilaclient-4.8.0/releasenotes/notes/bug-2047249-fix-osc-quota-set-per-share-gigabytes-fcff7f8ce2cc3c75.yaml
---
old/python-manilaclient-4.7.0/releasenotes/notes/bug-2047249-fix-osc-quota-set-per-share-gigabytes-fcff7f8ce2cc3c75.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/python-manilaclient-4.8.0/releasenotes/notes/bug-2047249-fix-osc-quota-set-per-share-gigabytes-fcff7f8ce2cc3c75.yaml
2024-03-01 10:55:26.000000000 +0100
@@ -0,0 +1,6 @@
+---
+fixes:
+ - |
+ The `openstack share quota set` command has been fixed to not set
+ `per_share_gigabytes` unless the user has specified the parameter, and
+ unless the user requests, and the server supports API version 2.62.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/releasenotes/notes/bug-2051737-fix-share-force-delete-request-6d2578fb7da61e3f.yaml
new/python-manilaclient-4.8.0/releasenotes/notes/bug-2051737-fix-share-force-delete-request-6d2578fb7da61e3f.yaml
---
old/python-manilaclient-4.7.0/releasenotes/notes/bug-2051737-fix-share-force-delete-request-6d2578fb7da61e3f.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/python-manilaclient-4.8.0/releasenotes/notes/bug-2051737-fix-share-force-delete-request-6d2578fb7da61e3f.yaml
2024-03-01 10:55:26.000000000 +0100
@@ -0,0 +1,5 @@
+---
+fixes:
+ - Share force delete command was sending two REST requests, first force
delete and
+ then delete. Fixed it by removing delete request. For more details, please
refer to
+ `launchpad bug 2051737
<https://bugs.launchpad.net/python-manilaclient/+bug/2051737>`_
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/releasenotes/notes/support_add_disabled_reason_to_services-08cb52e4711745c7.yaml
new/python-manilaclient-4.8.0/releasenotes/notes/support_add_disabled_reason_to_services-08cb52e4711745c7.yaml
---
old/python-manilaclient-4.7.0/releasenotes/notes/support_add_disabled_reason_to_services-08cb52e4711745c7.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/python-manilaclient-4.8.0/releasenotes/notes/support_add_disabled_reason_to_services-08cb52e4711745c7.yaml
2024-03-01 10:55:26.000000000 +0100
@@ -0,0 +1,5 @@
+---
+features:
+ - Support add disabled reason to services command.
+ See `bug 2037700 <https://bugs.launchpad.net/manila/+bug/2037700>`_
+ for more details.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-manilaclient-4.7.0/releasenotes/source/yoga.rst
new/python-manilaclient-4.8.0/releasenotes/source/yoga.rst
--- old/python-manilaclient-4.7.0/releasenotes/source/yoga.rst 2023-11-20
08:05:46.000000000 +0100
+++ new/python-manilaclient-4.8.0/releasenotes/source/yoga.rst 2024-03-01
10:55:26.000000000 +0100
@@ -3,4 +3,4 @@
=========================
.. release-notes::
- :branch: stable/yoga
+ :branch: unmaintained/yoga
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-manilaclient-4.7.0/setup.cfg
new/python-manilaclient-4.8.0/setup.cfg
--- old/python-manilaclient-4.7.0/setup.cfg 2023-11-20 08:06:08.853259800
+0100
+++ new/python-manilaclient-4.8.0/setup.cfg 2024-03-01 10:55:55.637289000
+0100
@@ -20,6 +20,8 @@
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
+ Programming Language :: Python :: 3.10
+ Programming Language :: Python :: 3.11
[files]
packages =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-manilaclient-4.7.0/test-requirements.txt
new/python-manilaclient-4.8.0/test-requirements.txt
--- old/python-manilaclient-4.7.0/test-requirements.txt 2023-11-20
08:05:46.000000000 +0100
+++ new/python-manilaclient-4.8.0/test-requirements.txt 2024-03-01
10:55:26.000000000 +0100
@@ -1,4 +1,4 @@
-hacking>=3.0.1,<3.1.0 # Apache-2.0
+hacking>=6.1.0,<6.2.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
ddt>=1.0.1 # MIT