Commit Graph

500 Commits

Author SHA1 Message Date
OpenDev Sysadmins 1bc49e1824 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:51:17 +00:00
Jenkins b04c94d443 Merge "Add utils for validating and splitting quotes" 2016-08-11 10:25:34 +00:00
Omar Shykhkerimov d1e08f533d Add utils for validating and splitting quotes
Now Murano and Glance have similiar implementations of validating
and splitting quotes for using operator 'in' in their API [1],[2].

The style of this functionality should be common as they follow
appropriate api-wg style [3]. So it would be great to have them
implemented in one place and reuse in different projects.

TBD: add appropriate commits to Murano and Glance if this patch
isn't revoked.

[1]: https://github.com/openstack/glance/blob/master/glance/common/utils.py#L601-L644
[2]: https://github.com/openstack/murano/blob/master/murano/common/utils.py#L250-L301
[3]: https://specs.openstack.org/openstack/api-wg/guidelines/pagination_filter_sort.html#filtering

Change-Id: I15236d28b2136153db093590fb4dae65a87eb3e3
Co-Authored-By: Alexis Lee <lxsli@hpe.com>
2016-08-09 20:26:24 +03:00
OpenStack Proposal Bot 06ff3e367b Updated from global requirements
Change-Id: I02a0ce99c358cc92e33bb5a419f33fb9f9470443
2016-08-04 02:40:58 +00:00
Lucas Alvares Gomes f43d78d358 Extend specs matcher to support ">" and "<"
This patch is exteding the specs matcher and adding support for the ">"
and "<" operators. Prior to this patch, only the "equal" forms were
supported (">=" and "<=").

It also looks inconsistent because for the "s" prefixed operators all
the 4 forms are supported already: "s<=", "s<", "s>=" and "s>".

Change-Id: I82a72b0ef6ee277e7b09b0eb138e058687ce8804
2016-07-27 17:11:06 +01:00
Swapnil Kulkarni (coolsvap) c5918adcea Remove discover from test-requirements
It's only needed for python < 2.7 which is not supported

Change-Id: Iea5e3c9c64672eeef59e9cb6cefdf161b55721d8
2016-07-22 06:41:00 +00:00
Jenkins e1d503c6c4 Merge "Fix mask_dict_password for non string/dict type key in dict" 2016-07-13 17:02:19 +00:00
Jenkins 0799f0338a Merge "More unit tests for specs matcher" 2016-07-13 11:43:47 +00:00
Jenkins 9e9f30da57 Merge "Use an actual well defined parser for spec matching" 2016-07-13 11:43:39 +00:00
Jenkins aa2fe5cb16 Merge "Imported Translations from Zanata" 2016-07-12 19:30:14 +00:00
dharmendra 878f5700f0 Fix mask_dict_password for non string/dict type key in dict
mask_dict_password method removes the keys from passed dict if those
are not
- indicative of password
- Dict
- String type

So keys with value None or other type than string/dict are being removed.

This method should just change the password with secret and return other
Key as it is without any removal or alter.

Change-Id: I21294ce6fd25a3e6438de41949d4427b17945bb2
Closes-Bug: #1600168
2016-07-12 11:09:50 -07:00
Ruby Loo 5434726342 More unit tests for specs matcher
This adds more unit tests for the specs matcher, for
more complete coverage of the operators.

Change-Id: I80743cdc2e7d188ccee52975c35adcf86b91dc5f
2016-07-12 09:19:49 +00:00
OpenStack Proposal Bot 1d1c9839bb Imported Translations from Zanata
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I3d930fe461719eb4831cafaa13ee97c6e03339da
2016-07-12 08:08:38 +00:00
Eric Brown 103a32216e Add Python 3.5 classifier and venv
Now that there is a passing gate job, we can claim support for
Python 3.5 in the classifier. This patch also adds the convenience
py35 venv.

Change-Id: I96bd1ee7501905cc6a9cf9299b007dadaeac0d28
2016-07-11 20:25:58 -07:00
Jenkins 1927db4d67 Merge "Remove unused LOG to keep code clean" 2016-07-11 23:02:46 +00:00
Joshua Harlow 7699788d59 Use an actual well defined parser for spec matching
Instead of a custom build parser and evaluator for
specs use an actual formal parser and evaluation of
that parse result instead, making that custom parser
now be one that follows a more normal way of creating
and evaluating a DSL.

Also removes <all-in> operator, since it is buggy. (It
will be added later when the issue has been resolved.)

Co-authored-by: Alexis Lee <lxsli@hpe.com>
Change-Id: I10f7dff8c83e5b6983515677e80cefa55881a92c
2016-07-11 22:25:07 +00:00
zhengyao1 9981276fe6 Remove unused LOG to keep code clean
Remove redundant usage of logging.

Change-Id: Idab3b20c8f5878aaea7c90607c99efd0c81f93c8
2016-07-11 11:51:39 +08:00
OpenStack Proposal Bot b9e9f17c4b Updated from global requirements
Change-Id: I455892333110709485d568ea30049a3c6d29941b
2016-07-09 03:16:26 +00:00
Jenkins 2b36107f0b Merge "Move nova extra_specs_ops to oslo.utils" 2016-07-07 17:12:51 +00:00
Jenkins 8da9b4022f Merge "Add basic docstrings to stopwatch has_started/stopped methods" 2016-06-28 18:41:26 +00:00
Joshua Harlow 53e70e8f5a Add basic docstrings to stopwatch has_started/stopped methods
This will ensure these methods get pulled into sphinx when
the docs are built for this object (so that people will know
that these methods exist and can be used).

Change-Id: I4e890a4830a976b4ea5fb8d5b57b03c20411df03
2016-06-28 08:59:16 -07:00
John L. Villalovos 893ac87468 Make mask_dict_password consistent with mask_password
mask_password when given a value of:

 {'ipmi_password': 'foo'} will return {'ipmi_password': '****'}

But passing the same dict to mask_dict_password() would return the dict
unchanged.

This fixes it so that it works consistently on which keys will trigger a
masking of the password.

Change-Id: I279f245fa750a57809c9d000137c4f9baf44cd40
Closes-Bug: #1594935
2016-06-22 09:37:09 -07:00
Jenkins 5ffd83808f Merge "improve tests for mask_password and mask_dict_password" 2016-06-22 16:32:54 +00:00
OpenStack Proposal Bot 5b8de1c41d Updated from global requirements
Change-Id: I4863ef81ab4ed9b6c57a3fe965f06e342451c9ac
2016-06-22 05:47:10 +00:00
Amrith Kumar e1ec546dee improve tests for mask_password and mask_dict_password
All the tests used a very 'strong' password of mypassword and it
wasn't apparent in reviewing some new tests whether the masking was
being done of the 'word' password in mypassword or the command option
or dictionary key.

So I've taken the liberty to rewrite all the tests with a better
password.

Change-Id: I50c05d79bc9d8eaae5147d7f96ef5abfd0f2b2e1
2016-06-21 15:39:36 -04:00
Amaury Medeiros 17c2e2c740 Simplify boolean expression in executils.py
There's no need for checking again if next_up is not instance of
CausedByException as this is exactly what the else clause means.

Change-Id: I437b3b4948e89d6a138be03e9613e522b10d4824
2016-06-21 14:07:11 +01:00
Jenkins 1d15614c20 Merge "Support json format output from qemu command" 2016-06-21 08:12:59 +00:00
Bin Zhou bf80b23e77 Support json format output from qemu command
QemuImgInfo is realized by parsing the output string of 'qemu-img info
**.img' line by line, it's complicated and improvment can be done. The
command 'qemu-img info **.img --output json' will produce json style
output and arguments can be parsed easily by calling json.loads. This
patch add support json format output parsing, to simplify the code and
make it more clear and readable.

Change-Id: Iefa139dc4bcea864cb86371d8a24df0e4695169c
Closes-Bug:#1590252
2016-06-20 01:21:14 +00:00
Jenkins 7f548853bc Merge "Fix flake8 issues" 2016-06-17 13:36:11 +00:00
Costin Galan 5a8cade630
Fix flake8 issues
I have improved the readability of the code by fixing the
problems that flake8 reported.

The type of errors that are fixed are:
    * H302 - Import only module
    * H305 - Import not grouped correctly
    * H307 - Like imports shoud be grouped together
    * H402 - One line docstring needs punctation
    * F821 - Undefined name

Change-Id: I3a7f12120b6a99342a3d2025206edcdc0f6a4a93
Signed-off-by: Costin Galan <cgalan@cloudbasesolutions.com>
2016-06-17 07:51:19 +03:00
Jenkins d20d99200f Merge "Use is_valid_ipv4 in get_ipv6_addr_by_EUI64" 2016-06-16 18:36:46 +00:00
ChangBo Guo(gcb) 3f7808119c Use is_valid_ipv4 in get_ipv6_addr_by_EUI64
In netaddr module, method valid_ipv4 raise exception
AddrFormatError if parameter is specified as empty string.
Method is_valid_ipv4 returns False in this case. We should
use it to avoid raising exception AddrFormatError to caller.

Change-Id: Ic983fcb7bcb9cb957333979a6604768b921e4969
2016-06-13 19:42:19 +08:00
OpenStack Proposal Bot 2ac2bff19e Imported Translations from Zanata
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: Id891445959fdf5382cbaa70ab957bebf0e31e7a1
2016-06-11 07:53:49 +00:00
Jenkins 98e24bedf3 Merge "Allow assigning "0" to port" 2016-06-10 18:09:29 +00:00
Jenkins 6439ee0ab5 Merge "Avoid catching generic exception" 2016-06-09 08:05:40 +00:00
Dariusz Smigiel 9598077a85 Allow assigning "0" to port
Function for port validation doesn't validate "0" as a proper port
number, althought IANA RFC 6335 [1] describes as valid 0-65535.
Add missing "0" to function.

[1] https://tools.ietf.org/html/rfc6335#section-8.1.2

Change-Id: I088add52cf454e5df503ecb5d6551724fb5ddaf4
Closes-Bug: #1590485
2016-06-08 12:19:27 -05:00
OpenStack Proposal Bot dfdaaa2e31 Updated from global requirements
Change-Id: I8526da9d6aa4b6b40a688f8c06c541eda2d4b203
2016-06-03 18:18:16 +00:00
ChangBo Guo(gcb) cbf5dde05c Fix method split_path's docstring 'versionadded'
This method was merged in 3.11, not 3.9.

Change-Id: I35a9778d017466b044521cbb4c9d282d14c128c4
2016-05-31 12:33:28 +08:00
OpenStack Proposal Bot 947d73ae0b Updated from global requirements
Change-Id: I100563774b3c1cf1720d67d365e6bed7ee75b59c
2016-05-30 00:38:30 +00:00
OpenStack Proposal Bot d79012dbc9 Updated from global requirements
Change-Id: I29559392ad010346acb5cf3cde6b9638eabf99d4
2016-05-26 17:04:11 +00:00
Abhishek Kekane 27dbe1e746 Avoid catching generic exception
Replaced 'except Exception' with 'netaddr.AddrFormatError' which
will be raised if address is specified as empty string.

TrivialFix

Change-Id: I3be2fb95b623f7baba057a3936b6071fb82d6a15
2016-05-25 11:55:21 +05:30
ChangBo Guo(gcb) 8f5e65cae3 Remove method total_seconds in timeuitls
There is no consumer in downstream and in requirments project
file upper-constraints shows oslo.utils==3.8.0 for Mitaka branch, so
it is safe to remove it now.

Change-Id: I44ae4ce59efbfe2fd060aa0ff0e0698470d5ad36
2016-05-24 14:59:37 +08:00
Abhishek Kekane 388a15e6c0 Fix is_valid_cidr raises TypeError
is_valid_cidr raises TypeError if invalid addr type is passed.
Caught TypeError to return False if addr type is other than
expected.

Change-Id: I2bb6070e96eb07a47aab12eeef2840ca4f6abc1e
Closes-Bug: #1584599
2016-05-23 12:17:07 +05:30
Jenkins 6cf8386cc7 Merge "Move method split_path into oslo.utils" 2016-05-12 22:36:37 +00:00
ChangBo Guo(gcb) 12d4936f12 Trivial: ignore openstack/common in flake8 exclude list
The directory openstack/common doesn't exist any more,
so remove it from flake8 exclude list.

Change-Id: I6f7f6bb9dd8b8e89979efd030a022d7455df67c7
2016-05-11 14:44:16 +08:00
ChangBo Guo(gcb) daf4681766 Move method split_path into oslo.utils
Method split_path was used in project keystonemiddleware, sahara.
So it's good to accept it by oslo.utils.

http://git.openstack.org/cgit/openstack/keystonemiddleware/tree/keystonemiddleware/s3_token.py#n50
http://git.openstack.org/cgit/openstack/sahara/tree/sahara/openstack/commons.py#n24

Change-Id: I8507a7c406d12e459809442601f3ecf919e62311
2016-05-09 14:54:35 +08:00
OpenStack Proposal Bot 406c753a72 Imported Translations from Zanata
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I1a039792748facab4a09cfe11d8d9b935192517c
2016-05-04 06:33:52 +00:00
OpenStack Proposal Bot 006286a6c9 Updated from global requirements
Change-Id: Ib32c3a895d4c23b4603c516f82d092623948c6a6
2016-04-30 18:07:55 +00:00
Jim Rollenhagen e97f08bb07 Move nova extra_specs_ops to oslo.utils
Ironic needs to do some capability matching that has feature parity with
Nova's capability matching. Rather than trying to re-create it
ourselves, move Nova's matching code into oslo.utils so that we make
sure it's always the same.

Also has small modifications to handle pep8 complaints in oslo.utils,
renaming the file and test names to be more generalized, and to use
oslotest instead of nova.test.

Change-Id: I3b70afdf1479b6649feac509b794d04fc5836194
2016-04-20 11:12:30 -04:00
OpenStack Proposal Bot 3ac0253bdb Imported Translations from Zanata
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: Iece011405b6e9b95e5aaeea3a2e2ffb96064737b
2016-04-16 06:29:27 +00:00