Commit Graph

32 Commits

Author SHA1 Message Date
Takashi Kajinami 2f23343e4f Use static name for package resource
... instead of using the actual package name. This helps users to
identify the resource name more easily.

Change-Id: Icc6a27685f3b3747b4e0562eb8066aa3cce5516c
2023-03-20 00:47:47 +09:00
Takashi Kajinami 11599ba429 Remove support for glance-registry service
This patch removes support for glance-registry service, because it has
been removed from glance [1].
 [1] https://review.opendev.org/#/c/738671/

Change-Id: Id05f736dbbddaff2cb90aa6678c777b9a0318e40
2020-07-28 19:41:10 +09:00
Tobias Urdin f919b6012f Change to relative include
Change-Id: Ia74bb7c58f4f2c303e0226733b53503c93dea5c7
2020-07-13 21:19:42 +02:00
Tobias Urdin ed9298e996 Convert all class usage to relative names
Change-Id: I9ff8d888e367a46ab89e3668bf4ba76c4c7c127c
2019-12-08 23:06:03 +01:00
Clayton O'Neill 18b010975c Add hooks for external install & svc management
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
2016-06-17 13:17:34 +00:00
Drew Fisher 637f986252 Remove POSIX users, groups, and file modes.
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
2016-03-08 15:48:10 +02:00
Matt Fischer e7a4604613 Let openstacklib manage openstackclient
No need to duplicate resources, let openstacklib manage the client.

Change-Id: I6c530e9e821c6a92ea5310ffeb8a4e42f067060c
2015-12-08 15:33:15 +00:00
Dan Prince bce0eac01c Autorequire correct package based on the distro
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>
2015-09-09 12:37:30 +02:00
Benedikt von St. Vieth 7128d96dde solve duplicate declaration issue for python-openstackclient
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
2015-08-13 19:03:37 +02:00
Jenkins 578252b066 Merge "Use OpenstackClient for glance_image auth" 2015-08-07 17:47:22 +00:00
Yanis Guenane 92180ae9a1 Add tag to package and service resources
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
2015-07-22 20:05:30 +02:00
Colleen Murphy 39b58df7a8 Use OpenstackClient for glance_image auth
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 f377c0229c.
- 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
2015-06-29 17:35:23 -07:00
Emilien Macchi 876e857b29 Revert "Separate api and registry packages for Red Hat"
Due to a patch in RDO packaging, puppet-glance is broken for RHEL platforms.

This reverts commit 5f15e05704.

Change-Id: I7ba146714d1b0e8d461c556eff5a9f8c4ad9627f
2015-04-17 13:37:04 +00:00
Javier Pena 5f15e05704 Separate api and registry packages for Red Hat
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
2015-04-10 18:07:12 +02:00
Matt Fischer 81a9c1acb1 Fix API/Registry ensure for Ubuntu
On Ubuntu the API and Registry are separate packages so we need an
package_ensure for each.

Change-Id: I02dcca223f57392e7b4c82806a2c0d48d301d4aa
2015-04-10 08:29:43 -06:00
Sebastien Badia 0d83409381 Fix lint issues (doc, metadata, manifests)
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
2015-02-23 01:29:11 +01:00
Jenkins 9a4568c361 Merge "Add Puppet 4.x lint checks" 2015-02-12 16:28:56 +00:00
Clayton O'Neill d72e768a10 Add Puppet 4.x lint checks
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
2015-02-09 17:02:48 +00:00
Matt Fischer cbf3326184 Add openstack tag to glance packages
Change-Id: Ifbc41027c11f62342397d7e60e71080336c3418e
Partial-Bug: #1391209
2015-02-05 15:20:18 +00:00
Clayton O'Neill 81f5841260 Fix typo
Change-Id: I7aa1918c481e842bc7d555f87dda7eb78b003483
2015-01-07 08:00:59 -05:00
Benedikt Trefzer 394661ec4a support separate registry/api packages
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
2014-04-15 21:50:35 +02:00
Logan McNaughton 86868bd15c Fix some puppet lint warnings.
Puppet-lint likes the ensure's to come first.

Change-Id: I9ecd8213c140e51769258c03038082fb98a2bd34
2013-08-09 16:44:47 +00:00
Dan Bode a9f0d034c6 update docs 2012-10-31 16:03:06 -07:00
Dan Bode ceb41af5fc Remove explicit management of python-migrate
This should be handled by the package managed.
2012-04-09 10:11:25 -07:00
Dan Bode fdbf846d15 Refactor api-ini config files
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.
2012-04-05 09:28:55 -07:00
Derek Higgins f6a9d5c22c fix typo 2012-03-21 15:01:48 +00:00
Dan Bode 7c6d5405fd Add python migrate dependency 2012-03-19 22:54:43 -07:00
Dan Bode 2167074954 Add fedora support for glance
This commit adds fedora support for glance
2012-03-18 11:57:04 -07:00
Dan Bode c273426619 Style update
This commit includes a style update based on
reports from puppet-lint.
2012-03-13 15:20:12 -07:00
Dan Bode 7ba954f324 Add $ to glance package_ensure
This commit fixes a type where the $ was ommitted to
the class parameters package_ensure for the glance class.
2012-03-13 15:08:56 -07:00
Dan Bode 2bf87bcc2f (#11693) Add package_ensure param to glance class
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.
2012-01-03 11:24:43 -08:00
Dan Bode 70c652874d initial commit for glance.
This code was contributed by Chris Blumentritt <cblument@gmail.com>
2011-06-14 17:55:48 -07:00