Move defaults.rb to openstack spec helper

This change is to add the defaults.rb to the openstack spec helper so we
have a single place that can be referenced by all the modules to provide
our default facts.

Change-Id: I0e103b1782b02f22f6f9c37658da1e386312a27d
This commit is contained in:
Alex Schultz
2016-01-13 14:29:08 -07:00
parent de2638066e
commit 6ca122ed4d

View File

@@ -0,0 +1,22 @@
# This file contains a module to return a default set of facts and supported
# operating systems for the tests in this module.
module OSDefaults
def self.get_facts(extra_facts={})
{ :os_service_default => '<SERVICE DEFAULT>' }.merge(extra_facts)
end
def self.get_supported_os
[
{ 'operatingsystem' => 'CentOS',
'operatingsystemrelease' => [ '7.0' ] },
{ 'operatingsystem' => 'RedHat',
'operatingsystemrelease' => [ '7.0' ] },
{ 'operatingsystem' => 'Fedora',
'operatingsystemrelease' => [ '21', '22' ] },
{ 'operatingsystem' => 'Ubuntu',
'operatingsystemrelease' => [ '14.04' ] },
{ 'operatingsystem' => 'Debian',
'operatingsystemrelease' => [ '7', '8' ] }
]
end
end