Commit Graph

1161 Commits

Author SHA1 Message Date
Javier Pena 8435b47f80 Fix man page build
https://review.openstack.org/474775 moved glance.rst from the
doc/source/man directory into doc/source/cli, so we need to adjust
the path in conf.py to avoid issues when running:

python setup.py build_sphinx -b man

Change-Id: I2c37755553d1265fb9fb069067c4468853f395b7
2017-07-04 16:48:28 +02:00
Jenkins a53b302764 Merge "Replace assertTrue(isinstance()) with assertIsInstance()" 2017-06-30 21:03:45 +00:00
Doug Hellmann c859380718 turn on warning-is-error in sphinx build
Fix a formatting error in one docstring and turn on the flag to ensure
that future warnings in the doc build trigger a build failure.

Change-Id: I7159b985d1690a8ae61ff885408da4623c105952
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-28 12:25:32 -04:00
Doug Hellmann 4565e2bf45 use openstackdocstheme html context
Set some of the new config values and enable openstackdocstheme as an
extension so it will inject values into the page context as it writes
each documentation page. This ensures the pages link to the right bug
tracker, etc.

Change-Id: I316bd585f91064af4d1d1e7b834986619fc3a2d3
Depends-On: Icf3a40ed104cfd828f532f6f2b112ed02f996ff5
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-28 12:25:32 -04:00
Doug Hellmann cecd30a91b update the doc URLs in the readme
Change-Id: I62b284465ec81c2ba4ddba4c803b996a34e91eeb
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-28 12:25:32 -04:00
Doug Hellmann b7a0cd0e66 switch to openstackdocstheme
Change-Id: Id687e3405d8afe0db201eb648941cc51bb9f741e
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-28 12:25:30 -04:00
Doug Hellmann ca7faf6bb5 import content from cli-reference in openstack-manuals
Change-Id: Ibea5fe3e4711af997841992dead7171c99c69bfa
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-28 12:24:48 -04:00
Doug Hellmann e8acf5e736 move existing content into the new standard structure
This patch rearranges and reformats existing content.

It replaces the home-grown autodoc feature with the one built into pbr,
for consistency with other OpenStack projects.

It depends on the doc-migration spec and a pbr feature to allow us to
specify where the autodoc content should go in the source tree during
the build.

Change-Id: I8d2bb11b5ef3e46fcd22c8bed8f84060d8ab6f03
Depends-On: Ia750cb049c0f53a234ea70ce1f2bbbb7a2aa9454
Depends-On: I2bd5652bb59cbd9c939931ba2e7db1b37d2b30bb
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-28 12:24:48 -04:00
Doug Hellmann d6e936cd14 add explicit dependency on pyopenssl
The library is used in glanceclient/common/https.py and the
documentation build for the API fails without the dependency.

Update the error handling so that when OpenSSL reports an error it is
converted to a client communication error.

Change-Id: I0c0fb3139bb848d0cbaf88ae6a767a730bea74eb
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-28 12:24:48 -04:00
Jenkins 05453b19b2 Merge "Replace six.iteritems() with .items()" 2017-06-28 14:49:38 +00:00
Jenkins 66a2979291 Merge "allow unhandled exceptions to cause test errors" 2017-06-28 14:27:47 +00:00
OpenStack Proposal Bot 551fce5340 Updated from global requirements
Change-Id: Ib5c051b7011783548553447d68f80bcdda9395df
2017-06-27 12:21:19 +00:00
Doug Hellmann c8a7a5d56d allow unhandled exceptions to cause test errors
Hiding the unhandled exception in the test with a failure makes it
harder to debug the problem. Let them pass unhandled so the test reports
an ERROR instead of FAILURE.

Change-Id: I4e435a6d276fdf161dac28f08c2c7efedd1d6385
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-26 10:59:29 -04:00
Jenkins 392fa4f7c8 Merge "move old release notes into the releasenotes doc tree" 2017-06-21 15:48:50 +00:00
Jenkins 0db3ba8322 Merge "Enable code coverage report in console output" 2017-06-21 14:14:29 +00:00
Doug Hellmann c9100ed742 move old release notes into the releasenotes doc tree
Change-Id: I00797d38d6ad9b1a7b198767a0cbbb2f619c3b43
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-20 13:08:40 -04:00
Jenkins 4682d403d2 Merge "Remove log translations" 2017-06-19 19:13:08 +00:00
Jenkins a2d1d8ce8a Merge "gitignore: Ignore auto-generated docs" 2017-06-19 15:40:17 +00:00
Jenkins 37a41017c5 Merge "doc: Remove cruft from conf.py" 2017-06-15 21:13:17 +00:00
pawnesh.kumar 84a8089372 Enable code coverage report in console output
Modified tox configuration to enable code coverage report in console output

Change-Id: I57c5aa7d88e3bab5397c996677a0d18d6157f79f
2017-06-15 19:38:47 +00:00
Van Hung Pham 7791110b2f Replace assertTrue(isinstance()) with assertIsInstance()
Some of tests use different method of assertTrue(isinstance(A, B))
or assertEqual(type(A), B). The correct way is to use
assertIsInstance(A, B) provided by test tools.

Change-Id: Ibb5e5f848c5632f7c1895c47b8c1a938f2c746c3
2017-06-14 11:03:10 +07:00
OpenStack Proposal Bot a86fe0a252 Updated from global requirements
Change-Id: Ie04111374dc4769a641aa25619d0732f9f07cbea
2017-06-10 21:47:49 +00:00
OpenStack Proposal Bot d3d405cfb2 Updated from global requirements
Change-Id: I9fc075327f46c4b4e28f4dbb0bd4275dc5c2871c
2017-06-02 22:06:26 +00:00
Jenkins d67b33b2e5 Merge "Allow global_request_id in Client constructor" 2017-06-01 17:22:55 +00:00
Sean Dague ec76e254da Allow global_request_id in Client constructor
This allows us to pass in a global_request_id in the client
constructor so that subsequent calls with this client pass that to the
servers. This enables cross project request_id tracking.

oslo spec I65de8261746b25d45e105394f4eeb95b9cb3bd42

Change-Id: Iea1e754a263a01dae5ed598fdda134394aff54b0
2017-06-01 14:32:03 +00:00
Abhishek Kekane 60c06d526c Downloading image with --progress fails
Downloading image with --progress fails with "RequestIdProxy object is
not an iterator". This is because to display download progress
VerboseFileWrapper in progressbar requires object of IterableWithLength,
but after support of returning request-id [1] to caller it returns
RequestIdProxy object which is wrapped around IterableWithLength
and response.

To resolve this issue overridden next and __next__ methods in
RequestIdProxy so that it can act as iterator for python 2.x
and 3.x as well.

[1] 610177a779

Closes-Bug: #1670464
Change-Id: I188e67c2487b7e4178ea246f02154bbcbc35a2b1
2017-05-29 17:56:11 +05:30
Jenkins 3338ed91d4 Merge "Downloading image with --progress fails for python3" 2017-05-29 11:54:55 +00:00
OpenStack Proposal Bot f7598479d1 Updated from global requirements
Change-Id: Ic7656a41fcff3f1f5c47526d54f2254bc9a09c6b
2017-05-24 23:21:59 +00:00
ckonstanski 03900522d4 v2: Content-Type: application/octet-stream header always added
The bug: any existing Content-Type header cannot be found because the
call to headers.get() fails. Therefore we end up with two Content-Type
headers because a new one (applicaion/octet-stream) gets added
unconditionally. The cause: the strings (keys and values) in the headers
dict are converted from unicode sequences of type <str> to utf-8
sequences of type <bytes>. This happens in safe_encode()
(oslo_utils/encodeutils.py:66). <str> != <bytes> even if they appear to
have the same characters.

Hence, for python 3.x, _set_common_request_kwargs() adds content-type
to header even if custom content-type is set in the request.

This results in unsupported media type exception when glance client
is used with keystoneauth and python 3.x

The fix: follow the directions in encode_headers().
It says to do this just before sending the request. Honor this principle;
do not encode headers and then perform more business logic on them.

Change-Id: Idf6079b32f70bc171f5016467048e917d42f296d
Closes-bug: #1641239
Co-Authored-By: Pushkar Umaranikar <pushkar.umaranikar@intel.com>
2017-05-19 19:02:00 +00:00
Eric Fried 7df87fd4a2 Convert IOError from requests
This requests commit [1] changed the behavior when a nonexistent cacert
file is passed in: now it raises IOError.  This is getting through
glanceclient.common.http.HTTPClient._request, which used to raise
CommunicationError in this scenario.

Even though there is arguably a better exception than CommunicationError
to represent this condition (like maybe IOError), for backward
compatibility this change set converts IOError to CommunicationError.

We also improve the unit test to raise the original exception if the
expected conditions aren't met; this improves debugability.

[1] https://github.com/kennethreitz/requests/commit/7d8b87c37f3a5fb993fd83eda6888ac217cd108e

Change-Id: I6a2cf4c6d041b67d3509153b4cef18b459263648
Closes-Bug: #1692085
2017-05-19 14:59:58 -04:00
Abhishek Kekane bb2a5e946f Downloading image with --progress fails for python3
Downloading image with --progress fails for python3 with,
TypeError: 'IterableWithLength' object is not an iterator. This
is because IterableWithLength class does not implemented python3
compatible __next__ method.

Added __next__ method for python3 compatibility.

Change-Id: Ic2114180fac26e9a60678f06612be733e8671bdb
Closes-Bug: #1671365
2017-05-18 11:42:35 +05:30
OpenStack Proposal Bot a0edf0c2bf Updated from global requirements
Change-Id: If6412272a017a0887b00a33e68a00966ab8d1441
2017-05-03 12:22:23 +00:00
OpenStack Proposal Bot 79f96c5f4d Updated from global requirements
Change-Id: I3f45a69b0c70271b3b6b40035500f07b66758c21
2017-05-01 13:40:05 +00:00
Stephen Finucane 26a8572039 gitignore: Ignore auto-generated docs
Change-Id: I34b0a426bc10749e0b206aee9c8f7bdf3aea002f
2017-04-20 09:40:19 +01:00
Stephen Finucane 50eaad2249 doc: Remove cruft from conf.py
Change-Id: I1bbb2d490f0415e4062da520e6fb09e6db477aa0
2017-04-20 09:40:19 +01:00
Stephen Finucane 0e2e3f4372 Use Sphinx 1.5 warning-is-error
With pbr 2.0 and Sphinx 1.5, the setting for treat sphinx warnings as
errors is setting warning-is-error in build_sphinx section. Enable this.

Change-Id: I39ffb22c37a05f00cade2fbd14449eaf77dc3d39
2017-04-20 09:40:15 +01:00
Stephen Finucane bd42145923 Explicitly set 'builders' option
An upcoming release of pbr will require explicitly stating which
builders are requested, rather than defaulting to html and man. Head off
any potential impact this may cause by explicitly setting this
configuration now.

Change-Id: I94098478dd80fd8c41f63d192422c6240f3cd92a
2017-04-19 10:25:50 +01:00
OpenStack Proposal Bot 92f97576f3 Updated from global requirements
Change-Id: Idd8453b0c37e991dbd80260664c775539baa7c0c
2017-04-12 04:21:02 +00:00
OpenStack Proposal Bot a9a8cc56ba Updated from global requirements
Change-Id: I8c9321e6dca3b6c66e1341fa4b66d3cfb7228362
2017-04-07 06:15:34 +00:00
lijunbo 07ad860d07 Remove references to Python 3.4
Now that there exists only a gate job for Python 3.5 and not 3.4,
we should remove those references to the 3.4 that is untested.

Change-Id: I8853fadc29823b16fb4b620648636d658ec38d8d
2017-03-24 01:52:08 +00:00
wangzhenyu 36d2358a9d Remove log translations
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: Icf6423763f2d535b2c85c067d6e4a5676914e2c3
2017-03-21 07:19:21 +08:00
Jenkins ba46e69eee Merge "Replace functions 'dict.get' and 'del' with 'dict.pop'" 2017-03-06 17:09:00 +00:00
OpenStack Proposal Bot 333494a6d0 Updated from global requirements
Change-Id: I04411a2a10fc9587fbe61859b2a8597d8375fcdf
2017-03-03 22:58:20 +00:00
Jenkins 1268ca5333 Merge "Updated from global requirements" 2017-03-03 21:47:05 +00:00
Jenkins 0b77214f03 Merge "x-openstack-request-id logged twice in logs" 2017-03-03 20:56:25 +00:00
OpenStack Proposal Bot 7752c4a434 Updated from global requirements
Change-Id: Ib0bd11e18e336c86e66045a256e0befe90f0f56b
2017-03-02 11:54:22 +00:00
ricolin 70f27293bd Update test requirement
Since pbr already landed and the old version of hacking seems not
work very well with pbr>=2, we should update it to match global
requirement.
Partial-Bug: #1668848

Change-Id: I131cce2efade625af3e1e36a058c086ea5793f47
2017-03-02 16:35:24 +08:00
OpenStack Proposal Bot 5f1ae538e0 Updated from global requirements
Change-Id: I33e7b23e1c47148b9b1b29b7c05d6c2d88dcd065
2017-03-01 04:15:29 +00:00
Abhishek Kekane 87e4f7646f x-openstack-request-id logged twice in logs
In the recent release of keystoneauth1 2.18.0 provision is made to log
x-openstack-request-id for session client. Once this new library is synced
in openstack projects, the x-openstack-request-id will be logged twice
on the console if session client is used.

For example,
$ glance --debug image-list

DEBUG:keystoneauth.session:GET call to image for
http://10.232.48.204:9292/v2/schemas/image used request id
req-96a3f203-c605-4c96-a31d-f1199d41705c

DEBUG:glanceclient.common.http:GET call to glance-api for
http://10.232.48.204:9292/v2/schemas/image used request id
req-96a3f203-c605-4c96-a31d-f1199d41705c

Above log will be logged twice on the console.

Removed logging of x-openstack-request-id in case of SessionClient as it
is already logged in keystoneauth1. x-openstack-request-id will only be
logged once on console if HTTPClient is used.

Depends-On: I492b331ff3da8d0b91178bf0d5fe1d3702f15bd7
Closes-Bug: #1657351
Change-Id: I64258f997dc060113f53682aee74bdd40a346e54
2017-02-22 01:49:22 +05:30
OpenStack Proposal Bot 1cd7030c8f Updated from global requirements
Change-Id: I082f5baf52318187aa0f7d32a25d23d033255218
2017-02-11 17:51:14 +00:00