Commit Graph

25 Commits

Author SHA1 Message Date
Takashi Kajinami 06e65b5fee Use core provider implementation to look up keystone resources
... so that the credentials in clouds.yaml file can be used if
available instead of openrc.

Also, the transformation from project name to project uuid is still
needed so the transform_to method has been undeprecated.

Change-Id: I0e0d42d92e8272f3f7faf809e07e599805bbedaa
2023-11-18 15:07:10 +00:00
Takashi Kajinami 3cad74dac3 Remove unused functions from base provider
These functions in the base provider has been unused.

Change-Id: I265ddb8236335abfabc01abd30eafaa2cda6712d
2023-11-16 14:54:29 +00:00
Takashi Kajinami 2985cdc613 Fix wrong conversion from project name to uuid
The transform_to => 'project_uuid' should transform a value between
the following two formats.
 <project name>  <=>  AUTH_<project uuid>

However the existing logic adds unnecessary AUTH_ prefix when
transforming the uuid format back to a project name.

This removes the wrong AUTH_ prefix so that the value is transformed
back to the original value.

Change-Id: I2cba1d06d0c9f18ae2a9679592f3f95c82868a90
2023-11-16 23:52:55 +09:00
Takashi Kajinami 9207422cf3 Remove deprecated network name parameters
These were deprecated during an old cycle[1].

[1] 0a3af34213

Change-Id: I2f91bbc26709a9188478d866f3875bd8ca6317d3
2023-08-06 18:48:16 +09:00
Thomas Goirand 73b91cf53b Add support for ironic_api_uwsgi_config in Debian
This patch is adding the configuration of the number of workers,
threads, and the size of the listen queue in Debian, which uses
uwsgi to run Ironic API. Therefore, this patch adds a new
ironic_api_uwsgi_config provider as well as a new
ironic::wsgi::uwsgi class.

Change-Id: Ib9a98bd26e1f970bb00efadb59b4d9b5b731bdaa
2023-03-22 23:17:09 +09:00
Takashi Kajinami c4c5372851 Remove wrong TODO comment
The IPAddr.new().prefix function does not work as intended. This change
removes the TODO comment to use the function because we can't really
replace the current implementation by that built-in feature.

irb(main):001:0> IPAddr.new('ffff:ffff:ffff:ffff::').to_i.to_s(2).count("1")
=> 64
irb(main):002:0> IPAddr.new('ffff:ffff:ffff:ffff::').prefix
=> 128

Change-Id: I07a340e1716f6ab8db718b89bf4535f989df7929
2022-08-25 10:37:18 +09:00
Takashi Kajinami 0a3af34213 ironic_config: Deprecate transfomers
... because all parameters using these transformers have been
deprecated.

Change-Id: I0893e3765515e96d90cc5e0dc85aa94254f5f886
2022-02-12 23:56:21 +09:00
Takashi Kajinami ecdeb8f365 Add support for MultiStrOpt (inspector)
This replaces the provider implementation of ironic_inspector_config
type so that MultiStrOpt, which is used by several options like
 - oslo_policy/policy_dirs
are handled correctly.

The same was already implemented for ironic_config by [1].

[1] 0f4a5263a7

Change-Id: If032600c34394f9f0f3686971082aafeab9be3ea
2021-11-02 09:06:53 +09:00
Takashi Kajinami 889fc86298 Clean up parameter/resource to manage api-paste.ini
This change removes the remaining parameter and resource to manage
api-paste.ini, which were deprecated during the previous cycle[1].
Ironic doesn't rely on the paste deploy mechanism and these
implementations have never been used actually.

[1] 7f88e87fe8
Change-Id: I15e4a1368a5e0606ad2b1fb05a2ce4dc399e9c3b
2021-10-15 11:28:22 +09:00
Takashi Kajinami 7f88e87fe8 Deprecate invalid ironic_api_paste_ini
Ironic has never used api-paste.ini but defines pipeline in code.
The ironic_api_paste_ini resource type to manage api-paste.ini is
deprecated because the resource is just invalid.

Change-Id: I5fc1d691642f184b6fdd4bfcba5314b3ea11b583
2021-08-11 14:47:26 +09:00
Takashi Kajinami 0f4a5263a7 Add support for MultiStrOpt
This replaces the provider implementation of ironic_config type so that
MultiStrOpt, which is used by several options like
 - oslo_messaging_notifications/driver
 - oslo_policy/policy_dirs
are handled correctly.

Change-Id: Icbc4d60d2538317c05ff5760359b45327abfb533
2021-07-13 18:17:12 +09:00
Takashi Kajinami 2e1a3d0647 Use anchor to require necessary packages
... so that correct packages are required without re-defining them in
resource implementations.

Change-Id: I274e2aa28648f1c875d1f43b26a2afc1e65ee3bc
2020-05-04 03:04:16 +09:00
Harald Jensås 15eedd0c4c Fix Inspector dnsmasq config for IPv6
Extend and re-name the function ipv6_netmask_to_prefix() to
ipv6_normalize_dnsmasq_ip_subnets(). It now changes the netmask
to prefix and removes the 'gateway' if it is an IPv6 subnet.

On IPv6 router info should be provided in router advertisements.
There was a draft to add support in DHCPv6, but it was never
completed.
https://datatracker.ietf.org/doc/draft-ietf-mif-dhcpv6-route-option/

Also:
  Add match for userclass iPXE and set option6:bootfile-url

Closes-Bug: #1844573
Change-Id: I47d88519acd18630e0d5682d93f1088771ec03a1
2019-09-27 20:20:13 +02:00
Harald Jensås 7b6b097d8a Convert ipv6 netmask to prefix in dnsmasq.conf
dnsmasq.conf require a prefix lenght as netmask for IPv6.
Convert a IPv6 address netmask to prefix.

Closes-Bug: #1828837
Change-Id: Idf84ba30eb4eb6d202faa470209f10c9da40e80b
2019-05-16 14:46:30 +02:00
Matthias Bastian f505d6fc8b Make providers use auth_url for authentication
When reading credentials from the configuration's keystone_authtoken
section www_authenticate_uri was used as URL for Keystone.
As www_authenticate_uri is a public endpoint that is not necessarily
reachable for the Puppet agent, this change uses the more appropriate
auth_url as Keystone URL.

Change-Id: Ie40e48d0ccd83657de753f92cd8c0018baf8ef8d
2018-08-03 12:01:58 +02:00
ZhongShengping 4b6e556d89 Deprecate auth_uri option
Option auth_uri from group keystone_authtoken is deprecated[1].
Use option www_authenticate_uri from group keystone_authtoken.

[1]https://review.openstack.org/#/c/508522/

Change-Id: I1cd487e845adc0f53d970bf916385fdaf2c32022
Closes-Bug: #1759098
2018-04-05 10:54:06 +08:00
Vasyl Saienko 5736ebba4c Add ability to translate swift account project name to UUID
This patch adds ability to translate swift account project name to UUID and update
glance/swift_account option in the following format 'AUTH_uuid'.

By either calling ironic_config directly:

  ironic_config {
    'glance/swift_account': value => 'swift_account_project_name', transform_to => 'project_uuid'
  }

or by defining ::ironic::glance class:

  class{'::ironic::glance':
    swift_account_project_name => 'project_name'
  }

Change-Id: I1df2e069b7922f64c0971551bf57d7c06bd318e2
2017-03-28 10:04:19 +03:00
Vasyl Saienko 8a80e6fb46 Add ability to translate net name to UUID
This patch adds ability to translate network name to UUID when
setting options in ironic_config.

For example to translate network name to uuid for provision_network,
cleaning_network:

ironic_config {
  'neutron/cleaning_network': value => 'baremetal', transform_to => 'net_uuid';
  'neutron/provisioning_network': value => 'baremetal', transform_to => 'net_uuid';
}

or by defining ::ironic::conductor class with the following variables:

class {'::ironic::conductor':
  cleaning_network_name     => 'cleaning_network',
  provisioning_network_name => 'provisioning_network'
}

Change-Id: I7ee49c6fec7fcbddbd06e401272e83325c8fdc73
2017-03-27 10:45:11 +03:00
iberezovskiy eef5b11679 Configure keystone authtoken options
Add ironic api and inspector authtoken classes to
configure keystone authtoken related parameters.
Unit tests are updated accordingly.

Deprecate some parameters in api and inspectore classes:
  - ironic::api|inspector::admin_tenant_name is deprecated
    in favor of ironic::api|inspector::authtoken::project_name.
  - ironic::api|inspector::admin_user is deprecated
    in favor of ironic::api|inspector::authtoken::username.
  - ironic::api|inspector::admin_password is deprecated
    in favor of ironic::api|inspector::authtoken::password.
  - ironic::api|inspector::identity_uri is deprecated
    in favor of ironic::api|inspector::authtoken::auth_uri.
  - ironic::api|inspector::auth_uri is deprecated
    in favor of ironic::api|inspector::authtoken::auth_uri.
  - ironic::api::memcached_servers is deprecated
    in favor of ironic::api::authtoken::memcached_servers.

Closes-bug: #1604463

Change-Id: Idcb9557ab0b42b2a0dba7cf2ab6a5ccf52dd1d23
2016-08-18 13:43:10 +03:00
ZhongShengping a70ee4fb7e Add api_paste type/provider for Ironic
Add ironic_api_paste_ini type/provider for Ironic.
Also add the capability to configure api-paste.ini with config.pp.
Closes-bug: #1483371

Change-Id: I0a5ba71e577b87ad469fd624a73033a1a8ea6b82
2016-02-16 09:23:11 +08:00
John Trowbridge 0358830fa7 Add ironic-inspector support
Add the ability to configure the ironic-inspector service
for doing introspection of bare metal nodes.

Closes-Bug: 1486197
Change-Id: I9b2917a2c3f6afe75dc295c81d09f7a12856007f
2015-10-06 09:17:41 -04:00
Yanis Guenane bb1bab5b28 Reflect provider change in puppet-openstacklib
With the creation of the new openstack_config provider, some processing
that was done in ironic_config has been centralized in
openstack_config.

Impacted methods are :

  * section
  * setting
  * separator

Also, this commit adds the fact that, when passing a specific string
(ensure_absent_val) the provider will behave as if ensure => absent was
specified. '<SERVICE DEFAULT>' is the default value for
ensure_absent_val.

The use case is the following :

ironic_config { 'DEFAULT/foo' : value => 'bar' } # will work as usual

ironic_config { 'DEFAULT/foo' : value => '<SERVICE DEFAULT>' } # will mean absent

That means that all the current :

if $myvar {
  ironic_config { 'DEFAULT/foo' : value => $myvar }
} else {
  ironic_config { 'DEFAULT/foo' : ensure => absent }
}

can be removed in favor of :

ironic_config { 'DEFAULT/foo' : value => $myvar }

If for any reason '<SERVICE DEFAULT>' turns out to be a valid value for
a specific parameter. One could by pass that doing the following :

ironic_config { 'DEFAULT/foo' : value => '<SERVICE DEFAULT>',
ensure_absent_val => 'foo' }

Change-Id: I35ddb5c9f90cb5c65ceca64abf1c4881e4216554
Depends-On: I0eeebde3aac2662cc7e69bfad7f8d2481463a218
2015-08-19 11:02:55 +02:00
Yanis Guenane 69fa700138 Rely on autorequire for config resource ordering
Currently we specify the ordering of config resources wherever it is
necessary based on the presence of the file it will write to, or the
presence of the package in charge of providing the file it will write
to.

Those kind of ordering can be specified directly at the resource level
using the autorequire mechanism. With this patch, any config resource
will make sure the package in charge of providing the file will be
installed first.

Change-Id: I121f3cf146d9909cd549bd2e252f8cc645e5a030
2015-08-12 19:07:12 +02:00
Emilien Macchi 65faf63162 API, Conductor, Drivers, Specs
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
2013-11-30 01:08:04 +01:00
Emilien Macchi e5b4e458ab First commit with basic manifests
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
2013-11-25 20:59:48 +01:00