Commit Graph

622 Commits

Author SHA1 Message Date
Takashi Kajinami 1d3b0073e0 Drop unused default password in create_stack_user
All calls of create_stack_user has the password argument set.

Change-Id: I267536b4b2b121c2bb921d024cc3e04400cbf211
2024-01-28 23:48:48 +09:00
Takashi Kajinami 813f229a08 Bump hacking
hacking 3.0.x is too old.

Also fix failures detected by the new hacking version.

Change-Id: Ifccbbf2ff7b0824d2079937526d3eee1c536349b
2024-01-18 19:04:37 +09:00
Takashi Kajinami ac2462a584 Clear implementations for neutron LBaaS v1
These resources were hidden some releases ago so we no longer need to
maintain the implementations.

Story: 2010678
Task: 47760
Change-Id: Id9684396e495f46890a915e7d05d9fd2ddc24b63
2023-04-10 14:16:40 +09:00
Takashi Kajinami 87bdbfdcab Drop implementation for OS::Magnum::Bay/BayModel
Magnum has deprecated it's Bay API and BayModel API a long ago and
these resource types were deprecated and are hidden in Heat now.

Magnum has removed the old API during Zed cycle and the resources are
no longer supported, so we should remove the implementation now.

Change-Id: If4c6a83a83f9eb29407eb632f47c7229b5492ffd
2022-09-21 16:40:03 +09:00
Brendan Shephard 79f5868e04 Floating IP port forwarding resource
Add a new heat resource for Floating IP port
forwarding extension.

Story: 2009321
Task: 43742
Change-Id: I729f11873940a83e77038c5ba8e8eb50965623f6
2022-08-16 13:50:52 +10:00
Ian Wienand bf9186a37e Fallback to upstream for Fedora image
OpenDev infra only keep around the latest two Fedora releases in their
mirrors.  Probe for the image from the local test mirror, but if not
found, fallback to upstream.  This will be much less reliable, but can
avoid gate breakage until new images can be used.

Also, use endpoint_type when creating keystoneclient

Keystone admin endpoint has been removed from devstack with[1].
This would use the public endpoint by default.

Change-Id: I96ab14871ee8c5d5b83cc0cd4abc840ef0218ca8
2021-11-12 15:32:19 +05:30
Brendan Shephard 9131940ebb Drop six library
The six library was introduced to bridge the gap
between Python2 and 3. This is no longer necessary
on branches where we are not supporting Python2.

Change-Id: I7736373d03c23884158e4a1d41defafb4e2b8a4c
2021-10-05 02:50:03 +00:00
Takashi Kajinami 271156446f Drop support for Block Storage API v2
... because it was already removed from cinder[1].

[1] e05b261af7dcd24096b229860df65dff1d385910

Change-Id: I8baf1701483ce2addd47dd4cb472f92ad4a192cd
2021-08-02 05:41:26 +00:00
Zuul d7aee60eec Merge "Check ready status volume before extend volume" 2021-04-07 14:12:35 +00:00
ramishra 6ff0dc2e19 Assume interface detach called for port not found
If the interface has been detached before we call
detach_interface, then we keep on calling it as we
get a 404 from nova. Let's assume it's being called
and check if the interface has been detached.

Task: 42195

Change-Id: I768eeb10c2c24a0c93749b11636ef3e003ecfcd9
2021-04-01 19:37:36 +05:30
Zuul 98dc789fbc Merge "Switch to collections.abc.*" 2021-03-12 08:07:07 +00:00
ricolin 150c0a9bde Check ready status volume before extend volume
Change-Id: I2d74bb0ee66813a500b3cb7766022297f5a152f2
Story: 2008349
Task: 41251
2021-03-12 01:12:10 +00:00
Zuul ef0f64e3c8 Merge "Regenerate trust when update with different user" 2021-03-11 16:04:46 +00:00
Stephen Finucane 57e9754093 Switch to collections.abc.*
The abstract base classes previously defined in 'collections' were moved
to 'collections.abc' in 3.3. The aliases will be removed in 3.10.
Preempt this change now with a simple find-replace:

  $ ag -l 'collections.($TYPES)' | \
      xargs sed -i 's/\(collections\)\.\($TYPES\)/\1.abc.\2/g'

Where $TYPES is the list of moved ABCs from [1].

[1] https://docs.python.org/3/library/collections.abc.html

Change-Id: Ia282479bb1d466bd2189ebb21b51d91e89b9581e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-02-01 11:15:59 +00:00
Lingxian Kong defb617ce5 Fix args for initializing trove client
Trove client is using the 'retries' as 'connect_retries' when instantiating
trove Client.

Ref:
https://github.com/openstack/python-troveclient/blob/master/troveclient/client.py#L469

Story: 2008422
Task: 41366

Change-Id: I58a6e235410e2ca28b3822400151621c18ad882d
2020-12-07 21:03:17 +13:00
Zuul 47be5106bd Merge "S2007837: Fixes domain_id parameter in the user find call" 2020-11-17 16:51:45 +00:00
ricolin d8efcd1780 Regenerate trust when update with different user
Regenerate trust when update stack with different user
We will regenerate (and delete old trust) when user credential
doesn't match with current context (means different user is
operating).

Story: #1752347
Task: #17352

Change-Id: I39795bdbd8ab255150153bf8b1e165b49e1a7027
2020-11-17 14:25:47 +00:00
David J Peacock aab68ced6a Update get_hosts to use available API
os-hosts was deprecated in nova quite some time ago.  This patch updates
get_hosts to use the available os-hypervisors functions.

Change-Id: I36421e9859a266f0278c1b5f2acb4ebbacbfca82
Story: 2006584
Task: 36708
bz: 1740567
2020-11-09 14:43:02 +01:00
Zuul 3e2209aeb8 Merge "Use set instead of list of server_deferred_statuses" 2020-11-03 00:10:50 +00:00
Jan Horstmann f98aef09e2 Bump MANILACLIENT_VERSION and use sharev2 endpoint
This commit bumps MANILACLIENT_VERSION to 2.13 and changes the used
service type to sharev2.

In order to support the value of "cephx" in property
'{"access_rules": [{"access_type": ""}]}' in ressource
OS::Manila::Share, manilaclient needs to use at least version 2.13 of
the manila API ([1]). The default minimum version in manilaclient, which
is used when only a mayor version is specified is 2.0.
Additionally the sharev2 service type endpoint has to be used to access
the manila v2 API.

The export_locations response was removed in version 2.9 of manila API
from the "Show share details" request ([2]) and moved to its own
endpoint in [3]. Thus it is requested from there now.
Additionally the new endpoint is more verbose, so only its path
attribute is returned, in order to match the previous behaviour.

[1]
https://docs.openstack.org/manila/latest/contributor/api_microversion_history.html
[2]
https://docs.openstack.org/api-ref/shared-file-system/?expanded=show-single-export-location-detail,show-share-details-detail#show-share-details
[3]
https://docs.openstack.org/api-ref/shared-file-system/?expanded=show-single-export-location-detail,list-export-locations-detail#list-export-locations

Change-Id: I4c37be8fad1edb05d812fed260e97e9188fd23ce
Story: 2007986
Task: 40612
2020-08-25 16:20:53 +02:00
Rabi Mishra 01c230e793 Check for nova exception.Conflict rather than task_state
When detaching and attaching volumes nova would raise an
exception.Conflict, if attach and detach can't happen. Let's
use that to retry rather than using task_state.

Change-Id: I50904e4254568cd807b9ff18eef482cadb626ce5
Task: 40169
2020-06-26 14:29:54 +05:30
Sam Kumar e79e76dade S2007837: Fixes domain_id parameter in the user find call
Keystone database has domain stored in domain_id column
Find function call does not use domain_id since the parameter
was passed as domain instead of domain_id. This change fixes
the incorrect parameter name.

Story: 2007837
Task: 40124

Change-Id: I15b5f1463dadef750ff9e24fe510b06958eba188
2020-06-19 17:23:32 +00:00
Hervé Beraud 6ccd16cc32 Remove six and python 2.7 full support
Six is in use to help us to keep support for python 2.7.
Since the ussuri cycle we decide to remove the python 2.7
support so we can go ahead and also remove six usage from
the python code.

Review process and help
-----------------------
Removing six introduce a lot of changes and an huge amount of modified files
To simplify reviews we decided to split changes into several patches to avoid
painful reviews and avoid mistakes.

To review this patch you can use the six documentation [1] to obtain help and
understand choices.

Additional informations
-----------------------
Changes related to 'six.b(data)' [2]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

six.b [2] encode the given datas in latin-1 in python3 so I did the same
things in this patch.

Latin-1 is equal to iso-8859-1 [3].

This encoding is the default encoding [4] of certain descriptive HTTP
headers.

I suggest to keep latin-1 for the moment and to move to another encoding
in a follow-up patch if needed to move to most powerful encoding (utf8).

HTML4 support utf8 charset and utf8 is the default charset for HTML5 [5].

Note that this commit message is autogenerated and not necesserly contains
changes related to 'six.b'

[1] https://six.readthedocs.io/
[2] https://six.readthedocs.io/#six.b
[3] https://docs.python.org/3/library/codecs.html#standard-encodings
[4] https://www.w3schools.com/charsets/ref_html_8859.asp
[5] https://www.w3schools.com/html/html_charset.asp

Patch 5 of a serie of 28 patches

Change-Id: Idb037ded55698790fc1658896f1e2dcdce89f3f9
2020-04-22 12:23:44 +02:00
Zuul 1e168df5ec Merge "Filter by project id in list_security_groups" 2020-04-16 08:13:17 +00:00
ricolin 5b35225d16 Add ironic client plugin support
Change-Id: I2f3ee94424c4dab75fbcef6f8b32e565b45684e4
Task: 36285
2020-04-09 14:14:38 +08:00
Pavlo Shchelokovskyy fe55842f72 Filter by project id in list_security_groups
this utilizes server-side filtering and makes requests issued
on behalf of admin user (who otherwise sees all SGs) much faster,
avoiding unnecessary failures due to timeouts.

Change-Id: Ifdceb855affcfccb07dbe415ee4b140d3a0355ee
Story: 2007473
Task: 39168
2020-04-08 09:10:05 +00:00
Zuul 73f9dc295f Merge "Check task_state of instance before volume actions" 2020-02-20 04:42:20 +00:00
ricolin f020a59f0d Avoid dynamic import from monasca client
Change-Id: I113a773076b2c687be0b7c88bf547b854a7d2f9a
2020-02-19 11:48:45 +08:00
Zane Bitter 9a4012ba9d Use set instead of list of server_deferred_statuses
We only use this list to test for membership, so it's more efficient to
use a set.

Change-Id: I520fd87a18f37da3ae2e61c56fe00063348540b4
2020-02-18 09:20:41 -05:00
Zuul d5c01a7359 Merge "[S2007072] Enables case insensitive user name search." 2020-02-14 07:45:18 +00:00
Sampat P 9dded0d8c8 [S2007072] Enables case insensitive user name search.
Task: 37963

If heat templates use keystone user name in a case different
from the case in which the user name is stored in keystone DB
Heat stack creates fails. This change adds an option to heat
engine to enable case insensitive user name search.

Change-Id: I8e5cb027beebce39921d336fb3845125b0efc5bc
2020-02-13 11:54:45 -05:00
Zuul b833f8ec2a Merge "Fix Designate Zone ID lookup for real" 2020-01-24 07:46:00 +00:00
Zuul e3de1453ad Merge "Add support for Octavia's Flavor and FlavorProfile resources" 2020-01-21 11:42:58 +00:00
Gregory Thiemonge 68a8219315 Add support for Octavia's Flavor and FlavorProfile resources
Added OS::Octavia::Flavor and OS::Octavia::FlavorProfile support.
Added flavor parameter in OS::Octavia::LoadBalancer.

Flavor and FlavorProfile allow to configure/tune Load Balancer
capabilities (enable/disable HA, etc...)

Story: 2007081
Task: 37993

Change-Id: If31a888e5867ac6941ff0d515d4b88894fb97572
2020-01-20 18:57:37 +01:00
Rabi Mishra 2f63735a5c Fix Designate Zone ID lookup for real
When there are no 'supported_versions' defined for a client plugin,
we should not use version when calling self.client()

Also fixes similar issue in resources.

Task: 38165

Change-Id: Ifce776e8e8375f6a4399574aa71cc2f81ecc57b0
2020-01-17 21:49:55 +05:30
Zuul e5076ce6b2 Merge "Support for shared services in multi region mode" 2020-01-09 19:07:29 +00:00
Zuul 7c9a1cf779 Merge "Cache service availability results per request" 2020-01-08 23:41:47 +00:00
Zane Bitter 758866d890 Cache service availability results per request
Retrieving the list of available resource types seems to be inordinately
slow on at least some clouds (though not in our gate tests). It appears
that checking service availability is the main culprit. These service
availability checks are also performed during validation of a template,
so they should be as fast as possible.

Previously, we never cached the availability of a service, probably on
the assumption that checking the catalog, once retrieved, would be
quick. It's not clear that we even need to use the user's token to
retrieve the catalog on each request, since all users should see the
same catalog. However, at a minimum we can cache the results for the
request so that we don't need to do multiple lookups of the same service
when validating a single stack or listing the available resource types.
This patch does that, and also caches the results of extension lookups
in Neutron and Cinder for the duration of the request, independently of
the global oslo.cache settings (which, if enabled, can cache the results
across requests).

Change-Id: I0618dc2a35f7323abedccb13ef3d6537eef1d24c
Task: 37974
2020-01-07 15:46:38 -05:00
ricolin 40ca7e9e63 Check task_state of instance before volume actions
Check task_state before verify resize or before detachment.

We need to make sure the task_state moved out from resize_finish before
we trigger some action like attach/detach volume.

So when we update flvor and volume at the samethime, the resize action
will not affect volume attachment/detachment.

Depends-On: https://review.opendev.org/#/c/700512/

Change-Id: I64033d5a0a8fea5c4fd93b1deb111d3d8fba0cf7
Story: #2007042
Task: #37854
Task: #37855
Task: #37869
2019-12-26 15:29:05 +00:00
Nakul Dahiwade fd41115805 Support for shared services in multi region mode
The services are declared in a list in config.
shared_services_types=image, volume, volumev2

Change-Id: I64c00756cc28db616e9e49e6eb1613b76a19068e
Story: 2003772
Task: 26464
2019-12-23 18:47:00 +00:00
Ifat Afek ab584e500e Added a Vitrage client
Story: 2002684
Task: 23116
Change-Id: If05f0907d8f43f64327c7774170e5b559286fc06
2019-12-19 15:25:30 +00:00
Zuul d33d27af0d Merge "zun: add 'tty' property to container" 2019-12-19 08:23:21 +00:00
Hongbin Lu 74567b3f08 zun: add 'tty' property to container
This property allows users to open the TTY of the container.
It basically allows users to use horizon's console to access
the container interactively. For example:

  resources:
    test:
      type: OS::Zun::Container
      properties:
        image: "cirros"
        interactive: true
        tty: true
        command: "/bin/sh"

Change-Id: I70f64d43ed6d2bcb5bab3e5c8f986ca827df8c6f
Closes-Bug: #1856233
2019-12-19 02:38:40 +00:00
Rabi Mishra 7cd26947b8 Revert "Add retries when loading keystone data and fetching endpoints"
Now that we can use connect_retries with keystone session[1]
for retries, we should revert this change.

This reverts commit 6fb8ac250a.

[1] https://review.opendev.org/676664

Change-Id: I70ad41b12095eede617fd8dc454b5761697ea50a
2019-12-04 07:24:16 +05:30
Zuul e98848e516 Merge "Fix Designate Zone ID lookup" 2019-11-12 19:47:56 +00:00
Rabi Mishra 49a2a1e55a Remove nova api extension checks
Entire api extension concept has been removed from nova. API bindings
which have been deprecated since Train release are removed with
https://review.opendev.org/#/c/686516/.

Change-Id: Ifd318a54ef01eb500cebbc11e642b3ae62e5fc79
2019-11-06 20:03:56 +05:30
Zane Bitter 03819bd449 Fix Designate Zone ID lookup
This was broken by a8fba21f23.

Change-Id: I4562a6c243c9010337252d5c57485dc5f64268e1
Task: 37373
2019-11-06 16:39:19 +08:00
Zuul 970e33e637 Merge "Add Blazar custom constraint plugin" 2019-10-19 05:16:54 +00:00
Feilong Wang ea18c18188 Fix cfn-init-data path in ignition
The 'local-data' in path /var/lib/os-collect-config/local-data should
be a directory, not a file. However, even if we can fix this, now
os-apply-config will merge configs based on the order [ec2, heat and
local], but actually there is no deployments collected local. Then
unfortunately, the deployments collected from Heat will be
overwriten because the merging order in os-apply-config. At this
moment, we can't change os-apply-config since it's deliberate.
So the only reasonable way we can do now is using
/var/lib/heat-cfntools/cfn-init-data and /var/lib/cloud/data/cfn-init-data.

Story: 2006566
Task: 36851

Change-Id: I3b1ed30967e9235e9e830c5e4156f739303be618
2019-10-17 17:15:25 +13:00
Zuul 008346fd3a Merge "Support domain in keystone lookups" 2019-10-08 18:51:00 +00:00