Commit Graph

56 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 7a4c8f72e8 Fix modules location
In previous commit error has been made since all plugins that were
based in the library were modules and not action plugins.

Based on that we fix issue by simply renaming folder.

Change-Id: I12ad4f7f925b22f64bfc5acd9c6368eaaaa0a9cf
2022-01-13 23:19:42 +02:00
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
Dmitriy Rabotyagov 3d92c7da03 Fix linters
Change-Id: I1f7f3d920f1017d1d5e0c4c11c3544677d992a7c
2020-11-17 16:00:03 +00:00
Georgina d6d099f6c3 Identity providers can be created with specifed domain
Add idp_domain_id parameter so that when creating an identity provider a
domain can be specified that the IDP resides within instead of creating
and belonging to a new auto generated domain.
This change is backwards compatible, idp_domain_id is optional.

Change-Id: If761dd4faf63cf09d436d9e0a22f7e90cec9a105
2020-06-22 17:13:14 +00:00
Georgina 5af0b9bcc3 Removing name2int module
Module not widely used.
Module usage should be replaced with string_2_int filter.

Change-Id: I1b71275af47db50380965bbb8c899ae4d5aa439f
Closes-Bug: #1826243
2019-07-27 16:07:20 +00:00
mattycarroll 42a993d69c Remove unused Magnum module
This module is not used in the openstack-ansible project and there is a
native ansible module for the same purpose. There will be no supporting
changes for this fix to remove it from use because it is not being used.

Patch set 2: Add release note

Change-Id: Ia516ccfc024218ccfb143d600268875c9013cc22
Closes-bug: #1826247
2019-05-08 15:09:17 +00:00
Zuul bdc1ed618c Merge "Remove the config_template module" 2019-02-12 15:36:41 +00:00
Jesse Pretorius b28590f5bd Remove the config_template module
The config_template action module has now been moved into its own git
repository (openstack/ansible-config_template). This has been done to
simplify the ability to use the plugin in other non OpenStack-Ansible
projects.

As part of this, we now need to remove the environment settings given
to ansible so that the common tests repo settings in ansible.cfg take
effect.

Related-Bug: 1791258
Depends-On: https://review.openstack.org/635841
Change-Id: I3a7d8c0c248febc4223029e076062ca68312b104
2019-02-11 16:43:57 +00:00
Zuul d7f7a52c61 Merge "Prevent interface map from being built for neutron_server container" 2019-02-09 03:51:22 +00:00
James Denton 152bae8b96 Convert provider network network_mappings to unique list
When users define multiple provider networks in openstack_user_config
using the same label<->interface mapping, as seen when defining both a
flat and vlan-type network using the same host_bind_override, the
network_mappings list contains both (identical) mappings. This causes
the Neutron agent to bail with the following error:

linuxbridge_neutron_agent [-] Parsing physical_interface_mappings failed:
Key vlan in mapping: 'vlan:ens1f0' not unique. Agent terminated!

This patch converts the list->set->list to ensure unique mappings.

Change-Id: Ia9093ebf23c4ec0209ada07e76048ecbadb9ee41
2019-02-06 19:40:17 +00:00
James Denton a5f3532700 Prevent interface map from being built for neutron_server container
This patch updates the provider_network library by removing neutron_server
from the list of groups that require provider interface maps, as
neutron_server is not in-path of instance traffic, and all interface mappings
should exist only where network agents are configured. Removing this logic
will allow container_interface to become an optional parameter for provider
network definitions.

Change-Id: I5bfa14e0b7d97eb75756b7e40c93f48ae13fe087
2019-02-06 15:19:58 +00:00
James Denton 7fd6dd2112 Update provider networks plugin to support multiple network mappings
This patch updates the provider networks plugin by adding support
for network interface to bridge mappings. For each flat/vlan provider
network, a network_interface can be defined that will be added to an OVS
provider bridge automatically. This supercedes the network_interface override
for OVS-based deployments, including OVS, OVS w/ DVR, and OVN, that was
only available outside of the plugin.

Change-Id: I99d95ab103f9d64726a809eb81db69e0b2b18ffb
2018-12-20 15:40:57 +00:00
zhangdebo 37f4125234 Fix Chinese quotes
Change-Id: I0f26b77c61c28bdd055697588a9427a79ebf9e64
2018-12-18 18:46:09 +08:00
James Denton bc3e3b074c Updates provider_network plugin to support geneve
This commit updates the provider_network library to support
geneve for use with Open Virtual Networking (OVN).

Change-Id: I770a6a3e08490b7ae74752178e69be43ec484dc5
Implements: networking-ovn support
Partial-Bug: #1782625
2018-10-02 12:57:01 +00:00
James Denton 256163ecd2 Modify provider_network plugin to compare group_binds to group_names
This patch compares group_binds of a given OSA provider network to the
group membership of a host to ensure the respective Neutron provider
network is configured only on matching hosts.

Change-Id: Idd13195b7f5c23badb21542dd83ab2898aae16d5
Partial-Bug: #1787462
2018-08-20 13:50:46 +00:00
Kevin Carter fef14ca3c7 Remove the dist_sort module
The dist_sort module is no longer used anywhere, so there's no need to
keep it around.

Change-Id: Idb492e01aa82a3f55b28565fb77a4f7cd7a9d735
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-06-24 14:29:44 +00:00
Jakub Jursa 884500daae Fixed insecure passing in keystone module
As Keystone Client is passed already created Session object (L603), it doesn't
take into an account client_args, so Session is created with default verify
value.

Change-Id: I428a80cfb99821053d27dcf8a4b130377467d469
2018-03-19 14:33:30 +01:00
Michael Rice 8ead9b2685 Add missing domain parameter to _get_group_roles
Adds missing 'domain' parameter to function which
was causing errors when using keystone federation.

Change-Id: Icfc06feae806a9faf8f4d12bf2281dd6c9772989
Closes-Bug: 1733108
Signed-off-by: Michael Rice <michael@michaelrice.org>
2017-11-20 12:09:26 +00:00
Kevin Carter 2d1dd94264
remove the use of iteritems
iteritems is a py2 callable and will break when using py3.

Change-Id: Icea444baea8f3597cb8dd24e3d61e9ed0926cdf5
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-08-02 15:04:48 -05:00
Miguel Alex Cantu 76d5f02a32 Add ignore_none_type to config template
It is sometimes useful to tell ConfigTemplateParser to write
out options that are valueless and not suffixed with '=' or ':',
such as when overriding a my.cnf.

This commit adds the 'ignore_none_type' attribute to the config_template
module. If this attribute is set to false, then valueless options will be
written out to the resultant INI file as-is, without the '=' or ':' suffix.

Change-Id: I5c88b2019c01b44193a5d0df9299ecce6de52f01
Partial-Bug: #1693234
2017-06-26 19:12:43 +00:00
Jimmy McCrory a5d669f0b4 Remove neutron library
As of Ansible 2.3, the os_network module now allows more additional
options for 'provider_network_type'[0]. Use of OSA's neutron plugin can
be removed.

[0] https://github.com/ansible/ansible-modules-core/issues/5589

Change-Id: If74185ecca1ea639c2e1526b5542e89dd533084b
Implements: blueprint use-std-ansible-modules
2017-05-24 23:00:42 +00:00
ArchiFleKs fa85b97313 Support Keystone versionless endpoints
Uses keystone.client instead of keystone.client.v3 with session and auth
to return a keystone client with the discovered URL.

Also sets project_domain_name and user_domain_name do "Default" as they
are expected by Keystone.

Change-Id: I8fce922e2907584138a132f37887f227eabe9abe
Partial-Bug: #1688320
2017-05-11 12:21:20 -04:00
Jimmy McCrory 5e1828ce6e Don't log password arguments of keystone module
Set no_log=True for the 'login_password' and 'password' arguments of the
keystone module so that they will not be printed in plain text within
Ansible run output.

Change-Id: I07748e9ff1c1459f0eacf1409bef4e158c9e6446
2017-04-05 07:22:42 -07:00
Jenkins 7d6f37857c Merge "Always update existing matching endpoints" 2017-03-14 12:42:19 +00:00
Andy McCrae 5822e29d41 Always update existing matching endpoints
There is no usecase for having 2 endpoints that have the same Region,
interface, service_name and service_type.

The keystone module should default to update these endpoints if the url
is different, but the Region, interface, service_name and service_type
match.

This will make the default behaviour of state "present" to match that of
state "update".

Change-Id: I0ade538e20f2a926b33c1637446c2d4f650cd13d
2017-03-14 11:10:17 +00:00
Logan V cc7c9249d4 Allow keystone module to ignore service catalog
When bootstrapping Keystone it is sometimes useful to ignore the
service catalog and contact a specific Keystone instance.

Change-Id: I6ecfc422b0e8a7a5fadea08389c1268009ac7f2a
2017-02-25 21:28:44 -06:00
Jimmy McCrory 14d2727c04 Remove quotes when assigning values from an openrc
The magnum and neutron modules parse an openrc file and create key-value
pairs by literally assigning the key to anything in front of an '=' and
the value to everything after an '='. If the value is surrounded by
quotes, do not include them.

Depends-On: I4b1e7b5cb83061ea35108db545fdfa33cef037a5
Change-Id: Ib44d9fa63332286fe4e51bd818f80b5989815988
2017-02-14 16:19:41 -08:00
Bjoern Teipel ab176bbe0d Implementation Neutron SR-IOV
This change adds the new attribute
``sriov_host_interface`` in order to map ml2 network
names to physical SR-IOV capable network interfaces.

Co-Authored-By: James Denton <james.denton@rackspace.com>

Change-Id: Ia62725e2369f75000157e0ab2c3f858e61fef10d
Closes-Bug: #1653283
2017-01-09 11:12:05 -06:00
Logan V 800ef36999 Revert "Remove neutron library"
Using the upstream library breaks the ability to test network plugins
that use 'local' neutron networks (ie. calico).

https://github.com/ansible/ansible-modules-core/issues/5589

This reverts commit 38b899b63b.

Change-Id: I8a33db524c24324dc2af8463a43cb145f7cc34d6
2016-11-12 17:12:48 -06:00
Jimmy McCrory 0af898835a Remove glance library
With the use of this library replaced by upstream Ansible modules it's
no longer necessary to carry it.

Closes-Bug: 1538642

Change-Id: I55591132180eec99ce9b9bc38caa996b01d18949
Depends-On: Ic98613c37069ccb2ec1bc9a7644c922cc5b37e22
Depends-On: I017303e9a731ebc60315ea1784ba184a8294b08e
Depends-On: If0e36c61307056c8786c67b60fd56b03f2ad7bda
2016-11-11 09:19:45 -08:00
Jimmy McCrory 38b899b63b Remove neutron library
With the use of this library replaced by upstream Ansible modules it's
no longer necessary to carry it.

Change-Id: Iedc9c18a457eb2b620538c693337860b80a85123
Depends-On: I8c165531407c6b6aa8e5910cb28ae610b53e2ee5
2016-11-04 10:45:56 -07:00
Jenkins a90b10572e Merge "Remove xrange for run both Python 2 and Python 3" 2016-10-12 18:24:40 +00:00
Andy McCrae 6b5a7d942d Add get_networks command to neutron library
get_networks will return network information, and will fail if the
specified "net_name" network is not present.
If no "net_name" is specified the network information will be
returned without performing the check on the existence of "net_name"
network within neutron.

Change-Id: I01775c9b29e312cc6696ffdc708befc46d11bf52
2016-10-12 13:28:09 +00:00
Luong Anh Tuan 831103935b Remove xrange for run both Python 2 and Python 3
In python 3, range() does what xrange() used to do and xrange() does not
exist. If you want to write code that will run on both Python 2 and
Python 3, you can't use xrange().

range() can actually be faster in some cases - eg. if iterating over the
same sequence multiple times. xrange() has to reconstruct the integer
object every time, but range() will have real integer objects.
(It will always perform worse in terms of memory however)

xrange() isn't usable in all cases where a real list is needed.
For instance, it doesn't support slices, or any list methods.

Change-Id: I033289359882c08185d59d13fa0b994c4566185a
2016-10-12 12:39:30 +07:00
Jenkins 334604c209 Merge "Adding Magnum plugin" 2016-10-03 16:54:10 +00:00
Chris Hultin 18bbe27c1a Adding Magnum plugin
Adding Magnum plugin with support for creating, updating,
and deleting Cluster Templates

Change-Id: I6e158001acf9b6d6f924a5459142ee87eba09ff2
2016-09-30 10:29:08 -05:00
Gaudenz Steinlin 963d11713e Support more than one flat network
The existing logic only parsed the first flat network, but having
multiple flat networks is perfectly legal.

Change-Id: I15a17aa8f72d177c5afba3d34ee978e3fe576a67
2016-09-28 14:39:10 +02:00
Kevin Carter 80beba88da Add option to toggle list extensions
By default a list item in a JSON or YAML format will extend if a its already
defined in the target template and a config_override using a list is being set
for the existing "key".

This change allows that functionality to be toggled on or off. The boolean
option to enable list extension is ``list_extend``.

To maintain the API this feature will remain True by default.

Co-Authored-By: Travis Truman <travis_truman@cable.comcast.com>
Change-Id: I97e06aef2cc778f048f3d6863fe61d10eddb8602
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-09 16:15:00 -05:00
Jimmy McCrory f974f7a0cd Deserialize glance image_properties
Glance requires that the passed image properties be an iterable
dictionary.

Update the documented example to use YAML's syntax for a dictionary
instead of a JSON string. The resulting string will be deserialized
to a Python dict.

Change-Id: I2f02a4e772398d0c133d3109058d55c4f96b72f7
2016-09-06 14:02:43 -07:00
Kevin Carter c7b7169c79
Update dist-sort module for better effectiveness
The dist-sort module has been updated to ensure its execution
is effective, fast, and nonintrusive. There are cases where
the rounds made by the module take an excessive amount of time
to complete. This change ensures that the module is limiting its
rounds to a known index and the iterable is processed using a
generator.

Change-Id: I03d1f70cb6cd17f38ef37b4d8371a8982beca29e
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-07-20 08:43:01 -05:00
Jimmy McCrory 7d059fdc00 Optionally include image properties
Since glance image_properties is not a required argument, only attempt
to include it in the glance image create options when it's provided.

Change-Id: Ia4b27e1f3b433ac0efa89a1794c81f9c522093fb
2016-06-11 22:17:43 -05:00
Chris Hultin 7d534a4e8d Adding ability to set 'properties' via Glance
The 'Glance' plugin lacked the ability to set properties
on the images that were created via the plugin.  This patch
adds that ability.

Change-Id: If2c73050ed8335b3a22b79bb7ce28189de046427
2016-06-10 15:55:18 +00:00
Jimmy McCrory a72d40ef8a Provide type for boolean module parameters
Instead of inserting 'True' and 'False' into Ansible's BOOLEANS
constants, designate the parameters as a 'bool' type.
ansible.module_utils.basic will downcase and handle ensuring the
variables are cast to booleans.

Change-Id: I2fc70a90df5cca76b49fc21adee59350173157d9
2016-05-31 14:12:11 -07:00
Jenkins e8dec55732 Merge "Support users without projects in keystone library" 2016-05-18 09:06:01 +00:00
Jenkins b9c74c197b Merge "Bring delete and update functions to keystone module" 2016-05-17 22:30:22 +00:00
Jean-Philippe Evrard 58d9d83c40 Bring delete and update functions to keystone module
This commit adds "state" parameter in the keystone module for
its ensure_endpoint command.

This is the state parameter behavior:
- When not set or set to present, it will ensure the endpoint
  with the URL given will be present in keystone

- When set to update, it will ensure that the same kind of
  endpoint gets its url changed if it was different. If there
  was no endpoint of the same kind, the module will create the
  endpoint

- When set to absent, the module will delete the endpoint with
  the given url.

Closes-Bug: #1426191
Change-Id: Ie5e715d02f2d5fb96ceeb2c3e368090aa4702599
2016-05-17 19:57:13 +00:00
Jimmy McCrory 07d600dcff Support users without projects in keystone library
Update the ensure_user, ensure_user_role, and ensure_group_role commands
and dependent functions to allow creation of and role assignment to a
user without specifying a project.
This will allow use of the keystone library for creating users, such as
the heat stack admin, within only a domain.

Since a role can only get granted to either a project or domain at one
time, only attempt to grant the role within the project if both are
provided.

Notifications of state changes for the ensure role commands have also
been fixed.

Partial-Bug: 1579612
Change-Id: I6a132e5407c9881a047037b85bd6e25b85c0d8a1
2016-05-11 19:33:39 +00:00
Jesse Pretorius (odyssey4me) f975da26ce Revert "Support users without projects in keystone library"
In the os_keystone role, the 'Ensure Keystone user to Admin role'
this patch causes 'keystoneclient.exceptions.ValidationError:
Specify either a domain or project, not both'.

This reverts commit 2e1492a127.

Change-Id: I8784d4213e297fd78477b54b21c47f4c5223bb1e
2016-05-11 13:04:39 +00:00
Jimmy McCrory 2e1492a127 Support users without projects in keystone library
Update the ensure_user and ensure_user_role commands and dependent
functions to allow creation of and role assignment to a user without
specifying a project.

This will allow use of the keystone library for creating users, such as
the heat stack admin, within only a domain.

Partial-Bug: 1579612
Change-Id: I0e4c51e772f61d4879716b7b5dbe5c8211cea901
2016-05-10 13:34:49 -07:00
Gabor Lekeny dce1b35de9 Add user and project login domains to keystone
Added login_user_domain_name and login_project_domain_name parameters to
keystone module.

Closes-Bug: #1574000

Change-Id: I29524ac9dad063c266122ecee09563531217974c
Signed-off-by: Gabor Lekeny <gabor.lekeny@ericsson.com>
2016-05-03 07:34:54 +00:00