<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openstack/python-cinderclient.git/cinderclient/tests/unit/test_base.py, branch 2.0.0</title>
<subtitle>opendev.org: openstack/python-cinderclient.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/'/>
<entry>
<title>Fix adding non-ascii attrs to Resource objects error</title>
<updated>2017-01-20T20:12:29+00:00</updated>
<author>
<name>Michael Dovgal</name>
<email>mdovgal@mirantis.com</email>
</author>
<published>2016-12-26T11:16:53+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/commit/?id=d8a621015259eaafd8d1fee99db3ca663cd4be5c'/>
<id>d8a621015259eaafd8d1fee99db3ca663cd4be5c</id>
<content type='text'>
Due to these lines of code [0] we don't have an opportunity
to add attributes with non-ascii symbols to Resource objects,
but information about it will be in _info dict.

Example of side effect - quota_show command.
Because we don't have such an attr, here [1] it will be added
None value instead of real value [2].

This patch fixes this problem.

[0] - https://github.com/openstack/python-cinderclient/blob/f8c93ed03b388612ca28b8055debf915ce631cec/cinderclient/apiclient/base.py#L498-L499
[1] - https://github.com/openstack/python-cinderclient/blob/f8c93ed03b388612ca28b8055debf915ce631cec/cinderclient/shell_utils.py#L179
[2] - http://paste.openstack.org/show/593358/

Change-Id: I0493845dafc5dad836e899b9c22d563023c1dab0
Closes-Bug: #1652605
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Due to these lines of code [0] we don't have an opportunity
to add attributes with non-ascii symbols to Resource objects,
but information about it will be in _info dict.

Example of side effect - quota_show command.
Because we don't have such an attr, here [1] it will be added
None value instead of real value [2].

This patch fixes this problem.

[0] - https://github.com/openstack/python-cinderclient/blob/f8c93ed03b388612ca28b8055debf915ce631cec/cinderclient/apiclient/base.py#L498-L499
[1] - https://github.com/openstack/python-cinderclient/blob/f8c93ed03b388612ca28b8055debf915ce631cec/cinderclient/shell_utils.py#L179
[2] - http://paste.openstack.org/show/593358/

Change-Id: I0493845dafc5dad836e899b9c22d563023c1dab0
Closes-Bug: #1652605
</pre>
</div>
</content>
</entry>
<entry>
<title>Add convertation of query parameters to string</title>
<updated>2016-12-30T14:01:40+00:00</updated>
<author>
<name>Mykhailo Dovgal</name>
<email>mdovgal@mirantis.com</email>
</author>
<published>2016-11-09T14:18:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/commit/?id=797d932d0f564221a9d126d1ca49de36870c62b6'/>
<id>797d932d0f564221a9d126d1ca49de36870c62b6</id>
<content type='text'>
There are some problems with non-ascii chars and special symbols
during using cinderclient.
This patch closes bug connected with parse.urlencode py27 unicode
encode bug by adding convertation of query parameters before
creating query string in manager._build_list_url method.
Also it fix the problems with encoding in quota commands.

Change-Id: I96269cca7ad203eaad02d87b30c16d970b26b25f
Closes-Bug: #1636621
Closes-Bug: #1518141
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are some problems with non-ascii chars and special symbols
during using cinderclient.
This patch closes bug connected with parse.urlencode py27 unicode
encode bug by adding convertation of query parameters before
creating query string in manager._build_list_url method.
Also it fix the problems with encoding in quota commands.

Change-Id: I96269cca7ad203eaad02d87b30c16d970b26b25f
Closes-Bug: #1636621
Closes-Bug: #1518141
</pre>
</div>
</content>
</entry>
<entry>
<title>Move old oslo-incubator code out of openstack/common</title>
<updated>2016-11-03T12:59:31+00:00</updated>
<author>
<name>dineshbhor</name>
<email>dinesh.bhor@nttdata.com</email>
</author>
<published>2016-11-03T09:07:57+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/commit/?id=a01a3e1b7f6dd0919ffa15a4d54b84f0ac1e7915'/>
<id>a01a3e1b7f6dd0919ffa15a4d54b84f0ac1e7915</id>
<content type='text'>
As part of the first community-wide goal, teams were asked to
remove the openstack/common package of their projects if one
existed. This was a byproduct of the old oslo-incubator form
of syncing common functionality.

The package, apiclient, was moved to a top level location and
cliutils was moved to the common module. There are no oslo
specific libraries, the recommended solution is to move it in
tree and maintain it there.

Change-Id: Iee52004bd33c19d63133577ff466164b85fd6ca6
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As part of the first community-wide goal, teams were asked to
remove the openstack/common package of their projects if one
existed. This was a byproduct of the old oslo-incubator form
of syncing common functionality.

The package, apiclient, was moved to a top level location and
cliutils was moved to the common module. There are no oslo
specific libraries, the recommended solution is to move it in
tree and maintain it there.

Change-Id: Iee52004bd33c19d63133577ff466164b85fd6ca6
</pre>
</div>
</content>
</entry>
<entry>
<title>Deleting volume metadata keys with a single request</title>
<updated>2016-09-01T19:53:06+00:00</updated>
<author>
<name>Yuriy Nesenenko</name>
<email>ynesenenko@mirantis.com</email>
</author>
<published>2016-06-02T13:34:33+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/commit/?id=e15d8e7f0920cb7cd5719d2861dea886bd6f9cb0'/>
<id>e15d8e7f0920cb7cd5719d2861dea886bd6f9cb0</id>
<content type='text'>
Deleting multiple volume metadata keys with a single request
to improve performance. To delete multiple metadata items without
affecting the remaining ones, just update the metadata items with
the updated complete list of ones (without items to delete)
in the body of the request. This patch uses etags to avoid the
lost update problem with volume metadata. The command isn't changed:

 $ cinder metadata volume_id unset k1 k2 k3

Co-Authored-By: Ivan Kolodyazhny &lt;e0ne@e0ne.info&gt;
Depends-On: I575635258c10f299181b8e4cdb51a7ad1f1be764
Implements: blueprint delete-multiple-metadata-keys
Change-Id: I8e18133ffee87c240a7af4b8177683ab99330d9e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Deleting multiple volume metadata keys with a single request
to improve performance. To delete multiple metadata items without
affecting the remaining ones, just update the metadata items with
the updated complete list of ones (without items to delete)
in the body of the request. This patch uses etags to avoid the
lost update problem with volume metadata. The command isn't changed:

 $ cinder metadata volume_id unset k1 k2 k3

Co-Authored-By: Ivan Kolodyazhny &lt;e0ne@e0ne.info&gt;
Depends-On: I575635258c10f299181b8e4cdb51a7ad1f1be764
Implements: blueprint delete-multiple-metadata-keys
Change-Id: I8e18133ffee87c240a7af4b8177683ab99330d9e
</pre>
</div>
</content>
</entry>
<entry>
<title>Make Resource class's function can be wraped by api_version</title>
<updated>2016-09-01T08:48:08+00:00</updated>
<author>
<name>Cao Shufeng</name>
<email>caosf.fnst@cn.fujitsu.com</email>
</author>
<published>2016-09-01T06:26:01+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/commit/?id=ff564a783f2243664963b12e446288ece1ffc2e0'/>
<id>ff564a783f2243664963b12e446288ece1ffc2e0</id>
<content type='text'>
api_verson.wraps() function requires the object to have an
api_version attribute[1]. This change add api_version
attribute to Resource class, so that we can use api_version
to wrap functions in Resource class.

[1]: https://github.com/openstack/python-cinderclient/blob/master/cinderclient/api_versions.py#L346
Partial-Bug: #1619105

Change-Id: I0fce855768a4a5165ce08274214d4907b4d2fb66
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
api_verson.wraps() function requires the object to have an
api_version attribute[1]. This change add api_version
attribute to Resource class, so that we can use api_version
to wrap functions in Resource class.

[1]: https://github.com/openstack/python-cinderclient/blob/master/cinderclient/api_versions.py#L346
Partial-Bug: #1619105

Change-Id: I0fce855768a4a5165ce08274214d4907b4d2fb66
</pre>
</div>
</content>
</entry>
<entry>
<title>base.Resource not define __ne__() built-in function</title>
<updated>2016-07-04T07:15:11+00:00</updated>
<author>
<name>yuyafei</name>
<email>yu.yafei@zte.com.cn</email>
</author>
<published>2016-05-28T08:10:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/commit/?id=ccde9b3ba78e2dd0f2a726e6d23dba91f8ee061f'/>
<id>ccde9b3ba78e2dd0f2a726e6d23dba91f8ee061f</id>
<content type='text'>
Class base.Resource defines __eq__() built-in function, but does
not define __ne__() built-in function, so self.assertEqual works
but self.assertNotEqual does not work at all in this test case in
python2. This patch fixes it by defining __ne__() built-in function
of class base.Resource. Also fixes spelling errors:resoruces.

Change-Id: I845d531880ad74d928a3e15335ed10e71590826e
Closes-Bug: #1586268
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Class base.Resource defines __eq__() built-in function, but does
not define __ne__() built-in function, so self.assertEqual works
but self.assertNotEqual does not work at all in this test case in
python2. This patch fixes it by defining __ne__() built-in function
of class base.Resource. Also fixes spelling errors:resoruces.

Change-Id: I845d531880ad74d928a3e15335ed10e71590826e
Closes-Bug: #1586268
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix Resource.__eq__ mismatch semantics of object equal</title>
<updated>2016-03-01T08:47:25+00:00</updated>
<author>
<name>Rui Chen</name>
<email>chenrui.momo@gmail.com</email>
</author>
<published>2015-11-28T08:04:40+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/commit/?id=eb1cddbc28f507b117fe3b1808aea78724151e88'/>
<id>eb1cddbc28f507b117fe3b1808aea78724151e88</id>
<content type='text'>
The __eq__ of apiclient.base.Resource will return True,
if the two objects have same id, even if they have different
other attributes value. The behavior is weird and don't
match the semantics of object equal. The objects that have
different value should be different objects.
Fix this issue and add some test cases in this patch.

Change-Id: I187032e5630ac47a4f54db5058dbf9b6e15eba6d
Closes-Bug: #1499369
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The __eq__ of apiclient.base.Resource will return True,
if the two objects have same id, even if they have different
other attributes value. The behavior is weird and don't
match the semantics of object equal. The objects that have
different value should be different objects.
Fix this issue and add some test cases in this patch.

Change-Id: I187032e5630ac47a4f54db5058dbf9b6e15eba6d
Closes-Bug: #1499369
</pre>
</div>
</content>
</entry>
<entry>
<title>Provide consistency for Wrapper classes</title>
<updated>2016-02-16T07:41:31+00:00</updated>
<author>
<name>Ankit Agrawal</name>
<email>ankit11.agrawal@nttdata.com</email>
</author>
<published>2016-02-16T06:59:05+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/commit/?id=b2fc77f731c9cdb02efaa942f140ee7fd134ffac'/>
<id>b2fc77f731c9cdb02efaa942f140ee7fd134ffac</id>
<content type='text'>
Updated TupleWithMeta class to make it consistent with other Meta
classes in order to avoid confusion. Also made provision to call
TupleWithMeta with a tuple containing one or more elements.

For more details on how request_id will be returned to the caller,
please refer to the approved blueprint [1] discussed with the
cross-project team.
[1] http://specs.openstack.org/openstack/openstack-specs/specs/return-request-id.html

Change-Id: I5a79a4ed8cb4dc83ea3b64499df191750462100d
Partial-Implements: blueprint return-request-id-to-caller
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Updated TupleWithMeta class to make it consistent with other Meta
classes in order to avoid confusion. Also made provision to call
TupleWithMeta with a tuple containing one or more elements.

For more details on how request_id will be returned to the caller,
please refer to the approved blueprint [1] discussed with the
cross-project team.
[1] http://specs.openstack.org/openstack/openstack-specs/specs/return-request-id.html

Change-Id: I5a79a4ed8cb4dc83ea3b64499df191750462100d
Partial-Implements: blueprint return-request-id-to-caller
</pre>
</div>
</content>
</entry>
<entry>
<title>Add Wrapper classes for list, dict, tuple</title>
<updated>2016-01-25T06:53:27+00:00</updated>
<author>
<name>Ankit Agrawal</name>
<email>ankit11.agrawal@nttdata.com</email>
</author>
<published>2015-12-02T08:51:17+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/commit/?id=1619f11b9c191d44303977fd1b07fea28da9bc7c'/>
<id>1619f11b9c191d44303977fd1b07fea28da9bc7c</id>
<content type='text'>
Added wrapper classes which are inherited from base data types list,
tuple and dict. Each of these wrapper classes contains a 'request_ids'
attribute which will be populated with a 'x-openstack-request_id'
received in a header from a response body.

This change is required to return 'request_id' from
client to log request_id mappings of cross projects.

Partial-Implements: blueprint return-request-id-to-caller
Change-Id: I3aadb4d8bf675e20f2094b66a23ac20f455a99eb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added wrapper classes which are inherited from base data types list,
tuple and dict. Each of these wrapper classes contains a 'request_ids'
attribute which will be populated with a 'x-openstack-request_id'
received in a header from a response body.

This change is required to return 'request_id' from
client to log request_id mappings of cross projects.

Partial-Implements: blueprint return-request-id-to-caller
Change-Id: I3aadb4d8bf675e20f2094b66a23ac20f455a99eb
</pre>
</div>
</content>
</entry>
<entry>
<title>Add to_dict method to Resource class</title>
<updated>2015-12-14T08:27:21+00:00</updated>
<author>
<name>wanghao</name>
<email>wanghao749@huawei.com</email>
</author>
<published>2015-07-30T08:55:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/commit/?id=bb0f48489874d63206317ad79e9f2f7b48ca9172'/>
<id>bb0f48489874d63206317ad79e9f2f7b48ca9172</id>
<content type='text'>
Many clients have to_dict method in Resource class.
It is needed to get full info about resource.
So it would be nice to add to_dict method in
cinder client too.

Now openstack/common has graduated from oslo-incubator.
So we just modify it cinderclient.

Changes merged with this patch:
---------------------
apiclient/base.py
  ---add to_dict function in class Resource.
unit/test_base.py
  ---add unit test case.

change-Id: I81add424bcdd667ba271adb7d5b1ceb504120f93
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Many clients have to_dict method in Resource class.
It is needed to get full info about resource.
So it would be nice to add to_dict method in
cinder client too.

Now openstack/common has graduated from oslo-incubator.
So we just modify it cinderclient.

Changes merged with this patch:
---------------------
apiclient/base.py
  ---add to_dict function in class Resource.
unit/test_base.py
  ---add unit test case.

change-Id: I81add424bcdd667ba271adb7d5b1ceb504120f93
</pre>
</div>
</content>
</entry>
</feed>
