Module gettextutils from oslo-incubator was graduated to separate
library (oslo.i18n) and removed from repository, so we should use
new library.
Change-Id: I15d36ac5a2bb88b332ffa38d29488b75c55a20a9
Since module `jsonutils` from common code is graduated in
`oslo.serialization`, we should remove code from oslo-incubator and use this
library.
Change-Id: Ia8b5ef598ff415cdde19f523a36a552918f9f94b
Modules `strutils`, `timeutils` and `network_utils` from common code are
graduated in `oslo.utils`, so we can:
1. remove `novaclient.openstack.common.network_utils` and use
`oslo.utils.netutils` instead.
2. use `oslo.utils.encodeutils` and `oslo.utils.strutils` instead of
`novaclient.openstack.common.strutils`.
3. use `oslo.utils.timeutils` instead of
`novaclient.openstack.common.timeutils`.
Additional information:
- modules `importutils`, `strutils` and `timeutils` from
`novaclient.openstack.common` cannot be removed, because:
- importutils is used by apiclient and jsonutils;
- strutils is used by apiclient, cliutils and jsonutils;
- timeutils is used by jsonutils
- additional check for `safe_encode` in Py3 is required, since
If91a866d864a22d28a352152beff4c7406a27b7b was merged.
Change-Id: Ib8d79d9c85af4916e87a76a1a67a13488ddaa111
gettextutils was used in novaclient, but wasn't recorded.
This patch also let the modules in alphabetical order.
Change-Id: I725c3e8be126b8acd5e42ccaca776f57235ecdc7
Switch to using network_utils for splitting the URL. The code
in oslo-incubator supports ipv6 urls
HEAD of oslo-incubator is bb52a3fc49f033b9f36238231ca56e754a78cf4b
Updated openstack-common.conf to pick up the new dependency from
oslo-incubator
Change-Id: Ifa3dec384e85942a191260d17e8141030d31ff84
Closes-Bug: #1298137
Mistakenly removed it in e0272b0578d2a4f5bd75e68baee1b56f49931266.
Was thrown off by the warning saying module not found, the module is
found on the third try (found in tools).
Change-Id: Iaf5a7ba0259d352cb824b2cdb22291ffb7883efc
In the process of unification of the clients code we should
reuse common functionality from Oslo.
Related to blueprint common-client-library-2
Change-Id: Ia5e4e60f07561849f75d88b8a2ea3d23d6d5ff6d
In the process of unification of the clients code we should
reuse common functionality from Oslo.
Related to blueprint common-client-library-2
Change-Id: I078b7be864f34596c846832d6201fee9b18c42f8
Print the dictionaries and arrays without the unicode tags.
The patch also updated tests that did not return valid data.
Change-Id: Ia787f98a9510b68beb3ceaf00c285ca5c934f5c0
Closes-bug: #1265002
Python3 reorganized the standard library and moved several
functions to different modules and combined modules. Six
provides a consistent interface to the module through
six.moves
However urllib/urlparse is not covered by six.moves so
py3kcompat adds python2/python3 compatibility layer for
urllib/urlparse.
Change-Id: If1436d2260f1c8b6df8c514c8730e7bcf0e648b8
Signed-off-by: Chuck Short <chuck.short@canonical.com>
The current version of install_venv_common uses the --distribute flag
in its creation of the virtualenv. This causes some upgrade problems
with the new versions of distribute and setuptools. The solution to
those problems is to get off of the distribute bandwagon.
Change-Id: I5efe196c46b12d88c853f8362ebcbf0cc6f1573d
In the original code, isalnum() in is_uuid_like() doesn't allow "-",
while for UUID, format like aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa should be
allowed. This patch is to reuse uuidutils's API in oslo.
Change-Id: I339974c75a32d27f8e4443a1b97bb6e410933aa4
Signed-off-by: Shane Wang <shane.wang@intel.com>
openstack.common.setup and openstack.common.version are now in the
standalone library pbr, so all projects using those two should
migrate.
Fixes bug 1179007.
Change-Id: I7ac1c37f0bf148619dffff8f454db05fc192e471
Update to latest openstack.common.version.py and fix __init__.py
to get "nova --version" to work properly again
Fixes LP# 1165325
Change-Id: I29e54cd4cf79759407f3967518e9be575abd994a
Currently novaclient doesn't handle properly incoming and outgoing
encode / decode process. As a solution for this, this patch implements a
decoding process for all data incoming from the user side and decodes
everything going out of the client, i.e: http requests, prints, etc.
This patch introduces a new module (strutils.py) taken from
oslo-incubator in order to use 2 of the functions present in it:
About safe_(decode|encode):
Both functions try to encode / decode the incoming text using the
stdin encoding, fallback to python's default encoding if that
returns None or to UTF-8 as the last option.
In both functions only basestring objects are accepted and they both
raise TypeError if an object of another type is passed.
About the general novaclient changes:
In order to better support non-ASCII characters, it is a good
practice to use unicode interanlly and encode everything that has to
go out. This patch aims to do that and introduces this behaviour in
the client.
Testing:
A good test (besides using tox) is to use nova client with and
without setting any locale (export LANG=).
Fixes bug: 1061156
Change-Id: I20b75e42b0c3dac89f1048faa1127253a64f86c7
Fixes bug #1045456
The date range in Nova's os-simple-tenant-usage is expected to be in UTC
time since launch/termination dates are stored in the DB in UTC time and
we use the client supplied parameters to query DB without conversion.
Switch from using datetime.today() to datetime.utcnow() to fix the issue.
Add a test for the default date range.
Import timeutils from openstack-common so we can control the return value
of utcnow() in the tests.
Change-Id: Iac77e3a4cc9561714d1492c54cef931f9764531e