hammer_cli_foreman_salt 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 70964d8eb9f65e664e8d9c04e5351befba5c1412
4
- data.tar.gz: 314ac17ae1f431cf5c7df3c39365a055237f2503
2
+ SHA256:
3
+ metadata.gz: 29b086bb4e59893341ec64110ea23d87e6b559cc7ad6adad1b03840e79638bbb
4
+ data.tar.gz: ba101f384b2c4a73ae8e684958a553f13e4027a872b71811c53db0477a4be147
5
5
  SHA512:
6
- metadata.gz: 1a6a757fb6adf216ba558af765f74498fa3b91bfbf3ba0ec66d889cdc519a8b9186f9bc1c0f88a601276809081d909b6ca41211deb6811f0b84264536b509d41
7
- data.tar.gz: 139b224d2d65b41683c379509f513756595b9638e4515999d0d894f9164e1ee4a8776998047c43a2ee8e6d3c3e093645976421f87ed89a59a31ee8fbd2898337
6
+ metadata.gz: ee74281caad5e22b91bad6097d5ca8fbccb6ddb92f293dde2b2bc7b31294519ae9d0cca8d9e4d879a6a623dea518fdf4c412f23172455b596173ba07d962b872
7
+ data.tar.gz: 1230eb95ab19c781924d1901046ca4d6f90a6af1dd15ae3185bef27a20bf7bdf4f3e48d79a3bbaa362032290e257a7500c2bf92fbc297388012e8c8972241a46
@@ -27,6 +27,16 @@ module HammerCLIForemanSalt
27
27
  build_options
28
28
  end
29
29
 
30
+ class AuthCommand < HammerCLIForeman::Command
31
+ action :auth
32
+ command_name 'auth'
33
+
34
+ success_message _('Salt authentication status successfully changed')
35
+ failure_message _('Salt authentication status change failed')
36
+
37
+ build_options
38
+ end
39
+
30
40
  autoload_subcommands
31
41
  end
32
42
 
@@ -14,6 +14,14 @@ module HammerCLIForemanSalt
14
14
  build_options
15
15
  end
16
16
 
17
+ class InfoCommand < HammerCLIForeman::InfoCommand
18
+ output SaltEnvironment::ListCommand.output_definition do
19
+ HammerCLIForeman::References.timestamps(self)
20
+ end
21
+
22
+ build_options
23
+ end
24
+
17
25
  class CreateCommand < HammerCLIForeman::CreateCommand
18
26
  success_message _('Salt Environment created')
19
27
  failure_message _('Could not create the Salt Environment')
@@ -0,0 +1,50 @@
1
+ require 'hammer_cli'
2
+ require 'hammer_cli_foreman'
3
+
4
+ module HammerCLIForemanSalt
5
+ class SaltHostgroup < HammerCLIForeman::Command
6
+ resource :salt_hostgroups
7
+
8
+ class InfoCommand < HammerCLIForeman::InfoCommand
9
+ output do
10
+ field :id, _('ID')
11
+ field :name, _('Name')
12
+ field :salt_master, _('Salt Master')
13
+ field :salt_environment, _('Salt Environment')
14
+ field :salt_states, _('Salt States')
15
+ end
16
+
17
+ # remove --name command
18
+ def self.create_option_builder
19
+ builder = super
20
+ builder.builders.delete_if { |b| b.class == HammerCLIForeman::SearchablesOptionBuilder }
21
+ builder
22
+ end
23
+
24
+ build_options
25
+ end
26
+
27
+ class UpdateCommand < HammerCLIForeman::UpdateCommand
28
+ success_message _('Salt Hostgroup updated')
29
+ failure_message _('Could not update the Salt Hostgroup')
30
+
31
+ # remove --new-* and --name commands
32
+ def self.create_option_builder
33
+ builder = super
34
+ builder.builders.delete_if { |b| b.class == HammerCLIForeman::SearchablesUpdateOptionBuilder }
35
+ builder.builders.delete_if { |b| b.class == HammerCLIForeman::SearchablesOptionBuilder }
36
+ builder
37
+ end
38
+
39
+ build_options
40
+ end
41
+
42
+ autoload_subcommands
43
+ end
44
+
45
+ HammerCLI::MainCommand.subcommand 'salt-hostgroup', 'Manage Salt Hostgroups', SaltHostgroup
46
+ end
47
+
48
+
49
+
50
+
@@ -0,0 +1,22 @@
1
+ require 'hammer_cli'
2
+ require 'hammer_cli_foreman'
3
+
4
+ module HammerCLIForemanSalt
5
+ class SaltJobs < HammerCLIForeman::Command
6
+ resource :jobs
7
+
8
+ class UploadCommand < HammerCLIForeman::Command
9
+ action :upload
10
+ command_name 'upload'
11
+
12
+ success_message _('Salt job uploaded successfully')
13
+ failure_message _('Salt job upload failed')
14
+
15
+ build_options
16
+ end
17
+
18
+ autoload_subcommands
19
+ end
20
+
21
+ HammerCLI::MainCommand.subcommand 'salt-jobs', 'Upload Salt Jobs', SaltJobs
22
+ end
@@ -9,8 +9,8 @@ module HammerCLIForemanSalt
9
9
  output do
10
10
  field :id, _('ID')
11
11
  field :name, _('Name')
12
- field :salt_master, _('Salt Master')
13
- field :salt_environment_id, _('Salt Environment ID')
12
+ field :salt_proxy_name, _('Salt Master')
13
+ field :salt_environment_name, _('Salt Environment')
14
14
  end
15
15
 
16
16
  build_options
@@ -20,8 +20,8 @@ module HammerCLIForemanSalt
20
20
  output do
21
21
  field :id, _('ID')
22
22
  field :name, _('Name')
23
- field :salt_master, _('Salt Master')
24
- field :salt_environment_id, _('Salt Environment ID')
23
+ field :salt_proxy_name, _('Salt Master')
24
+ field :salt_environment_name, _('Salt Environment')
25
25
  collection :salt_states, _('Salt States'), :hide_blank => true do
26
26
  field :id, _('ID')
27
27
  field :name, _('Name')
@@ -21,6 +21,23 @@ module HammerCLIForemanSalt
21
21
  build_options
22
22
  end
23
23
 
24
+ class InfoCommand < HammerCLIForeman::InfoCommand
25
+ output do
26
+ field :id, _('ID')
27
+ field :name, _('Name')
28
+
29
+ collection :salt_environments, _('Salt Environments'), :hide_blank => true do
30
+ field :name, _('Name')
31
+ end
32
+
33
+ collection :hostgroups, _('Hostgroups'), :hide_blank => true do
34
+ field :title, _('Title')
35
+ end
36
+ end
37
+
38
+ build_options
39
+ end
40
+
24
41
  class DeleteCommand < HammerCLIForeman::DeleteCommand
25
42
  success_message _('Salt State deleted')
26
43
  failure_message _('Could not delete the Salt State')
@@ -28,6 +45,16 @@ module HammerCLIForemanSalt
28
45
  build_options
29
46
  end
30
47
 
48
+ class ImportCommand < HammerCLIForeman::Command
49
+ action :import
50
+
51
+ command_name 'import'
52
+ success_message _("States were imported")
53
+ failure_message _("Import of states failed")
54
+
55
+ build_options
56
+ end
57
+
31
58
  autoload_subcommands
32
59
  end
33
60
 
@@ -0,0 +1,63 @@
1
+ require 'hammer_cli'
2
+ require 'hammer_cli_foreman'
3
+
4
+ module HammerCLIForemanSalt
5
+ class SaltVariable < HammerCLIForeman::Command
6
+ resource :salt_variables
7
+
8
+ class ListCommand < HammerCLIForeman::ListCommand
9
+ output do
10
+ field :id, _('ID')
11
+ field :variable, _('Name')
12
+ end
13
+
14
+ build_options
15
+ end
16
+
17
+ class InfoCommand < HammerCLIForeman::InfoCommand
18
+ output do
19
+ field :id, _('ID')
20
+ field :variable, _('Name')
21
+ field :default_value, _('Default Value')
22
+ field :override_values, _('Override Values')
23
+ field :hidden_value?, _('Hidden Value?')
24
+ field :description, _('Description')
25
+ end
26
+
27
+ build_options
28
+ end
29
+
30
+
31
+ class CreateCommand < HammerCLIForeman::CreateCommand
32
+ success_message _('Salt Variable created')
33
+ failure_message _('Could not create the Salt Variable')
34
+
35
+ build_options
36
+ end
37
+
38
+ class DeleteCommand < HammerCLIForeman::DeleteCommand
39
+ success_message _('Salt Variable deleted')
40
+ failure_message _('Could not delete the Salt Variable')
41
+
42
+ build_options
43
+ end
44
+
45
+ class UpdateCommand < HammerCLIForeman::UpdateCommand
46
+ success_message _('Salt Variable updated')
47
+ failure_message _('Could not update the Salt Variable')
48
+
49
+ # remove --new-* commands
50
+ def self.create_option_builder
51
+ builder = super
52
+ builder.builders.delete_if { |b| b.class == HammerCLIForeman::SearchablesUpdateOptionBuilder }
53
+ builder
54
+ end
55
+
56
+ build_options
57
+ end
58
+
59
+ autoload_subcommands
60
+ end
61
+
62
+ HammerCLI::MainCommand.subcommand 'salt-variable', 'Manage Salt Variables', SaltVariable
63
+ end
@@ -1,5 +1,5 @@
1
1
  module HammerCLIForemanSalt
2
2
  def self.version
3
- @version ||= Gem::Version.new '0.0.2'
3
+ @version ||= Gem::Version.new '0.1.0'
4
4
  end
5
5
  end
@@ -6,4 +6,8 @@ module HammerCLIForemanSalt
6
6
  require 'hammer_cli_foreman_salt/salt_key'
7
7
  require 'hammer_cli_foreman_salt/salt_minion'
8
8
  require 'hammer_cli_foreman_salt/salt_state'
9
+ require 'hammer_cli_foreman_salt/salt_job'
10
+ require 'hammer_cli_foreman_salt/salt_variable'
11
+ require 'hammer_cli_foreman_salt/salt_hostgroup'
12
+ require 'hammer_cli_foreman_salt/version'
9
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hammer_cli_foreman_salt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Benjamin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-18 00:00:00.000000000 Z
11
+ date: 2021-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hammer_cli_foreman
@@ -16,15 +16,21 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.1.2
19
+ version: 2.0.0
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 4.0.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - ">="
25
28
  - !ruby/object:Gem::Version
26
- version: 0.1.2
27
- description: Foreman Salt-related commands for Hammer CLI
29
+ version: 2.0.0
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 4.0.0
33
+ description:
28
34
  email: stephen@redhat.com
29
35
  executables: []
30
36
  extensions: []
@@ -36,13 +42,16 @@ files:
36
42
  - lib/hammer_cli_foreman_salt.rb
37
43
  - lib/hammer_cli_foreman_salt/salt_autosign.rb
38
44
  - lib/hammer_cli_foreman_salt/salt_environment.rb
45
+ - lib/hammer_cli_foreman_salt/salt_hostgroup.rb
46
+ - lib/hammer_cli_foreman_salt/salt_job.rb
39
47
  - lib/hammer_cli_foreman_salt/salt_key.rb
40
48
  - lib/hammer_cli_foreman_salt/salt_minion.rb
41
49
  - lib/hammer_cli_foreman_salt/salt_state.rb
50
+ - lib/hammer_cli_foreman_salt/salt_variable.rb
42
51
  - lib/hammer_cli_foreman_salt/version.rb
43
52
  homepage: http://github.com/theforeman/hammer_cli_foreman_salt
44
53
  licenses:
45
- - GPL v3+
54
+ - GPL-3.0
46
55
  metadata: {}
47
56
  post_install_message:
48
57
  rdoc_options: []
@@ -60,8 +69,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
60
69
  version: '0'
61
70
  requirements: []
62
71
  rubyforge_project:
63
- rubygems_version: 2.2.2
72
+ rubygems_version: 2.7.6
64
73
  signing_key:
65
74
  specification_version: 4
66
- summary: Foreman Salt-related commands for Hammer
75
+ summary: Foreman Salt-related commands for Hammer CLI
67
76
  test_files: []