Skip to content

Commit

Permalink
Issue #87: all jboss_admin::resource::* types should pass their name …
Browse files Browse the repository at this point in the history
…as the name to the wrapped jboss_resource type
  • Loading branch information
itewk committed Mar 13, 2016
1 parent 2d35d0f commit 1060bd3
Show file tree
Hide file tree
Showing 228 changed files with 881 additions and 1,794 deletions.
19 changes: 7 additions & 12 deletions internal/custom_resource/access_log.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,9 @@
$resolve_hosts = undef,
$rotate = undef,
$ensure = present,
$path = $name
$cli_path = $name
) {
if $ensure == present {



$raw_options = {
'extended' => $extended,
'pattern' => $pattern,
Expand All @@ -43,21 +40,19 @@
}
$options = delete_undef_values($raw_options)

jboss_resource { $path:
jboss_resource { $name:
address => $cli_path,
ensure => $ensure,
server => $server,
options => $options
}


}

if $ensure == absent {
jboss_resource { $path:
ensure => $ensure,
server => $server
jboss_resource { $name:
address => $cli_path,
ensure => $ensure,
server => $server
}
}


}
18 changes: 7 additions & 11 deletions internal/custom_resource/async_handler.pp
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,13 @@
$queue_length = undef,
$subhandlers = undef,
$ensure = present,
$path = $name
$cli_path = $name
) {
if $ensure == present {

if $queue_length != undef and $queue_length != undefined and !is_integer($queue_length) {
fail('The attribute queue_length is not an integer')
}


$raw_options = {
'filter' => $filter,
'formatter' => $formatter,
Expand All @@ -56,21 +54,19 @@
}
$options = delete_undef_values($raw_options)

jboss_resource { $path:
jboss_resource { $name:
address => $cli_path,
ensure => $ensure,
server => $server,
options => $options
}


}

if $ensure == absent {
jboss_resource { $path:
ensure => $ensure,
server => $server
jboss_resource { $name:
address => $cli_path,
ensure => $ensure,
server => $server
}
}


}
19 changes: 7 additions & 12 deletions internal/custom_resource/authentication_truststore.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,29 @@
$keystore_path = undef,
$keystore_relative_to = undef,
$ensure = present,
$path = $name
$cli_path = $name
) {
if $ensure == present {



$raw_options = {
'keystore-password' => $keystore_password,
'keystore-path' => $keystore_path,
'keystore-relative-to' => $keystore_relative_to,
}
$options = delete_undef_values($raw_options)

jboss_resource { $path:
jboss_resource { $name:
address => $cli_path,
ensure => $ensure,
server => $server,
options => $options
}


}

if $ensure == absent {
jboss_resource { $path:
ensure => $ensure,
server => $server
jboss_resource { $name:
address => $cli_path
ensure => $ensure,
server => $server
}
}


}
18 changes: 7 additions & 11 deletions internal/custom_resource/bundle.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@
$symbolic_name = undef,
$version = undef,
$ensure = present,
$path = $name
$cli_path = $name
) {
if $ensure == present {

if $startlevel != undef and $startlevel != undefined and !is_integer($startlevel) {
fail('The attribute startlevel is not an integer')
}


$raw_options = {
'id' => $id,
'startlevel' => $startlevel,
Expand All @@ -41,21 +39,19 @@
}
$options = delete_undef_values($raw_options)

jboss_resource { $path:
jboss_resource { $name:
address => $cli_path,
ensure => $ensure,
server => $server,
options => $options
}


}

if $ensure == absent {
jboss_resource { $path:
ensure => $ensure,
server => $server
jboss_resource { $name:
address => $cli_path,
ensure => $ensure,
server => $server
}
}


}
18 changes: 7 additions & 11 deletions internal/custom_resource/capability.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,31 @@
$server,
$startlevel = undef,
$ensure = present,
$path = $name
$cli_path = $name
) {
if $ensure == present {

if $startlevel != undef and $startlevel != undefined and !is_integer($startlevel) {
fail('The attribute startlevel is not an integer')
}


$raw_options = {
'startlevel' => $startlevel,
}
$options = delete_undef_values($raw_options)

jboss_resource { $path:
jboss_resource { $name:
address => $cli_path,
ensure => $ensure,
server => $server,
options => $options
}


}

if $ensure == absent {
jboss_resource { $path:
ensure => $ensure,
server => $server
jboss_resource { $name:
address => $cli_path,
ensure => $ensure,
server => $server
}
}


}
14 changes: 5 additions & 9 deletions internal/custom_resource/configuration.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,29 @@
$server,
$entries = undef,
$ensure = present,
$path = $name
$cli_path = $name
) {
if $ensure == present {

if $entries == undef or $entries == undefined { fail('The attribute entries is undefined but required') }


$raw_options = {
'entries' => $entries,
}
$options = delete_undef_values($raw_options)

jboss_resource { $path:
jboss_resource { $name:
address => $cli_path,
ensure => $ensure,
server => $server,
options => $options
}


}

if $ensure == absent {
jboss_resource { $path:
jboss_resource { $name:
address => $cli_path,
ensure => $ensure,
server => $server
}
}


}
13 changes: 5 additions & 8 deletions internal/custom_resource/connector_remoting.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,18 @@
$security_realm = undef,
$socket_binding = undef,
$ensure = present,
$path = $name
$cli_path = $name
) {
if $ensure == present {



$raw_options = {
'authentication-provider' => $authentication_provider,
'security-realm' => $security_realm,
'socket-binding' => $socket_binding,
}
$options = delete_undef_values($raw_options)

jboss_resource { $path:
jboss_resource { $name:
address => $cli_path,
ensure => $ensure,
server => $server,
options => $options
Expand All @@ -43,11 +41,10 @@
}

if $ensure == absent {
jboss_resource { $path:
jboss_resource { $name:
address => $cli_path,
ensure => $ensure,
server => $server
}
}


}
17 changes: 7 additions & 10 deletions internal/custom_resource/connector_web.pp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
$socket_binding = undef,
$virtual_server = undef,
$ensure = present,
$path = $name
$cli_path = $name
) {
if $ensure == present {

Expand All @@ -88,7 +88,6 @@
fail('The attribute redirect_port is not an integer')
}


$raw_options = {
'enable-lookups' => $enable_lookups,
'enabled' => $enabled,
Expand All @@ -108,21 +107,19 @@
}
$options = delete_undef_values($raw_options)

jboss_resource { $path:
jboss_resource { $name:
address => $cli_path,
ensure => $ensure,
server => $server,
options => $options
}


}

if $ensure == absent {
jboss_resource { $path:
ensure => $ensure,
server => $server
jboss_resource { $name:
address => $cli_path,
ensure => $ensure,
server => $server
}
}


}
17 changes: 7 additions & 10 deletions internal/custom_resource/console_handler.pp
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,9 @@
$resource_name = undef,
$target = undef,
$ensure = present,
$path = $name
$cli_path = $name
) {
if $ensure == present {



$raw_options = {
'autoflush' => $autoflush,
'encoding' => $encoding,
Expand All @@ -53,7 +50,8 @@
}
$options = delete_undef_values($raw_options)

jboss_resource { $path:
jboss_resource { $name:
address => $cli_path,
ensure => $ensure,
server => $server,
options => $options
Expand All @@ -63,11 +61,10 @@
}

if $ensure == absent {
jboss_resource { $path:
ensure => $ensure,
server => $server
jboss_resource { $name:
address => $cli_path,
ensure => $ensure,
server => $server
}
}


}
Loading

0 comments on commit 1060bd3

Please sign in to comment.