This adds defined anchor points for external modules to hook into the
software install, config and service dependency chain. This allows
external modules to manage software installation (virtualenv,
containers, etc) and service management (pacemaker) without needing rely
on resources that may change or be renamed.
Change-Id: If683fbd098e701a3c4da91941cf818b18b41b209
This patch removes File resources which should be delivered by packaging
tools. These resources (files, directories, modes, users, and group
attributes) could be in conflict with different OS packaging systems
which isn't a desired result.
Co-Authored-By: Ivan Berezovskiy <iberezovskiy@mirantis.com>
Closes-Bug: #1458915
Change-Id: I02fe8cc99dcd56e16ac66136a0da244a1eeb630b
Some distros (RHEL based) have a single glance package. On those
distros the ensure_package/autorequire stuff doesn't quite work
correctly as per the type code it is assumed two packages 'glance-api'
and 'glance-registry'
This commit makes sure that on RHEL based distros type only autorequire
'openstack-glance' while on other distros it correctly autorequire
'glance-api' and 'glance-registry'
Change-Id: I17c84b2282beadaec80f4db42fa5696b7967159f
Closes-bug: #1493442
Co-Authored-By: Yanis Guenane <yguenane@redhat.com>
when having a controller node with several modules that use puppet-openstacklib
the package python-openstackclient is already declared. because openstacklib
adds the tag 'openstack' to the resource, we have to do it here to. otherwise
ensure_resource does not recognize it and we have a duplicate declaration
for the package.
Change-Id: Icf341ea92764f2ddb60b0e7ace09a56febe59545
Closes-Bug: #1483663
In order to be able to take an action after all the packages of the
module have been installed/updated or all the services have been
started/restarted, we set a 'glance-package' and 'glance-service'
tag for each package and service of this module.
At the moment, there is a generic openstack tag that is not specific
enough if one wants to take action upon a single module change.
Use case :
If an action needs to be taken after all the packages have been
installed or updated : Package <| tag == 'glance-package' |> -> X
Change-Id: If43e27e80500deebf6b758b11541d3d6f50cb129
This patch changes the glance_image provider to use
puppet-openstacklib's authentication methods, which use
python-openstackclient as an interface, instead of the glance command
line client. The benefits of this is:
- Code reduction. This patch reduces the amount of code in the
glance parent provider and glance_image provider by reusing code from
Puppet::Provider::Openstack instead of implementing authentication,
retries, and response parsing in the provider.
- Presumed reduction in sudden API changes that require quick fixes in
this module, such as f377c0229c006b02f43a14be4979553e983cb98e.
- Ability to set project-based access control for images
Additional reasoning for this change is in the blueprint.
Important note: this change does not work on Ubuntu under Juno due to a
major bug in the version of python-openstackclient shipped in UCA [1].
This change targets the Kilo releases.
Note about performance: the self.instances and instances methods make
API requests for each image found in the list of instances. This is not
a change from how this was implemented before. The --long formatted
list, either from the glance client or openstackclient, does not
provide all information needed to query an instance and populate
setters. Future patches could possibly improve on this.
Other details of this change:
- Removes auth_glance method, replaced by the request and
glance_request methods
- Removes auth_glance_stdin method which was not being used
- Removes parse_table which is now unnecessary because openstackclient
formats its responses as CSV and Puppet::Provider::Openstack#request
returns the results a hash
- Removes remove_warnings methods which are handled by
Puppet::Provider::Openstack#request
- Removes list_glance_images and get_glance_image_attr which are
sufficiently replaced by using the 'list' and 'show' commands with
Puppet::Provider::Openstack's request method.
- Removed self.prefetch since we can't populate auth parameters during
a prefetch. Instead we prepopulate the list via the instances method.
- Added a flush method to do updates more efficiently
- Changed is_public property to accept true/false in addition to yes/no
and to munge to a symbol instead of a capitalized string, for
consistency with keystone_tenant's enabled property
- Move the reset method into the spec tests since it is only necessary
for testing
- Added tests for glance_image, which did not exist before
- Removed connection retry test since this is taken care of in
openstacklib
[1] https://bugs.launchpad.net/python-openstackclient/+bug/1269821
blueprint use-openstackclient-in-module-resources
Change-Id: Iceab5e1c6138e7aba0f883ed4acb8f7ecbcd2830
Due to a patch in RDO packaging, puppet-glance is broken for RHEL platforms.
This reverts commit 5f15e05704b2e549b8fab1c643a6ee743a0e92f4.
Change-Id: I7ba146714d1b0e8d461c556eff5a9f8c4ad9627f
Starting in Kilo, Red Hat-based platforms are using separate
glance-api and glance-registry packages (for an example, see
http://trunk.rdoproject.org/f21/current/).
Change-Id: I3ad476846d7dec3ca612e5b0d20b21b8577f4af0
Add puppet parameters lint (with puppet-lint-param-docs gem) and fix
missing documentations, this commit also fix metadata.json file (SPDX
license, and open dependencies).
Change-Id: I0d590b930a8d0263c3a74d861b9786770be7d183
This changes the puppet-lint requirement to 1.1.x, so that we can use
puppet-lint plugins. Most of these plugins are for 4.x compat, but some
just catch common errors.
Change-Id: I3d21236d5bf3b0b6c625e38e20492d35aaa13307
on Debian plattforms there are separate packages
for glance registry and glance api. This allows
you to install api/registry on different servers.
If the packages for registry and api are the same,
(as it is the case for RedHat plattform)
the package is installed in ::glance class.
If the packages differs (as for Debian plattform),
installation of packages is done in
registry/api classes.
Additionaly this patch adds a test for unsupported
plattforms.
Change-Id: I8d4b74e8c8ad2dd7e6e2ad175326f36ff818c108
Previously, I was trying to configure the auth context
based on the auth type.
After receiving feedback that these sections from auth context
should not be configured, I have refactored this code to remove
this configuration.
This commit adds a class parameter to specify
what the ensure state of the glance package should
be.
This parameter has been added to allow a user to
specufy rather or not glance should be upgraded.