<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openstack/python-cinderclient.git/cinderclient/tests/unit/test_api_versions.py, branch 4.0.3</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>Enable H306</title>
<updated>2017-08-01T20:23:49+00:00</updated>
<author>
<name>Eric Harney</name>
<email>eharney@redhat.com</email>
</author>
<published>2017-08-01T19:16:22+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/commit/?id=60d00b0a035f5d6e0c436dee50719238cdf119cc'/>
<id>60d00b0a035f5d6e0c436dee50719238cdf119cc</id>
<content type='text'>
Enforce ordering of imports with H306.

For tests, this is mostly done by grouping test
imports after other cinderclient imports.

Change-Id: Ie40fda014d1aedb057e5b4ea1f27f999c84e6373
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enforce ordering of imports with H306.

For tests, this is mostly done by grouping test
imports after other cinderclient imports.

Change-Id: Ie40fda014d1aedb057e5b4ea1f27f999c84e6373
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle AttributeError in _get_server_version_range</title>
<updated>2017-05-31T15:57:05+00:00</updated>
<author>
<name>Matt Riedemann</name>
<email>mriedem.os@gmail.com</email>
</author>
<published>2017-05-31T15:54:48+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/commit/?id=e90503cba2db8aea03164f0cbaabd1c49bcc4a46'/>
<id>e90503cba2db8aea03164f0cbaabd1c49bcc4a46</id>
<content type='text'>
_get_server_version_range only supports a v3 client object
because ServiceManager.server_api_version() is only implemented
for the v3 client code. If you're trying to call this with a
v1 or v2 client object, it will raise an AttributeError which
is unhelpful for the end python API client.

This change handles the AttributeError and returns a more useful
error with an explanation of how the client code is wrong.

We could alternatively set versions = None and let it return two
empty APIVersion objects, but that seems confusing. This change
opts to be explicit about the failure.

Change-Id: I2266999df6332b8c5fb0ec808db69bcc847effb0
Closes-Bug: #1694739
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
_get_server_version_range only supports a v3 client object
because ServiceManager.server_api_version() is only implemented
for the v3 client code. If you're trying to call this with a
v1 or v2 client object, it will raise an AttributeError which
is unhelpful for the end python API client.

This change handles the AttributeError and returns a more useful
error with an explanation of how the client code is wrong.

We could alternatively set versions = None and let it return two
empty APIVersion objects, but that seems confusing. This change
opts to be explicit about the failure.

Change-Id: I2266999df6332b8c5fb0ec808db69bcc847effb0
Closes-Bug: #1694739
</pre>
</div>
</content>
</entry>
<entry>
<title>Add get_highest_version method</title>
<updated>2017-03-10T16:48:46+00:00</updated>
<author>
<name>scottda</name>
<email>scott.dangelo@gmail.com</email>
</author>
<published>2016-12-13T19:14:26+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/commit/?id=61faea2eb3a3725e4dc81e15c1a402f2c8dc8fcc'/>
<id>61faea2eb3a3725e4dc81e15c1a402f2c8dc8fcc</id>
<content type='text'>
Add method to query a server that supports /v3 endpoint and get the
highest supported microversion.

Change-Id: If179760787526440c852803eafaf9617bcd2d36e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add method to query a server that supports /v3 endpoint and get the
highest supported microversion.

Change-Id: If179760787526440c852803eafaf9617bcd2d36e
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix discover_version</title>
<updated>2017-03-09T21:42:28+00:00</updated>
<author>
<name>scottda</name>
<email>scott.dangelo@hpe.com</email>
</author>
<published>2016-10-12T22:03:14+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/commit/?id=3220566e46f2480098801546345d429dd6dfc9d6'/>
<id>3220566e46f2480098801546345d429dd6dfc9d6</id>
<content type='text'>
discover_version needs to find the proper module for server_api_version
method, and it needs to properly parse a list of versions.
Do some refactor to clean things up.
Add unit tests.

Co-Authored-By: waj334 &lt;justin.wilson@intel.com&gt;
Change-Id: I742bc33074cc55fe5f9682b8b97a82573c51183f
Closes-Bug: #1632872
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
discover_version needs to find the proper module for server_api_version
method, and it needs to properly parse a list of versions.
Do some refactor to clean things up.
Add unit tests.

Co-Authored-By: waj334 &lt;justin.wilson@intel.com&gt;
Change-Id: I742bc33074cc55fe5f9682b8b97a82573c51183f
Closes-Bug: #1632872
</pre>
</div>
</content>
</entry>
<entry>
<title>Modify assertTrue</title>
<updated>2016-09-11T06:01:23+00:00</updated>
<author>
<name>zheng yin</name>
<email>yin.zheng@easystack.cn</email>
</author>
<published>2016-07-26T11:57:01+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/commit/?id=6cc2360a5c08bd14285c23f6faf4611df1d8615e'/>
<id>6cc2360a5c08bd14285c23f6faf4611df1d8615e</id>
<content type='text'>
For example: assertTrue(v1&lt;v2) is equal to assertLess(v1,v2)

Change-Id: Ic4a0e80eab167079631ac7dc054ad4d2a8a02fab
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For example: assertTrue(v1&lt;v2) is equal to assertLess(v1,v2)

Change-Id: Ic4a0e80eab167079631ac7dc054ad4d2a8a02fab
</pre>
</div>
</content>
</entry>
<entry>
<title>Make APIVersion's null check more pythonic</title>
<updated>2016-08-29T09:41:57+00:00</updated>
<author>
<name>Gorka Eguileor</name>
<email>geguileo@redhat.com</email>
</author>
<published>2016-08-05T12:45:28+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/commit/?id=8b5a772e36fb7b7fae42a956bc844e792bec2035'/>
<id>8b5a772e36fb7b7fae42a956bc844e792bec2035</id>
<content type='text'>
Our current APIVersion object has an is_null method to check when the
version instance is null (major=0 and minor=0).

While this works it is not very pythonic, since you have to write
expressions such as:

 if not min_version and not max_version:
     return True
 elif ((min_version and max_version) and
       max_version.is_null() and min_version.is_null()):
     return True

This patch removes the is_null method and instead implements the truth
value testing to simplify expressions and make code more pythonic.

So previous code would just look like:

 if not min_version and not max_version:
     return True

Because this will work with min_version being None or being an
APIVersion instance with major=0 and minor=0.

Change-Id: I7497c5dc940c1e726507117cadbad232d8c1d80d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Our current APIVersion object has an is_null method to check when the
version instance is null (major=0 and minor=0).

While this works it is not very pythonic, since you have to write
expressions such as:

 if not min_version and not max_version:
     return True
 elif ((min_version and max_version) and
       max_version.is_null() and min_version.is_null()):
     return True

This patch removes the is_null method and instead implements the truth
value testing to simplify expressions and make code more pythonic.

So previous code would just look like:

 if not min_version and not max_version:
     return True

Because this will work with min_version being None or being an
APIVersion instance with major=0 and minor=0.

Change-Id: I7497c5dc940c1e726507117cadbad232d8c1d80d
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix useless api_version of Manager class</title>
<updated>2016-08-23T05:32:00+00:00</updated>
<author>
<name>Cao ShuFeng</name>
<email>caosf.fnst@cn.fujitsu.com</email>
</author>
<published>2016-04-22T06:46:23+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/commit/?id=09a76374c38e217f29520be5dd898993f2fba37f'/>
<id>09a76374c38e217f29520be5dd898993f2fba37f</id>
<content type='text'>
Manager's api_version property is used by api_version.wraps. It
should not be an "empty" class and the real api_version can be
read from Client class.

The 3.0 version's upload-to-image doesn't work as excepted because
of this useless api_version of VolumeManager class. This patch also
fix it and update some unit tests for it, because the changes are
co-dependent on one another.

Co-Authored-By: Nate Potter &lt;nathaniel.potter@intel.com&gt;

Change-Id: I398cbd02b61f30918a427291d1d3ae00435e0f4c
Closes-Bug: #1573414
Closes-Bug: #1589040
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Manager's api_version property is used by api_version.wraps. It
should not be an "empty" class and the real api_version can be
read from Client class.

The 3.0 version's upload-to-image doesn't work as excepted because
of this useless api_version of VolumeManager class. This patch also
fix it and update some unit tests for it, because the changes are
co-dependent on one another.

Co-Authored-By: Nate Potter &lt;nathaniel.potter@intel.com&gt;

Change-Id: I398cbd02b61f30918a427291d1d3ae00435e0f4c
Closes-Bug: #1573414
Closes-Bug: #1589040
</pre>
</div>
</content>
</entry>
<entry>
<title>Support api-microversions</title>
<updated>2016-04-19T17:19:45+00:00</updated>
<author>
<name>scottda</name>
<email>scott.dangelo@hpe.com</email>
</author>
<published>2016-04-05T21:45:28+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-cinderclient.git/commit/?id=3f75b48f067abae846655e48ce8f96fda79a3ae8'/>
<id>3f75b48f067abae846655e48ce8f96fda79a3ae8</id>
<content type='text'>
Changes to cinderclient to use microversions.

Implements: blueprint api-microversion-support-for-cinderclient
api-microversion-support-for-cinderclient

Change-Id: I840a1162b88e8ff36fa3fc4e1d6b9317104df3e0
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Changes to cinderclient to use microversions.

Implements: blueprint api-microversion-support-for-cinderclient
api-microversion-support-for-cinderclient

Change-Id: I840a1162b88e8ff36fa3fc4e1d6b9317104df3e0
</pre>
</div>
</content>
</entry>
</feed>
