Commit Graph

194 Commits

Author SHA1 Message Date
Hamza Alqtaishat 990287677b Adding the senlin resource
This handle the senlin cluster disable/clean
for disable it will detach the polices from the cluster
and resize the cluster to zero (empty cluster)

for clean it will deatach the policies from cluster
clean the policies, receivers then clean the clusters then clean
the profiles

Change-Id: I09421d55c66d91a747bc786fdd250730c79dfd34
2019-10-24 20:31:38 +00:00
Zuul e9021e2dcc Merge "Enable some additional functional testing" 2019-10-23 11:41:29 +00:00
Zuul a6e4f7cb81 Merge "Clean up zuul job config" 2019-10-23 11:41:29 +00:00
Adam Harwell 4bda141c47 Enable some additional functional testing
alt_demo user, non-ascii resource names

Change-Id: I4872d194963c790549c4bd6f03aceec1cb2e25a4
2019-10-22 22:25:18 +00:00
Adam Harwell e2f6401477 Clean up zuul job config
Change-Id: I83e3c2d8af86281b5f84f321766a8c0124efd420
2019-10-22 22:22:14 +00:00
Adam Harwell a7b9786f4a Revert "Url quoting of swift object names when deleting"
This reverts commit fc73a2e881.

Change-Id: I7d0d0d4f6af53dec2cf96e1bbc8de70d5f6c7ba3
2019-10-21 15:41:05 -07:00
Zuul 0f517cf361 Merge "Adding the disable feature" 2019-10-15 16:20:27 +00:00
Hamza Alqtaishat 39a159f8c7 Adding the disable feature
This feature allow the disable of most of the project resources
in some cases the admin want to disable the project and wait
for period of time before deleting the resources just in case
some resources are still usable or need to be moved to another
project

for nova the disable will stop the servers
for neutron it will change the admin_state_up to false which
will change the status of resource to down
for glance it will deactivate the images
for swift it will remove the read/write acls to container
for octaivia chenge the admin_state_up to false making the
status of loadbalancer down
for cinder it will change the volume to readonly

for the resources that dont have a way of disabling the
resource it will just log a warning

Change-Id: Ic2af6ad1ffb1e749a3d1ba687950264b5098bcdb
2019-10-14 21:33:38 +00:00
Zuul 30a24580cf Merge "Fix auth order issue introduced in modernize patch" 2019-10-11 14:54:18 +00:00
sreinke 18ba71715b Add ha_router_replicated_interface to router interfaces
Change-Id: I8cf94d123555b37fa80c9dc93005e089ef2f5042
2019-10-09 10:07:04 +00:00
Adam Harwell 3ca9f412b4 Fix auth order issue introduced in modernize patch
Was introduced in Ieecc4043b613e333948c32e7e93ad1d383d1f3ec

Co-Authored-By: Hamza Mahmoud Abdallah Alqtaishat <hamalq@verizonmedia.com>
Change-Id: Id70b60de95fac44a50b06166486a5fcc80d12eda
2019-10-06 14:13:26 -07:00
Zuul c94a3fa9fb Merge "Add Octavia support" 2019-10-02 15:37:08 +00:00
Zuul 8a75ebb283 Merge "Allow entry points to override existing resources" 2019-10-02 15:11:57 +00:00
Adam Harwell 7044205c34 Add Octavia support
Includes functional testing.

Change-Id: I8d2152d2f354cfb882f534d23f150d6962195b0f
2019-10-01 20:09:37 -07:00
Adam Harwell 0421d12397 Modernize testing and clients
Update to use a new-style zuul role for devstack testing.
Remove references to Shade/os_client_config and use OpenstackSDK.

Change-Id: Ieecc4043b613e333948c32e7e93ad1d383d1f3ec
2019-10-01 20:09:32 -07:00
Yves-Gwenael Bourhis fc73a2e881 Url quoting of swift object names when deleting
shade sends the swift object or container name unquoted as an url and in
shade.openstackcloud.py in get_object_metadata where OpenStackCloudException
errors with 404 status_code are silently ignored.
If the name contains special characters such as a '#' we therefore get no
metadata without errors.
The same thing happens after in shade.openstackcloud.py in delete_object when
calling self._object_store_client.delete : an OpenStackCloudHTTPError is
caught and the delete method returns False.
This resulted in ospurge not deleting such objects without even getting
an exception.
After investigation, the issue would be the same in openstacksdk which
copies the same code as shade.
Since nor shade nor openstacksdks perform url encoding of the name, we url
encode it ourselves before calling shade, since shade makes an http
request by calling the swift api with the object name as an url.

Closes-Bug: #1831753

Change-Id: Ie7aea2a14d920ca11012ff26d7f74017704765f5
2019-06-05 18:04:37 +02:00
Yves-Gwenael Bourhis 4df8423bdf Allow entry points to override existing resources
Third party modules may want to modify existing resources behaviours.
To allow overriding existing resources, entry point modules need to be
loaded first.
It is not an issue to load them first since we sort the classes afterwards.

Change-Id: I92999d98df249649b79b13ca2be2691efdde737f
2019-06-04 14:34:36 +02:00
Yves-Gwenael Bourhis 79ecb6f53c To get tenant, use openstacksdk instead of shade.
Shade retrieves the list of all tenants and filters the result.
This can be a huge issue on platforms with tons of tenants.

OpenstackSDK's get_project method acts also like shade's get_project method,
but OpenstackSDK's identity manager just recovers the desired tenant, so we
use this.

Also we pass the OpenStackConfig instance to shade or openstacksdk
because if we don't, they re-instantiate one uselessly.

Closes-Bug: #1820616

Change-Id: I737b031fa9f2e4394d58ac204bf28b422cec1c28
2019-06-04 14:33:33 +02:00
Yves-Gwenael Bourhis 43c60708e5 Use python 3 to build docs
The CI fails to build docs with python 2.7 because Sphinx requires
Python '>=3.5'
So we build docs with python 3.

Change-Id: If94342cbc5ad440009c515d70f1e79295241997c
2019-06-04 13:38:22 +02:00
OpenDev Sysadmins e4261a65db 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:44 +00:00
Ian Wienand 4547110dd9 Replace openstack.org git:// URLs with https://
This is a mechanically generated change to replace openstack.org
git:// URLs with https:// equivalents.

This is in aid of a planned future move of the git hosting
infrastructure to a self-hosted instance of gitea (https://gitea.io),
which does not support the git wire protocol at this stage.

This update should result in no functional change.

For more information see the thread at

 http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html

Change-Id: Id3bd6c6d5a5f4291c4890ff960550de2bb9feadf
2019-03-24 20:35:33 +00:00
Yves-Gwenael Bourhis 8a69363f8e Fix test_get_resource_classes parameter passing
In utils.get_resource_classes we expect a list of strings.
However we are passing a string.
The test was succeding by pure luck.
If we pass something else (such as 'Stacks') we had multiple results.
This test was confusing for other developers implementing other tests.

Closes-Bug: #1820033

Change-Id: I8414b7582d94b199457a01e4916a7e7b6e51edbc
2019-03-14 10:50:28 +01:00
Yves-Gwenael Bourhis 02bcffc174 Add support for entry points
Change-Id: I11fd40645479a815b29afaac0b12d45f6f7e6c21
2019-03-13 15:50:35 +01:00
Jordan Pittier 98a0fb2405 Update default cirros version
Following I419348f1784600e3989c8e86a99c04b24f3610c4

Change-Id: I0661144bb6f6d26b3026b011a7fbb01f1998279a
2019-03-12 18:38:39 +01:00
jacky06 f9b785cfaf Remove support for py34
Change-Id: I5c4e42bd33edf7a144427cc906f34432c949c838
2018-12-19 11:22:20 -05:00
qingszhao da8881a8e9 Change openstack-dev to openstack-discuss
Mailinglists have been updated. Openstack-discuss replaces openstack-dev.

Change-Id: I9d4b8c05581a1a8de9ade33027c05d8d40cfe6ac
2018-12-04 16:32:59 +00:00
Vieri b9e7afe86f Update min tox version to 2.0
The commands used by constraints need at least tox 2.0.  Update to
reflect reality, which should help with local running of constraints
targets.

Change-Id: I2a71f220ebbc969dc30b55804cb393c0e2f60605
2018-11-02 07:06:59 +00:00
Graham Hayes 11e2fdd2fb
Add functional testing for Designate
Change-Id: If9fe00c437e6ca1341c72c1081eee35ad2ee46d2
Signed-off-by: Graham Hayes <gr@ham.ie>
2018-10-19 16:31:39 +01:00
Graham Hayes bd1588ac19
Add Designate support
Change-Id: Ia4aab5f6ccc6405eba20750b505ebdf32a6ab82d
Signed-off-by: Graham Hayes <gr@ham.ie>
2018-10-15 16:49:02 +01:00
Zuul add202ff6a Merge "Neutron: handle DVR router interfaces" 2018-09-09 19:06:22 +00:00
Zuul 5ab33b32a9 Merge "Add .coverage files to gitignore" 2018-09-09 18:16:06 +00:00
Oleg Bondarev 5b92014541 Neutron: handle DVR router interfaces
DVR uses different device_owner name for router interfaces

Change-Id: I9f78cf3372456326d5c5be93cca57230481472fb
2018-09-09 17:47:53 +00:00
Zuul 222167a636 Merge "Add python2 jobs" 2018-09-09 15:23:49 +00:00
Zuul 64a70a0b54 Merge "Add heat stacks cleanup" 2018-09-09 13:53:28 +00:00
Tobias Urdin db1fdb4c1c Add python2 jobs
Adds python 2.7 jobs and pep8 jobs.

Change-Id: Ic6289f85793769a57063e38ff7012133594a73ad
2018-09-09 14:07:26 +02:00
Tobias Urdin b4b917164c Add .coverage files to gitignore
When running coverage testing it creates
.coverage* files, this excludes them from git.

Change-Id: I9c991cf20474c7fcce939ee98ac0206cdac2f5d7
2018-09-09 10:38:34 +00:00
Tobias Urdin 8b9262207e Move zuul config to repo
Moves the zuul config for ospurge that now
is in project-config in to the repo.

Change-Id: I21d83eaa8575a4c59cd65c8527243f05662ec024
2018-09-08 22:27:12 +00:00
Tobias Urdin ebb02fde0a Fix functional testing
Fixes for the functional testing using
devstack.

Change-Id: I3a510b6405464fe966cb7cb5ea0a1321b9e7e34f
2018-09-08 22:51:08 +02:00
Tobias Urdin 9189d5da71 Add heat stacks cleanup
Add support to cleanup heat stacks.
Order it early since Heat is probably
orchestrating some servers, volumes etc
that will be removed.

Change-Id: I98c70ff5ac1c8ba5389cd97193152dfb29bec8e4
2018-09-08 15:50:10 +02:00
Victor Stinner af88d16028 Python2: Fix tox -e py27
With this change, unit tests now pass on Python 2.7: tox -e py27.

Changes:

* Replace "yield from ..." with "for item in ...: yield item"
* Remove last annotations from utils.py
* tox.ini: use python3 as basepython rather than python3.5 to support
  Python 2.7 and Python 3.6
* tox.ini: add py27 to envlist

Related-Bug: 1726399
Change-Id: Ief1a95402e8a31a34ada2937a7ae6a604f7f8757
2017-11-13 09:13:46 +01:00
Victor Stinner c1d38f741b Python2: Fix metaclass, super() and OrderedMeta
* Add six dependency
* Replace "metaclass=" syntax with six.with_metaclass()
* Add parameters to super()
* Only define OrderedMeta on Python 3

Related-Bug: 1726399
Change-Id: I21800320ef23cc95fc07278864e73b64bb7d6d08
2017-11-13 09:13:43 +01:00
Victor Stinner b73c938a93 Python 2: Move type annotations to .pyi files
Python 2 doesn't support type annotations: raise SyntaxError. Move
them to separated .pyi files to add Python 2 support without loosing
annotations.

Keep inline comments like "# type: Optional[str]".

Related-Bug: 1726399
Change-Id: Ib1a837e88cf76908f1007b3881703ffb433e6c2f
2017-11-09 16:11:57 +01:00
Zuul 44cab87d5f Merge "Python2: Add mock and unittest2 test dependencies" 2017-11-09 14:50:17 +00:00
Zuul 6ec607639b Merge "Python2: Add funcsigs dependency" 2017-11-09 14:40:42 +00:00
Zuul 725df86557 Merge "Python2: Add SimpleNamespace for Python 2" 2017-11-09 12:53:02 +00:00
Victor Stinner 50560fc91c Python2: Add funcsigs dependency
inspect.signature() was added to Python 3.3: add funcsigs on Python
2.7.

funcsigs dependency is specific to Python 2.7 and so not installed on
Python 3.

Change-Id: I951e7df9fcebdc2148cca477f4b064fc9a028e55
Related-Bug: 1726399
2017-11-09 13:30:11 +01:00
Victor Stinner 67fc801e69 Python2: Use __name__ rather than __qualname__
The __qualname__ attribute was added in Python 3. Falls back on
__name__ for Python 2 compatibility, when __qualname__ is not
available.

Related-Bug: 1726399
Change-Id: I19d07dc978250e5340327f05ea6ab62ac55489ed
2017-11-09 10:43:51 +00:00
Victor Stinner 17162e6506 Python2: Add mock and unittest2 test dependencies
* unittest.mock was added in Python 3.3 standard library: use
  external 'mock' module, backport for Python 2.7
* assertRaisesRegex() method was added to Python 3.2 unittest module:
  use external 'unitttest2' backport for Python 2.7 to not have to
  rewrite unit tests just because of Python 2.7

Both added dependencies are specific to Python 2.7 and have no impact
on Python 3.

Related-Bug: 1726399
Change-Id: Ieb32e85d6f40f9b7bed5ba99900be2432d18da9e
2017-11-09 10:43:20 +00:00
Victor Stinner c2d1728dee Python2: Add SimpleNamespace for Python 2
types.SimpleNamespace was added in Python 3.3. Reimplement it in 3
lignes to add compatibility with Python 2.7.

Related-Bug: 1726399
Change-Id: I1553a39ecbf315b5e89d3ec8070b15769cabb8d2
2017-11-09 10:43:03 +00:00
Victor Stinner 90642dd2ec Fix functional tests
* Use an ASCII name for the VM name to workaround a Nova bug.
* Pass --os-domain-id parameter to ospurge to purge the
  invisible_to_admin project

Related-Bug: #1730756
Change-Id: Ie1507a3564d1d8919148228fa647be63e725c7bc
2017-11-08 23:09:50 +01:00