From openstacksdk version 0.11.1 onwards, there is no way
you can add service to the connection. Hence we need to monkey
_find_service_filter_class method from sdk to allow
to point to thee correct service filter class from masakariclient.
Solution provided here is not going to work in sdk 0.9.19 and
0.10.0 versions. Because service descriptor is not supported
in 0.9.19 and 0.10.0 sdk versions and profile parameter doesn't
work correctly during connection initialization.
Also solution provided here is not going to work in sdk 0.13.0
and above, it will still fails with below error
"'Connection' object has no attribute 'ha'"
this is because 'Connection' object expecting instance_ha not ha
Co-Author: tpatil <tushar.vitthal.patil@gmail.com>
Depends-On: I24ec493f3333a5b3f6bfed9395c921fb28500065
Change-Id: Ib86d560a302a27640b6f41c78022cd7b2e8765c9
Closes-Bug: #1779752
This is a mechanically generated patch to complete step 1 of moving
the zuul job settings out of project-config and into each project
repository.
Because there will be a separate patch on each branch, the branch
specifiers for branch-specific jobs have been removed.
Because this patch is generated by a script, there may be some
cosmetic changes to the layout of the YAML file(s) as the contents are
normalized.
See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html
Change-Id: Ie00b9cd60060bcab73c0d9b173df862da0a28941
Story: #2002586
Task: #24310
The resource2/proxy2 migration is finally done, so resource2/proxy2 will
be resource/proxy in the next openstacksdk release.
In the release after that, Profile is going away as are entrypoints
plugins. This handles fixing most of that in a way that should work with
both old and new.
There are two additional places where it is problematic due to profile
in the API. I've left a TODO note there and will send in a followup
patch to handle those.
Note: The masakari command doesn't work yet with this fix.
Co-Authored-By: Kengo Takahara <takahara-kn@njk.co.jp>
Change-Id: I0c7145c7726e8a5895451ec4e08ae3bf6f324c7a
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.
This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.
Change-Id: I387f9aa8a44a7bb0908097f799b98990989b18db
As of now segment can be created with only 'auto', 'reserved_host'
recovery-methods.
Added support for rh_priority and auto_priority.
Closes-Bug: #1713971
Change-Id: I88e4145d3e38301ce363c65409c646297b50d01a
This patch re-factors test_segment and test_host modules.
The common code is moved to a private method (_test_take_action)
and called from respective methods to reduce the code footprint.
Change-Id: I1577c66f8a59eb86fb488d8201a0b2da42be5d97
Recently we added python-masakariclient to global-requirements [1]
as a requirement library for masakari-monitors. python-masakariclient
itself is a library and adding upper constraints support to libraries
is slightly more complex than services as the libraries themselves are
listed in upper-constraints.txt which leads to errors that you can't
install a specific version and a constrained version.
This change adds constraints support by also adding a helper script to
edit the constraints to remove python-masakariclient.
This patch is a copy of commit: 78f113780510b741bc974c69eb9b0718cd657c1d
For failing jobs please refer: https://review.openstack.org/#/c/492989/
[1] 1cd2c8da1a6534c23959cd0a4035e7f530471386
Change-Id: I9376ee14ebfb9186c1480276b47939c3ffc30108
python-masakariclient should use os-testr instead of testr as
it is more powerful and provide much prettier output than testr.
This patch also disables the use of PY34 and adds PY35 for in tox
as the gating on python 3.4 is restricted to <= Mitaka in OpenStack.
This is due to the change from Ubuntu Trusty to Xenial, where only
python3.5 is available.
Change-Id: I1029be8dedd8d4530586c2b4b852c7ddc1d03cf7
There are test cases in which there is no assertion in the UT code.
In that test case, the proper test has not been done.
This patch adds assertions to the test cases to test them properly.
Change-Id: Idb7c602e3c73908ad04c587a2e3eb53b0a3e70b2
Closes-Bug: #1668886
__init__ method shouldn't return value. This patch removes the return
statement from the __init__ method.
TrivialFix
Change-Id: I1f5d9cf3ca04c27bc083a617d3d434456fe6a3b5
This patch has made the following improvements on command
arguments.
- Change the order of arguments which are output as Usage.
- Limits the value which specifies for the argument.
Change-Id: I3b69c922c35cef400a80a04dbd35d20f5f03d9db
On current master code test case failing on Python 3.x and gives
following error: RuntimeError as dictionary changed size during
iteration.
In Python 2.x calling items makes a copy of the items that you can
iterate over while modifying the dict. This doesn't work in Python
3.x because items returns an iterator instead of a list.
To fix this issue forced a copy of the items to be made by using
list() method.
NOTE:
Currently we don't have gate job for python3.x so this issue can
not be reproduced on gate.
Change-Id: If6ec61c735de71be21c0a55a1b165941ae5ac1a0
This patch enables to specify segment name and ID when excuting
commands such as 'openstack segment', 'openstack segment host',
'masakari segment-*' and 'masakari host-*'.
And, also enables to specify host name and ID as well.
And, modified to output reserved column when executing masakari
host-list command.
Change-Id: I1f08c1bfbfa93464afef224b65fa7e5c4cb9d0c4
Closes-Bug: #1668530
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: Ic856cc4a75cb54b14b6d0e79d1aa68e45494b1d7
Since the function to delete a segment host doesn't output
resources after processing, the base class of DeleteHost class
should be the osc_lib.command.command.Command class.
This patch modified the base class of DeleteHost class and
modified so that it doesn't return an unnecessary value.
Change-Id: I2fcce95ae25be94ee5c38b876574476b77fdedff
Closes-Bug: #1656762
The patch[1] is submitted in python-openstacksdk which fixes
the bug: 1653108. This patch bumps the python-openstacksdk to
0.9.13 which includes that fix.
[1] I6d728abbcc5e914b5bd025bc4e059cdcb13e2109
Closes-Bug: #1653108
Change-Id: I109e05cd413bf7bdf39a54992b36b0db660220c8
This patch resolve following issues.
- Debug logs had not been enough.
- Error messages of update/delete operations had not been clearly.
Change-Id: I988a6f35c5308ca5eab5cc537ee5334ada0cea2c
Closes-Bug: #1656185
The segment subcommand and host subcommand can specify
the name of the resource.
Change-Id: I3fbdbdbcc21cc0f7b13351a9970631fc994b897f
Closes-Bug: #1643759
Optional arguments like --limit, --marker and --filters were
showing incorrect help information for segment, host and
notification list commands.
Corrected the help message to show relevant information.
Change-Id: I409dd57c65cfe3b4582f9c113db0bf39d50c46c1
Closes-bug: #1653199
Following list apis doesn't support sort_key, sort_dir and filters:
[1] segment list
[2] segment host list
[3] notification list
For these apis sort_key, sort_dir and filters if passed from command
line are omitted and the whole list is returned without filtering.
This patch fixes the sorting and filtering issue. Now, it is possible
to get results from masakari service in the order you want based on the sorting
parameter you pass to the above apis.
Closes-Bug: #1654521
Change-Id: I21a42ffff31104aa29f8cd7d5d4cb45556b972be
Notification does not have name attribute and it can be retrieved
using UUID only, so it should not show name in the help message of
notification show.
Corrected help message of notification show to display UUID only.
Closes-bug: #1653090
Change-Id: Ifc12997e677f8cdbf802cb9adac01e13ba50a9ea
Command openstack notification list, create, show doesn't display status
in the response.
Added 'status' field in the notification resource and 'columns' list
of _show_notification() method to fix this issue.
Closes-Bug: #1653098
Change-Id: Idcbc7310c20c333072ea02836ae3c29f836970af