Commit Graph

12 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 4ce9e713ce Make plugins usable as part of collection
Since we're converting plugins repo to collection, we make plugins
usable from collection. For that we change repo structure.

Symlinks to old destinations are created for backwards compatability

Change-Id: I15b4a9f50910794c11b57457f9f4fbb34f321654
2022-01-12 13:41:09 +00:00
Duncan Walker 24fe4789c8 Removing unused filters from osa plugins
pip_constraint_update, filtered_list,
git_link_parse, git_link_parse_name filters
have no reference inside OSA
hence removing these filters.

Change-Id: Id4bc4ab87ac4b60121290ad6cbbd143962357d39
Closes-Bug: #1826245
2019-09-20 09:47:30 +01:00
Zuul fa93ca1b24 Merge "Removing unused filters from osa plugins" 2019-07-30 19:08:40 +00:00
mattycarroll fc9e016e90 Remove bit_length_power_of_2
This change is to remove bit_length_power_of_2 from this repo since
it has been moved to openstack-ansible-openstack_hosts. This is
because it is only used by that repo.

Depends-On: I543328db49dc6b7bbb05878503dbb3d337a18558
Change-Id: I9e2b3e10ec42d246d203e363f0c737b8824ccd47
Closes-bug: #1826242
2019-07-27 21:37:47 +00:00
namrata aba5c08446 Removing unused filters from osa plugins
pip_requirement_names filter has no reference inside OSA
hence removing the same.

Change-Id: I3f7038f3add6a05c2b2fb038818aa92d370e2e81
Partial-Bug: 1826245
2019-07-26 17:29:04 +05:30
Georgina 6482c25017 Removal of netloc filters
The ansible urlsplit filter added in 2.4 means that maintaining the
filters netloc, netloc_no_port and netorigin should no longer be
necessary.
All usages of these filters within other openstack repos have been
updated to use urlsplit and merged.

Change-Id: Ief1ec06e205bae7ec114fe0b9bd7d9c4973383dd
Closes-Bug: #1820830
2019-04-23 13:37:52 +00:00
Jimmy McCrory 83c5785ba8 Allow basic auth in netloc_no_port filtered URLs
Update the netloc_no_port filter to parse a URL using the 'hostname'
attribute instead of splitting the netloc before the first colon, where
a username might be provided.

Change-Id: I9a0d01eac1e44de121fc7c6753cfa1bc2ed4318d
2018-10-29 00:10:01 -07:00
Jesse Pretorius (odyssey4me) 1e436a2f43 Revert "Add a get_nested filter"
This reverts commit 80a1262252
because we're not using it, and using json_query is simple enough.

Change-Id: I8d5fba867eceb6892a7a995a9b86153e88353480
2018-07-20 11:22:38 +01:00
Nolan Brubaker 80a1262252 Add a get_nested filter
When accessing nested facts, such as in ansible_local sections, guard
statements in the when clause can get quite long, due to having to
repeate the 'in/not in' logic for every key at every level.

The get_nested filter attempts to instead to move the guard into a
single line, making the conditions easier to write and maintain.

As example,

   ('openstack_ansible' not in ansible_local or
    'swift' not in ansible_local['openstack_ansible'] or
    'venv_tag' not in ansible_local['openstack_ansible']['swift'] or
    ansible_local['openstack_ansible']['swift']['venv_tag'] == swift_venv_tag)

 could be rewritten as

     get_nested(ansible_local, 'openstack_ansible.swift.venv_tag') == swift_venv_tag

Change-Id: I3b43c25c8783c43cf5285f2b3e7267b2c5712ea0
2017-07-07 19:42:39 +00:00
Jimmy McCrory 057ed9a808 Python3 compatibility for osa-filters
The urlparse module is renamed to urllib.parse in Python3.

Change-Id: I3dceb2f87e5e0469ab705866163225601686a0af
Implements: blueprint goal-python35
2017-06-05 12:14:27 -07:00
Kevin Carter 4ba94db7bb
Created deprecation filter
This filter can be used to notify users that an option has been deprecated.
The filter can be applied to any variable and can be made fatal.

USAGE:
{{ new_var | deprecated(old_var=old_var, old_var_name="old_var_name", new_var_name="new_var_name", removed_in="removed_in", fatal=false) }}'

Note that the key names need not be specified they're only shown in the usage
example for clarity.

PRACTICAL USAGE:
{{ new_var | deprecated(old_var, 'old_var_name', 'new_var_name', 'the next release') }}

Change-Id: Id4f830df4b96a9b0b0b7637c23dfe63dc142387c
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-02-29 15:20:34 -06:00
Jesse Pretorius fc411eaf89 Rename plugins folders to standard Ansible names
The standard Ansible names for the plugins folders [1] are singular.

This patch renames our plural names to singular names so that when
the plugins are downloaded into a default location there is no further
configuration required.

[1] https://github.com/ansible/ansible/blob/devel/lib/ansible/constants.py

Change-Id: Ib965750f267d11287a6196e2544c3a014a3e2029
2016-02-10 00:54:11 +00:00