hammer_cli_foreman 0.0.18 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of hammer_cli_foreman might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/hammer_cli_foreman.rb +39 -27
- data/lib/hammer_cli_foreman/architecture.rb +14 -14
- data/lib/hammer_cli_foreman/associating_commands.rb +46 -40
- data/lib/hammer_cli_foreman/auth.rb +49 -0
- data/lib/hammer_cli_foreman/commands.rb +82 -29
- data/lib/hammer_cli_foreman/common_parameter.rb +13 -17
- data/lib/hammer_cli_foreman/compute_resource.rb +23 -23
- data/lib/hammer_cli_foreman/credentials.rb +36 -0
- data/lib/hammer_cli_foreman/domain.rb +32 -35
- data/lib/hammer_cli_foreman/environment.rb +14 -19
- data/lib/hammer_cli_foreman/exception_handler.rb +30 -8
- data/lib/hammer_cli_foreman/fact.rb +5 -5
- data/lib/hammer_cli_foreman/host.rb +178 -105
- data/lib/hammer_cli_foreman/hostgroup.rb +59 -37
- data/lib/hammer_cli_foreman/i18n.rb +24 -0
- data/lib/hammer_cli_foreman/image.rb +24 -24
- data/lib/hammer_cli_foreman/location.rb +13 -13
- data/lib/hammer_cli_foreman/media.rb +21 -16
- data/lib/hammer_cli_foreman/model.rb +16 -16
- data/lib/hammer_cli_foreman/operating_system.rb +39 -39
- data/lib/hammer_cli_foreman/organization.rb +13 -13
- data/lib/hammer_cli_foreman/output/fields.rb +2 -2
- data/lib/hammer_cli_foreman/output/formatters.rb +15 -4
- data/lib/hammer_cli_foreman/parameter.rb +13 -11
- data/lib/hammer_cli_foreman/partition_table.rb +17 -18
- data/lib/hammer_cli_foreman/puppet_class.rb +9 -9
- data/lib/hammer_cli_foreman/report.rb +38 -38
- data/lib/hammer_cli_foreman/resource_supported_test.rb +1 -1
- data/lib/hammer_cli_foreman/smart_class_parameter.rb +36 -36
- data/lib/hammer_cli_foreman/smart_proxy.rb +22 -21
- data/lib/hammer_cli_foreman/subnet.rb +29 -31
- data/lib/hammer_cli_foreman/template.rb +45 -43
- data/lib/hammer_cli_foreman/user.rb +20 -23
- data/lib/hammer_cli_foreman/version.rb +1 -1
- data/locale/Makefile +64 -0
- data/locale/hammer-cli-foreman.pot +1573 -0
- data/locale/zanata.xml +29 -0
- data/test/unit/apipie_resource_mock.rb +44 -72
- data/test/unit/architecture_test.rb +1 -2
- data/test/unit/commands_test.rb +23 -21
- data/test/unit/common_parameter_test.rb +15 -10
- data/test/unit/compute_resource_test.rb +1 -2
- data/test/unit/credentials_test.rb +46 -0
- data/test/unit/data/1.4/foreman_api.json +10387 -0
- data/test/unit/domain_test.rb +2 -5
- data/test/unit/environment_test.rb +2 -3
- data/test/unit/exception_handler_test.rb +29 -4
- data/test/unit/fact_test.rb +0 -1
- data/test/unit/helpers/command.rb +20 -4
- data/test/unit/helpers/resource_disabled.rb +2 -2
- data/test/unit/host_test.rb +24 -12
- data/test/unit/hostgroup_test.rb +7 -8
- data/test/unit/image_test.rb +6 -7
- data/test/unit/location_test.rb +9 -5
- data/test/unit/media_test.rb +1 -9
- data/test/unit/model_test.rb +1 -3
- data/test/unit/operating_system_test.rb +7 -9
- data/test/unit/organization_test.rb +12 -6
- data/test/unit/output/formatters_test.rb +5 -0
- data/test/unit/partition_table_test.rb +1 -2
- data/test/unit/puppet_class_test.rb +2 -3
- data/test/unit/report_test.rb +1 -2
- data/test/unit/smart_class_parameter_test.rb +9 -4
- data/test/unit/smart_proxy_test.rb +1 -2
- data/test/unit/subnet_test.rb +2 -3
- data/test/unit/template_test.rb +23 -8
- data/test/unit/test_helper.rb +13 -0
- data/test/unit/test_output_adapter.rb +1 -1
- data/test/unit/user_test.rb +1 -2
- metadata +17 -7
@@ -2,15 +2,15 @@ require 'hammer_cli_foreman/smart_class_parameter'
|
|
2
2
|
|
3
3
|
module HammerCLIForeman
|
4
4
|
|
5
|
-
class PuppetClass <
|
5
|
+
class PuppetClass < HammerCLIForeman::Command
|
6
6
|
|
7
|
-
resource
|
7
|
+
resource :puppetclasses
|
8
8
|
|
9
9
|
class ListCommand < HammerCLIForeman::ListCommand
|
10
10
|
|
11
11
|
output do
|
12
|
-
field :id, "Id"
|
13
|
-
field :name, "Name"
|
12
|
+
field :id, _("Id")
|
13
|
+
field :name, _("Name")
|
14
14
|
end
|
15
15
|
|
16
16
|
def retrieve_data
|
@@ -32,10 +32,10 @@ module HammerCLIForeman
|
|
32
32
|
|
33
33
|
#FIXME: show environments, hostgroups, variables and parameters
|
34
34
|
output ListCommand.output_definition do
|
35
|
-
collection :lookup_keys, "Smart variables" do
|
35
|
+
collection :lookup_keys, _("Smart variables") do
|
36
36
|
from :lookup_key do
|
37
|
-
field :key, "Parameter"
|
38
|
-
field :default_value, "Default value"
|
37
|
+
field :key, _("Parameter")
|
38
|
+
field :default_value, _("Default value")
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
@@ -47,7 +47,7 @@ module HammerCLIForeman
|
|
47
47
|
class SCParamsCommand < HammerCLIForeman::SmartClassParametersBriefList
|
48
48
|
|
49
49
|
apipie_options :without => [:host_id, :hostgroup_id, :puppetclass_id, :environment_id]
|
50
|
-
option ['--id', '--name'], 'PUPPET_CLASS_ID', 'puppet class id/name',
|
50
|
+
option ['--id', '--name'], 'PUPPET_CLASS_ID', _('puppet class id/name'),
|
51
51
|
:attribute_name => :puppetclass_id, :required => true
|
52
52
|
end
|
53
53
|
|
@@ -57,5 +57,5 @@ module HammerCLIForeman
|
|
57
57
|
|
58
58
|
end
|
59
59
|
|
60
|
-
HammerCLI::MainCommand.subcommand '
|
60
|
+
HammerCLI::MainCommand.subcommand 'puppet-class', _("Search puppet modules."), HammerCLIForeman::PuppetClass
|
61
61
|
|
@@ -1,22 +1,22 @@
|
|
1
1
|
module HammerCLIForeman
|
2
2
|
|
3
|
-
class Report <
|
3
|
+
class Report < HammerCLIForeman::Command
|
4
4
|
|
5
|
-
resource
|
5
|
+
resource :reports
|
6
6
|
|
7
7
|
class ListCommand < HammerCLIForeman::ListCommand
|
8
8
|
|
9
9
|
output do
|
10
|
-
field :id, "Id"
|
11
|
-
field :host_name, "Host"
|
12
|
-
field :reported_at, "Last report", Fields::Date
|
10
|
+
field :id, _("Id")
|
11
|
+
field :host_name, _("Host")
|
12
|
+
field :reported_at, _("Last report"), Fields::Date
|
13
13
|
from "status" do
|
14
|
-
field :applied, "Applied"
|
15
|
-
field :restarted, "Restarted"
|
16
|
-
field :failed, "Failed"
|
17
|
-
field :failed_restarts, "Restart Failures"
|
18
|
-
field :skipped, "Skipped"
|
19
|
-
field :pending, "Pending"
|
14
|
+
field :applied, _("Applied")
|
15
|
+
field :restarted, _("Restarted")
|
16
|
+
field :failed, _("Failed")
|
17
|
+
field :failed_restarts, _("Restart Failures")
|
18
|
+
field :skipped, _("Skipped")
|
19
|
+
field :pending, _("Pending")
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
@@ -29,42 +29,42 @@ module HammerCLIForeman
|
|
29
29
|
identifiers :id
|
30
30
|
|
31
31
|
output do
|
32
|
-
field :id, "Id"
|
33
|
-
field :host_name, "Host"
|
34
|
-
field :reported_at, "Reported at", Fields::Date
|
35
|
-
label "Report status" do
|
32
|
+
field :id, _("Id")
|
33
|
+
field :host_name, _("Host")
|
34
|
+
field :reported_at, _("Reported at"), Fields::Date
|
35
|
+
label _("Report status") do
|
36
36
|
from "status" do
|
37
|
-
field :applied, "Applied"
|
38
|
-
field :restarted, "Restarted"
|
39
|
-
field :failed, "Failed"
|
40
|
-
field :failed_restarts, "Restart Failures"
|
41
|
-
field :skipped, "Skipped"
|
42
|
-
field :pending, "Pending"
|
37
|
+
field :applied, _("Applied")
|
38
|
+
field :restarted, _("Restarted")
|
39
|
+
field :failed, _("Failed")
|
40
|
+
field :failed_restarts, _("Restart Failures")
|
41
|
+
field :skipped, _("Skipped")
|
42
|
+
field :pending, _("Pending")
|
43
43
|
end
|
44
44
|
end
|
45
|
-
label "Report metrics" do
|
45
|
+
label _("Report metrics") do
|
46
46
|
from "metrics" do
|
47
47
|
from "time" do
|
48
|
-
field :config_retrieval, "config_retrieval"
|
49
|
-
field :exec, "exec"
|
50
|
-
field :file, "file"
|
51
|
-
field :package, "package"
|
52
|
-
field :service, "service"
|
53
|
-
field :user, "user"
|
54
|
-
field :yumrepo, "yumrepo"
|
55
|
-
field :filebucket, "filebucket"
|
56
|
-
field :cron, "cron"
|
57
|
-
field :total, "total"
|
48
|
+
field :config_retrieval, _("config_retrieval")
|
49
|
+
field :exec, _("exec")
|
50
|
+
field :file, _("file")
|
51
|
+
field :package, _("package")
|
52
|
+
field :service, _("service")
|
53
|
+
field :user, _("user")
|
54
|
+
field :yumrepo, _("yumrepo")
|
55
|
+
field :filebucket, _("filebucket")
|
56
|
+
field :cron, _("cron")
|
57
|
+
field :total, _("total")
|
58
58
|
end
|
59
59
|
end
|
60
60
|
end
|
61
|
-
field :logs, "Logs", Fields::Collection do
|
61
|
+
field :logs, _("Logs"), Fields::Collection do
|
62
62
|
from :log do
|
63
63
|
from :source do
|
64
|
-
field :source, "Resource"
|
64
|
+
field :source, _("Resource")
|
65
65
|
end
|
66
66
|
from :message do
|
67
|
-
field :message, "Message"
|
67
|
+
field :message, _("Message")
|
68
68
|
end
|
69
69
|
end
|
70
70
|
end
|
@@ -76,8 +76,8 @@ module HammerCLIForeman
|
|
76
76
|
|
77
77
|
class DeleteCommand < HammerCLIForeman::DeleteCommand
|
78
78
|
identifiers :id
|
79
|
-
success_message "Report has been deleted"
|
80
|
-
failure_message "Could not delete the report"
|
79
|
+
success_message _("Report has been deleted")
|
80
|
+
failure_message _("Could not delete the report")
|
81
81
|
|
82
82
|
apipie_options
|
83
83
|
end
|
@@ -88,5 +88,5 @@ module HammerCLIForeman
|
|
88
88
|
|
89
89
|
end
|
90
90
|
|
91
|
-
HammerCLI::MainCommand.subcommand 'report', "Browse and read reports.", HammerCLIForeman::Report
|
91
|
+
HammerCLI::MainCommand.subcommand 'report', _("Browse and read reports."), HammerCLIForeman::Report
|
92
92
|
|
@@ -1,15 +1,15 @@
|
|
1
1
|
module HammerCLIForeman
|
2
2
|
|
3
3
|
class SmartClassParametersBriefList < HammerCLIForeman::ListCommand
|
4
|
-
resource
|
5
|
-
command_name '
|
4
|
+
resource :smart_class_parameters, :index
|
5
|
+
command_name 'sc-params'
|
6
6
|
|
7
7
|
output do
|
8
|
-
field :id, "Id"
|
8
|
+
field :id, _("Id")
|
9
9
|
|
10
|
-
field :parameter, "Parameter"
|
11
|
-
field :default_value, "Default Value"
|
12
|
-
field :override, "Override"
|
10
|
+
field :parameter, _("Parameter")
|
11
|
+
field :default_value, _("Default Value")
|
12
|
+
field :override, _("Override")
|
13
13
|
end
|
14
14
|
|
15
15
|
def retrieve_data
|
@@ -25,15 +25,15 @@ module HammerCLIForeman
|
|
25
25
|
|
26
26
|
output do
|
27
27
|
from :puppetclass do
|
28
|
-
field :name, "Puppet class"
|
29
|
-
field :id, "Class Id", Fields::Id
|
28
|
+
field :name, _("Puppet class")
|
29
|
+
field :id, _("Class Id"), Fields::Id
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
-
class SmartClassParameter <
|
34
|
+
class SmartClassParameter < HammerCLIForeman::Command
|
35
35
|
|
36
|
-
resource
|
36
|
+
resource :smart_class_parameters
|
37
37
|
|
38
38
|
class ListCommand < HammerCLIForeman::SmartClassParametersList
|
39
39
|
command_name 'list'
|
@@ -43,34 +43,34 @@ module HammerCLIForeman
|
|
43
43
|
class InfoCommand < HammerCLIForeman::InfoCommand
|
44
44
|
|
45
45
|
output ListCommand.output_definition do
|
46
|
-
field :description, "Description"
|
47
|
-
field :parameter_type, "Type"
|
48
|
-
field :required, "Required"
|
49
|
-
field :_environments, "Environments", Fields::List
|
50
|
-
field :_environment_ids, "Environment Ids", Fields::List
|
51
|
-
label "Validator" do
|
52
|
-
field :validator_type, "Type"
|
53
|
-
field :validator_rule, "Rule"
|
46
|
+
field :description, _("Description")
|
47
|
+
field :parameter_type, _("Type")
|
48
|
+
field :required, _("Required")
|
49
|
+
field :_environments, _("Environments"), Fields::List
|
50
|
+
field :_environment_ids, _("Environment Ids"), Fields::List
|
51
|
+
label _("Validator") do
|
52
|
+
field :validator_type, _("Type")
|
53
|
+
field :validator_rule, _("Rule")
|
54
54
|
end
|
55
|
-
label "Override values" do
|
56
|
-
field :override_value_order, "Order", Fields::List
|
57
|
-
field :override_values_count, "Count"
|
55
|
+
label _("Override values") do
|
56
|
+
field :override_value_order, _("Order"), Fields::List
|
57
|
+
field :override_values_count, _("Count")
|
58
58
|
collection :override_values, "Values" do
|
59
|
-
label "Value" do
|
60
|
-
field :id, 'Id'
|
61
|
-
field :match, 'Match'
|
62
|
-
field :value, 'Value'
|
59
|
+
label _("Value") do
|
60
|
+
field :id, _('Id')
|
61
|
+
field :match, _('Match')
|
62
|
+
field :value, _('Value')
|
63
63
|
end
|
64
64
|
end
|
65
65
|
end
|
66
|
-
field :created_at, "Created at", Fields::Date
|
67
|
-
field :updated_at, "Updated at", Fields::Date
|
66
|
+
field :created_at, _("Created at"), Fields::Date
|
67
|
+
field :updated_at, _("Updated at"), Fields::Date
|
68
68
|
end
|
69
69
|
|
70
70
|
def extend_data(res)
|
71
71
|
res['override_value_order'] = res['override_value_order'].split("\n")
|
72
|
-
res['_environments'] = res['environments'].map { |e| e['
|
73
|
-
res['_environment_ids'] = res['environments'].map { |e| e['
|
72
|
+
res['_environments'] = res['environments'].map { |e| e['name']}
|
73
|
+
res['_environment_ids'] = res['environments'].map { |e| e['id']}
|
74
74
|
res
|
75
75
|
end
|
76
76
|
|
@@ -79,19 +79,19 @@ module HammerCLIForeman
|
|
79
79
|
|
80
80
|
class UpdateCommand < HammerCLIForeman::UpdateCommand
|
81
81
|
|
82
|
-
success_message "Parameter updated"
|
83
|
-
failure_message "Could not update the parameter"
|
82
|
+
success_message _("Parameter updated")
|
83
|
+
failure_message _("Could not update the parameter")
|
84
84
|
|
85
85
|
apipie_options :without => [:parameter_type, :validator_type, :id, :override, :required]
|
86
86
|
|
87
|
-
option "--override", "OVERRIDE", "Override this parameter.",
|
87
|
+
option "--override", "OVERRIDE", _("Override this parameter."),
|
88
88
|
:format => HammerCLI::Options::Normalizers::Bool.new
|
89
|
-
option "--required", "REQUIRED", "This parameter is required.",
|
89
|
+
option "--required", "REQUIRED", _("This parameter is required."),
|
90
90
|
:format => HammerCLI::Options::Normalizers::Bool.new
|
91
|
-
option "--parameter-type", "PARAMETER_TYPE", "Type of the parameter.",
|
91
|
+
option "--parameter-type", "PARAMETER_TYPE", _("Type of the parameter."),
|
92
92
|
:format => HammerCLI::Options::Normalizers::Enum.new(
|
93
93
|
['string', 'boolean', 'integer', 'real', 'array', 'hash', 'yaml', 'json'])
|
94
|
-
option "--validator-type", "VALIDATOR_TYPE", "Type of the validator.",
|
94
|
+
option "--validator-type", "VALIDATOR_TYPE", _("Type of the validator."),
|
95
95
|
:format => HammerCLI::Options::Normalizers::Enum.new(['regexp', 'list', ''])
|
96
96
|
end
|
97
97
|
|
@@ -100,6 +100,6 @@ module HammerCLIForeman
|
|
100
100
|
|
101
101
|
end
|
102
102
|
|
103
|
-
HammerCLI::MainCommand.subcommand '
|
103
|
+
HammerCLI::MainCommand.subcommand 'sc-param', _("Manipulate smart class parameters."), HammerCLIForeman::SmartClassParameter
|
104
104
|
|
105
105
|
end
|
@@ -1,7 +1,8 @@
|
|
1
1
|
module HammerCLIForeman
|
2
2
|
|
3
|
-
class SmartProxy <
|
4
|
-
|
3
|
+
class SmartProxy < HammerCLIForeman::Command
|
4
|
+
|
5
|
+
resource :smart_proxies
|
5
6
|
|
6
7
|
class ListCommand < HammerCLIForeman::ListCommand
|
7
8
|
|
@@ -9,9 +10,9 @@ module HammerCLIForeman
|
|
9
10
|
|
10
11
|
#FIXME: search by unknown type returns 500 from the server, propper error handling should resove this
|
11
12
|
output do
|
12
|
-
field :id, "Id"
|
13
|
-
field :name, "Name"
|
14
|
-
field :url, "URL"
|
13
|
+
field :id, _("Id")
|
14
|
+
field :name, _("Name")
|
15
|
+
field :url, _("URL")
|
15
16
|
end
|
16
17
|
|
17
18
|
apipie_options
|
@@ -23,9 +24,9 @@ module HammerCLIForeman
|
|
23
24
|
action :show
|
24
25
|
|
25
26
|
output ListCommand.output_definition do
|
26
|
-
field :_features,
|
27
|
-
field :created_at, "Created at", Fields::Date
|
28
|
-
field :updated_at, "Updated at", Fields::Date
|
27
|
+
field :_features, _( "Features"), Fields::List
|
28
|
+
field :created_at, _("Created at"), Fields::Date
|
29
|
+
field :updated_at, _("Updated at"), Fields::Date
|
29
30
|
end
|
30
31
|
|
31
32
|
def extend_data(proxy)
|
@@ -41,8 +42,8 @@ module HammerCLIForeman
|
|
41
42
|
|
42
43
|
action :create
|
43
44
|
|
44
|
-
success_message "Smart proxy created"
|
45
|
-
failure_message "Could not create the proxy"
|
45
|
+
success_message _("Smart proxy created")
|
46
|
+
failure_message _("Could not create the proxy")
|
46
47
|
|
47
48
|
apipie_options
|
48
49
|
end
|
@@ -52,8 +53,8 @@ module HammerCLIForeman
|
|
52
53
|
|
53
54
|
action :update
|
54
55
|
|
55
|
-
success_message "Smart proxy updated"
|
56
|
-
failure_message "Could not update the proxy"
|
56
|
+
success_message _("Smart proxy updated")
|
57
|
+
failure_message _("Could not update the proxy")
|
57
58
|
|
58
59
|
apipie_options
|
59
60
|
end
|
@@ -63,28 +64,28 @@ module HammerCLIForeman
|
|
63
64
|
|
64
65
|
action :destroy
|
65
66
|
|
66
|
-
success_message "Smart proxy deleted"
|
67
|
-
failure_message "Could not delete the proxy"
|
67
|
+
success_message _("Smart proxy deleted")
|
68
|
+
failure_message _("Could not delete the proxy")
|
68
69
|
|
69
70
|
apipie_options
|
70
71
|
end
|
71
72
|
|
72
73
|
|
73
|
-
class ImportPuppetClassesCommand <
|
74
|
+
class ImportPuppetClassesCommand < HammerCLIForeman::WriteCommand
|
74
75
|
|
75
76
|
action :import_puppetclasses
|
76
77
|
|
77
|
-
command_name "
|
78
|
-
success_message "Puppet classes were imported"
|
79
|
-
failure_message "Import of puppet classes failed"
|
78
|
+
command_name "import-classes"
|
79
|
+
success_message _("Puppet classes were imported")
|
80
|
+
failure_message _("Import of puppet classes failed")
|
80
81
|
|
81
|
-
option "--dryrun", :flag, "Do not run the import"
|
82
|
+
option "--dryrun", :flag, _("Do not run the import")
|
82
83
|
|
83
84
|
apipie_options :without => [:smart_proxy_id, :dryrun]
|
84
85
|
|
85
86
|
def request_params
|
86
87
|
opts = super
|
87
|
-
opts['dryrun'] = option_dryrun?
|
88
|
+
opts['dryrun'] = option_dryrun? || false
|
88
89
|
opts
|
89
90
|
end
|
90
91
|
end
|
@@ -94,4 +95,4 @@ module HammerCLIForeman
|
|
94
95
|
|
95
96
|
end
|
96
97
|
|
97
|
-
HammerCLI::MainCommand.subcommand 'proxy', "Manipulate smart proxies.", HammerCLIForeman::SmartProxy
|
98
|
+
HammerCLI::MainCommand.subcommand 'proxy', _("Manipulate smart proxies."), HammerCLIForeman::SmartProxy
|
@@ -1,14 +1,16 @@
|
|
1
1
|
module HammerCLIForeman
|
2
2
|
|
3
|
-
class Subnet <
|
3
|
+
class Subnet < HammerCLIForeman::Command
|
4
|
+
|
5
|
+
resource :subnets
|
6
|
+
|
4
7
|
class ListCommand < HammerCLIForeman::ListCommand
|
5
|
-
resource ForemanApi::Resources::Subnet, "index"
|
6
8
|
|
7
9
|
output do
|
8
|
-
field :id, "Id"
|
9
|
-
field :name, "Name"
|
10
|
-
field :network, "Network"
|
11
|
-
field :mask, "Mask"
|
10
|
+
field :id, _("Id")
|
11
|
+
field :name, _("Name")
|
12
|
+
field :network, _("Network")
|
13
|
+
field :mask, _("Mask")
|
12
14
|
end
|
13
15
|
|
14
16
|
apipie_options
|
@@ -17,22 +19,21 @@ module HammerCLIForeman
|
|
17
19
|
|
18
20
|
class InfoCommand < HammerCLIForeman::InfoCommand
|
19
21
|
|
20
|
-
resource ForemanApi::Resources::Subnet, "show"
|
21
|
-
|
22
22
|
output ListCommand.output_definition do
|
23
|
-
field :priority, "Priority"
|
24
|
-
field :
|
25
|
-
field :
|
26
|
-
field :
|
27
|
-
field :
|
28
|
-
field :
|
29
|
-
field :
|
30
|
-
field :
|
31
|
-
field :
|
32
|
-
field :
|
33
|
-
field :
|
34
|
-
field :
|
35
|
-
field :
|
23
|
+
field :priority, _("Priority")
|
24
|
+
field :dns_id, _("DNS id")
|
25
|
+
field :dns, _("DNS"), Fields::Server
|
26
|
+
field :dns_primary, _("Primary DNS")
|
27
|
+
field :dns_secondary, _("Secondary DNS")
|
28
|
+
field :domain_ids, _("Domain ids"), Fields::List
|
29
|
+
field :tftp, _("TFTP"), Fields::Server
|
30
|
+
field :tftp_id, _("TFTP id")
|
31
|
+
field :dhcp, _("DHCP"), Fields::Server
|
32
|
+
field :dhcp_id, _("DHCP id")
|
33
|
+
field :vlanid, _("vlan id")
|
34
|
+
field :gateway, _("Gateway")
|
35
|
+
field :from, _("From")
|
36
|
+
field :to, _("To")
|
36
37
|
end
|
37
38
|
|
38
39
|
apipie_options
|
@@ -41,9 +42,8 @@ module HammerCLIForeman
|
|
41
42
|
|
42
43
|
class CreateCommand < HammerCLIForeman::CreateCommand
|
43
44
|
|
44
|
-
success_message "Subnet created"
|
45
|
-
failure_message "Could not create the subnet"
|
46
|
-
resource ForemanApi::Resources::Subnet, "create"
|
45
|
+
success_message _("Subnet created")
|
46
|
+
failure_message _("Could not create the subnet")
|
47
47
|
|
48
48
|
apipie_options
|
49
49
|
end
|
@@ -51,9 +51,8 @@ module HammerCLIForeman
|
|
51
51
|
|
52
52
|
class UpdateCommand < HammerCLIForeman::UpdateCommand
|
53
53
|
|
54
|
-
success_message "Subnet updated"
|
55
|
-
failure_message "Could not update the subnet"
|
56
|
-
resource ForemanApi::Resources::Subnet, "update"
|
54
|
+
success_message _("Subnet updated")
|
55
|
+
failure_message _("Could not update the subnet")
|
57
56
|
|
58
57
|
apipie_options
|
59
58
|
end
|
@@ -61,9 +60,8 @@ module HammerCLIForeman
|
|
61
60
|
|
62
61
|
class DeleteCommand < HammerCLIForeman::DeleteCommand
|
63
62
|
|
64
|
-
success_message "Subnet deleted"
|
65
|
-
failure_message "Could not delete the subnet"
|
66
|
-
resource ForemanApi::Resources::Subnet, "destroy"
|
63
|
+
success_message _("Subnet deleted")
|
64
|
+
failure_message _("Could not delete the subnet")
|
67
65
|
|
68
66
|
apipie_options
|
69
67
|
end
|
@@ -73,5 +71,5 @@ module HammerCLIForeman
|
|
73
71
|
|
74
72
|
end
|
75
73
|
|
76
|
-
HammerCLI::MainCommand.subcommand 'subnet', "Manipulate subnets.", HammerCLIForeman::Subnet
|
74
|
+
HammerCLI::MainCommand.subcommand 'subnet', _("Manipulate subnets."), HammerCLIForeman::Subnet
|
77
75
|
|