hammer_cli_foreman_rh_cloud 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8b1e317b3170d81f2607dfea4ec4f557ec2fe6bf4765ba29ee7bfabf9c655741
4
+ data.tar.gz: c6594093051efd8a95b19366388ec8b2b0a5345ce6a405534d2848dedca07922
5
+ SHA512:
6
+ metadata.gz: a6bf7a907f6c7a6c678d64a1109c05aa07d4e9d589376b072cfc2c7b21550468e1612451834a4147c5281eea97550af5ab977617176d2ccee9d1763b0723d206
7
+ data.tar.gz: 13b4113ca4ba55e4dce2d2e6c2e00ab5daab552b7ae2531e9b0635e66a16bbf50eddfec49ab46fe3a8ee0c25e0645b3927cacb9eb540aba914fb5501eda656bd
data/LICENSE ADDED
@@ -0,0 +1,5 @@
1
+ This program and entire repository is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
2
+
3
+ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
4
+
5
+ You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
data/README.md ADDED
@@ -0,0 +1,4 @@
1
+ # ForemanRhCloud hammer-cli plugin
2
+
3
+ This plugin is exposing [foreman_rh_cloud](https://github.com/theforeman/foreman_rh_cloud)
4
+ functionality for command line use.
@@ -0,0 +1,2 @@
1
+ :foreman_rh_cloud:
2
+ :enable_module: true
@@ -0,0 +1,23 @@
1
+ module HammerCLIForemanRhCloud
2
+ class CloudConnectorCommand < HammerCLIForeman::Command
3
+ resource :inventory
4
+ command_name 'cloud_connector'
5
+
6
+ class EnableCommand < HammerCLIForeman::Command
7
+ command_name 'enable'
8
+ action :enable_cloud_connector
9
+ desc 'Enable cloud connector'
10
+
11
+ success_message _('Cloud connector enable task started')
12
+ failure_message _('Failed to enable cloud connector, please check server logs for more information')
13
+
14
+ output do
15
+ field :task_id, _('Task id')
16
+ end
17
+
18
+ build_options
19
+ end
20
+
21
+ autoload_subcommands
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ module HammerCLIForemanRhCloud
2
+ class InventoryCommand < HammerCLIForeman::Command
3
+ resource :inventory
4
+ command_name 'rh_cloud_inventory'
5
+
6
+ class SyncCommand < HammerCLIForeman::Command
7
+ command_name 'sync'
8
+ action :sync_inventory_status
9
+ desc 'Start inventory status sync'
10
+
11
+ success_message _('Inventory sync task started successfully')
12
+ failure_message _('Failed to start inventory sync task, please check server logs for more information')
13
+
14
+ output do
15
+ field :id, _('Task id')
16
+ end
17
+
18
+ build_options
19
+ end
20
+
21
+ autoload_subcommands
22
+ end
23
+ end
@@ -0,0 +1,30 @@
1
+ module HammerCLIForemanRhCloud
2
+ class ReportCommand < HammerCLIForeman::Command
3
+ resource :inventory
4
+ command_name 'rh_cloud_report'
5
+
6
+ class DownloadCommand < HammerCLIForeman::DownloadCommand
7
+ command_name 'download'
8
+ desc 'Download the last generated report'
9
+
10
+ action :download_file
11
+
12
+ failure_message _('Failed to download report')
13
+
14
+ build_options
15
+ end
16
+
17
+ class GenerateCommand < HammerCLIForeman::Command
18
+ command_name 'generate'
19
+ action :generate_report
20
+ desc 'Start new report generation'
21
+
22
+ success_message _('Report generation started successfully')
23
+ failure_message _('Failed to start report generation task, please check server logs for more information.')
24
+
25
+ build_options
26
+ end
27
+
28
+ autoload_subcommands
29
+ end
30
+ end
@@ -0,0 +1,5 @@
1
+ module HammerCLIForemanRhCloud
2
+ def self.version
3
+ @version ||= Gem::Version.new '1.0.0'
4
+ end
5
+ end
@@ -0,0 +1,28 @@
1
+ module HammerCLIForemanRhCloud
2
+ require 'hammer_cli'
3
+ require 'hammer_cli_foreman'
4
+
5
+ require 'hammer_cli_foreman_rh_cloud/version'
6
+ require 'hammer_cli_foreman_rh_cloud/report'
7
+
8
+ HammerCLI::MainCommand.lazy_subcommand(
9
+ 'rh_report',
10
+ 'Manage reports sent to console.redhat.com',
11
+ 'HammerCLIForemanRhCloud::ReportCommand',
12
+ 'hammer_cli_foreman_rh_cloud/report'
13
+ )
14
+
15
+ HammerCLI::MainCommand.lazy_subcommand(
16
+ 'rh_cloud_inventory',
17
+ 'Manage inventory synchroniztion with console.redhat.com',
18
+ 'HammerCLIForemanRhCloud::InventoryCommand',
19
+ 'hammer_cli_foreman_rh_cloud/inventory'
20
+ )
21
+
22
+ HammerCLI::MainCommand.lazy_subcommand(
23
+ 'cloud_connector',
24
+ 'Manage Cloud Connector',
25
+ 'HammerCLIForemanRhCloud::CloudConnectorCommand',
26
+ 'hammer_cli_foreman_rh_cloud/cloud_connector'
27
+ )
28
+ end
metadata ADDED
@@ -0,0 +1,71 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hammer_cli_foreman_rh_cloud
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Shimon Shtein
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-10-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: hammer_cli_foreman
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 2.0.0
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 3.0.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 2.0.0
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 3.0.0
33
+ description:
34
+ email:
35
+ - sshtein@redhat.com
36
+ executables: []
37
+ extensions: []
38
+ extra_rdoc_files: []
39
+ files:
40
+ - LICENSE
41
+ - README.md
42
+ - config/foreman_rh_cloud.yml
43
+ - lib/hammer_cli_foreman_rh_cloud.rb
44
+ - lib/hammer_cli_foreman_rh_cloud/cloud_connector.rb
45
+ - lib/hammer_cli_foreman_rh_cloud/inventory.rb
46
+ - lib/hammer_cli_foreman_rh_cloud/report.rb
47
+ - lib/hammer_cli_foreman_rh_cloud/version.rb
48
+ homepage: https://github.com/theforeman/hammer-cli-foreman-rh-cloud
49
+ licenses:
50
+ - GPL-3.0
51
+ metadata: {}
52
+ post_install_message:
53
+ rdoc_options: []
54
+ require_paths:
55
+ - lib
56
+ required_ruby_version: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ requirements: []
67
+ rubygems_version: 3.2.22
68
+ signing_key:
69
+ specification_version: 4
70
+ summary: Foreman Rh Cloud plugin for Hammer CLI
71
+ test_files: []