This change updates the module to use the rspec-puppet-facts as defined
in the puppet-openstack_spec_helper.
Change-Id: I417934616be717d1b357bf8c16a029b75f439c2b
This patch changes the nova providers to use puppet-openstacklib's
authentication methods, which use python-openstackclient as an interface,
instead of the nova command line client.
The benefits of this is a code reduction. This patch reduces the amount
of code in the nova parent provider and nova providers by reusing code from
Puppet::Provider::Openstack instead of implementing authentication,
retries, and response parsing in the provider.
This patch doesn't affect next providers:
* nova_network and nova_floating:
openstack client has small functionality for managing nova floatings
and doesn't provide possibility to manage nova-networks,
so keeping old format of auth for this providers.
Also Nova-Network is deprecated.
* nova_cell:
openstack client doesn't provide possibility to manage cells;
* nova security groups - will be done in separate patch;
Additional reasoning for this change is in the blueprint.
Also added new tests for providers.
blueprint use-openstackclient-in-module-resources
Change-Id: Ifa09aeb71ba0bcc425eece314803a0d1609bed9f
mock is not used anywhere in the module, let's drop it.
This patch will help to hit this bug:
https://launchpad.net/bugs/1492636
Change-Id: I2e7f4fafded59db7e4810d943f6de68394e9c98e
* Add puppet-openstack_spec_helper to Gemfile
* Use puppet-openstack_spec_helper/defaults in spec_helper
* Delete spec/defaults.rb, useless now
Change-Id: I8110efa360070060d3321dbf05b69f0756891dcc
This change adds the rspec-puppet-facts gem to the spec helper so that
we can centralize the management of the base operating systems that we
support. rspec-puppet-facts allows us to simplify our unit tests and
provides a more complete list of Operating Systems and their associated
facts for the unit tests. With this change we can now loop over and
test CentOS, Debian, Fedora, RedHat, and Ubuntu by simply providing a
list of supported os to rspec-puppet-facts.
Additionally this change includes a central object for managing our
supported os list for rspec-puppet-facts and providing our default facts
like os_service_default. This central object should replace the usage of
@default_facts within the unit tests for each module.
Change-Id: I5e91cec849886e5320e1e2a264af66c5b8bfe95c
Switch Nova to use $::os_service_default
Change logging.pp, db.pp and tests.
Change-Id: I928a93534c6d27c020b7afb5b7dda32c379e9d62
Related-bug: #1515273
This patch is the initial modulesync run, it impacts:
* gitignore: just a sync between projects
* gemfile:
- update and allow to setup facter version and gem source
- split beaker gems with a dedicated group
- switch to rspec-puppet 2.2.0
* rakefile:
- use the new syntax for lint configuration
- add a acceptance target
* acceptance:
- sync nodesets
* spec: added rspec coverage report
Change-Id: If5a69a08a8599acb66cf97d2f1d1b1610ea67a82
- This checks which Puppet resources have been explicitly checked as
part of the current test run and outputs both a coverage percentage
and a list of untouched resources.
Change-Id: Ie273f5e4f3bbeb8dac52ab8ba5f09c5145a231c1
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
Bring nova-cells support into puppet-nova.
Cells is a feature introduced in Grizzly and improved in Havana.
This patch configures nodes to be part of a parent or child
cell.
It also adds "it_configures" in spec_helper.
Work in progress: do not merge.
Implements: blueprint cells-support
Change-Id: I10b6a0080cfbefeddf6a19fc661a3ddfaf3da218
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
* Automatically populate fixtures directory on spec runs
* Avoid duplicating spec_helper and Rakefile between modules
* Prepend fixtures to modulepath instead of overriding
* Remove recursive symlink in fixtures dir
In Debian/Ubuntu, the 'nova' user is now created as a system user, which
makes sense.
The 'nova' user created in the 'nova' class is not created as a system
user and is created before the 'nova-common' package is installed and
prevents the installation of the package.
So, require the package to be installed before puppet checks the user
existence and create the 'nova' user as a system user.
Signed-off-by: François Charlier <francois.charlier@enovance.com>