Commit Graph

22 Commits

Author SHA1 Message Date
Andrey Kurilin 01961d68a2 Cleanup needless code from oslo-incubator
oslo-incubator was deprecated and all modules used by novaclient were
removed from oslo-incubator master branch. This patch removes all unused
code from novaclient's repo.

Change-Id: Ie3c542d19da6ed4d25ec490faf6a86a82f48cd34
2015-12-18 08:46:12 +00:00
Davanum Srinivas a5f30d173f cleanup openstack-common.conf and sync updated files
Changes include:
e782594 Add last_request_id only if it is not none
18bf5ca Fix usage of NotFound exception in apiclient.base
3bc8231 deprecate apiclient package

Depends-On: Ia83ef6136da1c551ea947679dc546a0d7ad2f876
Change-Id: I0b5917c657d6adc3d34229b14833a5224c168e07
2015-06-16 20:32:08 -04:00
Andrey Kurilin 667f1af972 Reuse uuidutils frim oslo_utils
Change-Id: I0c5ec41215e97dafd7377179979b01a67704cb05
2015-05-08 12:36:41 +03:00
Andrey Kurilin dc09cf27e3 Port to use oslo.i18n
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
2014-10-16 01:19:48 +03:00
Andrey Kurilin 8c0fd9a674 Use oslo.serialization
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
2014-09-20 20:42:52 +03:00
Andrey Kurilin 392148c7ef Use oslo.utils
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
2014-08-28 12:17:22 +03:00
ChangBo Guo(gcb) ced071b78b Add missing dependent module gettextutils
gettextutils was used in novaclient, but wasn't recorded.
This patch also let the modules in alphabetical order.

Change-Id: I725c3e8be126b8acd5e42ccaca776f57235ecdc7
2014-05-12 16:49:06 +08:00
Davanum Srinivas 9344f02649 Fix for invalid literal ValueError parsing ipv6 url(s)
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
2014-03-29 14:16:02 -04:00
Joe Gordon 1023c85906 Re-add install_venv_common to openstack-common.conf
Mistakenly removed it in e0272b0578.
Was thrown off by the warning saying module not found, the module is
found on the third try (found in tools).

Change-Id: Iaf5a7ba0259d352cb824b2cdb22291ffb7883efc
2014-02-28 10:11:12 -08:00
Joe Gordon e0272b0578 oslo-sync of low hanging fruit
Generated with:
 ./update.sh --base novaclient --config-file
../python-novaclient/openstack-common.conf --dest-dir
../python-novaclient/

Skipped modules: apiclient and cliutils due to oslo issue in apiclient
(cliutils depends on apiclient).
https://review.openstack.org/#/c/76718/

Removed non-existent modules from openstack-commit.conf:
  py3kcompat I06b90f789ae21f2ef8b8071b4298bfc0406482a6
  intall_venv_common I84267f3c6726cb2e750f615e107c48b12c6ed353

Synced patches:
__init__.py [first sync]:
   c178e56 Add basic Python 3 tests
  12bcdb7 Remove vim header
  547ab34 Fix Copyright Headers - Rename LLC to Foundation
  96b9a54 Rajaram/Vinkesh|Added nova's serializaiton classes into common
  c85e1f7 Initial skeleton project

gettextutils:
  6d55e26 Add support for translating log levels separately
  afdbc0a Fix E501 in individual openstack projects
  6b2d15f Merge "Add support for locales missing from babel"
  9d529dd Make Message keep string interpolation args

importutils:
  885828a Deleted duplicated method in cliutils.

strutils:
  bec3a5e Implements SI/IEC unit system conversion to bytes

timeutils:
 d815087 Merge "Fix spelling errors in comments"
 71208fe Fix spelling errors in comments

Change-Id: I8f82acb63e61a64eeb6caba9d2d9c81d9cb766d8
2014-02-26 17:25:11 -08:00
Andrey Kurilin 871c5fc1be Sync cliutils from oslo
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
2014-01-15 15:03:22 +00:00
Andrey Kurilin 6cf101e9ee Sync apiclient from oslo
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
2014-01-15 14:52:50 +00:00
Gary Kotton 5c62630a9d Ensure that nova client prints dictionaries and arrays correctly
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
2013-12-31 05:17:00 -08:00
Chuck Short 61a8063954 Sync py3kcompat from oslo
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>
2013-08-23 14:39:23 -04:00
Monty Taylor a5558f8780 Sync install_venv_common from oslo
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
2013-07-08 15:22:39 -04:00
Michael Still d27407798d Convert to more modern openstack-common.conf format.
Change-Id: Ib02edb34b02d63f2dcf6fa08a224e5ec1fa02525
2013-05-23 08:49:37 +10:00
Shane Wang bc0ad1cb9d Reuse oslo for is_uuid_like() implementation
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>
2013-05-22 11:47:23 +08:00
Roman Podolyaka f08ac04a27 Migrate to pbr.
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
2013-05-19 10:00:38 +03:00
Davanum Srinivas 8ce2330247 Fix problem with nova --version
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
2013-04-08 12:15:03 -04:00
Flaper Fesp 47e6bc25ae Decodes input and encodes output
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
2013-03-04 19:01:27 +01:00
Mark McLoughlin f2d2e4cb06 Fix usage-list date range to use UTC time
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
2012-09-03 20:13:31 +01:00
Brian Waldon 3f4591142f Use openstack-common for AUTHORS generation
Also add .mailmap entries for Jake Dahn and James E. Blair

Change-Id: I1ec02aa5302922f3db6a3ad457f4f7c6a006ba00
2012-06-11 08:40:19 -07:00