... to avoid redundant parsing of json content from a given string.
This also allows us to add more strict validation later using Struct
data type.
Change-Id: I2a8bbd266d5e97a06b89c131bbd86e3710a68923
Drop support for string value and accept only hash values, to make
the interface consistent with cinder_* resources. This allows us to
avoid wrong interpretation of input values.
Change-Id: I29a79e4a66ce91647a216511213c2a59eb49c12b
The metadata property needs to be converted from the property field
value.
Also the hosts property need to be added after hosts are additionally
associated with the aggregate.
Change-Id: I9ad8334f2d2c1d01e42b4405e65da68939bd5c8d
openstackclient 4.0.0 was released long time ago. Drop the code
maintained for support quite old versions.
Change-Id: I14610a852804c8e83d0e7c9a623fa721ba514dcc
Fix the following error detected by puppet 8.
Munging failed for value true in class is_public: undefined method `=~'
for true:TrueClass ...
Change-Id: I7d078ea72c5c1c4898247f61422986f277ee9a98
Make sure that nova_flavor resource is idempotent when the "properties"
property is set. Also fix the typo causing undefined method error.
Closes-Bug: #2059949
Change-Id: I17a9d92c44b8dfe329b22b309d7a0408df707d1a
The uriescape function from puppetlabs-stdlib is no longer functional
in Puppet 8, because the URI.escape, which is internally used by that
function, is no longer available in Ruby 3+.
This replaces the function by own function to avoid the failure in
Puppet 8.
Closes-Bug: #2057860
Change-Id: I7b4db4c1e64416e20d8470cbff0b8497c6a0cfc9
Using credentials in keystone_authtoken options for nova_* resources
was deprecated some cycles ago[1].
[1] 0ed626e1461fecc4f443fcd543a99ba945539b1f
Change-Id: Iff2124f142791df8eb0be12ce134e32145bc209c
JSON does not allow usage of single quotes and require double quotes.
We have been converting single quotes to support such invalid usage but
that was deprecated a long ago[1].
This also simplifies the logic to handle aliases. Using undef results
in the value set to service default fact.
[1] 1cd349f893408803fec307f615ae3fe265d54fed
Change-Id: If1328531f33a9fe778091ce38b5c1f8072b473b8
This introduces the native resource type to manipulate qemu.conf, so
that we can define the resources in the same way for all libvirt
config files.
This also updates all libvirt config resource types to convert boolean
values automatically, because libvirt does not support raw boolean
values and the values should be converted to 1/0.
Change-Id: I562d19299e0377e02f2587f5ef36d35069b5a5cd
This is partial revert of 0ed626e1461fecc4f443fcd543a99ba945539b1f .
After discussing several problems caused by scope separation, we
decided to suspend implementing the scope enforcement and focus on
project personas like reader role. As the result of that decision,
the system admin persona will be removed, thus we should use
the project admin persona instead. The previous policy rules to allow
system scope access have been reverted by [1].
This does not revert the original patch to keep the unit tests which
were hugely refactored by that change.
[1] 066e1e69d1394839a9f0bde4ca8c3a0db2d52396
Change-Id: I85847850602ab3526d2fdb1a56bb927183198825
Currently we implement separate providers for all libvirt configuration
files but this is quite redundant because we have the same logic in
all providers.
This change refactors these providers makes use the libvirtd_config
provider used as the base implementation.
Change-Id: I486211306620d245262678875be3ec607640e921
... so that we users can use '<SERVICE DEFAULT>' similarly to
the resource types to manage the <service>.conf files.
Closes-Bug: #1981118
Change-Id: I4092da4732d5e68ce190e7341df7a01166954504
The novajoin[1] project has been unmaintained for last two years.
We deprecated support for the service during the previous cycle[2],
and no longer expect any user requires it.
[1] https://opendev.org/x/novajoin
[2] 70bb80f6d33a4c81a370cd051a4a47c5a2b2c88c
Change-Id: I8f21036de12d78ca25fddaf02399e4c38b490ed5
This change enforces usage of system scope credentials to manage
flavors, aggregates, and services, following the new policy rules for
SRBAC support in nova.
The logic to look up credential for the nova service user from
[keystone_authtoken] is left to keep backward compatibility but is
deprecated and will be removed.
Depends-on: https://review.opendev.org/806474
Depends-on: https://review.opendev.org/828025
Depends-on: https://review.opendev.org/828874
Change-Id: I71779f0f1459d64914589a94a440336386266306
The nova_flavor resource has been providing the project property which
accepts both project name and id. However this implementation results
in broken idempotency with project name used.
This change introduces a separate project_name property, so that users
can use project name with proper idempotency.
Closes-Bug: #1790795
Change-Id: Idee4af6931b8cf4a21d88f4cd38fe83468ec8efa
When a resource is created, the :ensure parameter should be set to
'present' so that exists returns true. In addition, the whole hash
should be cleared when a resource is deleted, otherwise subsequent
access might look up stale values. This change ensures property_hash is
updated in create/destroy accordingly.
This change also fixes the incorrect handling of "project" property
in nova_flavor which is causing unexpected update.
Finally, the ignored unit tests are fixed, to test the above fixes.
Change-Id: I611e3d0428674e7438fe15b276667f7b379d136e
Currently the project field shows a list of projects like;
project=['ec085e18-22bb-403b-8ba5-0f9c6d67dffa']
The commit 86764de9cd90b9b09898da6061aaa786906620df added the logic to
handle this format but it missed surrounding quote(') which should be
also removed.
Change-Id: If65221db5a9e60e797b834a305d385d3fea4db16
This change removes inefficient usage of autorequire, with the wrong
resource name(The resource name should include section name) in
some resource types. The necessary dependency is already enforced by
another autorequire which depends on service::end anchor.
Change-Id: I0993e2c9ed80d476ca984edf9d6167818a1cb1bb
The api-paste.ini accepts not only "=" but also ":" and some services
like Barbican have been using ":" for their default api-paste.ini
files.
[composite:main]
use = egg:Paste#urlmap
/: barbican_version
/v1: barbican-api-keystone
This change allows users to use ":" so that they can update the ini
files with keeping it consistent with the default fules
Depends-on: https://review.opendev.org/813614
Change-Id: I8ebe0c65b0e71380ba5a58a81b57e595e8dd29f8
This change enables support for modular libvirt
daemon configurations.
NOTE: As of now, this change doesn't handle any modular daemons
socket configuration.
Change-Id: I90c3dd7bd63f9f54e43eee7bc2f58d165ca80e57
The nova_security_group resource type and the nova_security_rule
resource type are dependent on subcommands of nova cli which were
already removed during Pike cycle[1][2]. This change removes these
invalid resource types.
Deprecation process is skipped because these resource types have not
worked as intended for a long period and we don't expect any user is
still using these invalid implementations.
[1] security group : a298b29cc7e6b7330945b1890f0a4bd4c9f3fde6
[2] security groip rules: 0896bdc52a307c0b9598da0b6b837a95f0c00b9a
Closes-Bug: #1941947
Change-Id: Ic72911bab169b0ab171a1701b6871a3d03f7951b
Some openstack installations use characters that are not in \w, the
old regex, now moved to string2hash was more permissible, and
there's probably no reason the regex in pythondict2hash can't be
just as permissible.
Change-Id: I35b964d96e6a558f1a10daa2391a398db60ea800
This change implements the quote parameter in libvirtd_config and
virtlogd_config, so that we can quote the value by that simple
parameter instead of implementing a logic in each manifests.
Also, with this change libvirtd_config and virtlogd_config supports
$::os_service_default, so that we can define absence of parameters more
easily.
Depends-on: https://review.opendev.org/792735
Change-Id: I3030ca34088019be932a9cc33344f7fb473a9aea
... because it was deprecated during the previous cycle and has been
useless since nova-network was removed.
Change-Id: If637debcd25b17183311e16e1bf5b76c453c634f
On each puppet run, I'm seeing:
value changed ['12'] to '12' (corrective)
Therefore, this patch switches from :openstackconfig to :ini_setting
to make runs indenpotant.
Change-Id: I2bd2a61263db8d7e54397ab85b4c51b79644adf2
The latest openstackclient doesn't show none but empty array([]) when
no access_project_ids is set for an flavor.
This change ensure that array format is properly handled to avoid
error during updating nova flavor using the nova_flavor resource.
Closes-Bug: #1924222
Change-Id: I976f70f1f4015536201c6c3acac3f1e4dbca4ccb
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 Nova API and api-metadata. Therefore, this patch adds
two new nova_api_uwsgi_config and nova_api_metadata_uwsgi_config
providers as well as two new nova::wsgi::uwsgi_api and
nova::wsgi::uwsgi_api_metadata classes.
Change-Id: Idd141edc5cddcfd79cf23e2041dbd1ce6a8252a8