hammer_cli_foreman 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/configuration.md +2 -2
- data/doc/name_id_resolution.md +26 -1
- data/doc/release_notes.md +24 -0
- data/lib/hammer_cli_foreman.rb +30 -29
- data/lib/hammer_cli_foreman/api/connection.rb +1 -1
- data/lib/hammer_cli_foreman/api/interactive_basic_auth.rb +3 -3
- data/lib/hammer_cli_foreman/api/session_authenticator_wrapper.rb +9 -8
- data/lib/hammer_cli_foreman/api/void_auth.rb +7 -0
- data/lib/hammer_cli_foreman/architecture.rb +3 -5
- data/lib/hammer_cli_foreman/associating_commands.rb +32 -32
- data/lib/hammer_cli_foreman/auth.rb +2 -2
- data/lib/hammer_cli_foreman/auth_source_ldap.rb +4 -4
- data/lib/hammer_cli_foreman/commands.rb +23 -55
- data/lib/hammer_cli_foreman/common_parameter.rb +5 -5
- data/lib/hammer_cli_foreman/compute_resource.rb +17 -7
- data/lib/hammer_cli_foreman/config_group.rb +3 -3
- data/lib/hammer_cli_foreman/domain.rb +6 -8
- data/lib/hammer_cli_foreman/environment.rb +3 -3
- data/lib/hammer_cli_foreman/exception_handler.rb +27 -4
- data/lib/hammer_cli_foreman/external_usergroup.rb +3 -4
- data/lib/hammer_cli_foreman/filter.rb +20 -21
- data/lib/hammer_cli_foreman/host.rb +43 -18
- data/lib/hammer_cli_foreman/hostgroup.rb +24 -19
- data/lib/hammer_cli_foreman/hosts/common_update_options.rb +4 -6
- data/lib/hammer_cli_foreman/id_resolver.rb +86 -50
- data/lib/hammer_cli_foreman/image.rb +3 -4
- data/lib/hammer_cli_foreman/interface.rb +7 -9
- data/lib/hammer_cli_foreman/location.rb +6 -9
- data/lib/hammer_cli_foreman/media.rb +3 -6
- data/lib/hammer_cli_foreman/model.rb +3 -6
- data/lib/hammer_cli_foreman/operating_system.rb +11 -12
- data/lib/hammer_cli_foreman/option_sources.rb +4 -0
- data/lib/hammer_cli_foreman/option_sources/id_params.rb +51 -0
- data/lib/hammer_cli_foreman/option_sources/ids_params.rb +30 -0
- data/lib/hammer_cli_foreman/option_sources/self_param.rb +16 -0
- data/lib/hammer_cli_foreman/option_sources/user_params.rb +59 -0
- data/lib/hammer_cli_foreman/organization.rb +6 -9
- data/lib/hammer_cli_foreman/output/formatters.rb +1 -1
- data/lib/hammer_cli_foreman/parameter.rb +3 -5
- data/lib/hammer_cli_foreman/partition_table.rb +5 -6
- data/lib/hammer_cli_foreman/realm.rb +3 -3
- data/lib/hammer_cli_foreman/report.rb +1 -4
- data/lib/hammer_cli_foreman/role.rb +4 -7
- data/lib/hammer_cli_foreman/settings.rb +1 -1
- data/lib/hammer_cli_foreman/smart_class_parameter.rb +24 -14
- data/lib/hammer_cli_foreman/smart_proxy.rb +5 -7
- data/lib/hammer_cli_foreman/smart_variable.rb +24 -12
- data/lib/hammer_cli_foreman/ssh_keys.rb +56 -0
- data/lib/hammer_cli_foreman/subnet.rb +6 -9
- data/lib/hammer_cli_foreman/template.rb +16 -9
- data/lib/hammer_cli_foreman/user.rb +10 -52
- data/lib/hammer_cli_foreman/usergroup.rb +3 -3
- data/lib/hammer_cli_foreman/version.rb +1 -1
- data/test/data/1.15/foreman_api.json +1 -1
- data/test/data/1.16/foreman_api.json +1 -0
- data/test/functional/compute_resource_test.rb +117 -0
- data/test/functional/filter_test.rb +2 -2
- data/test/functional/host_test.rb +61 -10
- data/test/functional/location_test.rb +5 -5
- data/test/functional/organization_test.rb +7 -7
- data/test/functional/role_test.rb +3 -3
- data/test/functional/smart_class_parameter_test.rb +5 -5
- data/test/functional/smart_variable_test.rb +1 -1
- data/test/functional/ssh_keys_test.rb +105 -0
- data/test/functional/template_test.rb +30 -4
- data/test/functional/user_test.rb +5 -5
- data/test/reports/TEST-HammerCLIForeman-Architecture-CreateCommand-parameters.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-Architecture-CreateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Architecture-DeleteCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Architecture-DeleteCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Architecture-InfoCommand-output.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Architecture-InfoCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Architecture-InfoCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Architecture-ListCommand-output.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Architecture-ListCommand-parameters.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-Architecture-ListCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Architecture-UpdateCommand-parameters.xml +15 -0
- data/test/reports/TEST-HammerCLIForeman-Architecture-UpdateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Architecture.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-CommonParameter-DeleteCommand-parameters.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-CommonParameter-DeleteCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-CommonParameter-ListCommand-output.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-CommonParameter-ListCommand-parameters.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-CommonParameter-ListCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-CommonParameter-SetCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-CommonParameter-SetCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-CommonParameter.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-ComputeResource-CreateCommand-parameters.xml +15 -0
- data/test/reports/TEST-HammerCLIForeman-ComputeResource-CreateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-ComputeResource-DeleteCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-ComputeResource-DeleteCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-ComputeResource-InfoCommand-output.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-ComputeResource-InfoCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-ComputeResource-InfoCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-ComputeResource-ListCommand-output.xml +15 -0
- data/test/reports/TEST-HammerCLIForeman-ComputeResource-ListCommand-parameters.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-ComputeResource-ListCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-ComputeResource-UpdateCommand-parameters.xml +15 -0
- data/test/reports/TEST-HammerCLIForeman-ComputeResource-UpdateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-ComputeResource.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Domain-CreateCommand-parameters.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-Domain-CreateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Domain-DeleteCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Domain-DeleteCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Domain-DeleteParameterCommand-parameters.xml +15 -0
- data/test/reports/TEST-HammerCLIForeman-Domain-DeleteParameterCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Domain-InfoCommand-output.xml +21 -0
- data/test/reports/TEST-HammerCLIForeman-Domain-InfoCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Domain-InfoCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Domain-ListCommand-output.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Domain-ListCommand-parameters.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-Domain-ListCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Domain-SetParameterCommand-parameters.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-Domain-SetParameterCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Domain-UpdateCommand-parameters.xml +15 -0
- data/test/reports/TEST-HammerCLIForeman-Domain-UpdateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Domain.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Environment-CreateCommand-parameters.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-Environment-CreateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Environment-DeleteCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Environment-DeleteCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Environment-InfoCommand-output.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-Environment-InfoCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Environment-InfoCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Environment-ListCommand-output.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Environment-ListCommand-parameters.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-Environment-ListCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Environment-UpdateCommand-parameters.xml +15 -0
- data/test/reports/TEST-HammerCLIForeman-Environment-UpdateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Environment.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-ExceptionHandler.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Host-CreateCommand-parameters.xml +46 -0
- data/test/reports/TEST-HammerCLIForeman-Host-CreateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Host-DeleteCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Host-DeleteCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Host-DeleteParameterCommand-parameters.xml +15 -0
- data/test/reports/TEST-HammerCLIForeman-Host-DeleteParameterCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Host-InfoCommand-output.xml +85 -0
- data/test/reports/TEST-HammerCLIForeman-Host-InfoCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Host-InfoCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Host-ListCommand-output.xml +21 -0
- data/test/reports/TEST-HammerCLIForeman-Host-ListCommand-parameters.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-Host-ListCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Host-PuppetRunCommand-output.xml +9 -0
- data/test/reports/TEST-HammerCLIForeman-Host-PuppetRunCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Host-SetParameterCommand-parameters.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-Host-SetParameterCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Host-StatusCommand-output.xml +9 -0
- data/test/reports/TEST-HammerCLIForeman-Host-StatusCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Host-UpdateCommand-parameters.xml +40 -0
- data/test/reports/TEST-HammerCLIForeman-Host-UpdateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Host.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Hostgroup-CreateCommand-parameters.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-Hostgroup-CreateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Hostgroup-DeleteCommand-parameters.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-Hostgroup-DeleteCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Hostgroup-DeleteParameterCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Hostgroup-DeleteParameterCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Hostgroup-InfoCommand-output.xml +29 -0
- data/test/reports/TEST-HammerCLIForeman-Hostgroup-InfoCommand-parameters.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-Hostgroup-InfoCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Hostgroup-ListCommand-output.xml +27 -0
- data/test/reports/TEST-HammerCLIForeman-Hostgroup-ListCommand-parameters.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-Hostgroup-ListCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Hostgroup-SetParameterCommand-parameters.xml +15 -0
- data/test/reports/TEST-HammerCLIForeman-Hostgroup-SetParameterCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Hostgroup-UpdateCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Hostgroup-UpdateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Hostgroup.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Location-CreateCommand-parameters.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-Location-CreateCommand-resource-disabled.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-Location-CreateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Location-DeleteCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Location-DeleteCommand-resource-disabled.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-Location-DeleteCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Location-InfoCommand-output.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-Location-InfoCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Location-InfoCommand-resource-disabled.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-Location-InfoCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Location-ListCommand-output.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Location-ListCommand-parameters.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-Location-ListCommand-resource-disabled.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-Location-ListCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Location-UpdateCommand-parameters.xml +15 -0
- data/test/reports/TEST-HammerCLIForeman-Location-UpdateCommand-resource-disabled.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-Location-UpdateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Location.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Medium-CreateCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Medium-CreateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Medium-DeleteCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Medium-DeleteCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Medium-InfoCommand-output.xml +23 -0
- data/test/reports/TEST-HammerCLIForeman-Medium-InfoCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Medium-InfoCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Medium-ListCommand-output.xml +15 -0
- data/test/reports/TEST-HammerCLIForeman-Medium-ListCommand-parameters.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-Medium-ListCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Medium-UpdateCommand-parameters.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-Medium-UpdateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Medium.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-OperatingSystem-CreateCommand-parameters.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-OperatingSystem-CreateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-OperatingSystem-DeleteCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-OperatingSystem-DeleteCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-OperatingSystem-DeleteParameterCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-OperatingSystem-DeleteParameterCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-OperatingSystem-InfoCommand-output.xml +27 -0
- data/test/reports/TEST-HammerCLIForeman-OperatingSystem-InfoCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-OperatingSystem-InfoCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-OperatingSystem-ListCommand-output.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-OperatingSystem-ListCommand-parameters.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-OperatingSystem-ListCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-OperatingSystem-SetParameterCommand-parameters.xml +15 -0
- data/test/reports/TEST-HammerCLIForeman-OperatingSystem-SetParameterCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-OperatingSystem-UpdateCommand-parameters.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-OperatingSystem-UpdateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-OperatingSystem.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Organization-CreateCommand-parameters.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-Organization-CreateCommand-resource-disabled.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-Organization-CreateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Organization-DeleteCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Organization-DeleteCommand-resource-disabled.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-Organization-DeleteCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Organization-InfoCommand-output.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-Organization-InfoCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Organization-InfoCommand-resource-disabled.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-Organization-InfoCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Organization-ListCommand-output.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Organization-ListCommand-parameters.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-Organization-ListCommand-resource-disabled.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-Organization-ListCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Organization-UpdateCommand-parameters.xml +15 -0
- data/test/reports/TEST-HammerCLIForeman-Organization-UpdateCommand-resource-disabled.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-Organization-UpdateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Organization.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-PartitionTable-CreateCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-PartitionTable-CreateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-PartitionTable-DeleteCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-PartitionTable-DeleteCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-PartitionTable-DumpCommand-parameters.xml +15 -0
- data/test/reports/TEST-HammerCLIForeman-PartitionTable-DumpCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-PartitionTable-InfoCommand-output.xml +19 -0
- data/test/reports/TEST-HammerCLIForeman-PartitionTable-InfoCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-PartitionTable-InfoCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-PartitionTable-ListCommand-output.xml +15 -0
- data/test/reports/TEST-HammerCLIForeman-PartitionTable-ListCommand-parameters.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-PartitionTable-ListCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-PartitionTable-UpdateCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-PartitionTable-UpdateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-PartitionTable.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-SmartProxy-CreateCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-SmartProxy-CreateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-SmartProxy-DeleteCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-SmartProxy-DeleteCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-SmartProxy-InfoCommand-output.xml +21 -0
- data/test/reports/TEST-HammerCLIForeman-SmartProxy-InfoCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-SmartProxy-InfoCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-SmartProxy-ListCommand-output.xml +15 -0
- data/test/reports/TEST-HammerCLIForeman-SmartProxy-ListCommand-parameters.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-SmartProxy-ListCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-SmartProxy-UpdateCommand-parameters.xml +15 -0
- data/test/reports/TEST-HammerCLIForeman-SmartProxy-UpdateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-SmartProxy.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Subnet-CreateCommand-parameters.xml +15 -0
- data/test/reports/TEST-HammerCLIForeman-Subnet-CreateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Subnet-DeleteCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Subnet-DeleteCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Subnet-InfoCommand-output.xml +43 -0
- data/test/reports/TEST-HammerCLIForeman-Subnet-InfoCommand-parameters.xml +13 -0
- data/test/reports/TEST-HammerCLIForeman-Subnet-InfoCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Subnet-ListCommand-output.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-Subnet-ListCommand-parameters.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-Subnet-ListCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Subnet-UpdateCommand-parameters.xml +15 -0
- data/test/reports/TEST-HammerCLIForeman-Subnet-UpdateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Subnet.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Template-CreateCommand-parameters.xml +15 -0
- data/test/reports/TEST-HammerCLIForeman-Template-CreateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Template-DeleteCommand-parameters.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-Template-DeleteCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Template-DumpCommand-parameters.xml +12 -0
- data/test/reports/TEST-HammerCLIForeman-Template-DumpCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Template-InfoCommand-output.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-Template-InfoCommand-parameters.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-Template-InfoCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Template-ListCommand-output.xml +15 -0
- data/test/reports/TEST-HammerCLIForeman-Template-ListCommand-parameters.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-Template-ListCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Template-ListKindsCommand-parameters.xml +9 -0
- data/test/reports/TEST-HammerCLIForeman-Template-ListKindsCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Template-UpdateCommand-parameters.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-Template-UpdateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-Template.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-User-CreateCommand-parameters.xml +19 -0
- data/test/reports/TEST-HammerCLIForeman-User-CreateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-User-DeleteCommand-parameters.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-User-DeleteCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-User-InfoCommand-output.xml +23 -0
- data/test/reports/TEST-HammerCLIForeman-User-InfoCommand-parameters.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-User-InfoCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-User-ListCommand-output.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-User-ListCommand-parameters.xml +17 -0
- data/test/reports/TEST-HammerCLIForeman-User-ListCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-User-UpdateCommand-parameters.xml +11 -0
- data/test/reports/TEST-HammerCLIForeman-User-UpdateCommand.xml +7 -0
- data/test/reports/TEST-HammerCLIForeman-User.xml +7 -0
- data/test/reports/TEST-MiniTest-Spec.xml +7 -0
- data/test/unit/api/interactive_basic_auth_test.rb +20 -1
- data/test/unit/api/session_authenticator_wrapper_test.rb +23 -8
- data/test/unit/api/void_auth_test.rb +11 -0
- data/test/unit/commands_test.rb +1 -1
- data/test/unit/exception_handler_test.rb +24 -3
- data/test/unit/helpers/command.rb +6 -2
- data/test/unit/host_test.rb +2 -2
- data/test/unit/hostgroup_test.rb +5 -3
- data/test/unit/id_resolver_test.rb +53 -5
- data/test/unit/media_test.rb +2 -2
- data/test/unit/option_sources/id_params_test.rb +30 -0
- data/test/unit/option_sources/ids_params_test.rb +30 -0
- data/test/unit/output/formatters_test.rb +4 -0
- data/test/unit/smart_class_parameter_test.rb +4 -4
- data/test/unit/smart_variable_test.rb +2 -2
- data/test/unit/user_test.rb +1 -2
- metadata +569 -69
@@ -53,7 +53,7 @@ module HammerCLIForeman
|
|
53
53
|
class CreateCommand < HammerCLIForeman::CreateCommand
|
54
54
|
include HammerCLIForeman::ResourceSupportedTest
|
55
55
|
|
56
|
-
success_message _("Organization created")
|
56
|
+
success_message _("Organization created.")
|
57
57
|
failure_message _("Could not create the organization")
|
58
58
|
|
59
59
|
build_options
|
@@ -65,7 +65,7 @@ module HammerCLIForeman
|
|
65
65
|
|
66
66
|
option "--id", "ID", " ", :referenced_resource => 'organization'
|
67
67
|
|
68
|
-
success_message _("Organization updated")
|
68
|
+
success_message _("Organization updated.")
|
69
69
|
failure_message _("Could not update the organization")
|
70
70
|
|
71
71
|
build_options
|
@@ -77,7 +77,7 @@ module HammerCLIForeman
|
|
77
77
|
|
78
78
|
option "--id", "ID", " ", :referenced_resource => 'organization'
|
79
79
|
|
80
|
-
success_message _("Organization deleted")
|
80
|
+
success_message _("Organization deleted.")
|
81
81
|
failure_message _("Could not delete the organization")
|
82
82
|
|
83
83
|
build_options do |o|
|
@@ -87,7 +87,7 @@ module HammerCLIForeman
|
|
87
87
|
|
88
88
|
|
89
89
|
class SetParameterCommand < HammerCLIForeman::Parameter::SetCommand
|
90
|
-
desc _("Create or update parameter for an organization
|
90
|
+
desc _("Create or update parameter for an organization")
|
91
91
|
|
92
92
|
success_message_for :update, _("Parameter [%{name}] updated to value [%{value}]")
|
93
93
|
success_message_for :create, _("Parameter [%{name}] created with value [%{value}]")
|
@@ -98,9 +98,9 @@ module HammerCLIForeman
|
|
98
98
|
|
99
99
|
|
100
100
|
class DeleteParameterCommand < HammerCLIForeman::Parameter::DeleteCommand
|
101
|
-
desc _("Delete parameter for an organization
|
101
|
+
desc _("Delete parameter for an organization")
|
102
102
|
|
103
|
-
success_message _("Parameter [%{name}] deleted")
|
103
|
+
success_message _("Parameter [%{name}] deleted.")
|
104
104
|
failure_message _("Could not delete organization parameter")
|
105
105
|
|
106
106
|
build_options
|
@@ -122,6 +122,3 @@ module HammerCLIForeman
|
|
122
122
|
end
|
123
123
|
|
124
124
|
end
|
125
|
-
|
126
|
-
|
127
|
-
|
@@ -46,9 +46,9 @@ module HammerCLIForeman
|
|
46
46
|
|
47
47
|
|
48
48
|
class SetCommand < AbstractParameterCommand
|
49
|
-
option "--name", "NAME", _("
|
50
|
-
option "--value", "VALUE", _("
|
51
|
-
option "--hidden-value", "HIDDEN_VALUE", _("
|
49
|
+
option "--name", "NAME", _("Parameter name"), :required => true
|
50
|
+
option "--value", "VALUE", _("Parameter value"), :required => true
|
51
|
+
option "--hidden-value", "HIDDEN_VALUE", _("Should the value be hidden"), :format => HammerCLI::Options::Normalizers::Bool.new
|
52
52
|
|
53
53
|
def self.command_name(name=nil)
|
54
54
|
(super(name) || "set-parameter").gsub('_', '-')
|
@@ -116,5 +116,3 @@ module HammerCLIForeman
|
|
116
116
|
|
117
117
|
end
|
118
118
|
end
|
119
|
-
|
120
|
-
|
@@ -21,6 +21,7 @@ module HammerCLIForeman
|
|
21
21
|
field :locked, _("Locked"), Fields::Boolean
|
22
22
|
HammerCLIForeman::References.operating_systems(self)
|
23
23
|
HammerCLIForeman::References.timestamps(self)
|
24
|
+
HammerCLIForeman::References.taxonomies(self)
|
24
25
|
end
|
25
26
|
|
26
27
|
build_options
|
@@ -29,7 +30,7 @@ module HammerCLIForeman
|
|
29
30
|
|
30
31
|
class DumpCommand < HammerCLIForeman::InfoCommand
|
31
32
|
command_name "dump"
|
32
|
-
desc _("View partition table content
|
33
|
+
desc _("View partition table content")
|
33
34
|
|
34
35
|
def print_data(partition_table)
|
35
36
|
puts partition_table["layout"]
|
@@ -44,7 +45,7 @@ module HammerCLIForeman
|
|
44
45
|
option "--file", "LAYOUT", _("Path to a file that contains the partition layout"), :attribute_name => :option_layout,
|
45
46
|
:required => true, :format => HammerCLI::Options::Normalizers::File.new
|
46
47
|
|
47
|
-
success_message _("Partition table created")
|
48
|
+
success_message _("Partition table created.")
|
48
49
|
failure_message _("Could not create the partition table")
|
49
50
|
|
50
51
|
build_options :without => [:layout]
|
@@ -55,7 +56,7 @@ module HammerCLIForeman
|
|
55
56
|
option "--file", "LAYOUT", _("Path to a file that contains the partition layout"), :attribute_name => :option_layout,
|
56
57
|
:format => HammerCLI::Options::Normalizers::File.new
|
57
58
|
|
58
|
-
success_message _("Partition table updated")
|
59
|
+
success_message _("Partition table updated.")
|
59
60
|
failure_message _("Could not update the partition table")
|
60
61
|
|
61
62
|
build_options :without => [:layout]
|
@@ -63,7 +64,7 @@ module HammerCLIForeman
|
|
63
64
|
|
64
65
|
|
65
66
|
class DeleteCommand < HammerCLIForeman::DeleteCommand
|
66
|
-
success_message _("Partition table deleted")
|
67
|
+
success_message _("Partition table deleted.")
|
67
68
|
failure_message _("Could not delete the partition table")
|
68
69
|
|
69
70
|
build_options
|
@@ -77,5 +78,3 @@ module HammerCLIForeman
|
|
77
78
|
end
|
78
79
|
|
79
80
|
end
|
80
|
-
|
81
|
-
|
@@ -26,7 +26,7 @@ module HammerCLIForeman
|
|
26
26
|
|
27
27
|
|
28
28
|
class CreateCommand < HammerCLIForeman::CreateCommand
|
29
|
-
success_message _("Realm [%{name}] created")
|
29
|
+
success_message _("Realm [%{name}] created.")
|
30
30
|
failure_message _("Could not create the realm")
|
31
31
|
|
32
32
|
build_options
|
@@ -34,7 +34,7 @@ module HammerCLIForeman
|
|
34
34
|
|
35
35
|
|
36
36
|
class UpdateCommand < HammerCLIForeman::UpdateCommand
|
37
|
-
success_message _("Realm [%{name}] updated")
|
37
|
+
success_message _("Realm [%{name}] updated.")
|
38
38
|
failure_message _("Could not update the realm")
|
39
39
|
|
40
40
|
build_options
|
@@ -42,7 +42,7 @@ module HammerCLIForeman
|
|
42
42
|
|
43
43
|
|
44
44
|
class DeleteCommand < HammerCLIForeman::DeleteCommand
|
45
|
-
success_message _("Realm [%{name}] deleted")
|
45
|
+
success_message _("Realm [%{name}] deleted.")
|
46
46
|
failure_message _("Could not delete the realm")
|
47
47
|
|
48
48
|
build_options
|
@@ -73,7 +73,7 @@ module HammerCLIForeman
|
|
73
73
|
|
74
74
|
|
75
75
|
class DeleteCommand < HammerCLIForeman::DeleteCommand
|
76
|
-
success_message _("Report has been deleted")
|
76
|
+
success_message _("Report has been deleted.")
|
77
77
|
failure_message _("Could not delete the report")
|
78
78
|
|
79
79
|
build_options
|
@@ -84,6 +84,3 @@ module HammerCLIForeman
|
|
84
84
|
end
|
85
85
|
|
86
86
|
end
|
87
|
-
|
88
|
-
|
89
|
-
|
@@ -57,7 +57,7 @@ module HammerCLIForeman
|
|
57
57
|
|
58
58
|
|
59
59
|
class CreateCommand < HammerCLIForeman::CreateCommand
|
60
|
-
success_message _("User role [%<name>s] created")
|
60
|
+
success_message _("User role [%<name>s] created.")
|
61
61
|
failure_message _("Could not create the user role")
|
62
62
|
|
63
63
|
build_options
|
@@ -65,7 +65,7 @@ module HammerCLIForeman
|
|
65
65
|
|
66
66
|
|
67
67
|
class UpdateCommand < HammerCLIForeman::UpdateCommand
|
68
|
-
success_message _("User role [%<name>s] updated")
|
68
|
+
success_message _("User role [%<name>s] updated.")
|
69
69
|
failure_message _("Could not update the user role")
|
70
70
|
|
71
71
|
build_options
|
@@ -82,7 +82,7 @@ module HammerCLIForeman
|
|
82
82
|
option(:option_new_name).required
|
83
83
|
end
|
84
84
|
|
85
|
-
success_message _("User role cloned")
|
85
|
+
success_message _("User role cloned.")
|
86
86
|
failure_message _("Could not clone the user role")
|
87
87
|
|
88
88
|
build_options
|
@@ -90,7 +90,7 @@ module HammerCLIForeman
|
|
90
90
|
|
91
91
|
|
92
92
|
class DeleteCommand < HammerCLIForeman::DeleteCommand
|
93
|
-
success_message _("User role [%<name>s] deleted")
|
93
|
+
success_message _("User role [%<name>s] deleted.")
|
94
94
|
failure_message _("Could not delete the user roles")
|
95
95
|
|
96
96
|
build_options
|
@@ -100,6 +100,3 @@ module HammerCLIForeman
|
|
100
100
|
end
|
101
101
|
|
102
102
|
end
|
103
|
-
|
104
|
-
|
105
|
-
|
@@ -25,7 +25,7 @@ module HammerCLIForeman
|
|
25
25
|
class UpdateCommand < HammerCLIForeman::UpdateCommand
|
26
26
|
command_name 'set'
|
27
27
|
|
28
|
-
success_message _("Setting [%{name}] updated to [%{value}]")
|
28
|
+
success_message _("Setting [%{name}] updated to [%{value}].")
|
29
29
|
failure_message _("Could not update the setting")
|
30
30
|
|
31
31
|
build_options
|
@@ -102,7 +102,7 @@ module HammerCLIForeman
|
|
102
102
|
|
103
103
|
class UpdateCommand < HammerCLIForeman::UpdateCommand
|
104
104
|
|
105
|
-
success_message _("Parameter updated")
|
105
|
+
success_message _("Parameter updated.")
|
106
106
|
failure_message _("Could not update the parameter")
|
107
107
|
|
108
108
|
build_options do |options|
|
@@ -110,14 +110,14 @@ module HammerCLIForeman
|
|
110
110
|
options.without(:parameter_type, :validator_type, :override, :required, :override_value_order)
|
111
111
|
end
|
112
112
|
|
113
|
-
option "--override", "OVERRIDE", _("Override this parameter
|
113
|
+
option "--override", "OVERRIDE", _("Override this parameter"),
|
114
114
|
:format => HammerCLI::Options::Normalizers::Bool.new
|
115
|
-
option "--required", "REQUIRED", _("This parameter is required
|
115
|
+
option "--required", "REQUIRED", _("This parameter is required"),
|
116
116
|
:format => HammerCLI::Options::Normalizers::Bool.new
|
117
|
-
option "--parameter-type", "PARAMETER_TYPE", _("Type of the parameter
|
117
|
+
option "--parameter-type", "PARAMETER_TYPE", _("Type of the parameter"),
|
118
118
|
:format => HammerCLI::Options::Normalizers::Enum.new(
|
119
119
|
['string', 'boolean', 'integer', 'real', 'array', 'hash', 'yaml', 'json'])
|
120
|
-
option "--validator-type", "VALIDATOR_TYPE", _("Type of the validator
|
120
|
+
option "--validator-type", "VALIDATOR_TYPE", _("Type of the validator"),
|
121
121
|
:format => HammerCLI::Options::Normalizers::Enum.new(['regexp', 'list', ''])
|
122
122
|
option "--override-value-order", "OVERRIDE_VALUE_ORDER", _("The order in which values are resolved"),
|
123
123
|
:format => HammerCLI::Options::Normalizers::List.new
|
@@ -136,11 +136,11 @@ module HammerCLIForeman
|
|
136
136
|
end
|
137
137
|
end
|
138
138
|
|
139
|
-
class
|
139
|
+
class AddMatcherCommand < HammerCLIForeman::CreateCommand
|
140
140
|
resource :override_values
|
141
|
-
command_name 'add-
|
141
|
+
command_name 'add-matcher'
|
142
142
|
|
143
|
-
success_message _("Override value created")
|
143
|
+
success_message _("Override value created.")
|
144
144
|
failure_message _("Could not create the override value")
|
145
145
|
|
146
146
|
build_options do |options|
|
@@ -151,7 +151,7 @@ module HammerCLIForeman
|
|
151
151
|
|
152
152
|
validate_options do
|
153
153
|
if option(:option_use_puppet_default).value
|
154
|
-
option(:option_value).rejected(:msg => _('Cannot use --value when --use-puppet-default is true'))
|
154
|
+
option(:option_value).rejected(:msg => _('Cannot use --value when --use-puppet-default is true.'))
|
155
155
|
end
|
156
156
|
|
157
157
|
if option(:option_smart_class_parameter_name).exist?
|
@@ -160,11 +160,17 @@ module HammerCLIForeman
|
|
160
160
|
end
|
161
161
|
end
|
162
162
|
|
163
|
-
|
163
|
+
HammerCLIForeman::SmartClassParameter.lazy_subcommand('add-override-value', _("Create an override value for a specific smart variable"),
|
164
|
+
'HammerCLIForeman::SmartClassParameter::AddMatcherCommand', 'hammer_cli_foreman/smart_class_parameter',
|
165
|
+
:hidden => true,
|
166
|
+
:warning => _('add-override-value command is deprecated and will be removed in one of the future versions. Please use add-matcher command instead.')
|
167
|
+
)
|
168
|
+
|
169
|
+
class RemoveMatcherCommand < HammerCLIForeman::DeleteCommand
|
164
170
|
resource :override_values
|
165
|
-
command_name 'remove-
|
171
|
+
command_name 'remove-matcher'
|
166
172
|
|
167
|
-
success_message _("Override value deleted")
|
173
|
+
success_message _("Override value deleted.")
|
168
174
|
failure_message _("Could not delete the override value")
|
169
175
|
|
170
176
|
build_options do |options|
|
@@ -180,10 +186,14 @@ module HammerCLIForeman
|
|
180
186
|
end
|
181
187
|
end
|
182
188
|
|
189
|
+
HammerCLIForeman::SmartClassParameter.lazy_subcommand('remove-override-value', _("Remove an override value for a specific smart variable"),
|
190
|
+
'HammerCLIForeman::SmartClassParameter::RemoveMatcherCommand', 'hammer_cli_foreman/smart_class_parameter',
|
191
|
+
:hidden => true,
|
192
|
+
:warning => _('remove-override-value command is deprecated and will be removed in one of the future versions. Please use remove-matcher command instead.')
|
193
|
+
)
|
194
|
+
|
183
195
|
autoload_subcommands
|
184
196
|
|
185
197
|
end
|
186
198
|
|
187
|
-
|
188
|
-
|
189
199
|
end
|
@@ -38,7 +38,7 @@ module HammerCLIForeman
|
|
38
38
|
|
39
39
|
|
40
40
|
class CreateCommand < HammerCLIForeman::CreateCommand
|
41
|
-
success_message _("Smart proxy created")
|
41
|
+
success_message _("Smart proxy created.")
|
42
42
|
failure_message _("Could not create the proxy")
|
43
43
|
|
44
44
|
build_options
|
@@ -46,7 +46,7 @@ module HammerCLIForeman
|
|
46
46
|
|
47
47
|
|
48
48
|
class UpdateCommand < HammerCLIForeman::UpdateCommand
|
49
|
-
success_message _("Smart proxy updated")
|
49
|
+
success_message _("Smart proxy updated.")
|
50
50
|
failure_message _("Could not update the proxy")
|
51
51
|
|
52
52
|
build_options
|
@@ -54,7 +54,7 @@ module HammerCLIForeman
|
|
54
54
|
|
55
55
|
|
56
56
|
class DeleteCommand < HammerCLIForeman::DeleteCommand
|
57
|
-
success_message _("Smart proxy deleted")
|
57
|
+
success_message _("Smart proxy deleted.")
|
58
58
|
failure_message _("Could not delete the proxy")
|
59
59
|
|
60
60
|
build_options
|
@@ -66,7 +66,7 @@ module HammerCLIForeman
|
|
66
66
|
action :import_puppetclasses
|
67
67
|
|
68
68
|
command_name "import-classes"
|
69
|
-
success_message _("Puppet classes were imported")
|
69
|
+
success_message _("Puppet classes were imported.")
|
70
70
|
failure_message _("Import of puppet classes failed")
|
71
71
|
|
72
72
|
option "--dryrun", :flag, _("Do not run the import")
|
@@ -89,7 +89,7 @@ module HammerCLIForeman
|
|
89
89
|
action :refresh
|
90
90
|
|
91
91
|
command_name "refresh-features"
|
92
|
-
success_message _("Smart proxy features were refreshed")
|
92
|
+
success_message _("Smart proxy features were refreshed.")
|
93
93
|
failure_message _("Refresh of smart proxy features failed")
|
94
94
|
|
95
95
|
build_options
|
@@ -99,5 +99,3 @@ module HammerCLIForeman
|
|
99
99
|
end
|
100
100
|
|
101
101
|
end
|
102
|
-
|
103
|
-
|
@@ -3,10 +3,10 @@ module HammerCLIForeman
|
|
3
3
|
module SmartVariableUpdateCreateCommons
|
4
4
|
|
5
5
|
def self.included(base)
|
6
|
-
base.option "--variable-type", "VARIABLE_TYPE", _("Type of the variable
|
6
|
+
base.option "--variable-type", "VARIABLE_TYPE", _("Type of the variable"),
|
7
7
|
:format => HammerCLI::Options::Normalizers::Enum.new(
|
8
8
|
['string', 'boolean', 'integer', 'real', 'array', 'hash', 'yaml', 'json'])
|
9
|
-
base.option "--validator-type", "VALIDATOR_TYPE", _("Type of the validator
|
9
|
+
base.option "--validator-type", "VALIDATOR_TYPE", _("Type of the validator"),
|
10
10
|
:format => HammerCLI::Options::Normalizers::Enum.new(['regexp', 'list', ''])
|
11
11
|
base.option "--override-value-order", "OVERRIDE_VALUE_ORDER", _("The order in which values are resolved"),
|
12
12
|
:format => HammerCLI::Options::Normalizers::List.new
|
@@ -104,14 +104,14 @@ module HammerCLIForeman
|
|
104
104
|
class CreateCommand < HammerCLIForeman::CreateCommand
|
105
105
|
include SmartVariableUpdateCreateCommons
|
106
106
|
|
107
|
-
success_message _("Smart variable [%{variable}] created")
|
107
|
+
success_message _("Smart variable [%{variable}] created.")
|
108
108
|
failure_message _("Could not create the smart variable")
|
109
109
|
end
|
110
110
|
|
111
111
|
class UpdateCommand < HammerCLIForeman::UpdateCommand
|
112
112
|
include SmartVariableUpdateCreateCommons
|
113
113
|
|
114
|
-
success_message _("Smart variable [%{variable}] updated")
|
114
|
+
success_message _("Smart variable [%{variable}] updated.")
|
115
115
|
failure_message _("Could not update the smart variable")
|
116
116
|
end
|
117
117
|
|
@@ -119,18 +119,17 @@ module HammerCLIForeman
|
|
119
119
|
class DeleteCommand < HammerCLIForeman::DeleteCommand
|
120
120
|
option '--name', 'NAME', _('Smart variable name'), :deprecated => _('Use --variable instead')
|
121
121
|
|
122
|
-
success_message _("Smart variable [%{variable}] deleted")
|
122
|
+
success_message _("Smart variable [%{variable}] deleted.")
|
123
123
|
failure_message _("Could not delete the smart variable")
|
124
124
|
|
125
125
|
build_options
|
126
126
|
end
|
127
127
|
|
128
|
-
|
129
|
-
class AddOverrideValueCommand < HammerCLIForeman::CreateCommand
|
128
|
+
class AddMatcherCommand < HammerCLIForeman::CreateCommand
|
130
129
|
resource :override_values
|
131
|
-
command_name 'add-
|
130
|
+
command_name 'add-matcher'
|
132
131
|
|
133
|
-
success_message _("Override value created")
|
132
|
+
success_message _("Override value created.")
|
134
133
|
failure_message _("Could not create the override value")
|
135
134
|
|
136
135
|
build_options do |options|
|
@@ -139,11 +138,18 @@ module HammerCLIForeman
|
|
139
138
|
end
|
140
139
|
end
|
141
140
|
|
142
|
-
|
141
|
+
HammerCLIForeman::SmartVariable.lazy_subcommand('add-override-value', _("Create an override value for a specific smart variable"),
|
142
|
+
'HammerCLIForeman::SmartVariable::AddMatcherCommand', 'hammer_cli_foreman/smart_variable',
|
143
|
+
:hidden => true,
|
144
|
+
:warning => _('add-override-value command is deprecated and will be removed in one of the future versions. Please use add-matcher command instead.')
|
145
|
+
)
|
146
|
+
|
147
|
+
|
148
|
+
class RemoveMatcherCommand < HammerCLIForeman::DeleteCommand
|
143
149
|
resource :override_values
|
144
|
-
command_name 'remove-
|
150
|
+
command_name 'remove-matcher'
|
145
151
|
|
146
|
-
success_message _("Override value deleted")
|
152
|
+
success_message _("Override value deleted.")
|
147
153
|
failure_message _("Could not delete the override value")
|
148
154
|
|
149
155
|
build_options do |options|
|
@@ -152,6 +158,12 @@ module HammerCLIForeman
|
|
152
158
|
end
|
153
159
|
end
|
154
160
|
|
161
|
+
HammerCLIForeman::SmartVariable.lazy_subcommand('remove-override-value', _("Remove an override value for a specific smart variable"),
|
162
|
+
'HammerCLIForeman::SmartVariable::RemoveMatcherCommand', 'hammer_cli_foreman/smart_variable',
|
163
|
+
:hidden => true,
|
164
|
+
:warning => _('remove-override-value command is deprecated and will be removed in one of the future versions. Please use remove-matcher command instead.')
|
165
|
+
)
|
166
|
+
|
155
167
|
autoload_subcommands
|
156
168
|
|
157
169
|
end
|