From 1060bd37ca18dd51f7057e860a6423e914f84e23 Mon Sep 17 00:00:00 2001 From: Ian Tewksbury Date: Sat, 12 Mar 2016 19:20:38 -0500 Subject: [PATCH] Issue #87: all jboss_admin::resource::* types should pass their name as the name to the wrapped jboss_resource type --- internal/custom_resource/access_log.pp | 19 +++++-------- internal/custom_resource/async_handler.pp | 18 +++++-------- .../authentication_truststore.pp | 19 +++++-------- internal/custom_resource/bundle.pp | 18 +++++-------- internal/custom_resource/capability.pp | 18 +++++-------- internal/custom_resource/configuration.pp | 14 ++++------ .../custom_resource/connector_remoting.pp | 13 ++++----- internal/custom_resource/connector_web.pp | 17 +++++------- internal/custom_resource/console_handler.pp | 17 +++++------- internal/custom_resource/directory.pp | 17 +++++------- internal/custom_resource/file_handler.pp | 19 +++++-------- internal/custom_resource/logger.pp | 19 +++++-------- .../periodic_rotating_file_handler.pp | 19 +++++-------- internal/custom_resource/property.pp | 15 +++++------ internal/custom_resource/protocol.pp | 27 ++++++++++--------- internal/custom_resource/root_logger.pp | 19 +++++-------- .../size_rotating_file_handler.pp | 18 +++++-------- internal/custom_resource/ssl.pp | 16 +++++------ internal/custom_resource/sso.pp | 19 +++++-------- internal/custom_resource/stack.pp | 21 +++++++-------- .../custom_resource/subsystem_infinispan.pp | 19 +++++-------- internal/custom_resource/subsystem_osgi.pp | 18 +++++-------- internal/custom_resource/subsystem_web.pp | 19 +++++-------- internal/custom_resource/transport.pp | 19 +++++-------- lib/tasks/manifest.erb | 11 +++----- manifests/resource/access_authorization.pp | 10 +++---- manifests/resource/access_log.pp | 19 +++++-------- manifests/resource/acl.pp | 10 +++---- manifests/resource/acl_module.pp | 10 +++---- manifests/resource/active_operation.pp | 10 +++---- manifests/resource/admin_objects.pp | 10 +++---- manifests/resource/applies_to.pp | 10 +++---- manifests/resource/archive_validation.pp | 10 +++---- manifests/resource/async_handler.pp | 18 +++++-------- manifests/resource/audit.pp | 10 +++---- manifests/resource/auth_module.pp | 10 +++---- manifests/resource/authentication_classic.pp | 10 +++---- ...authentication_client_certificate_store.pp | 10 +++---- manifests/resource/authentication_jaas.pp | 10 +++---- manifests/resource/authentication_jaspi.pp | 10 +++---- manifests/resource/authentication_ldap.pp | 10 +++---- manifests/resource/authentication_local.pp | 10 +++---- manifests/resource/authentication_plug_in.pp | 10 +++---- .../resource/authentication_properties.pp | 10 +++---- .../resource/authentication_truststore.pp | 19 +++++-------- manifests/resource/authorization_classic.pp | 10 +++---- manifests/resource/authorization_ldap.pp | 10 +++---- manifests/resource/authorization_plug_in.pp | 10 +++---- .../resource/authorization_properties.pp | 10 +++---- manifests/resource/bean_validation.pp | 10 +++---- manifests/resource/binary_keyed_jdbc_store.pp | 10 +++---- manifests/resource/binding.pp | 10 +++---- .../blocking_bounded_queue_thread_pool.pp | 10 +++---- .../blocking_queueless_thread_pool.pp | 10 +++---- manifests/resource/bootstrap_context.pp | 10 +++---- .../resource/bounded_queue_thread_pool.pp | 10 +++---- manifests/resource/bundle.pp | 18 +++++-------- manifests/resource/cache.pp | 10 +++---- manifests/resource/cache_container.pp | 10 +++---- .../resource/cached_connection_manager.pp | 10 +++---- manifests/resource/capability.pp | 18 +++++-------- .../resource/channel_creation_options.pp | 10 +++---- .../resource/cluster_passivation_store.pp | 10 +++---- .../resource/commit_markable_resource.pp | 10 +++---- manifests/resource/condition.pp | 10 +++---- manifests/resource/config_properties.pp | 10 +++---- manifests/resource/configuration.pp | 14 ++++------ .../resource/configuration_access_log.pp | 10 +++---- manifests/resource/configuration_container.pp | 10 +++---- .../configuration_jsp_configuration.pp | 10 +++---- manifests/resource/configuration_sso.pp | 10 +++---- .../configuration_static_resources.pp | 10 +++---- manifests/resource/connection_definitions.pp | 10 +++---- manifests/resource/connection_properties.pp | 10 +++---- manifests/resource/connector_remoting.pp | 13 ++++----- manifests/resource/connector_web.pp | 17 +++++------- manifests/resource/console_handler.pp | 17 +++++------- .../resource/constraint_vault_expression.pp | 10 +++---- manifests/resource/content.pp | 10 +++---- .../resource/core_service_module_loading.pp | 10 +++---- .../core_service_server_environment.pp | 10 +++---- manifests/resource/core_service_vault.pp | 10 +++---- manifests/resource/custom.pp | 10 +++---- manifests/resource/custom_formatter.pp | 10 +++---- manifests/resource/custom_load_metric.pp | 10 +++---- manifests/resource/data_source.pp | 10 +++---- manifests/resource/deployment.pp | 10 +++---- manifests/resource/directory.pp | 17 +++++------- manifests/resource/distributed_cache.pp | 10 +++---- manifests/resource/dynamic_load_provider.pp | 10 +++---- manifests/resource/endpoint.pp | 10 +++---- manifests/resource/entity_bean.pp | 10 +++---- manifests/resource/eviction.pp | 10 +++---- manifests/resource/exclude.pp | 10 +++---- manifests/resource/expiration.pp | 10 +++---- manifests/resource/expose_model_expression.pp | 10 +++---- manifests/resource/expose_model_resolved.pp | 10 +++---- manifests/resource/extension.pp | 10 +++---- manifests/resource/file_handler.pp | 19 +++++-------- manifests/resource/file_passivation_store.pp | 10 +++---- manifests/resource/file_store.pp | 10 +++---- .../group_search_group_to_principal.pp | 10 +++---- .../group_search_principal_to_group.pp | 10 +++---- manifests/resource/handler.pp | 10 +++---- .../resource/hibernate_persistence_unit.pp | 10 +++---- manifests/resource/identity_trust.pp | 10 +++---- manifests/resource/include.pp | 10 +++---- manifests/resource/interface.pp | 10 +++---- manifests/resource/invalidation_cache.pp | 10 +++---- manifests/resource/jdbc_driver.pp | 10 +++---- manifests/resource/json_formatter.pp | 10 +++---- manifests/resource/jsse.pp | 10 +++---- manifests/resource/ldap_connection.pp | 10 +++---- manifests/resource/load_metric.pp | 10 +++---- manifests/resource/local_cache.pp | 10 +++---- ...cal_destination_outbound_socket_binding.pp | 10 +++---- .../resource/local_outbound_connection.pp | 10 +++---- manifests/resource/locking.pp | 10 +++---- manifests/resource/log_store.pp | 10 +++---- manifests/resource/logger.pp | 19 +++++-------- manifests/resource/login_module.pp | 10 +++---- manifests/resource/login_module_stack.pp | 10 +++---- manifests/resource/long_running_threads.pp | 10 +++---- manifests/resource/mail_session.pp | 10 +++---- .../management_interface_http_interface.pp | 10 +++---- .../management_interface_native_interface.pp | 10 +++---- manifests/resource/mapping.pp | 10 +++---- manifests/resource/mapping_module.pp | 10 +++---- manifests/resource/message_driven_bean.pp | 10 +++---- manifests/resource/mixed_keyed_jdbc_store.pp | 10 +++---- manifests/resource/mod_cluster_config.pp | 10 +++---- manifests/resource/outbound_connection.pp | 10 +++---- manifests/resource/participants.pp | 10 +++---- manifests/resource/path.pp | 10 +++---- manifests/resource/pattern_formatter.pp | 10 +++---- .../periodic_rotating_file_handler.pp | 19 +++++-------- manifests/resource/policy_module.pp | 10 +++---- manifests/resource/post_handler_chain.pp | 10 +++---- manifests/resource/pre_handler_chain.pp | 10 +++---- manifests/resource/property.pp | 15 +++++------ manifests/resource/protocol.pp | 27 ++++++++++--------- manifests/resource/protocol_tcp.pp | 10 +++---- manifests/resource/protocol_tls.pp | 10 +++---- manifests/resource/protocol_udp.pp | 10 +++---- manifests/resource/provider_module.pp | 10 +++---- manifests/resource/queueless_thread_pool.pp | 10 +++---- ...ote_destination_outbound_socket_binding.pp | 10 +++---- .../resource/remote_outbound_connection.pp | 10 +++---- manifests/resource/remote_store.pp | 10 +++---- manifests/resource/remoting_connector.pp | 10 +++---- manifests/resource/replicated_cache.pp | 10 +++---- manifests/resource/resource_adapter.pp | 10 +++---- manifests/resource/rewrite.pp | 10 +++---- manifests/resource/role_mapping.pp | 10 +++---- manifests/resource/root_logger.pp | 19 +++++-------- manifests/resource/root_resource.pp | 10 +++---- manifests/resource/sasl_policy.pp | 10 +++---- manifests/resource/scanner.pp | 10 +++---- manifests/resource/scheduled_thread_pool.pp | 10 +++---- manifests/resource/security.pp | 10 +++---- manifests/resource/security_domain.pp | 10 +++---- manifests/resource/security_realm.pp | 10 +++---- manifests/resource/server_identity_secret.pp | 10 +++---- manifests/resource/server_identity_ssl.pp | 10 +++---- manifests/resource/server_imap.pp | 10 +++---- manifests/resource/server_pop3.pp | 10 +++---- manifests/resource/server_smtp.pp | 10 +++---- manifests/resource/service_async.pp | 10 +++---- manifests/resource/service_iiop.pp | 10 +++---- manifests/resource/service_remote.pp | 10 +++---- manifests/resource/service_timer_service.pp | 10 +++---- manifests/resource/setting.pp | 10 +++---- manifests/resource/short_running_threads.pp | 10 +++---- manifests/resource/singleton_bean.pp | 10 +++---- .../resource/size_rotating_file_handler.pp | 18 +++++-------- manifests/resource/socket_binding.pp | 10 +++---- manifests/resource/socket_binding_group.pp | 10 +++---- manifests/resource/ssl.pp | 16 +++++------ manifests/resource/sso.pp | 19 +++++-------- manifests/resource/stack.pp | 21 +++++++-------- manifests/resource/state_transfer.pp | 10 +++---- manifests/resource/stateful_session_bean.pp | 10 +++---- manifests/resource/stateless_session_bean.pp | 10 +++---- manifests/resource/store.pp | 10 +++---- .../resource/strict_max_bean_instance_pool.pp | 10 +++---- manifests/resource/string_keyed_jdbc_store.pp | 10 +++---- manifests/resource/subsystem.pp | 10 +++---- manifests/resource/subsystem_datasources.pp | 10 +++---- manifests/resource/subsystem_ee.pp | 10 +++---- manifests/resource/subsystem_ejb3.pp | 10 +++---- manifests/resource/subsystem_infinispan.pp | 19 +++++-------- manifests/resource/subsystem_jgroups.pp | 10 +++---- manifests/resource/subsystem_jmx.pp | 10 +++---- manifests/resource/subsystem_jpa.pp | 10 +++---- manifests/resource/subsystem_jsf.pp | 10 +++---- manifests/resource/subsystem_logging.pp | 10 +++---- manifests/resource/subsystem_osgi.pp | 18 +++++-------- manifests/resource/subsystem_remoting.pp | 10 +++---- manifests/resource/subsystem_security.pp | 10 +++---- manifests/resource/subsystem_transactions.pp | 10 +++---- manifests/resource/subsystem_web.pp | 19 +++++-------- manifests/resource/subsystem_webservices.pp | 10 +++---- manifests/resource/system_property.pp | 10 +++---- manifests/resource/thread_factory.pp | 10 +++---- manifests/resource/thread_pool.pp | 10 +++---- manifests/resource/transaction.pp | 10 +++---- manifests/resource/transactions.pp | 10 +++---- manifests/resource/transport.pp | 19 +++++-------- manifests/resource/trust_module.pp | 10 +++---- manifests/resource/type_buffer_pool.pp | 10 +++---- manifests/resource/type_class_loading.pp | 10 +++---- manifests/resource/type_compilation.pp | 10 +++---- manifests/resource/type_memory.pp | 10 +++---- manifests/resource/type_operating_system.pp | 10 +++---- manifests/resource/type_runtime.pp | 10 +++---- manifests/resource/type_threading.pp | 10 +++---- .../resource/unbounded_queue_thread_pool.pp | 10 +++---- manifests/resource/user.pp | 10 +++---- .../username_to_dn_advanced_filter.pp | 10 +++---- .../username_to_dn_username_filter.pp | 10 +++---- .../resource/username_to_dn_username_is_dn.pp | 10 +++---- manifests/resource/valve.pp | 10 +++---- manifests/resource/vault.pp | 10 +++---- manifests/resource/virtual_server.pp | 10 +++---- manifests/resource/workmanager.pp | 10 +++---- manifests/resource/write_behind.pp | 10 +++---- manifests/resource/xa_data_source.pp | 10 +++---- .../resource/xa_datasource_properties.pp | 10 +++---- 228 files changed, 881 insertions(+), 1794 deletions(-) diff --git a/internal/custom_resource/access_log.pp b/internal/custom_resource/access_log.pp index 03d61c1..3dcdb58 100644 --- a/internal/custom_resource/access_log.pp +++ b/internal/custom_resource/access_log.pp @@ -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, @@ -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 } } - - } diff --git a/internal/custom_resource/async_handler.pp b/internal/custom_resource/async_handler.pp index 994cf99..e7f6961 100644 --- a/internal/custom_resource/async_handler.pp +++ b/internal/custom_resource/async_handler.pp @@ -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, @@ -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 } } - - } diff --git a/internal/custom_resource/authentication_truststore.pp b/internal/custom_resource/authentication_truststore.pp index 33f7f6c..f4ed62a 100644 --- a/internal/custom_resource/authentication_truststore.pp +++ b/internal/custom_resource/authentication_truststore.pp @@ -20,12 +20,9 @@ $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, @@ -33,21 +30,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 } } - - } diff --git a/internal/custom_resource/bundle.pp b/internal/custom_resource/bundle.pp index c6c0f3f..a5ca4d0 100644 --- a/internal/custom_resource/bundle.pp +++ b/internal/custom_resource/bundle.pp @@ -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, @@ -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 } } - - } diff --git a/internal/custom_resource/capability.pp b/internal/custom_resource/capability.pp index da5637e..22862d8 100644 --- a/internal/custom_resource/capability.pp +++ b/internal/custom_resource/capability.pp @@ -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 } } - - } diff --git a/internal/custom_resource/configuration.pp b/internal/custom_resource/configuration.pp index e4d7cf6..3fcd2bf 100644 --- a/internal/custom_resource/configuration.pp +++ b/internal/custom_resource/configuration.pp @@ -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 } } - - } diff --git a/internal/custom_resource/connector_remoting.pp b/internal/custom_resource/connector_remoting.pp index 5f61ad1..4a0c772 100644 --- a/internal/custom_resource/connector_remoting.pp +++ b/internal/custom_resource/connector_remoting.pp @@ -20,12 +20,9 @@ $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, @@ -33,7 +30,8 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options @@ -43,11 +41,10 @@ } if $ensure == absent { - jboss_resource { $path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server } } - - } diff --git a/internal/custom_resource/connector_web.pp b/internal/custom_resource/connector_web.pp index e16fe8c..2418b91 100644 --- a/internal/custom_resource/connector_web.pp +++ b/internal/custom_resource/connector_web.pp @@ -68,7 +68,7 @@ $socket_binding = undef, $virtual_server = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { @@ -88,7 +88,6 @@ fail('The attribute redirect_port is not an integer') } - $raw_options = { 'enable-lookups' => $enable_lookups, 'enabled' => $enabled, @@ -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 } } - - } diff --git a/internal/custom_resource/console_handler.pp b/internal/custom_resource/console_handler.pp index cca25df..44a790f 100644 --- a/internal/custom_resource/console_handler.pp +++ b/internal/custom_resource/console_handler.pp @@ -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, @@ -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 @@ -63,11 +61,10 @@ } if $ensure == absent { - jboss_resource { $path: - ensure => $ensure, - server => $server + jboss_resource { $name: + address => $cli_path, + ensure => $ensure, + server => $server } } - - } diff --git a/internal/custom_resource/directory.pp b/internal/custom_resource/directory.pp index 5f7abf9..c373bf8 100644 --- a/internal/custom_resource/directory.pp +++ b/internal/custom_resource/directory.pp @@ -19,30 +19,25 @@ $cli_path = $name ) { if $ensure == present { - - - $raw_options = { 'path' => $path, 'relative-to' => $relative_to, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { - jboss_resource { $cli_path: - ensure => $ensure, - server => $server + jboss_resource { $name: + address => $cli_path, + ensure => $ensure, + server => $server } } - - } diff --git a/internal/custom_resource/file_handler.pp b/internal/custom_resource/file_handler.pp index aba019b..e3191b1 100644 --- a/internal/custom_resource/file_handler.pp +++ b/internal/custom_resource/file_handler.pp @@ -40,12 +40,9 @@ $level = undef, $resource_name = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { - - - $raw_options = { 'append' => $append, 'autoflush' => $autoflush, @@ -58,21 +55,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 } } - - } diff --git a/internal/custom_resource/logger.pp b/internal/custom_resource/logger.pp index e2e0b21..84f1952 100644 --- a/internal/custom_resource/logger.pp +++ b/internal/custom_resource/logger.pp @@ -28,12 +28,9 @@ $level = undef, $use_parent_handlers = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { - - - $raw_options = { 'category' => $category, 'filter' => $filter, @@ -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 } } - - } diff --git a/internal/custom_resource/periodic_rotating_file_handler.pp b/internal/custom_resource/periodic_rotating_file_handler.pp index d359782..ff8cc6a 100644 --- a/internal/custom_resource/periodic_rotating_file_handler.pp +++ b/internal/custom_resource/periodic_rotating_file_handler.pp @@ -44,12 +44,9 @@ $resource_name = undef, $suffix = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { - - - $raw_options = { 'append' => $append, 'autoflush' => $autoflush, @@ -63,21 +60,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 } } - - } diff --git a/internal/custom_resource/property.pp b/internal/custom_resource/property.pp index fa97dee..82298fb 100644 --- a/internal/custom_resource/property.pp +++ b/internal/custom_resource/property.pp @@ -15,27 +15,24 @@ $cli_path = $name ) { if $ensure == present { - $raw_options = { 'value' => $value, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { - jboss_resource { $cli_path: - ensure => $ensure, - server => $server + jboss_resource { $name: + address => $cli_path, + ensure => $ensure, + server => $server } } - - } diff --git a/internal/custom_resource/protocol.pp b/internal/custom_resource/protocol.pp index 7f7f6a5..e32e71e 100644 --- a/internal/custom_resource/protocol.pp +++ b/internal/custom_resource/protocol.pp @@ -16,10 +16,10 @@ $socket_binding = undef, $type = undef, $ensure = present, - $path = $name + $cli_path = $name ) { - $stack = regsubst($path, '/protocol.*$', '') - $check_command = "(outcome == success) of ${path}:read-resource()" + $stack = regsubst($cli_path, '/protocol.*$', '') + $check_command = "(outcome == success) of ${cli_path}:read-resource()" if $type == undef or $type == undefined { fail('type is required') @@ -36,24 +36,25 @@ } $options = delete_undef_values($raw_options) - jboss_exec { $add_command: - unless => $check_command, - server => $server + jboss_exec { "${name}: add": + command => $add_command, + unless => $check_command, + server => $server } - -> jboss_resource { $path: + -> + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - } if $ensure == absent { - jboss_exec { $remove_command: - onlyif => $check_command, - server => $server + jboss_exec { "${name}: remove": + command => $remove_command, + onlyif => $check_command, + server => $server } } - - } diff --git a/internal/custom_resource/root_logger.pp b/internal/custom_resource/root_logger.pp index 71b4d64..709386b 100644 --- a/internal/custom_resource/root_logger.pp +++ b/internal/custom_resource/root_logger.pp @@ -20,12 +20,9 @@ $handlers = undef, $level = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { - - - $raw_options = { 'filter' => $filter, 'handlers' => $handlers, @@ -33,21 +30,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 } } - - } diff --git a/internal/custom_resource/size_rotating_file_handler.pp b/internal/custom_resource/size_rotating_file_handler.pp index 21ddfb5..ce6b4e4 100644 --- a/internal/custom_resource/size_rotating_file_handler.pp +++ b/internal/custom_resource/size_rotating_file_handler.pp @@ -48,15 +48,13 @@ $resource_name = undef, $rotate_size = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { - if $max_backup_index != undef and $max_backup_index != undefined and !is_integer($max_backup_index) { fail('The attribute max_backup_index is not an integer') } - $raw_options = { 'append' => $append, 'autoflush' => $autoflush, @@ -71,21 +69,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 } } - - } diff --git a/internal/custom_resource/ssl.pp b/internal/custom_resource/ssl.pp index cd3d254..cb560c1 100644 --- a/internal/custom_resource/ssl.pp +++ b/internal/custom_resource/ssl.pp @@ -43,8 +43,6 @@ $cli_path = $name ) { if $ensure == present { - - $raw_options = { 'ca-certificate-file' => $ca_certificate_file, 'ca-revocation-url' => $ca_revocation_url, @@ -57,21 +55,19 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { - jboss_resource { $cli_path: - ensure => $ensure, - server => $server + jboss_resource { $name: + address => $cli_path, + ensure => $ensure, + server => $server } } - - } diff --git a/internal/custom_resource/sso.pp b/internal/custom_resource/sso.pp index eb5331d..ea4ecd3 100644 --- a/internal/custom_resource/sso.pp +++ b/internal/custom_resource/sso.pp @@ -24,12 +24,9 @@ $domain = undef, $reauthenticate = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { - - - $raw_options = { 'cache-container' => $cache_container, 'cache-name' => $cache_name, @@ -38,21 +35,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 } } - - } diff --git a/internal/custom_resource/stack.pp b/internal/custom_resource/stack.pp index 45c3450..4ea4d12 100644 --- a/internal/custom_resource/stack.pp +++ b/internal/custom_resource/stack.pp @@ -15,38 +15,35 @@ $protocols = undef, $transport = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { - if $protocols != undef and $protocols != undefined and !is_array($protocols) { fail('The attribute protocols is not an array') } - $raw_options = { 'protocols' => $protocols, 'transport' => $transport } $options = delete_undef_values($raw_options) - $add_command = "${path}:add" - $check_command = "(outcome == success) of ${path}:read-resource()" + $add_command = "${cli_path}:add" + $check_command = "(outcome == success) of ${cli_path}:read-resource()" - jboss_exec { $add_command: + jboss_exec { $name: + command => $add_command, unless => $check_command, arguments => $raw_options, server => $server } - } if $ensure == absent { - jboss_resource { $path: - ensure => $ensure, - server => $server + jboss_resource { $name: + address => $cli_path, + ensure => $ensure, + server => $server } } - - } diff --git a/internal/custom_resource/subsystem_infinispan.pp b/internal/custom_resource/subsystem_infinispan.pp index 529aa36..1f0a244 100644 --- a/internal/custom_resource/subsystem_infinispan.pp +++ b/internal/custom_resource/subsystem_infinispan.pp @@ -12,32 +12,27 @@ $server, $default_cache_container = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { - - - $raw_options = { 'default-cache-container' => $default_cache_container, } $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 } } - - } diff --git a/internal/custom_resource/subsystem_osgi.pp b/internal/custom_resource/subsystem_osgi.pp index f22385c..5083079 100644 --- a/internal/custom_resource/subsystem_osgi.pp +++ b/internal/custom_resource/subsystem_osgi.pp @@ -16,36 +16,32 @@ $activation = undef, $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 = { 'activation' => $activation, '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 } } - - } diff --git a/internal/custom_resource/subsystem_web.pp b/internal/custom_resource/subsystem_web.pp index 944b366..5632012 100644 --- a/internal/custom_resource/subsystem_web.pp +++ b/internal/custom_resource/subsystem_web.pp @@ -20,12 +20,9 @@ $instance_id = undef, $native = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { - - - $raw_options = { 'default-virtual-server' => $default_virtual_server, 'instance-id' => $instance_id, @@ -33,21 +30,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 } } - - } diff --git a/internal/custom_resource/transport.pp b/internal/custom_resource/transport.pp index 2537bfb..756dc78 100644 --- a/internal/custom_resource/transport.pp +++ b/internal/custom_resource/transport.pp @@ -36,12 +36,9 @@ $site = undef, $stack = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { - - - $raw_options = { 'cluster' => $cluster, 'executor' => $executor, @@ -53,21 +50,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 } } - - } diff --git a/lib/tasks/manifest.erb b/lib/tasks/manifest.erb index e727a5c..49cc4ce 100644 --- a/lib/tasks/manifest.erb +++ b/lib/tasks/manifest.erb @@ -16,10 +16,9 @@ define jboss_admin::resource::<%= type[:name] %> ( $<%= (puppet_name attr).to_s.ljust 30 %> = undef, <% end -%> $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - <% type[:attributes].each_key.sort.each do |attr| -%> <% attribute = type[:attributes][attr] -%> <% if attribute[:required] -%> @@ -61,13 +60,14 @@ end -%> } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - <% if ['data-source', 'xa-data-source'].include?(type[:name].to_s)-%> + if $enabled { jboss_exec {"Enable Data Source ${name}": command => "${name}:enable", @@ -83,7 +83,6 @@ end -%> } } <% end -%> - } if $ensure == absent { @@ -92,6 +91,4 @@ end -%> server => $server } } - - } diff --git a/manifests/resource/access_authorization.pp b/manifests/resource/access_authorization.pp index 5c4ce2a..cf9f49d 100644 --- a/manifests/resource/access_authorization.pp +++ b/manifests/resource/access_authorization.pp @@ -24,10 +24,9 @@ $provider = undef, $standard_role_names = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $all_role_names != undef and $all_role_names != undefined and !is_array($all_role_names) { fail('The attribute all_role_names is not an array') } @@ -49,13 +48,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -64,6 +62,4 @@ server => $server } } - - } diff --git a/manifests/resource/access_log.pp b/manifests/resource/access_log.pp index 03d61c1..3dcdb58 100644 --- a/manifests/resource/access_log.pp +++ b/manifests/resource/access_log.pp @@ -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, @@ -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 } } - - } diff --git a/manifests/resource/acl.pp b/manifests/resource/acl.pp index 3bea2c5..fdc73e5 100644 --- a/manifests/resource/acl.pp +++ b/manifests/resource/acl.pp @@ -12,10 +12,9 @@ $server, $acl_modules = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $acl_modules != undef and $acl_modules != undefined and !is_array($acl_modules) { fail('The attribute acl_modules is not an array') } @@ -25,13 +24,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -40,6 +38,4 @@ server => $server } } - - } diff --git a/manifests/resource/acl_module.pp b/manifests/resource/acl_module.pp index ac2395e..d8eddf6 100644 --- a/manifests/resource/acl_module.pp +++ b/manifests/resource/acl_module.pp @@ -24,10 +24,9 @@ $module = undef, $module_options = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $flag != undef and $flag != undefined and !($flag in ['required','requisite','sufficient','optional']) { fail('The attribute flag is not an allowed value: "required","requisite","sufficient","optional"') } @@ -40,13 +39,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -55,6 +53,4 @@ server => $server } } - - } diff --git a/manifests/resource/active_operation.pp b/manifests/resource/active_operation.pp index 8b4dad0..dbcd7c2 100644 --- a/manifests/resource/active_operation.pp +++ b/manifests/resource/active_operation.pp @@ -40,10 +40,9 @@ $operation = undef, $running_time = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $access_mechanism != undef and $access_mechanism != undefined and !($access_mechanism in ['NATIVE','HTTP','JMX']) { fail('The attribute access_mechanism is not an allowed value: "NATIVE","HTTP","JMX"') } @@ -75,13 +74,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -90,6 +88,4 @@ server => $server } } - - } diff --git a/manifests/resource/admin_objects.pp b/manifests/resource/admin_objects.pp index 34af4c0..b62a329 100644 --- a/manifests/resource/admin_objects.pp +++ b/manifests/resource/admin_objects.pp @@ -24,10 +24,9 @@ $jndi_name = undef, $use_java_context = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $enabled != undef and $enabled != undefined { validate_bool($enabled) } @@ -43,13 +42,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -58,6 +56,4 @@ server => $server } } - - } diff --git a/manifests/resource/applies_to.pp b/manifests/resource/applies_to.pp index 7cbc1b3..2d4b50b 100644 --- a/manifests/resource/applies_to.pp +++ b/manifests/resource/applies_to.pp @@ -24,10 +24,9 @@ $entire_resource = undef, $operations = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $attributes != undef and $attributes != undefined and !is_array($attributes) { fail('The attribute attributes is not an array') } @@ -46,13 +45,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -61,6 +59,4 @@ server => $server } } - - } diff --git a/manifests/resource/archive_validation.pp b/manifests/resource/archive_validation.pp index 9f80db3..a79c0f2 100644 --- a/manifests/resource/archive_validation.pp +++ b/manifests/resource/archive_validation.pp @@ -20,10 +20,9 @@ $fail_on_error = undef, $fail_on_warn = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $enabled != undef and $enabled != undefined { validate_bool($enabled) } @@ -41,13 +40,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -56,6 +54,4 @@ server => $server } } - - } diff --git a/manifests/resource/async_handler.pp b/manifests/resource/async_handler.pp index 994cf99..e7f6961 100644 --- a/manifests/resource/async_handler.pp +++ b/manifests/resource/async_handler.pp @@ -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, @@ -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 } } - - } diff --git a/manifests/resource/audit.pp b/manifests/resource/audit.pp index 48bbd17..8a2f4e8 100644 --- a/manifests/resource/audit.pp +++ b/manifests/resource/audit.pp @@ -12,10 +12,9 @@ $server, $provider_modules = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $provider_modules != undef and $provider_modules != undefined and !is_array($provider_modules) { fail('The attribute provider_modules is not an array') } @@ -25,13 +24,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -40,6 +38,4 @@ server => $server } } - - } diff --git a/manifests/resource/auth_module.pp b/manifests/resource/auth_module.pp index 1848d83..d3ebd84 100644 --- a/manifests/resource/auth_module.pp +++ b/manifests/resource/auth_module.pp @@ -28,10 +28,9 @@ $module = undef, $module_options = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $flag != undef and $flag != undefined and !($flag in ['required','requisite','sufficient','optional']) { fail('The attribute flag is not an allowed value: "required","requisite","sufficient","optional"') } @@ -45,13 +44,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -60,6 +58,4 @@ server => $server } } - - } diff --git a/manifests/resource/authentication_classic.pp b/manifests/resource/authentication_classic.pp index fa16281..8a65b10 100644 --- a/manifests/resource/authentication_classic.pp +++ b/manifests/resource/authentication_classic.pp @@ -12,10 +12,9 @@ $server, $login_modules = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $login_modules != undef and $login_modules != undefined and !is_array($login_modules) { fail('The attribute login_modules is not an array') } @@ -25,13 +24,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -40,6 +38,4 @@ server => $server } } - - } diff --git a/manifests/resource/authentication_client_certificate_store.pp b/manifests/resource/authentication_client_certificate_store.pp index 6931d26..34d2975 100644 --- a/manifests/resource/authentication_client_certificate_store.pp +++ b/manifests/resource/authentication_client_certificate_store.pp @@ -24,11 +24,10 @@ $keystore_path = undef, $keystore_relative_to = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'key-password' => $key_password, 'keystore-password' => $keystore_password, @@ -37,13 +36,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -52,6 +50,4 @@ server => $server } } - - } diff --git a/manifests/resource/authentication_jaas.pp b/manifests/resource/authentication_jaas.pp index acf4bf5..0e2b863 100644 --- a/manifests/resource/authentication_jaas.pp +++ b/manifests/resource/authentication_jaas.pp @@ -16,10 +16,9 @@ $assign_groups = undef, $resource_name = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $assign_groups != undef and $assign_groups != undefined { validate_bool($assign_groups) } @@ -30,13 +29,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -45,6 +43,4 @@ server => $server } } - - } diff --git a/manifests/resource/authentication_jaspi.pp b/manifests/resource/authentication_jaspi.pp index 55cfa9a..237fd53 100644 --- a/manifests/resource/authentication_jaspi.pp +++ b/manifests/resource/authentication_jaspi.pp @@ -12,10 +12,9 @@ $server, $auth_modules = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $auth_modules != undef and $auth_modules != undefined and !is_array($auth_modules) { fail('The attribute auth_modules is not an array') } @@ -25,13 +24,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -40,6 +38,4 @@ server => $server } } - - } diff --git a/manifests/resource/authentication_ldap.pp b/manifests/resource/authentication_ldap.pp index 6e3c53e..163d709 100644 --- a/manifests/resource/authentication_ldap.pp +++ b/manifests/resource/authentication_ldap.pp @@ -36,10 +36,9 @@ $user_dn = undef, $username_attribute = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $allow_empty_passwords != undef and $allow_empty_passwords != undefined { validate_bool($allow_empty_passwords) } @@ -58,13 +57,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -73,6 +71,4 @@ server => $server } } - - } diff --git a/manifests/resource/authentication_local.pp b/manifests/resource/authentication_local.pp index 8a7f52e..ccc1429 100644 --- a/manifests/resource/authentication_local.pp +++ b/manifests/resource/authentication_local.pp @@ -20,10 +20,9 @@ $default_user = undef, $skip_group_loading = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $skip_group_loading != undef and $skip_group_loading != undefined { validate_bool($skip_group_loading) } @@ -35,13 +34,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -50,6 +48,4 @@ server => $server } } - - } diff --git a/manifests/resource/authentication_plug_in.pp b/manifests/resource/authentication_plug_in.pp index d3997b5..032afe4 100644 --- a/manifests/resource/authentication_plug_in.pp +++ b/manifests/resource/authentication_plug_in.pp @@ -16,10 +16,9 @@ $mechanism = undef, $resource_name = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $mechanism != undef and $mechanism != undefined and !($mechanism in ['DIGEST','PLAIN']) { fail('The attribute mechanism is not an allowed value: "DIGEST","PLAIN"') } @@ -30,13 +29,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -45,6 +43,4 @@ server => $server } } - - } diff --git a/manifests/resource/authentication_properties.pp b/manifests/resource/authentication_properties.pp index 7ea90eb..b20d33e 100644 --- a/manifests/resource/authentication_properties.pp +++ b/manifests/resource/authentication_properties.pp @@ -20,10 +20,9 @@ $plain_text = undef, $relative_to = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $plain_text != undef and $plain_text != undefined { validate_bool($plain_text) } @@ -35,13 +34,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -50,6 +48,4 @@ server => $server } } - - } diff --git a/manifests/resource/authentication_truststore.pp b/manifests/resource/authentication_truststore.pp index 33f7f6c..f4ed62a 100644 --- a/manifests/resource/authentication_truststore.pp +++ b/manifests/resource/authentication_truststore.pp @@ -20,12 +20,9 @@ $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, @@ -33,21 +30,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 } } - - } diff --git a/manifests/resource/authorization_classic.pp b/manifests/resource/authorization_classic.pp index 4a2a48c..141896c 100644 --- a/manifests/resource/authorization_classic.pp +++ b/manifests/resource/authorization_classic.pp @@ -12,10 +12,9 @@ $server, $policy_modules = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $policy_modules != undef and $policy_modules != undefined and !is_array($policy_modules) { fail('The attribute policy_modules is not an array') } @@ -25,13 +24,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -40,6 +38,4 @@ server => $server } } - - } diff --git a/manifests/resource/authorization_ldap.pp b/manifests/resource/authorization_ldap.pp index c73f5ee..2ec6a50 100644 --- a/manifests/resource/authorization_ldap.pp +++ b/manifests/resource/authorization_ldap.pp @@ -12,23 +12,21 @@ $server, $connection = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'connection' => $connection, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/authorization_plug_in.pp b/manifests/resource/authorization_plug_in.pp index ddd7ae5..3c29408 100644 --- a/manifests/resource/authorization_plug_in.pp +++ b/manifests/resource/authorization_plug_in.pp @@ -12,23 +12,21 @@ $server, $resource_name = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'name' => $resource_name, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/authorization_properties.pp b/manifests/resource/authorization_properties.pp index 36762ed..3adcca3 100644 --- a/manifests/resource/authorization_properties.pp +++ b/manifests/resource/authorization_properties.pp @@ -16,24 +16,22 @@ $path = undef, $relative_to = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'path' => $path, 'relative-to' => $relative_to, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -42,6 +40,4 @@ server => $server } } - - } diff --git a/manifests/resource/bean_validation.pp b/manifests/resource/bean_validation.pp index 6f645ed..e2a6c40 100644 --- a/manifests/resource/bean_validation.pp +++ b/manifests/resource/bean_validation.pp @@ -12,10 +12,9 @@ $server, $enabled = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $enabled != undef and $enabled != undefined { validate_bool($enabled) } @@ -25,13 +24,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -40,6 +38,4 @@ server => $server } } - - } diff --git a/manifests/resource/binary_keyed_jdbc_store.pp b/manifests/resource/binary_keyed_jdbc_store.pp index 663632d..a30895f 100644 --- a/manifests/resource/binary_keyed_jdbc_store.pp +++ b/manifests/resource/binary_keyed_jdbc_store.pp @@ -40,10 +40,9 @@ $shared = undef, $singleton = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $fetch_state != undef and $fetch_state != undefined { validate_bool($fetch_state) } @@ -75,13 +74,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -90,6 +88,4 @@ server => $server } } - - } diff --git a/manifests/resource/binding.pp b/manifests/resource/binding.pp index 14d5676..8655b32 100644 --- a/manifests/resource/binding.pp +++ b/manifests/resource/binding.pp @@ -40,10 +40,9 @@ $type = undef, $value = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $binding_type != undef and $binding_type != undefined and !($binding_type in ['simple','object-factory','lookup','external-context']) { fail('The attribute binding_type is not an allowed value: "simple","object-factory","lookup","external-context"') } @@ -63,13 +62,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -78,6 +76,4 @@ server => $server } } - - } diff --git a/manifests/resource/blocking_bounded_queue_thread_pool.pp b/manifests/resource/blocking_bounded_queue_thread_pool.pp index 0e6d910..392aca4 100644 --- a/manifests/resource/blocking_bounded_queue_thread_pool.pp +++ b/manifests/resource/blocking_bounded_queue_thread_pool.pp @@ -36,10 +36,9 @@ $queue_length = undef, $thread_factory = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $allow_core_timeout != undef and $allow_core_timeout != undefined { validate_bool($allow_core_timeout) } @@ -64,13 +63,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -79,6 +77,4 @@ server => $server } } - - } diff --git a/manifests/resource/blocking_queueless_thread_pool.pp b/manifests/resource/blocking_queueless_thread_pool.pp index 11e028a..f5f8542 100644 --- a/manifests/resource/blocking_queueless_thread_pool.pp +++ b/manifests/resource/blocking_queueless_thread_pool.pp @@ -24,10 +24,9 @@ $resource_name = undef, $thread_factory = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $max_threads != undef and $max_threads != undefined and !is_integer($max_threads) { fail('The attribute max_threads is not an integer') } @@ -40,13 +39,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -55,6 +53,4 @@ server => $server } } - - } diff --git a/manifests/resource/bootstrap_context.pp b/manifests/resource/bootstrap_context.pp index fd717ba..46ac10a 100644 --- a/manifests/resource/bootstrap_context.pp +++ b/manifests/resource/bootstrap_context.pp @@ -16,24 +16,22 @@ $resource_name = undef, $workmanager = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'name' => $resource_name, 'workmanager' => $workmanager, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -42,6 +40,4 @@ server => $server } } - - } diff --git a/manifests/resource/bounded_queue_thread_pool.pp b/manifests/resource/bounded_queue_thread_pool.pp index 0ac6115..53c5c5f 100644 --- a/manifests/resource/bounded_queue_thread_pool.pp +++ b/manifests/resource/bounded_queue_thread_pool.pp @@ -40,10 +40,9 @@ $queue_length = undef, $thread_factory = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $allow_core_timeout != undef and $allow_core_timeout != undefined { validate_bool($allow_core_timeout) } @@ -69,13 +68,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -84,6 +82,4 @@ server => $server } } - - } diff --git a/manifests/resource/bundle.pp b/manifests/resource/bundle.pp index c6c0f3f..a5ca4d0 100644 --- a/manifests/resource/bundle.pp +++ b/manifests/resource/bundle.pp @@ -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, @@ -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 } } - - } diff --git a/manifests/resource/cache.pp b/manifests/resource/cache.pp index 485acf3..a8e7754 100644 --- a/manifests/resource/cache.pp +++ b/manifests/resource/cache.pp @@ -16,10 +16,9 @@ $aliases = undef, $passivation_store = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $aliases != undef and $aliases != undefined and !is_array($aliases) { fail('The attribute aliases is not an array') } @@ -30,13 +29,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -45,6 +43,4 @@ server => $server } } - - } diff --git a/manifests/resource/cache_container.pp b/manifests/resource/cache_container.pp index 97ab56c..57bccbd 100644 --- a/manifests/resource/cache_container.pp +++ b/manifests/resource/cache_container.pp @@ -44,10 +44,9 @@ $start = undef, $statistics_enabled = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $aliases != undef and $aliases != undefined and !is_array($aliases) { fail('The attribute aliases is not an array') } @@ -71,13 +70,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -86,6 +84,4 @@ server => $server } } - - } diff --git a/manifests/resource/cached_connection_manager.pp b/manifests/resource/cached_connection_manager.pp index 4266dfb..d3190ad 100644 --- a/manifests/resource/cached_connection_manager.pp +++ b/manifests/resource/cached_connection_manager.pp @@ -20,10 +20,9 @@ $error = undef, $install = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $debug != undef and $debug != undefined { validate_bool($debug) } @@ -41,13 +40,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -56,6 +54,4 @@ server => $server } } - - } diff --git a/manifests/resource/capability.pp b/manifests/resource/capability.pp index da5637e..22862d8 100644 --- a/manifests/resource/capability.pp +++ b/manifests/resource/capability.pp @@ -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 } } - - } diff --git a/manifests/resource/channel_creation_options.pp b/manifests/resource/channel_creation_options.pp index 17b49f4..58ab727 100644 --- a/manifests/resource/channel_creation_options.pp +++ b/manifests/resource/channel_creation_options.pp @@ -16,10 +16,9 @@ $type = undef, $value = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $type != undef and $type != undefined and !($type in ['remoting','xnio']) { fail('The attribute type is not an allowed value: "remoting","xnio"') } @@ -30,13 +29,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -45,6 +43,4 @@ server => $server } } - - } diff --git a/manifests/resource/cluster_passivation_store.pp b/manifests/resource/cluster_passivation_store.pp index e257bba..ca41edb 100644 --- a/manifests/resource/cluster_passivation_store.pp +++ b/manifests/resource/cluster_passivation_store.pp @@ -36,10 +36,9 @@ $max_size = undef, $passivate_events_on_replicate = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $idle_timeout != undef and $idle_timeout != undefined and !is_integer($idle_timeout) { fail('The attribute idle_timeout is not an integer') } @@ -64,13 +63,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -79,6 +77,4 @@ server => $server } } - - } diff --git a/manifests/resource/commit_markable_resource.pp b/manifests/resource/commit_markable_resource.pp index 88a5a5f..61b2748 100644 --- a/manifests/resource/commit_markable_resource.pp +++ b/manifests/resource/commit_markable_resource.pp @@ -24,10 +24,9 @@ $jndi_name = undef, $resource_name = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $batch_size != undef and $batch_size != undefined and !is_integer($batch_size) { fail('The attribute batch_size is not an integer') } @@ -43,13 +42,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -58,6 +56,4 @@ server => $server } } - - } diff --git a/manifests/resource/condition.pp b/manifests/resource/condition.pp index ee6b083..92a33f7 100644 --- a/manifests/resource/condition.pp +++ b/manifests/resource/condition.pp @@ -20,11 +20,10 @@ $pattern = undef, $test = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'flags' => $flags, 'pattern' => $pattern, @@ -32,13 +31,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -47,6 +45,4 @@ server => $server } } - - } diff --git a/manifests/resource/config_properties.pp b/manifests/resource/config_properties.pp index fe0f5de..166c4d8 100644 --- a/manifests/resource/config_properties.pp +++ b/manifests/resource/config_properties.pp @@ -12,23 +12,21 @@ $server, $value = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'value' => $value, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/configuration.pp b/manifests/resource/configuration.pp index e4d7cf6..3fcd2bf 100644 --- a/manifests/resource/configuration.pp +++ b/manifests/resource/configuration.pp @@ -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 } } - - } diff --git a/manifests/resource/configuration_access_log.pp b/manifests/resource/configuration_access_log.pp index c59f97c..1fa9cb4 100644 --- a/manifests/resource/configuration_access_log.pp +++ b/manifests/resource/configuration_access_log.pp @@ -28,10 +28,9 @@ $resolve_hosts = undef, $rotate = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $extended != undef and $extended != undefined { validate_bool($extended) } @@ -51,13 +50,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -66,6 +64,4 @@ server => $server } } - - } diff --git a/manifests/resource/configuration_container.pp b/manifests/resource/configuration_container.pp index 05b1ff6..5754e08 100644 --- a/manifests/resource/configuration_container.pp +++ b/manifests/resource/configuration_container.pp @@ -16,10 +16,9 @@ $mime_mapping = undef, $welcome_file = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $welcome_file != undef and $welcome_file != undefined and !is_array($welcome_file) { fail('The attribute welcome_file is not an array') } @@ -30,13 +29,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -45,6 +43,4 @@ server => $server } } - - } diff --git a/manifests/resource/configuration_jsp_configuration.pp b/manifests/resource/configuration_jsp_configuration.pp index 3bcba91..df7aaaf 100644 --- a/manifests/resource/configuration_jsp_configuration.pp +++ b/manifests/resource/configuration_jsp_configuration.pp @@ -84,10 +84,9 @@ $trim_spaces = undef, $x_powered_by = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $check_interval != undef and $check_interval != undefined and !is_integer($check_interval) { fail('The attribute check_interval is not an integer') } @@ -157,13 +156,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -172,6 +170,4 @@ server => $server } } - - } diff --git a/manifests/resource/configuration_sso.pp b/manifests/resource/configuration_sso.pp index 78e038a..ba67e85 100644 --- a/manifests/resource/configuration_sso.pp +++ b/manifests/resource/configuration_sso.pp @@ -24,10 +24,9 @@ $domain = undef, $reauthenticate = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $reauthenticate != undef and $reauthenticate != undefined { validate_bool($reauthenticate) } @@ -40,13 +39,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -55,6 +53,4 @@ server => $server } } - - } diff --git a/manifests/resource/configuration_static_resources.pp b/manifests/resource/configuration_static_resources.pp index 6eb3ee2..630ee9f 100644 --- a/manifests/resource/configuration_static_resources.pp +++ b/manifests/resource/configuration_static_resources.pp @@ -40,10 +40,9 @@ $sendfile = undef, $webdav = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $disabled != undef and $disabled != undefined { validate_bool($disabled) } @@ -75,13 +74,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -90,6 +88,4 @@ server => $server } } - - } diff --git a/manifests/resource/connection_definitions.pp b/manifests/resource/connection_definitions.pp index daac887..b296f47 100644 --- a/manifests/resource/connection_definitions.pp +++ b/manifests/resource/connection_definitions.pp @@ -140,10 +140,9 @@ $wrap_xa_resource = undef, $xa_resource_timeout = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $allocation_retry != undef and $allocation_retry != undefined and !is_integer($allocation_retry) { fail('The attribute allocation_retry is not an integer') } @@ -254,13 +253,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -269,6 +267,4 @@ server => $server } } - - } diff --git a/manifests/resource/connection_properties.pp b/manifests/resource/connection_properties.pp index 5ef530d..44b96a2 100644 --- a/manifests/resource/connection_properties.pp +++ b/manifests/resource/connection_properties.pp @@ -12,23 +12,21 @@ $server, $value = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'value' => $value, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/connector_remoting.pp b/manifests/resource/connector_remoting.pp index 5f61ad1..4a0c772 100644 --- a/manifests/resource/connector_remoting.pp +++ b/manifests/resource/connector_remoting.pp @@ -20,12 +20,9 @@ $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, @@ -33,7 +30,8 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options @@ -43,11 +41,10 @@ } if $ensure == absent { - jboss_resource { $path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server } } - - } diff --git a/manifests/resource/connector_web.pp b/manifests/resource/connector_web.pp index e16fe8c..2418b91 100644 --- a/manifests/resource/connector_web.pp +++ b/manifests/resource/connector_web.pp @@ -68,7 +68,7 @@ $socket_binding = undef, $virtual_server = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { @@ -88,7 +88,6 @@ fail('The attribute redirect_port is not an integer') } - $raw_options = { 'enable-lookups' => $enable_lookups, 'enabled' => $enabled, @@ -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 } } - - } diff --git a/manifests/resource/console_handler.pp b/manifests/resource/console_handler.pp index cca25df..44a790f 100644 --- a/manifests/resource/console_handler.pp +++ b/manifests/resource/console_handler.pp @@ -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, @@ -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 @@ -63,11 +61,10 @@ } if $ensure == absent { - jboss_resource { $path: - ensure => $ensure, - server => $server + jboss_resource { $name: + address => $cli_path, + ensure => $ensure, + server => $server } } - - } diff --git a/manifests/resource/constraint_vault_expression.pp b/manifests/resource/constraint_vault_expression.pp index eacff05..1c171b1 100644 --- a/manifests/resource/constraint_vault_expression.pp +++ b/manifests/resource/constraint_vault_expression.pp @@ -24,10 +24,9 @@ $default_requires_read = undef, $default_requires_write = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $configured_requires_read != undef and $configured_requires_read != undefined { validate_bool($configured_requires_read) } @@ -49,13 +48,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -64,6 +62,4 @@ server => $server } } - - } diff --git a/manifests/resource/content.pp b/manifests/resource/content.pp index 66982b7..7d19b26 100644 --- a/manifests/resource/content.pp +++ b/manifests/resource/content.pp @@ -12,23 +12,21 @@ $server, $content = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'content' => $content, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/core_service_module_loading.pp b/manifests/resource/core_service_module_loading.pp index 1ba5101..7918eea 100644 --- a/manifests/resource/core_service_module_loading.pp +++ b/manifests/resource/core_service_module_loading.pp @@ -12,10 +12,9 @@ $server, $module_roots = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $module_roots != undef and $module_roots != undefined and !is_array($module_roots) { fail('The attribute module_roots is not an array') } @@ -25,13 +24,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -40,6 +38,4 @@ server => $server } } - - } diff --git a/manifests/resource/core_service_server_environment.pp b/manifests/resource/core_service_server_environment.pp index b34838d..a6a3610 100644 --- a/manifests/resource/core_service_server_environment.pp +++ b/manifests/resource/core_service_server_environment.pp @@ -76,10 +76,9 @@ $server_name = undef, $temp_dir = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $initial_running_mode != undef and $initial_running_mode != undefined and !($initial_running_mode in ['NORMAL','ADMIN_ONLY']) { fail('The attribute initial_running_mode is not an allowed value: "NORMAL","ADMIN_ONLY"') } @@ -105,13 +104,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -120,6 +118,4 @@ server => $server } } - - } diff --git a/manifests/resource/core_service_vault.pp b/manifests/resource/core_service_vault.pp index 64f2ade..fdec6f3 100644 --- a/manifests/resource/core_service_vault.pp +++ b/manifests/resource/core_service_vault.pp @@ -20,11 +20,10 @@ $module = undef, $vault_options = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'code' => $code, 'module' => $module, @@ -32,13 +31,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -47,6 +45,4 @@ server => $server } } - - } diff --git a/manifests/resource/custom.pp b/manifests/resource/custom.pp index 8fb8485..8c794bb 100644 --- a/manifests/resource/custom.pp +++ b/manifests/resource/custom.pp @@ -32,10 +32,9 @@ $tls = undef, $username = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $ssl != undef and $ssl != undefined { validate_bool($ssl) } @@ -53,13 +52,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -68,6 +66,4 @@ server => $server } } - - } diff --git a/manifests/resource/custom_formatter.pp b/manifests/resource/custom_formatter.pp index 58a242d..150cd8f 100644 --- a/manifests/resource/custom_formatter.pp +++ b/manifests/resource/custom_formatter.pp @@ -20,11 +20,10 @@ $module = undef, $properties = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'class' => $class, 'module' => $module, @@ -32,13 +31,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -47,6 +45,4 @@ server => $server } } - - } diff --git a/manifests/resource/custom_load_metric.pp b/manifests/resource/custom_load_metric.pp index 8f1e630..37f6f28 100644 --- a/manifests/resource/custom_load_metric.pp +++ b/manifests/resource/custom_load_metric.pp @@ -24,10 +24,9 @@ $property = undef, $weight = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $weight != undef and $weight != undefined and !is_integer($weight) { fail('The attribute weight is not an integer') } @@ -40,13 +39,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -55,6 +53,4 @@ server => $server } } - - } diff --git a/manifests/resource/data_source.pp b/manifests/resource/data_source.pp index d430978..4d2d5f2 100644 --- a/manifests/resource/data_source.pp +++ b/manifests/resource/data_source.pp @@ -200,10 +200,9 @@ $valid_connection_checker_properties = undef, $validate_on_match = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $allocation_retry != undef and $allocation_retry != undefined and !is_integer($allocation_retry) { fail('The attribute allocation_retry is not an integer') } @@ -335,13 +334,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -350,6 +348,4 @@ server => $server } } - - } diff --git a/manifests/resource/deployment.pp b/manifests/resource/deployment.pp index 8cc17d3..55f95e7 100644 --- a/manifests/resource/deployment.pp +++ b/manifests/resource/deployment.pp @@ -28,10 +28,9 @@ $persistent = undef, $runtime_name = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $content != undef and $content != undefined and !is_array($content) { fail('The attribute content is not an array') } @@ -51,13 +50,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -66,6 +64,4 @@ server => $server } } - - } diff --git a/manifests/resource/directory.pp b/manifests/resource/directory.pp index 5f7abf9..c373bf8 100644 --- a/manifests/resource/directory.pp +++ b/manifests/resource/directory.pp @@ -19,30 +19,25 @@ $cli_path = $name ) { if $ensure == present { - - - $raw_options = { 'path' => $path, 'relative-to' => $relative_to, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { - jboss_resource { $cli_path: - ensure => $ensure, - server => $server + jboss_resource { $name: + address => $cli_path, + ensure => $ensure, + server => $server } } - - } diff --git a/manifests/resource/distributed_cache.pp b/manifests/resource/distributed_cache.pp index 6c9b923..a4b3191 100644 --- a/manifests/resource/distributed_cache.pp +++ b/manifests/resource/distributed_cache.pp @@ -72,10 +72,9 @@ $statistics_enabled = undef, $virtual_nodes = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $async_marshalling != undef and $async_marshalling != undefined { validate_bool($async_marshalling) } @@ -136,13 +135,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -151,6 +149,4 @@ server => $server } } - - } diff --git a/manifests/resource/dynamic_load_provider.pp b/manifests/resource/dynamic_load_provider.pp index d1d6ad4..921deee 100644 --- a/manifests/resource/dynamic_load_provider.pp +++ b/manifests/resource/dynamic_load_provider.pp @@ -16,10 +16,9 @@ $decay = undef, $history = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $decay != undef and $decay != undefined and !is_integer($decay) { fail('The attribute decay is not an integer') } @@ -33,13 +32,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -48,6 +46,4 @@ server => $server } } - - } diff --git a/manifests/resource/endpoint.pp b/manifests/resource/endpoint.pp index 89000da..4afb6cd 100644 --- a/manifests/resource/endpoint.pp +++ b/manifests/resource/endpoint.pp @@ -28,11 +28,10 @@ $type = undef, $wsdl_url = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'class' => $class, 'context' => $context, @@ -42,13 +41,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -57,6 +55,4 @@ server => $server } } - - } diff --git a/manifests/resource/entity_bean.pp b/manifests/resource/entity_bean.pp index d2c4ed8..3a07094 100644 --- a/manifests/resource/entity_bean.pp +++ b/manifests/resource/entity_bean.pp @@ -48,10 +48,9 @@ $run_as_role = undef, $security_domain = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $declared_roles != undef and $declared_roles != undefined and !is_array($declared_roles) { fail('The attribute declared_roles is not an array') } @@ -85,13 +84,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -100,6 +98,4 @@ server => $server } } - - } diff --git a/manifests/resource/eviction.pp b/manifests/resource/eviction.pp index 41a35bb..3fe5fc7 100644 --- a/manifests/resource/eviction.pp +++ b/manifests/resource/eviction.pp @@ -16,10 +16,9 @@ $max_entries = undef, $strategy = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $max_entries != undef and $max_entries != undefined and !is_integer($max_entries) { fail('The attribute max_entries is not an integer') } @@ -33,13 +32,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -48,6 +46,4 @@ server => $server } } - - } diff --git a/manifests/resource/exclude.pp b/manifests/resource/exclude.pp index d2058e6..8711996 100644 --- a/manifests/resource/exclude.pp +++ b/manifests/resource/exclude.pp @@ -20,10 +20,9 @@ $realm = undef, $type = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $type != undef and $type != undefined and !($type in ['GROUP','USER']) { fail('The attribute type is not an allowed value: "GROUP","USER"') } @@ -35,13 +34,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -50,6 +48,4 @@ server => $server } } - - } diff --git a/manifests/resource/expiration.pp b/manifests/resource/expiration.pp index 86aac9e..daaac32 100644 --- a/manifests/resource/expiration.pp +++ b/manifests/resource/expiration.pp @@ -20,10 +20,9 @@ $lifespan = undef, $max_idle = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $interval != undef and $interval != undefined and !is_integer($interval) { fail('The attribute interval is not an integer') } @@ -41,13 +40,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -56,6 +54,4 @@ server => $server } } - - } diff --git a/manifests/resource/expose_model_expression.pp b/manifests/resource/expose_model_expression.pp index bfb0615..66ef751 100644 --- a/manifests/resource/expose_model_expression.pp +++ b/manifests/resource/expose_model_expression.pp @@ -12,23 +12,21 @@ $server, $domain_name = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'domain-name' => $domain_name, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/expose_model_resolved.pp b/manifests/resource/expose_model_resolved.pp index c61a1c5..c61810f 100644 --- a/manifests/resource/expose_model_resolved.pp +++ b/manifests/resource/expose_model_resolved.pp @@ -16,10 +16,9 @@ $domain_name = undef, $proper_property_format = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $proper_property_format != undef and $proper_property_format != undefined { validate_bool($proper_property_format) } @@ -30,13 +29,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -45,6 +43,4 @@ server => $server } } - - } diff --git a/manifests/resource/extension.pp b/manifests/resource/extension.pp index 235585b..5fa450c 100644 --- a/manifests/resource/extension.pp +++ b/manifests/resource/extension.pp @@ -12,23 +12,21 @@ $server, $module = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'module' => $module, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/file_handler.pp b/manifests/resource/file_handler.pp index aba019b..e3191b1 100644 --- a/manifests/resource/file_handler.pp +++ b/manifests/resource/file_handler.pp @@ -40,12 +40,9 @@ $level = undef, $resource_name = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { - - - $raw_options = { 'append' => $append, 'autoflush' => $autoflush, @@ -58,21 +55,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 } } - - } diff --git a/manifests/resource/file_passivation_store.pp b/manifests/resource/file_passivation_store.pp index 66068ad..26bf23b 100644 --- a/manifests/resource/file_passivation_store.pp +++ b/manifests/resource/file_passivation_store.pp @@ -36,10 +36,9 @@ $sessions_path = undef, $subdirectory_count = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $idle_timeout != undef and $idle_timeout != undefined and !is_integer($idle_timeout) { fail('The attribute idle_timeout is not an integer') } @@ -64,13 +63,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -79,6 +77,4 @@ server => $server } } - - } diff --git a/manifests/resource/file_store.pp b/manifests/resource/file_store.pp index 058c504..b3f2eee 100644 --- a/manifests/resource/file_store.pp +++ b/manifests/resource/file_store.pp @@ -40,10 +40,9 @@ $shared = undef, $singleton = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $fetch_state != undef and $fetch_state != undefined { validate_bool($fetch_state) } @@ -75,13 +74,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -90,6 +88,4 @@ server => $server } } - - } diff --git a/manifests/resource/group_search_group_to_principal.pp b/manifests/resource/group_search_group_to_principal.pp index fafa7b5..95855c8 100644 --- a/manifests/resource/group_search_group_to_principal.pp +++ b/manifests/resource/group_search_group_to_principal.pp @@ -44,10 +44,9 @@ $recursive = undef, $search_by = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $group_name != undef and $group_name != undefined and !($group_name in ['DISTINGUISHED_NAME','SIMPLE']) { fail('The attribute group_name is not an allowed value: "DISTINGUISHED_NAME","SIMPLE"') } @@ -77,13 +76,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -92,6 +90,4 @@ server => $server } } - - } diff --git a/manifests/resource/group_search_principal_to_group.pp b/manifests/resource/group_search_principal_to_group.pp index 3c3d3fe..2d91a7b 100644 --- a/manifests/resource/group_search_principal_to_group.pp +++ b/manifests/resource/group_search_principal_to_group.pp @@ -32,10 +32,9 @@ $iterative = undef, $prefer_original_connection = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $group_name != undef and $group_name != undefined and !($group_name in ['DISTINGUISHED_NAME','SIMPLE']) { fail('The attribute group_name is not an allowed value: "DISTINGUISHED_NAME","SIMPLE"') } @@ -56,13 +55,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -71,6 +69,4 @@ server => $server } } - - } diff --git a/manifests/resource/handler.pp b/manifests/resource/handler.pp index 93615e6..1310e65 100644 --- a/manifests/resource/handler.pp +++ b/manifests/resource/handler.pp @@ -12,23 +12,21 @@ $server, $class = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'class' => $class, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/hibernate_persistence_unit.pp b/manifests/resource/hibernate_persistence_unit.pp index 379576c..d6b243a 100644 --- a/manifests/resource/hibernate_persistence_unit.pp +++ b/manifests/resource/hibernate_persistence_unit.pp @@ -12,10 +12,9 @@ $server, $enabled = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $enabled != undef and $enabled != undefined { validate_bool($enabled) } @@ -25,13 +24,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -40,6 +38,4 @@ server => $server } } - - } diff --git a/manifests/resource/identity_trust.pp b/manifests/resource/identity_trust.pp index a36afd7..64a025a 100644 --- a/manifests/resource/identity_trust.pp +++ b/manifests/resource/identity_trust.pp @@ -12,10 +12,9 @@ $server, $trust_modules = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $trust_modules != undef and $trust_modules != undefined and !is_array($trust_modules) { fail('The attribute trust_modules is not an array') } @@ -25,13 +24,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -40,6 +38,4 @@ server => $server } } - - } diff --git a/manifests/resource/include.pp b/manifests/resource/include.pp index 982e7fe..8bc3c16 100644 --- a/manifests/resource/include.pp +++ b/manifests/resource/include.pp @@ -20,10 +20,9 @@ $realm = undef, $type = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $type != undef and $type != undefined and !($type in ['GROUP','USER']) { fail('The attribute type is not an allowed value: "GROUP","USER"') } @@ -35,13 +34,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -50,6 +48,4 @@ server => $server } } - - } diff --git a/manifests/resource/interface.pp b/manifests/resource/interface.pp index 393189e..385b68c 100644 --- a/manifests/resource/interface.pp +++ b/manifests/resource/interface.pp @@ -88,10 +88,9 @@ $up = undef, $virtual = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $any_address != undef and $any_address != undefined { validate_bool($any_address) } @@ -150,13 +149,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -165,6 +163,4 @@ server => $server } } - - } diff --git a/manifests/resource/invalidation_cache.pp b/manifests/resource/invalidation_cache.pp index 9a06731..5c474c9 100644 --- a/manifests/resource/invalidation_cache.pp +++ b/manifests/resource/invalidation_cache.pp @@ -56,10 +56,9 @@ $start = undef, $statistics_enabled = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $async_marshalling != undef and $async_marshalling != undefined { validate_bool($async_marshalling) } @@ -104,13 +103,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -119,6 +117,4 @@ server => $server } } - - } diff --git a/manifests/resource/jdbc_driver.pp b/manifests/resource/jdbc_driver.pp index 8cf7ea0..faf0ff3 100644 --- a/manifests/resource/jdbc_driver.pp +++ b/manifests/resource/jdbc_driver.pp @@ -52,10 +52,9 @@ $module_slot = undef, $xa_datasource_class = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $driver_major_version != undef and $driver_major_version != undefined and !is_integer($driver_major_version) { fail('The attribute driver_major_version is not an integer') } @@ -81,13 +80,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -96,6 +94,4 @@ server => $server } } - - } diff --git a/manifests/resource/json_formatter.pp b/manifests/resource/json_formatter.pp index 0601349..e29cf69 100644 --- a/manifests/resource/json_formatter.pp +++ b/manifests/resource/json_formatter.pp @@ -33,10 +33,9 @@ $escape_new_line = undef, $include_date = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $compact != undef and $compact != undefined { validate_bool($compact) } @@ -60,13 +59,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -75,6 +73,4 @@ server => $server } } - - } diff --git a/manifests/resource/jsse.pp b/manifests/resource/jsse.pp index 232c9d8..09fc3b7 100644 --- a/manifests/resource/jsse.pp +++ b/manifests/resource/jsse.pp @@ -52,10 +52,9 @@ $trust_manager = undef, $truststore = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $client_auth != undef and $client_auth != undefined { validate_bool($client_auth) } @@ -75,13 +74,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -90,6 +88,4 @@ server => $server } } - - } diff --git a/manifests/resource/ldap_connection.pp b/manifests/resource/ldap_connection.pp index 443754b..40ed5fb 100644 --- a/manifests/resource/ldap_connection.pp +++ b/manifests/resource/ldap_connection.pp @@ -36,10 +36,9 @@ $security_realm = undef, $url = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $handles_referrals_for != undef and $handles_referrals_for != undefined and !is_array($handles_referrals_for) { fail('The attribute handles_referrals_for is not an array') } @@ -58,13 +57,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -73,6 +71,4 @@ server => $server } } - - } diff --git a/manifests/resource/load_metric.pp b/manifests/resource/load_metric.pp index d8adfb9..c7734e1 100644 --- a/manifests/resource/load_metric.pp +++ b/manifests/resource/load_metric.pp @@ -24,10 +24,9 @@ $type = undef, $weight = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $type != undef and $type != undefined and !($type in ['cpu','mem','heap','sessions','receive-traffic','send-traffic','requests','busyness']) { fail('The attribute type is not an allowed value: "cpu","mem","heap","sessions","receive-traffic","send-traffic","requests","busyness"') } @@ -43,13 +42,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -58,6 +56,4 @@ server => $server } } - - } diff --git a/manifests/resource/local_cache.pp b/manifests/resource/local_cache.pp index b39c319..2bfbf55 100644 --- a/manifests/resource/local_cache.pp +++ b/manifests/resource/local_cache.pp @@ -36,10 +36,9 @@ $start = undef, $statistics_enabled = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $batching != undef and $batching != undefined { validate_bool($batching) } @@ -64,13 +63,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -79,6 +77,4 @@ server => $server } } - - } diff --git a/manifests/resource/local_destination_outbound_socket_binding.pp b/manifests/resource/local_destination_outbound_socket_binding.pp index adc372c..85cea31 100644 --- a/manifests/resource/local_destination_outbound_socket_binding.pp +++ b/manifests/resource/local_destination_outbound_socket_binding.pp @@ -24,10 +24,9 @@ $source_interface = undef, $source_port = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $fixed_source_port != undef and $fixed_source_port != undefined { validate_bool($fixed_source_port) } @@ -43,13 +42,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -58,6 +56,4 @@ server => $server } } - - } diff --git a/manifests/resource/local_outbound_connection.pp b/manifests/resource/local_outbound_connection.pp index d589e65..40963a2 100644 --- a/manifests/resource/local_outbound_connection.pp +++ b/manifests/resource/local_outbound_connection.pp @@ -12,23 +12,21 @@ $server, $outbound_socket_binding_ref = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'outbound-socket-binding-ref' => $outbound_socket_binding_ref, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/locking.pp b/manifests/resource/locking.pp index 924148c..97cba14 100644 --- a/manifests/resource/locking.pp +++ b/manifests/resource/locking.pp @@ -24,10 +24,9 @@ $isolation = undef, $striping = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $acquire_timeout != undef and $acquire_timeout != undefined and !is_integer($acquire_timeout) { fail('The attribute acquire_timeout is not an integer') } @@ -49,13 +48,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -64,6 +62,4 @@ server => $server } } - - } diff --git a/manifests/resource/log_store.pp b/manifests/resource/log_store.pp index 097ef03..5e3aedd 100644 --- a/manifests/resource/log_store.pp +++ b/manifests/resource/log_store.pp @@ -12,23 +12,21 @@ $server, $type = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'type' => $type, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/logger.pp b/manifests/resource/logger.pp index e2e0b21..84f1952 100644 --- a/manifests/resource/logger.pp +++ b/manifests/resource/logger.pp @@ -28,12 +28,9 @@ $level = undef, $use_parent_handlers = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { - - - $raw_options = { 'category' => $category, 'filter' => $filter, @@ -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 } } - - } diff --git a/manifests/resource/login_module.pp b/manifests/resource/login_module.pp index 090addb..0a55669 100644 --- a/manifests/resource/login_module.pp +++ b/manifests/resource/login_module.pp @@ -24,10 +24,9 @@ $module = undef, $module_options = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $flag != undef and $flag != undefined and !($flag in ['required','requisite','sufficient','optional']) { fail('The attribute flag is not an allowed value: "required","requisite","sufficient","optional"') } @@ -40,13 +39,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -55,6 +53,4 @@ server => $server } } - - } diff --git a/manifests/resource/login_module_stack.pp b/manifests/resource/login_module_stack.pp index 6ba8e85..c3e881d 100644 --- a/manifests/resource/login_module_stack.pp +++ b/manifests/resource/login_module_stack.pp @@ -12,10 +12,9 @@ $server, $login_modules = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $login_modules != undef and $login_modules != undefined and !is_array($login_modules) { fail('The attribute login_modules is not an array') } @@ -25,13 +24,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -40,6 +38,4 @@ server => $server } } - - } diff --git a/manifests/resource/long_running_threads.pp b/manifests/resource/long_running_threads.pp index 8539778..4e47be5 100644 --- a/manifests/resource/long_running_threads.pp +++ b/manifests/resource/long_running_threads.pp @@ -40,10 +40,9 @@ $queue_length = undef, $thread_factory = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $allow_core_timeout != undef and $allow_core_timeout != undefined { validate_bool($allow_core_timeout) } @@ -69,13 +68,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -84,6 +82,4 @@ server => $server } } - - } diff --git a/manifests/resource/mail_session.pp b/manifests/resource/mail_session.pp index c82b036..bd0a5d1 100644 --- a/manifests/resource/mail_session.pp +++ b/manifests/resource/mail_session.pp @@ -20,10 +20,9 @@ $from = undef, $jndi_name = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $debug != undef and $debug != undefined { validate_bool($debug) } @@ -35,13 +34,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -50,6 +48,4 @@ server => $server } } - - } diff --git a/manifests/resource/management_interface_http_interface.pp b/manifests/resource/management_interface_http_interface.pp index 34dbb0a..dfb01d1 100644 --- a/manifests/resource/management_interface_http_interface.pp +++ b/manifests/resource/management_interface_http_interface.pp @@ -36,10 +36,9 @@ $security_realm = undef, $socket_binding = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $console_enabled != undef and $console_enabled != undefined { validate_bool($console_enabled) } @@ -61,13 +60,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -76,6 +74,4 @@ server => $server } } - - } diff --git a/manifests/resource/management_interface_native_interface.pp b/manifests/resource/management_interface_native_interface.pp index 7e9f87e..8faccae 100644 --- a/manifests/resource/management_interface_native_interface.pp +++ b/manifests/resource/management_interface_native_interface.pp @@ -24,10 +24,9 @@ $security_realm = undef, $socket_binding = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $port != undef and $port != undefined and !is_integer($port) { fail('The attribute port is not an integer') } @@ -40,13 +39,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -55,6 +53,4 @@ server => $server } } - - } diff --git a/manifests/resource/mapping.pp b/manifests/resource/mapping.pp index 6cd2683..63e01ce 100644 --- a/manifests/resource/mapping.pp +++ b/manifests/resource/mapping.pp @@ -12,10 +12,9 @@ $server, $mapping_modules = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $mapping_modules != undef and $mapping_modules != undefined and !is_array($mapping_modules) { fail('The attribute mapping_modules is not an array') } @@ -25,13 +24,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -40,6 +38,4 @@ server => $server } } - - } diff --git a/manifests/resource/mapping_module.pp b/manifests/resource/mapping_module.pp index 52c1924..85974ba 100644 --- a/manifests/resource/mapping_module.pp +++ b/manifests/resource/mapping_module.pp @@ -24,11 +24,10 @@ $module_options = undef, $type = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'code' => $code, 'module' => $module, @@ -37,13 +36,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -52,6 +50,4 @@ server => $server } } - - } diff --git a/manifests/resource/message_driven_bean.pp b/manifests/resource/message_driven_bean.pp index 18ba832..59d5ad0 100644 --- a/manifests/resource/message_driven_bean.pp +++ b/manifests/resource/message_driven_bean.pp @@ -56,10 +56,9 @@ $security_domain = undef, $timers = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $declared_roles != undef and $declared_roles != undefined and !is_array($declared_roles) { fail('The attribute declared_roles is not an array') } @@ -101,13 +100,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -116,6 +114,4 @@ server => $server } } - - } diff --git a/manifests/resource/mixed_keyed_jdbc_store.pp b/manifests/resource/mixed_keyed_jdbc_store.pp index c461536..4bdd075 100644 --- a/manifests/resource/mixed_keyed_jdbc_store.pp +++ b/manifests/resource/mixed_keyed_jdbc_store.pp @@ -44,10 +44,9 @@ $singleton = undef, $string_keyed_table = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $fetch_state != undef and $fetch_state != undefined { validate_bool($fetch_state) } @@ -80,13 +79,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -95,6 +93,4 @@ server => $server } } - - } diff --git a/manifests/resource/mod_cluster_config.pp b/manifests/resource/mod_cluster_config.pp index 693d2a6..728da18 100644 --- a/manifests/resource/mod_cluster_config.pp +++ b/manifests/resource/mod_cluster_config.pp @@ -108,10 +108,9 @@ $ttl = undef, $worker_timeout = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $advertise != undef and $advertise != undefined { validate_bool($advertise) } @@ -193,13 +192,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -208,6 +206,4 @@ server => $server } } - - } diff --git a/manifests/resource/outbound_connection.pp b/manifests/resource/outbound_connection.pp index 9b789e5..f85bec1 100644 --- a/manifests/resource/outbound_connection.pp +++ b/manifests/resource/outbound_connection.pp @@ -12,23 +12,21 @@ $server, $uri = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'uri' => $uri, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/participants.pp b/manifests/resource/participants.pp index c468253..5c53d11 100644 --- a/manifests/resource/participants.pp +++ b/manifests/resource/participants.pp @@ -32,10 +32,9 @@ $status = undef, $type = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $status != undef and $status != undefined and !($status in ['PENDING','PREPARED','FAILED','HEURISTIC','READONLY']) { fail('The attribute status is not an allowed value: "PENDING","PREPARED","FAILED","HEURISTIC","READONLY"') } @@ -50,13 +49,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -65,6 +63,4 @@ server => $server } } - - } diff --git a/manifests/resource/path.pp b/manifests/resource/path.pp index 7c91534..5fe9c32 100644 --- a/manifests/resource/path.pp +++ b/manifests/resource/path.pp @@ -24,10 +24,9 @@ $read_only = undef, $relative_to = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $read_only != undef and $read_only != undefined { validate_bool($read_only) } @@ -40,13 +39,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -55,6 +53,4 @@ server => $server } } - - } diff --git a/manifests/resource/pattern_formatter.pp b/manifests/resource/pattern_formatter.pp index 17dba59..d12b086 100644 --- a/manifests/resource/pattern_formatter.pp +++ b/manifests/resource/pattern_formatter.pp @@ -16,24 +16,22 @@ $color_map = undef, $pattern = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'color-map' => $color_map, 'pattern' => $pattern, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -42,6 +40,4 @@ server => $server } } - - } diff --git a/manifests/resource/periodic_rotating_file_handler.pp b/manifests/resource/periodic_rotating_file_handler.pp index d359782..ff8cc6a 100644 --- a/manifests/resource/periodic_rotating_file_handler.pp +++ b/manifests/resource/periodic_rotating_file_handler.pp @@ -44,12 +44,9 @@ $resource_name = undef, $suffix = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { - - - $raw_options = { 'append' => $append, 'autoflush' => $autoflush, @@ -63,21 +60,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 } } - - } diff --git a/manifests/resource/policy_module.pp b/manifests/resource/policy_module.pp index 646b030..41035eb 100644 --- a/manifests/resource/policy_module.pp +++ b/manifests/resource/policy_module.pp @@ -24,10 +24,9 @@ $module = undef, $module_options = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $flag != undef and $flag != undefined and !($flag in ['required','requisite','sufficient','optional']) { fail('The attribute flag is not an allowed value: "required","requisite","sufficient","optional"') } @@ -40,13 +39,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -55,6 +53,4 @@ server => $server } } - - } diff --git a/manifests/resource/post_handler_chain.pp b/manifests/resource/post_handler_chain.pp index ff530bd..12a682a 100644 --- a/manifests/resource/post_handler_chain.pp +++ b/manifests/resource/post_handler_chain.pp @@ -12,23 +12,21 @@ $server, $protocol_bindings = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'protocol-bindings' => $protocol_bindings, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/pre_handler_chain.pp b/manifests/resource/pre_handler_chain.pp index 31394d0..3f250ed 100644 --- a/manifests/resource/pre_handler_chain.pp +++ b/manifests/resource/pre_handler_chain.pp @@ -12,23 +12,21 @@ $server, $protocol_bindings = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'protocol-bindings' => $protocol_bindings, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/property.pp b/manifests/resource/property.pp index fa97dee..82298fb 100644 --- a/manifests/resource/property.pp +++ b/manifests/resource/property.pp @@ -15,27 +15,24 @@ $cli_path = $name ) { if $ensure == present { - $raw_options = { 'value' => $value, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { - jboss_resource { $cli_path: - ensure => $ensure, - server => $server + jboss_resource { $name: + address => $cli_path, + ensure => $ensure, + server => $server } } - - } diff --git a/manifests/resource/protocol.pp b/manifests/resource/protocol.pp index 7f7f6a5..e32e71e 100644 --- a/manifests/resource/protocol.pp +++ b/manifests/resource/protocol.pp @@ -16,10 +16,10 @@ $socket_binding = undef, $type = undef, $ensure = present, - $path = $name + $cli_path = $name ) { - $stack = regsubst($path, '/protocol.*$', '') - $check_command = "(outcome == success) of ${path}:read-resource()" + $stack = regsubst($cli_path, '/protocol.*$', '') + $check_command = "(outcome == success) of ${cli_path}:read-resource()" if $type == undef or $type == undefined { fail('type is required') @@ -36,24 +36,25 @@ } $options = delete_undef_values($raw_options) - jboss_exec { $add_command: - unless => $check_command, - server => $server + jboss_exec { "${name}: add": + command => $add_command, + unless => $check_command, + server => $server } - -> jboss_resource { $path: + -> + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - } if $ensure == absent { - jboss_exec { $remove_command: - onlyif => $check_command, - server => $server + jboss_exec { "${name}: remove": + command => $remove_command, + onlyif => $check_command, + server => $server } } - - } diff --git a/manifests/resource/protocol_tcp.pp b/manifests/resource/protocol_tcp.pp index 147a616..a3ee721 100644 --- a/manifests/resource/protocol_tcp.pp +++ b/manifests/resource/protocol_tcp.pp @@ -20,10 +20,9 @@ $message_transfer = undef, $port = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $port != undef and $port != undefined and !is_integer($port) { fail('The attribute port is not an integer') } @@ -35,13 +34,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -50,6 +48,4 @@ server => $server } } - - } diff --git a/manifests/resource/protocol_tls.pp b/manifests/resource/protocol_tls.pp index 1837407..bc394cd 100644 --- a/manifests/resource/protocol_tls.pp +++ b/manifests/resource/protocol_tls.pp @@ -20,10 +20,9 @@ $message_transfer = undef, $port = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $port != undef and $port != undefined and !is_integer($port) { fail('The attribute port is not an integer') } @@ -35,13 +34,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -50,6 +48,4 @@ server => $server } } - - } diff --git a/manifests/resource/protocol_udp.pp b/manifests/resource/protocol_udp.pp index 58aaffc..3acab38 100644 --- a/manifests/resource/protocol_udp.pp +++ b/manifests/resource/protocol_udp.pp @@ -16,10 +16,9 @@ $host = undef, $port = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $port != undef and $port != undefined and !is_integer($port) { fail('The attribute port is not an integer') } @@ -30,13 +29,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -45,6 +43,4 @@ server => $server } } - - } diff --git a/manifests/resource/provider_module.pp b/manifests/resource/provider_module.pp index 37d2581..245dc5f 100644 --- a/manifests/resource/provider_module.pp +++ b/manifests/resource/provider_module.pp @@ -16,24 +16,22 @@ $code = undef, $module_options = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'code' => $code, 'module-options' => $module_options, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -42,6 +40,4 @@ server => $server } } - - } diff --git a/manifests/resource/queueless_thread_pool.pp b/manifests/resource/queueless_thread_pool.pp index c6cbd2b..af1ad89 100644 --- a/manifests/resource/queueless_thread_pool.pp +++ b/manifests/resource/queueless_thread_pool.pp @@ -28,10 +28,9 @@ $resource_name = undef, $thread_factory = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $max_threads != undef and $max_threads != undefined and !is_integer($max_threads) { fail('The attribute max_threads is not an integer') } @@ -45,13 +44,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -60,6 +58,4 @@ server => $server } } - - } diff --git a/manifests/resource/remote_destination_outbound_socket_binding.pp b/manifests/resource/remote_destination_outbound_socket_binding.pp index ef8a98a..dab983b 100644 --- a/manifests/resource/remote_destination_outbound_socket_binding.pp +++ b/manifests/resource/remote_destination_outbound_socket_binding.pp @@ -28,10 +28,9 @@ $source_interface = undef, $source_port = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $fixed_source_port != undef and $fixed_source_port != undefined { validate_bool($fixed_source_port) } @@ -51,13 +50,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -66,6 +64,4 @@ server => $server } } - - } diff --git a/manifests/resource/remote_outbound_connection.pp b/manifests/resource/remote_outbound_connection.pp index c4dcc7d..00cfd32 100644 --- a/manifests/resource/remote_outbound_connection.pp +++ b/manifests/resource/remote_outbound_connection.pp @@ -20,11 +20,10 @@ $security_realm = undef, $username = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'outbound-socket-binding-ref' => $outbound_socket_binding_ref, 'security-realm' => $security_realm, @@ -32,13 +31,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -47,6 +45,4 @@ server => $server } } - - } diff --git a/manifests/resource/remote_store.pp b/manifests/resource/remote_store.pp index 8a5e316..1124ae3 100644 --- a/manifests/resource/remote_store.pp +++ b/manifests/resource/remote_store.pp @@ -48,10 +48,9 @@ $socket_timeout = undef, $tcp_no_delay = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $fetch_state != undef and $fetch_state != undefined { validate_bool($fetch_state) } @@ -94,13 +93,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -109,6 +107,4 @@ server => $server } } - - } diff --git a/manifests/resource/remoting_connector.pp b/manifests/resource/remoting_connector.pp index 8fc7a44..580b5f8 100644 --- a/manifests/resource/remoting_connector.pp +++ b/manifests/resource/remoting_connector.pp @@ -12,10 +12,9 @@ $server, $use_management_endpoint = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $use_management_endpoint != undef and $use_management_endpoint != undefined { validate_bool($use_management_endpoint) } @@ -25,13 +24,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -40,6 +38,4 @@ server => $server } } - - } diff --git a/manifests/resource/replicated_cache.pp b/manifests/resource/replicated_cache.pp index 72aff50..2adb0e5 100644 --- a/manifests/resource/replicated_cache.pp +++ b/manifests/resource/replicated_cache.pp @@ -56,10 +56,9 @@ $start = undef, $statistics_enabled = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $async_marshalling != undef and $async_marshalling != undefined { validate_bool($async_marshalling) } @@ -104,13 +103,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -119,6 +117,4 @@ server => $server } } - - } diff --git a/manifests/resource/resource_adapter.pp b/manifests/resource/resource_adapter.pp index 375bd22..9ad331c 100644 --- a/manifests/resource/resource_adapter.pp +++ b/manifests/resource/resource_adapter.pp @@ -32,10 +32,9 @@ $module = undef, $transaction_support = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $beanvalidationgroups != undef and $beanvalidationgroups != undefined and !is_array($beanvalidationgroups) { fail('The attribute beanvalidationgroups is not an array') } @@ -53,13 +52,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -68,6 +66,4 @@ server => $server } } - - } diff --git a/manifests/resource/rewrite.pp b/manifests/resource/rewrite.pp index a832745..254b653 100644 --- a/manifests/resource/rewrite.pp +++ b/manifests/resource/rewrite.pp @@ -20,11 +20,10 @@ $pattern = undef, $substitution = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'flags' => $flags, 'pattern' => $pattern, @@ -32,13 +31,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -47,6 +45,4 @@ server => $server } } - - } diff --git a/manifests/resource/role_mapping.pp b/manifests/resource/role_mapping.pp index 9536397..bfd8e59 100644 --- a/manifests/resource/role_mapping.pp +++ b/manifests/resource/role_mapping.pp @@ -12,10 +12,9 @@ $server, $include_all = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $include_all != undef and $include_all != undefined { validate_bool($include_all) } @@ -25,13 +24,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -40,6 +38,4 @@ server => $server } } - - } diff --git a/manifests/resource/root_logger.pp b/manifests/resource/root_logger.pp index 71b4d64..709386b 100644 --- a/manifests/resource/root_logger.pp +++ b/manifests/resource/root_logger.pp @@ -20,12 +20,9 @@ $handlers = undef, $level = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { - - - $raw_options = { 'filter' => $filter, 'handlers' => $handlers, @@ -33,21 +30,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 } } - - } diff --git a/manifests/resource/root_resource.pp b/manifests/resource/root_resource.pp index 9270b98..bcd0bb3 100644 --- a/manifests/resource/root_resource.pp +++ b/manifests/resource/root_resource.pp @@ -68,10 +68,9 @@ $schema_locations = undef, $server_state = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $launch_type != undef and $launch_type != undefined and !($launch_type in ['DOMAIN','STANDALONE','EMBEDDED','APPCLIENT']) { fail('The attribute launch_type is not an allowed value: "DOMAIN","STANDALONE","EMBEDDED","APPCLIENT"') } @@ -107,13 +106,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -122,6 +120,4 @@ server => $server } } - - } diff --git a/manifests/resource/sasl_policy.pp b/manifests/resource/sasl_policy.pp index b0975f6..5539b0d 100644 --- a/manifests/resource/sasl_policy.pp +++ b/manifests/resource/sasl_policy.pp @@ -32,10 +32,9 @@ $no_plain_text = undef, $pass_credentials = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $forward_secrecy != undef and $forward_secrecy != undefined { validate_bool($forward_secrecy) } @@ -65,13 +64,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -80,6 +78,4 @@ server => $server } } - - } diff --git a/manifests/resource/scanner.pp b/manifests/resource/scanner.pp index 54e676d..089bcca 100644 --- a/manifests/resource/scanner.pp +++ b/manifests/resource/scanner.pp @@ -40,10 +40,9 @@ $scan_enabled = undef, $scan_interval = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $auto_deploy_exploded != undef and $auto_deploy_exploded != undefined { validate_bool($auto_deploy_exploded) } @@ -75,13 +74,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -90,6 +88,4 @@ server => $server } } - - } diff --git a/manifests/resource/scheduled_thread_pool.pp b/manifests/resource/scheduled_thread_pool.pp index 7d31370..ac08347 100644 --- a/manifests/resource/scheduled_thread_pool.pp +++ b/manifests/resource/scheduled_thread_pool.pp @@ -24,10 +24,9 @@ $resource_name = undef, $thread_factory = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $max_threads != undef and $max_threads != undefined and !is_integer($max_threads) { fail('The attribute max_threads is not an integer') } @@ -40,13 +39,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -55,6 +53,4 @@ server => $server } } - - } diff --git a/manifests/resource/security.pp b/manifests/resource/security.pp index cf89c2d..614d32f 100644 --- a/manifests/resource/security.pp +++ b/manifests/resource/security.pp @@ -28,10 +28,9 @@ $server_auth = undef, $strength = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $include_mechanisms != undef and $include_mechanisms != undefined and !is_array($include_mechanisms) { fail('The attribute include_mechanisms is not an array') } @@ -57,13 +56,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -72,6 +70,4 @@ server => $server } } - - } diff --git a/manifests/resource/security_domain.pp b/manifests/resource/security_domain.pp index 4c5a4b5..364bce1 100644 --- a/manifests/resource/security_domain.pp +++ b/manifests/resource/security_domain.pp @@ -12,23 +12,21 @@ $server, $cache_type = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'cache-type' => $cache_type, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/security_realm.pp b/manifests/resource/security_realm.pp index 866e379..d9506af 100644 --- a/manifests/resource/security_realm.pp +++ b/manifests/resource/security_realm.pp @@ -12,10 +12,9 @@ $server, $map_groups_to_roles = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $map_groups_to_roles != undef and $map_groups_to_roles != undefined { validate_bool($map_groups_to_roles) } @@ -25,13 +24,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -40,6 +38,4 @@ server => $server } } - - } diff --git a/manifests/resource/server_identity_secret.pp b/manifests/resource/server_identity_secret.pp index af31c80..98a0479 100644 --- a/manifests/resource/server_identity_secret.pp +++ b/manifests/resource/server_identity_secret.pp @@ -12,23 +12,21 @@ $server, $value = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'value' => $value, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/server_identity_ssl.pp b/manifests/resource/server_identity_ssl.pp index 9a60fa3..ce5bfb9 100644 --- a/manifests/resource/server_identity_ssl.pp +++ b/manifests/resource/server_identity_ssl.pp @@ -36,11 +36,10 @@ $keystore_relative_to = undef, $protocol = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'alias' => $alias, 'key-password' => $key_password, @@ -52,13 +51,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -67,6 +65,4 @@ server => $server } } - - } diff --git a/manifests/resource/server_imap.pp b/manifests/resource/server_imap.pp index b5ca498..6d059f1 100644 --- a/manifests/resource/server_imap.pp +++ b/manifests/resource/server_imap.pp @@ -28,10 +28,9 @@ $tls = undef, $username = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $ssl != undef and $ssl != undefined { validate_bool($ssl) } @@ -48,13 +47,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -63,6 +61,4 @@ server => $server } } - - } diff --git a/manifests/resource/server_pop3.pp b/manifests/resource/server_pop3.pp index a3a5219..b7327a5 100644 --- a/manifests/resource/server_pop3.pp +++ b/manifests/resource/server_pop3.pp @@ -28,10 +28,9 @@ $tls = undef, $username = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $ssl != undef and $ssl != undefined { validate_bool($ssl) } @@ -48,13 +47,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -63,6 +61,4 @@ server => $server } } - - } diff --git a/manifests/resource/server_smtp.pp b/manifests/resource/server_smtp.pp index b1f6304..4faca2d 100644 --- a/manifests/resource/server_smtp.pp +++ b/manifests/resource/server_smtp.pp @@ -28,10 +28,9 @@ $tls = undef, $username = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $ssl != undef and $ssl != undefined { validate_bool($ssl) } @@ -48,13 +47,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -63,6 +61,4 @@ server => $server } } - - } diff --git a/manifests/resource/service_async.pp b/manifests/resource/service_async.pp index e40a024..fdcf311 100644 --- a/manifests/resource/service_async.pp +++ b/manifests/resource/service_async.pp @@ -12,23 +12,21 @@ $server, $thread_pool_name = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'thread-pool-name' => $thread_pool_name, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/service_iiop.pp b/manifests/resource/service_iiop.pp index 4735ecf..45c3131 100644 --- a/manifests/resource/service_iiop.pp +++ b/manifests/resource/service_iiop.pp @@ -16,10 +16,9 @@ $enable_by_default = undef, $use_qualified_name = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $enable_by_default != undef and $enable_by_default != undefined { validate_bool($enable_by_default) } @@ -33,13 +32,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -48,6 +46,4 @@ server => $server } } - - } diff --git a/manifests/resource/service_remote.pp b/manifests/resource/service_remote.pp index dfcc554..cd650ef 100644 --- a/manifests/resource/service_remote.pp +++ b/manifests/resource/service_remote.pp @@ -16,24 +16,22 @@ $connector_ref = undef, $thread_pool_name = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'connector-ref' => $connector_ref, 'thread-pool-name' => $thread_pool_name, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -42,6 +40,4 @@ server => $server } } - - } diff --git a/manifests/resource/service_timer_service.pp b/manifests/resource/service_timer_service.pp index 75d02fb..13c8477 100644 --- a/manifests/resource/service_timer_service.pp +++ b/manifests/resource/service_timer_service.pp @@ -20,11 +20,10 @@ $relative_to = undef, $thread_pool_name = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'path' => $path, 'relative-to' => $relative_to, @@ -32,13 +31,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -47,6 +45,4 @@ server => $server } } - - } diff --git a/manifests/resource/setting.pp b/manifests/resource/setting.pp index e42b179..59c02eb 100644 --- a/manifests/resource/setting.pp +++ b/manifests/resource/setting.pp @@ -16,24 +16,22 @@ $path = undef, $relative_to = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'path' => $path, 'relative-to' => $relative_to, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -42,6 +40,4 @@ server => $server } } - - } diff --git a/manifests/resource/short_running_threads.pp b/manifests/resource/short_running_threads.pp index 6367a8e..ff57b38 100644 --- a/manifests/resource/short_running_threads.pp +++ b/manifests/resource/short_running_threads.pp @@ -40,10 +40,9 @@ $queue_length = undef, $thread_factory = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $allow_core_timeout != undef and $allow_core_timeout != undefined { validate_bool($allow_core_timeout) } @@ -69,13 +68,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -84,6 +82,4 @@ server => $server } } - - } diff --git a/manifests/resource/singleton_bean.pp b/manifests/resource/singleton_bean.pp index 360273e..54a2d6d 100644 --- a/manifests/resource/singleton_bean.pp +++ b/manifests/resource/singleton_bean.pp @@ -28,10 +28,9 @@ $security_domain = undef, $timers = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $declared_roles != undef and $declared_roles != undefined and !is_array($declared_roles) { fail('The attribute declared_roles is not an array') } @@ -48,13 +47,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -63,6 +61,4 @@ server => $server } } - - } diff --git a/manifests/resource/size_rotating_file_handler.pp b/manifests/resource/size_rotating_file_handler.pp index 21ddfb5..ce6b4e4 100644 --- a/manifests/resource/size_rotating_file_handler.pp +++ b/manifests/resource/size_rotating_file_handler.pp @@ -48,15 +48,13 @@ $resource_name = undef, $rotate_size = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { - if $max_backup_index != undef and $max_backup_index != undefined and !is_integer($max_backup_index) { fail('The attribute max_backup_index is not an integer') } - $raw_options = { 'append' => $append, 'autoflush' => $autoflush, @@ -71,21 +69,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 } } - - } diff --git a/manifests/resource/socket_binding.pp b/manifests/resource/socket_binding.pp index 003ef50..4f9ecbe 100644 --- a/manifests/resource/socket_binding.pp +++ b/manifests/resource/socket_binding.pp @@ -36,10 +36,9 @@ $resource_name = undef, $port = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $client_mappings != undef and $client_mappings != undefined and !is_array($client_mappings) { fail('The attribute client_mappings is not an array') } @@ -64,13 +63,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -79,6 +77,4 @@ server => $server } } - - } diff --git a/manifests/resource/socket_binding_group.pp b/manifests/resource/socket_binding_group.pp index 66607f7..7bc7a2c 100644 --- a/manifests/resource/socket_binding_group.pp +++ b/manifests/resource/socket_binding_group.pp @@ -20,10 +20,9 @@ $resource_name = undef, $port_offset = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $port_offset != undef and $port_offset != undefined and !is_integer($port_offset) { fail('The attribute port_offset is not an integer') } @@ -35,13 +34,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -50,6 +48,4 @@ server => $server } } - - } diff --git a/manifests/resource/ssl.pp b/manifests/resource/ssl.pp index cd3d254..cb560c1 100644 --- a/manifests/resource/ssl.pp +++ b/manifests/resource/ssl.pp @@ -43,8 +43,6 @@ $cli_path = $name ) { if $ensure == present { - - $raw_options = { 'ca-certificate-file' => $ca_certificate_file, 'ca-revocation-url' => $ca_revocation_url, @@ -57,21 +55,19 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { - jboss_resource { $cli_path: - ensure => $ensure, - server => $server + jboss_resource { $name: + address => $cli_path, + ensure => $ensure, + server => $server } } - - } diff --git a/manifests/resource/sso.pp b/manifests/resource/sso.pp index eb5331d..ea4ecd3 100644 --- a/manifests/resource/sso.pp +++ b/manifests/resource/sso.pp @@ -24,12 +24,9 @@ $domain = undef, $reauthenticate = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { - - - $raw_options = { 'cache-container' => $cache_container, 'cache-name' => $cache_name, @@ -38,21 +35,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 } } - - } diff --git a/manifests/resource/stack.pp b/manifests/resource/stack.pp index 45c3450..4ea4d12 100644 --- a/manifests/resource/stack.pp +++ b/manifests/resource/stack.pp @@ -15,38 +15,35 @@ $protocols = undef, $transport = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { - if $protocols != undef and $protocols != undefined and !is_array($protocols) { fail('The attribute protocols is not an array') } - $raw_options = { 'protocols' => $protocols, 'transport' => $transport } $options = delete_undef_values($raw_options) - $add_command = "${path}:add" - $check_command = "(outcome == success) of ${path}:read-resource()" + $add_command = "${cli_path}:add" + $check_command = "(outcome == success) of ${cli_path}:read-resource()" - jboss_exec { $add_command: + jboss_exec { $name: + command => $add_command, unless => $check_command, arguments => $raw_options, server => $server } - } if $ensure == absent { - jboss_resource { $path: - ensure => $ensure, - server => $server + jboss_resource { $name: + address => $cli_path, + ensure => $ensure, + server => $server } } - - } diff --git a/manifests/resource/state_transfer.pp b/manifests/resource/state_transfer.pp index 8af3136..fb5d1e4 100644 --- a/manifests/resource/state_transfer.pp +++ b/manifests/resource/state_transfer.pp @@ -20,10 +20,9 @@ $enabled = undef, $timeout = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $chunk_size != undef and $chunk_size != undefined and !is_integer($chunk_size) { fail('The attribute chunk_size is not an integer') } @@ -41,13 +40,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -56,6 +54,4 @@ server => $server } } - - } diff --git a/manifests/resource/stateful_session_bean.pp b/manifests/resource/stateful_session_bean.pp index 0c30847..7577b95 100644 --- a/manifests/resource/stateful_session_bean.pp +++ b/manifests/resource/stateful_session_bean.pp @@ -24,10 +24,9 @@ $run_as_role = undef, $security_domain = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $declared_roles != undef and $declared_roles != undefined and !is_array($declared_roles) { fail('The attribute declared_roles is not an array') } @@ -40,13 +39,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -55,6 +53,4 @@ server => $server } } - - } diff --git a/manifests/resource/stateless_session_bean.pp b/manifests/resource/stateless_session_bean.pp index ef9cc65..1a88b55 100644 --- a/manifests/resource/stateless_session_bean.pp +++ b/manifests/resource/stateless_session_bean.pp @@ -52,10 +52,9 @@ $security_domain = undef, $timers = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $declared_roles != undef and $declared_roles != undefined and !is_array($declared_roles) { fail('The attribute declared_roles is not an array') } @@ -93,13 +92,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -108,6 +106,4 @@ server => $server } } - - } diff --git a/manifests/resource/store.pp b/manifests/resource/store.pp index 06b16ef..e829784 100644 --- a/manifests/resource/store.pp +++ b/manifests/resource/store.pp @@ -36,10 +36,9 @@ $shared = undef, $singleton = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $fetch_state != undef and $fetch_state != undefined { validate_bool($fetch_state) } @@ -70,13 +69,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -85,6 +83,4 @@ server => $server } } - - } diff --git a/manifests/resource/strict_max_bean_instance_pool.pp b/manifests/resource/strict_max_bean_instance_pool.pp index b16743c..466f4d7 100644 --- a/manifests/resource/strict_max_bean_instance_pool.pp +++ b/manifests/resource/strict_max_bean_instance_pool.pp @@ -20,10 +20,9 @@ $timeout = undef, $timeout_unit = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $max_pool_size != undef and $max_pool_size != undefined and !is_integer($max_pool_size) { fail('The attribute max_pool_size is not an integer') } @@ -41,13 +40,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -56,6 +54,4 @@ server => $server } } - - } diff --git a/manifests/resource/string_keyed_jdbc_store.pp b/manifests/resource/string_keyed_jdbc_store.pp index d775352..518d4c2 100644 --- a/manifests/resource/string_keyed_jdbc_store.pp +++ b/manifests/resource/string_keyed_jdbc_store.pp @@ -40,10 +40,9 @@ $singleton = undef, $string_keyed_table = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $fetch_state != undef and $fetch_state != undefined { validate_bool($fetch_state) } @@ -75,13 +74,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -90,6 +88,4 @@ server => $server } } - - } diff --git a/manifests/resource/subsystem.pp b/manifests/resource/subsystem.pp index 4ea57e0..cb29fb4 100644 --- a/manifests/resource/subsystem.pp +++ b/manifests/resource/subsystem.pp @@ -24,10 +24,9 @@ $management_minor_version = undef, $xml_namespaces = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $management_major_version != undef and $management_major_version != undefined and !is_integer($management_major_version) { fail('The attribute management_major_version is not an integer') } @@ -49,13 +48,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -64,6 +62,4 @@ server => $server } } - - } diff --git a/manifests/resource/subsystem_datasources.pp b/manifests/resource/subsystem_datasources.pp index 55fc80c..f1e216e 100644 --- a/manifests/resource/subsystem_datasources.pp +++ b/manifests/resource/subsystem_datasources.pp @@ -12,10 +12,9 @@ $server, $installed_drivers = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $installed_drivers != undef and $installed_drivers != undefined and !is_array($installed_drivers) { fail('The attribute installed_drivers is not an array') } @@ -25,13 +24,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -40,6 +38,4 @@ server => $server } } - - } diff --git a/manifests/resource/subsystem_ee.pp b/manifests/resource/subsystem_ee.pp index 2743cea..e8b9e0d 100644 --- a/manifests/resource/subsystem_ee.pp +++ b/manifests/resource/subsystem_ee.pp @@ -28,10 +28,9 @@ $jboss_descriptor_property_replacement = undef, $spec_descriptor_property_replacement = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $annotation_property_replacement != undef and $annotation_property_replacement != undefined { validate_bool($annotation_property_replacement) } @@ -57,13 +56,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -72,6 +70,4 @@ server => $server } } - - } diff --git a/manifests/resource/subsystem_ejb3.pp b/manifests/resource/subsystem_ejb3.pp index d9c972d..6409f9d 100644 --- a/manifests/resource/subsystem_ejb3.pp +++ b/manifests/resource/subsystem_ejb3.pp @@ -64,10 +64,9 @@ $enable_statistics = undef, $in_vm_remote_interface_invocation_pass_by_value = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $default_entity_bean_optimistic_locking != undef and $default_entity_bean_optimistic_locking != undefined { validate_bool($default_entity_bean_optimistic_locking) } @@ -105,13 +104,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -120,6 +118,4 @@ server => $server } } - - } diff --git a/manifests/resource/subsystem_infinispan.pp b/manifests/resource/subsystem_infinispan.pp index 529aa36..1f0a244 100644 --- a/manifests/resource/subsystem_infinispan.pp +++ b/manifests/resource/subsystem_infinispan.pp @@ -12,32 +12,27 @@ $server, $default_cache_container = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { - - - $raw_options = { 'default-cache-container' => $default_cache_container, } $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 } } - - } diff --git a/manifests/resource/subsystem_jgroups.pp b/manifests/resource/subsystem_jgroups.pp index aa0aae8..a2fb514 100644 --- a/manifests/resource/subsystem_jgroups.pp +++ b/manifests/resource/subsystem_jgroups.pp @@ -12,23 +12,21 @@ $server, $default_stack = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'default-stack' => $default_stack, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/subsystem_jmx.pp b/manifests/resource/subsystem_jmx.pp index 16841dc..0fca246 100644 --- a/manifests/resource/subsystem_jmx.pp +++ b/manifests/resource/subsystem_jmx.pp @@ -16,10 +16,9 @@ $non_core_mbean_sensitivity = undef, $show_model = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $non_core_mbean_sensitivity != undef and $non_core_mbean_sensitivity != undefined { validate_bool($non_core_mbean_sensitivity) } @@ -33,13 +32,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -48,6 +46,4 @@ server => $server } } - - } diff --git a/manifests/resource/subsystem_jpa.pp b/manifests/resource/subsystem_jpa.pp index 6812b03..6ec6d7f 100644 --- a/manifests/resource/subsystem_jpa.pp +++ b/manifests/resource/subsystem_jpa.pp @@ -16,10 +16,9 @@ $default_datasource = undef, $default_extended_persistence_inheritance = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $default_extended_persistence_inheritance != undef and $default_extended_persistence_inheritance != undefined and !($default_extended_persistence_inheritance in ['DEEP','SHALLOW']) { fail('The attribute default_extended_persistence_inheritance is not an allowed value: "DEEP","SHALLOW"') } @@ -30,13 +29,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -45,6 +43,4 @@ server => $server } } - - } diff --git a/manifests/resource/subsystem_jsf.pp b/manifests/resource/subsystem_jsf.pp index 8784aeb..ccad989 100644 --- a/manifests/resource/subsystem_jsf.pp +++ b/manifests/resource/subsystem_jsf.pp @@ -12,23 +12,21 @@ $server, $default_jsf_impl_slot = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'default-jsf-impl-slot' => $default_jsf_impl_slot, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/subsystem_logging.pp b/manifests/resource/subsystem_logging.pp index 0631d59..50cac33 100644 --- a/manifests/resource/subsystem_logging.pp +++ b/manifests/resource/subsystem_logging.pp @@ -12,10 +12,9 @@ $server, $add_logging_api_dependencies = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $add_logging_api_dependencies != undef and $add_logging_api_dependencies != undefined { validate_bool($add_logging_api_dependencies) } @@ -25,13 +24,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -40,6 +38,4 @@ server => $server } } - - } diff --git a/manifests/resource/subsystem_osgi.pp b/manifests/resource/subsystem_osgi.pp index f22385c..5083079 100644 --- a/manifests/resource/subsystem_osgi.pp +++ b/manifests/resource/subsystem_osgi.pp @@ -16,36 +16,32 @@ $activation = undef, $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 = { 'activation' => $activation, '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 } } - - } diff --git a/manifests/resource/subsystem_remoting.pp b/manifests/resource/subsystem_remoting.pp index dc4f732..1565a41 100644 --- a/manifests/resource/subsystem_remoting.pp +++ b/manifests/resource/subsystem_remoting.pp @@ -32,10 +32,9 @@ $worker_task_max_threads = undef, $worker_write_threads = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $worker_read_threads != undef and $worker_read_threads != undefined and !is_integer($worker_read_threads) { fail('The attribute worker_read_threads is not an integer') } @@ -65,13 +64,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -80,6 +78,4 @@ server => $server } } - - } diff --git a/manifests/resource/subsystem_security.pp b/manifests/resource/subsystem_security.pp index 1532fdc..ad67126 100644 --- a/manifests/resource/subsystem_security.pp +++ b/manifests/resource/subsystem_security.pp @@ -12,10 +12,9 @@ $server, $deep_copy_subject_mode = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $deep_copy_subject_mode != undef and $deep_copy_subject_mode != undefined { validate_bool($deep_copy_subject_mode) } @@ -25,13 +24,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -40,6 +38,4 @@ server => $server } } - - } diff --git a/manifests/resource/subsystem_transactions.pp b/manifests/resource/subsystem_transactions.pp index a0fa8fb..7e09223 100644 --- a/manifests/resource/subsystem_transactions.pp +++ b/manifests/resource/subsystem_transactions.pp @@ -108,10 +108,9 @@ $use_hornetq_store = undef, $use_jdbc_store = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $default_timeout != undef and $default_timeout != undefined and !is_integer($default_timeout) { fail('The attribute default_timeout is not an integer') } @@ -181,13 +180,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -196,6 +194,4 @@ server => $server } } - - } diff --git a/manifests/resource/subsystem_web.pp b/manifests/resource/subsystem_web.pp index 944b366..5632012 100644 --- a/manifests/resource/subsystem_web.pp +++ b/manifests/resource/subsystem_web.pp @@ -20,12 +20,9 @@ $instance_id = undef, $native = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { - - - $raw_options = { 'default-virtual-server' => $default_virtual_server, 'instance-id' => $instance_id, @@ -33,21 +30,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 } } - - } diff --git a/manifests/resource/subsystem_webservices.pp b/manifests/resource/subsystem_webservices.pp index 9c6b204..7f231a0 100644 --- a/manifests/resource/subsystem_webservices.pp +++ b/manifests/resource/subsystem_webservices.pp @@ -24,10 +24,9 @@ $wsdl_port = undef, $wsdl_secure_port = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $modify_wsdl_address != undef and $modify_wsdl_address != undefined { validate_bool($modify_wsdl_address) } @@ -46,13 +45,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -61,6 +59,4 @@ server => $server } } - - } diff --git a/manifests/resource/system_property.pp b/manifests/resource/system_property.pp index 3a96e05..af483ae 100644 --- a/manifests/resource/system_property.pp +++ b/manifests/resource/system_property.pp @@ -12,23 +12,21 @@ $server, $value = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'value' => $value, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/thread_factory.pp b/manifests/resource/thread_factory.pp index 21e0347..4befd0c 100644 --- a/manifests/resource/thread_factory.pp +++ b/manifests/resource/thread_factory.pp @@ -29,10 +29,9 @@ $priority = undef, $thread_name_pattern = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $priority != undef and $priority != undefined and !is_integer($priority) { fail('The attribute priority is not an integer') } @@ -45,13 +44,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -60,6 +58,4 @@ server => $server } } - - } diff --git a/manifests/resource/thread_pool.pp b/manifests/resource/thread_pool.pp index 65c396d..f5610ac 100644 --- a/manifests/resource/thread_pool.pp +++ b/manifests/resource/thread_pool.pp @@ -24,10 +24,9 @@ $resource_name = undef, $thread_factory = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $max_threads != undef and $max_threads != undefined and !is_integer($max_threads) { fail('The attribute max_threads is not an integer') } @@ -40,13 +39,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -55,6 +53,4 @@ server => $server } } - - } diff --git a/manifests/resource/transaction.pp b/manifests/resource/transaction.pp index abda25b..f216dbd 100644 --- a/manifests/resource/transaction.pp +++ b/manifests/resource/transaction.pp @@ -20,10 +20,9 @@ $mode = undef, $stop_timeout = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $locking != undef and $locking != undefined and !($locking in ['OPTIMISTIC','PESSIMISTIC']) { fail('The attribute locking is not an allowed value: "OPTIMISTIC","PESSIMISTIC"') } @@ -41,13 +40,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -56,6 +54,4 @@ server => $server } } - - } diff --git a/manifests/resource/transactions.pp b/manifests/resource/transactions.pp index 00f0882..943c4f2 100644 --- a/manifests/resource/transactions.pp +++ b/manifests/resource/transactions.pp @@ -24,10 +24,9 @@ $jmx_name = undef, $type = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $age_in_seconds != undef and $age_in_seconds != undefined and !is_integer($age_in_seconds) { fail('The attribute age_in_seconds is not an integer') } @@ -40,13 +39,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -55,6 +53,4 @@ server => $server } } - - } diff --git a/manifests/resource/transport.pp b/manifests/resource/transport.pp index 2537bfb..756dc78 100644 --- a/manifests/resource/transport.pp +++ b/manifests/resource/transport.pp @@ -36,12 +36,9 @@ $site = undef, $stack = undef, $ensure = present, - $path = $name + $cli_path = $name ) { if $ensure == present { - - - $raw_options = { 'cluster' => $cluster, 'executor' => $executor, @@ -53,21 +50,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 } } - - } diff --git a/manifests/resource/trust_module.pp b/manifests/resource/trust_module.pp index 641e122..07bd7ca 100644 --- a/manifests/resource/trust_module.pp +++ b/manifests/resource/trust_module.pp @@ -24,10 +24,9 @@ $module = undef, $module_options = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $flag != undef and $flag != undefined and !($flag in ['required','requisite','sufficient','optional']) { fail('The attribute flag is not an allowed value: "required","requisite","sufficient","optional"') } @@ -40,13 +39,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -55,6 +53,4 @@ server => $server } } - - } diff --git a/manifests/resource/type_buffer_pool.pp b/manifests/resource/type_buffer_pool.pp index fd87ca2..0067e42 100644 --- a/manifests/resource/type_buffer_pool.pp +++ b/manifests/resource/type_buffer_pool.pp @@ -12,23 +12,21 @@ $server, $resource_name = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'name' => $resource_name, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/type_class_loading.pp b/manifests/resource/type_class_loading.pp index d23af7d..ebf9b7d 100644 --- a/manifests/resource/type_class_loading.pp +++ b/manifests/resource/type_class_loading.pp @@ -16,10 +16,9 @@ $object_name = undef, $verbose = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $verbose != undef and $verbose != undefined { validate_bool($verbose) } @@ -30,13 +29,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -45,6 +43,4 @@ server => $server } } - - } diff --git a/manifests/resource/type_compilation.pp b/manifests/resource/type_compilation.pp index 3f3f791..e8e0d92 100644 --- a/manifests/resource/type_compilation.pp +++ b/manifests/resource/type_compilation.pp @@ -20,10 +20,9 @@ $resource_name = undef, $object_name = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $compilation_time_monitoring_supported != undef and $compilation_time_monitoring_supported != undefined { validate_bool($compilation_time_monitoring_supported) } @@ -35,13 +34,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -50,6 +48,4 @@ server => $server } } - - } diff --git a/manifests/resource/type_memory.pp b/manifests/resource/type_memory.pp index 5f7027c..188ec3b 100644 --- a/manifests/resource/type_memory.pp +++ b/manifests/resource/type_memory.pp @@ -16,10 +16,9 @@ $object_name = undef, $verbose = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $verbose != undef and $verbose != undefined { validate_bool($verbose) } @@ -30,13 +29,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -45,6 +43,4 @@ server => $server } } - - } diff --git a/manifests/resource/type_operating_system.pp b/manifests/resource/type_operating_system.pp index 7580576..3cef540 100644 --- a/manifests/resource/type_operating_system.pp +++ b/manifests/resource/type_operating_system.pp @@ -24,11 +24,10 @@ $object_name = undef, $version = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'arch' => $arch, 'name' => $resource_name, @@ -37,13 +36,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -52,6 +50,4 @@ server => $server } } - - } diff --git a/manifests/resource/type_runtime.pp b/manifests/resource/type_runtime.pp index a4da48f..4dbb49f 100644 --- a/manifests/resource/type_runtime.pp +++ b/manifests/resource/type_runtime.pp @@ -72,10 +72,9 @@ $vm_vendor = undef, $vm_version = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $boot_class_path_supported != undef and $boot_class_path_supported != undefined { validate_bool($boot_class_path_supported) } @@ -106,13 +105,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -121,6 +119,4 @@ server => $server } } - - } diff --git a/manifests/resource/type_threading.pp b/manifests/resource/type_threading.pp index fa229b6..e632ef9 100644 --- a/manifests/resource/type_threading.pp +++ b/manifests/resource/type_threading.pp @@ -44,10 +44,9 @@ $thread_cpu_time_enabled = undef, $thread_cpu_time_supported = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $all_thread_ids != undef and $all_thread_ids != undefined and !is_array($all_thread_ids) { fail('The attribute all_thread_ids is not an array') } @@ -86,13 +85,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -101,6 +99,4 @@ server => $server } } - - } diff --git a/manifests/resource/unbounded_queue_thread_pool.pp b/manifests/resource/unbounded_queue_thread_pool.pp index 794041a..e81cee2 100644 --- a/manifests/resource/unbounded_queue_thread_pool.pp +++ b/manifests/resource/unbounded_queue_thread_pool.pp @@ -24,10 +24,9 @@ $resource_name = undef, $thread_factory = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $max_threads != undef and $max_threads != undefined and !is_integer($max_threads) { fail('The attribute max_threads is not an integer') } @@ -40,13 +39,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -55,6 +53,4 @@ server => $server } } - - } diff --git a/manifests/resource/user.pp b/manifests/resource/user.pp index 8d60c60..6bab95c 100644 --- a/manifests/resource/user.pp +++ b/manifests/resource/user.pp @@ -12,23 +12,21 @@ $server, $password = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'password' => $password, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/username_to_dn_advanced_filter.pp b/manifests/resource/username_to_dn_advanced_filter.pp index 082363f..7363c3f 100644 --- a/manifests/resource/username_to_dn_advanced_filter.pp +++ b/manifests/resource/username_to_dn_advanced_filter.pp @@ -28,10 +28,9 @@ $recursive = undef, $user_dn_attribute = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $force != undef and $force != undefined { validate_bool($force) } @@ -48,13 +47,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -63,6 +61,4 @@ server => $server } } - - } diff --git a/manifests/resource/username_to_dn_username_filter.pp b/manifests/resource/username_to_dn_username_filter.pp index cbfb297..ae0468f 100644 --- a/manifests/resource/username_to_dn_username_filter.pp +++ b/manifests/resource/username_to_dn_username_filter.pp @@ -28,10 +28,9 @@ $recursive = undef, $user_dn_attribute = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $force != undef and $force != undefined { validate_bool($force) } @@ -48,13 +47,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -63,6 +61,4 @@ server => $server } } - - } diff --git a/manifests/resource/username_to_dn_username_is_dn.pp b/manifests/resource/username_to_dn_username_is_dn.pp index 2b9fd56..db24aa5 100644 --- a/manifests/resource/username_to_dn_username_is_dn.pp +++ b/manifests/resource/username_to_dn_username_is_dn.pp @@ -12,10 +12,9 @@ $server, $force = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $force != undef and $force != undefined { validate_bool($force) } @@ -25,13 +24,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -40,6 +38,4 @@ server => $server } } - - } diff --git a/manifests/resource/valve.pp b/manifests/resource/valve.pp index fc88d6f..fffc8e3 100644 --- a/manifests/resource/valve.pp +++ b/manifests/resource/valve.pp @@ -24,10 +24,9 @@ $module = undef, $param = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $enabled != undef and $enabled != undefined { validate_bool($enabled) } @@ -40,13 +39,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -55,6 +53,4 @@ server => $server } } - - } diff --git a/manifests/resource/vault.pp b/manifests/resource/vault.pp index 1e41bf2..1e318ac 100644 --- a/manifests/resource/vault.pp +++ b/manifests/resource/vault.pp @@ -16,24 +16,22 @@ $code = undef, $vault_options = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'code' => $code, 'vault-options' => $vault_options, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -42,6 +40,4 @@ server => $server } } - - } diff --git a/manifests/resource/virtual_server.pp b/manifests/resource/virtual_server.pp index 65531d4..50167c4 100644 --- a/manifests/resource/virtual_server.pp +++ b/manifests/resource/virtual_server.pp @@ -24,10 +24,9 @@ $enable_welcome_root = undef, $resource_name = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $alias != undef and $alias != undefined and !is_array($alias) { fail('The attribute alias is not an array') } @@ -43,13 +42,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -58,6 +56,4 @@ server => $server } } - - } diff --git a/manifests/resource/workmanager.pp b/manifests/resource/workmanager.pp index b92c364..26c737f 100644 --- a/manifests/resource/workmanager.pp +++ b/manifests/resource/workmanager.pp @@ -12,23 +12,21 @@ $server, $resource_name = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'name' => $resource_name, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - } diff --git a/manifests/resource/write_behind.pp b/manifests/resource/write_behind.pp index 4a76275..18f909c 100644 --- a/manifests/resource/write_behind.pp +++ b/manifests/resource/write_behind.pp @@ -24,10 +24,9 @@ $shutdown_timeout = undef, $thread_pool_size = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $flush_lock_timeout != undef and $flush_lock_timeout != undefined and !is_integer($flush_lock_timeout) { fail('The attribute flush_lock_timeout is not an integer') } @@ -49,13 +48,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -64,6 +62,4 @@ server => $server } } - - } diff --git a/manifests/resource/xa_data_source.pp b/manifests/resource/xa_data_source.pp index 6f34bb0..83630d4 100644 --- a/manifests/resource/xa_data_source.pp +++ b/manifests/resource/xa_data_source.pp @@ -232,10 +232,9 @@ $xa_datasource_class = undef, $xa_resource_timeout = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - if $allocation_retry != undef and $allocation_retry != undefined and !is_integer($allocation_retry) { fail('The attribute allocation_retry is not an integer') } @@ -390,13 +389,12 @@ } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -405,6 +403,4 @@ server => $server } } - - } diff --git a/manifests/resource/xa_datasource_properties.pp b/manifests/resource/xa_datasource_properties.pp index e146c04..e4d5b99 100644 --- a/manifests/resource/xa_datasource_properties.pp +++ b/manifests/resource/xa_datasource_properties.pp @@ -12,23 +12,21 @@ $server, $value = undef, $ensure = present, - $cli_path = $name + $cli_path = $name, ) { if $ensure == present { - $raw_options = { 'value' => $value, } $options = delete_undef_values($raw_options) - jboss_resource { $cli_path: + jboss_resource { $name: + address => $cli_path, ensure => $ensure, server => $server, options => $options } - - } if $ensure == absent { @@ -37,6 +35,4 @@ server => $server } } - - }