Skip to content

Commit

Permalink
Add Parameter Type Enforcing to all Classes
Browse files Browse the repository at this point in the history
The lint tests for this were disabled previously.
  • Loading branch information
traylenator committed Feb 1, 2024
1 parent b05472a commit acc88d8
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 35 deletions.
54 changes: 27 additions & 27 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@
# @api private
#
class cvmfs::config (
$mount_method = $cvmfs::mount_method,
$manage_autofs_service = $cvmfs::manage_autofs_service,
$cvmfs_http_proxy = $cvmfs::cvmfs_http_proxy,
$cvmfs_quota_limit = $cvmfs::cvmfs_quota_limit,
$cvmfs_quota_ratio = $cvmfs::cvmfs_quota_ratio,
$cvmfs_cache_base = $cvmfs::cvmfs_cache_base,
$cvmfs_tracefile = $cvmfs::cvmfs_tracefile,
$cvmfs_debuglog = $cvmfs::cvmfs_debuglog,
$cvmfs_max_ttl = $cvmfs::cvmfs_max_ttl,
$cvmfs_repo_list = $cvmfs::cvmfs_repo_list,
$cvmfs_memcache_size = $cvmfs::cvmfs_memcache_size,
$cvmfs_claim_ownership = $cvmfs::cvmfs_claim_ownership,
$cvmfs_syslog_level = $cvmfs::cvmfs_syslog_level,
$cvmfs_uid_map = $cvmfs::cvmfs_uid_map,
$cvmfs_gid_map = $cvmfs::cvmfs_gid_map,
$cvmfs_instrument_fuse = $cvmfs::cvmfs_instrument_fuse,
$cvmfs_mount_rw = $cvmfs::cvmfs_mount_rw,
$default_cvmfs_partsize = $cvmfs::default_cvmfs_partsize,
$cvmfs_timeout = $cvmfs::cvmfs_timeout,
$cvmfs_timeout_direct = $cvmfs::cvmfs_timeout_direct,
$cvmfs_nfiles = $cvmfs::cvmfs_nfiles,
$cvmfs_env_variables = $cvmfs::cvmfs_env_variables,
$cvmfs_use_geoapi = $cvmfs::cvmfs_use_geoapi,
$cvmfs_follow_redirects = $cvmfs::cvmfs_follow_redirects,
$cvmfs_alien_cache = $cvmfs::cvmfs_alien_cache,
$cvmfs_shared_cache = $cvmfs::cvmfs_shared_cache,
Enum['autofs','mount','none'] $mount_method = $cvmfs::mount_method,
Boolean $manage_autofs_service = $cvmfs::manage_autofs_service,
Variant[Undef, String] $cvmfs_http_proxy = $cvmfs::cvmfs_http_proxy,
Variant[Enum['auto'],Integer] $cvmfs_quota_limit = $cvmfs::cvmfs_quota_limit,
Float $cvmfs_quota_ratio = $cvmfs::cvmfs_quota_ratio,
Stdlib::Absolutepath $cvmfs_cache_base = $cvmfs::cvmfs_cache_base,
Optional[Stdlib::Absolutepath] $cvmfs_tracefile = $cvmfs::cvmfs_tracefile,
Optional[Stdlib::Absolutepath] $cvmfs_debuglog = $cvmfs::cvmfs_debuglog,
Optional[Integer] $cvmfs_max_ttl = $cvmfs::cvmfs_max_ttl,
Boolean $cvmfs_repo_list = $cvmfs::cvmfs_repo_list,
Optional[Integer] $cvmfs_memcache_size = $cvmfs::cvmfs_memcache_size,
Optional[Enum['yes','no']] $cvmfs_claim_ownership = $cvmfs::cvmfs_claim_ownership,
Optional[Integer[1,2]] $cvmfs_syslog_level = $cvmfs::cvmfs_syslog_level,
Optional[Hash[Variant[Integer,String], Integer, 1]] $cvmfs_uid_map = $cvmfs::cvmfs_uid_map,
Optional[Hash[Variant[Integer,String], Integer, 1]] $cvmfs_gid_map = $cvmfs::cvmfs_gid_map,
Boolean $cvmfs_instrument_fuse = $cvmfs::cvmfs_instrument_fuse,
Optional[Enum['yes','no']] $cvmfs_mount_rw = $cvmfs::cvmfs_mount_rw,
Integer $default_cvmfs_partsize = $cvmfs::default_cvmfs_partsize,
Optional[Integer] $cvmfs_timeout = $cvmfs::cvmfs_timeout,
Optional[Integer] $cvmfs_timeout_direct = $cvmfs::cvmfs_timeout_direct,
Optional[Integer] $cvmfs_nfiles = $cvmfs::cvmfs_nfiles,
Hash $cvmfs_env_variables = $cvmfs::cvmfs_env_variables,
Optional[Enum['yes','no']] $cvmfs_use_geoapi = $cvmfs::cvmfs_use_geoapi,
Optional[Enum['yes','no']] $cvmfs_follow_redirects = $cvmfs::cvmfs_follow_redirects,
Optional[String] $cvmfs_alien_cache = $cvmfs::cvmfs_alien_cache,
Optional[Enum['yes','no']] $cvmfs_shared_cache = $cvmfs::cvmfs_shared_cache,
Optional[Variant[Integer[4,4],Integer[6,6]]] $cvmfs_ipfamily_prefer = $cvmfs::cvmfs_ipfamily_prefer,
Optional[Integer] $cvmfs_dns_max_ttl = $cvmfs::cvmfs_dns_max_ttl,
Optional[Integer] $cvmfs_dns_min_ttl = $cvmfs::cvmfs_dns_min_ttl,
Expand All @@ -39,7 +39,7 @@
Optional[Array[Integer[0],1]] $cvmfs_cpu_affinity = $cvmfs::cvmfs_cpu_affinity,
Optional[Array[Integer[1],1]] $cvmfs_xattr_privileged_gids = $cvmfs::cvmfs_xattr_privileged_gids,
Optional[Array[String[1],1]] $cvmfs_xattr_protected_xattrs = $cvmfs::cvmfs_xattr_protected_xattrs,
$cvmfs_repositories = $cvmfs::cvmfs_repositories,
Optional[String[1]] $cvmfs_repositories = $cvmfs::cvmfs_repositories,
) inherits cvmfs {
# If cvmfspartsize fact exists use it, otherwise use a sensible default.
if $facts['cvmfspartsize'] {
Expand Down
6 changes: 3 additions & 3 deletions manifests/fsck.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
# @param usesystemd Use a systemd timer
#
class cvmfs::fsck (
$cvmfs_cache_base = $cvmfs::cvmfs_cache_base,
$options = $cvmfs::cvmfs_fsck_options,
$onreboot = $cvmfs::cvmfs_fsck_onreboot,
Stdlib::Absolutepath $cvmfs_cache_base = $cvmfs::cvmfs_cache_base,
Optional[String] $options = $cvmfs::cvmfs_fsck_options,
Boolean $onreboot = $cvmfs::cvmfs_fsck_onreboot,
Optional[Boolean] $usesystemd = undef,
) inherits cvmfs {
if ($facts['os']['family'] == 'RedHat' and (versioncmp($facts['os']['release']['major'],'7') <= 0))
Expand Down
6 changes: 3 additions & 3 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# @api private
#
class cvmfs::install (
$cvmfs_version = $cvmfs::cvmfs_version,
$cvmfs_cache_base = $cvmfs::cvmfs_cache_base,
$fuse3 = $cvmfs::fuse3,
String[1] $cvmfs_version = $cvmfs::cvmfs_version,
Stdlib::Absolutepath $cvmfs_cache_base = $cvmfs::cvmfs_cache_base,
Optional[Boolean] $fuse3 = $cvmfs::fuse3,
) inherits cvmfs {
# Create the cache dir if one is defined, otherwise assume default is in the package.
# Require the package so we know the user is in place.
Expand Down
4 changes: 2 additions & 2 deletions manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# @api private
#
class cvmfs::service (
$mount_method = $cvmfs::mount_method,
$manage_autofs_service = $cvmfs::manage_autofs_service,
Enum['autofs','mount','none'] $mount_method = $cvmfs::mount_method,
Boolean $manage_autofs_service = $cvmfs::manage_autofs_service,
) inherits cvmfs {
# CVMFS 2.1 at least uses cvmfs_config.

Expand Down

0 comments on commit acc88d8

Please sign in to comment.