Debian/Ubuntu: Add type validations to repo class
We haven't added any validations about these parameters but we inexplicitly required specific types. This adds type validations to avoid users from using wrong types. Change-Id: I672fe9a99598ce40614bdab783f98c441ded7e62
This commit is contained in:
@@ -41,14 +41,14 @@
|
||||
# Defaults to "http://${facts['os']['distro']['codename']}-${release}.debian.net/debian"
|
||||
#
|
||||
class openstack_extras::repo::debian::debian(
|
||||
$release = $::openstack_extras::repo::debian::params::release,
|
||||
$manage_deb = true,
|
||||
$package_require = false,
|
||||
$use_extrepo = true,
|
||||
String[1] $release = $::openstack_extras::repo::debian::params::release,
|
||||
Boolean $manage_deb = true,
|
||||
Boolean $package_require = false,
|
||||
Boolean $use_extrepo = true,
|
||||
# Below params only used if $use_extrepo is set to false
|
||||
$source_hash = {},
|
||||
$source_defaults = {},
|
||||
$deb_location = "http://${facts['os']['distro']['codename']}-${release}.debian.net/debian",
|
||||
Hash $source_hash = {},
|
||||
Hash $source_defaults = {},
|
||||
String[1] $deb_location = "http://${facts['os']['distro']['codename']}-${release}.debian.net/debian",
|
||||
) inherits openstack_extras::repo::debian::params {
|
||||
|
||||
$lowercase_release = downcase($release)
|
||||
|
||||
@@ -42,14 +42,15 @@
|
||||
# Defaults to $::openstack_extras::repo::debian::params::uca_location
|
||||
#
|
||||
class openstack_extras::repo::debian::ubuntu(
|
||||
$release = $::openstack_extras::repo::debian::params::release,
|
||||
$manage_uca = true,
|
||||
$repo = 'updates',
|
||||
$source_hash = {},
|
||||
$source_defaults = {},
|
||||
$package_require = false,
|
||||
$uca_location = $::openstack_extras::repo::debian::params::uca_location,
|
||||
String[1] $release = $::openstack_extras::repo::debian::params::release,
|
||||
Boolean $manage_uca = true,
|
||||
String[1] $repo = 'updates',
|
||||
Hash $source_hash = {},
|
||||
Hash $source_defaults = {},
|
||||
Boolean $package_require = false,
|
||||
String[1] $uca_location = $::openstack_extras::repo::debian::params::uca_location,
|
||||
) inherits openstack_extras::repo::debian::params {
|
||||
|
||||
if $manage_uca {
|
||||
exec { 'installing ubuntu-cloud-keyring':
|
||||
command => '/usr/bin/apt-get -y install ubuntu-cloud-keyring',
|
||||
|
||||
Reference in New Issue
Block a user