hammer_cli_foreman_google 0.0.1

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: 83134742ab78717e97dde2d01758645b37d3450c8e7ce82208f319598c3ef24c
4
+ data.tar.gz: 2f15f4992eb9a4c5e92e360d51cceb5dc65fbf19092627a7ca86210abd74dd51
5
+ SHA512:
6
+ metadata.gz: 034cdf1efbdad0048fbbd6d185a3dd938427d7d5d66d38d36e2e814f145e9554f05724027f3907f19934c4bd3f39d6dbdea1c7c26d07e2065fef64f37c07aaa3
7
+ data.tar.gz: 42e867cf9a06079d1a8c769fd4fc6fae4099d417c11236d26cf8d60b28963f40e8e8abf75ec02b88ca5192b549cfc8d67611ed1999e313a96119f185d7ff4622
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,29 @@
1
+ # hammer_cli_foreman_google
2
+
3
+ ## Description
4
+ CLI tool for Google compute resource in Foreman [foreman_google](https://github.com/theforeman/foreman_google)
5
+
6
+ ## Installation
7
+
8
+ ### Package
9
+ ```
10
+ # yum install tfm-rubygem-hammer_cli_foreman_google
11
+ ```
12
+
13
+ ### Foreman Installer
14
+ ```
15
+ # foreman-installer --enable-foreman-cli-google
16
+ ```
17
+
18
+ ### Development Setup
19
+
20
+ Clone the repo from github:
21
+ ```bash
22
+ git clone https://github.com/theforeman/hammer_cli_foreman_google.git
23
+ ```
24
+
25
+ Edit `~/.hammer/cli.modules.d/foreman_google.yml` and enter in the following:
26
+ ```yaml
27
+ :foreman_google:
28
+ :enable_module: true
29
+ ```
@@ -0,0 +1,2 @@
1
+ :foreman_google:
2
+ :enable_module: true
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'hammer_cli_foreman/compute_resource/base'
4
+
5
+ module HammerCLIForemanGoogle
6
+ module ComputeResources
7
+ class Google < HammerCLIForeman::ComputeResources::Base
8
+ def name
9
+ 'GCE'
10
+ end
11
+
12
+ def compute_attributes
13
+ %w[machine_type network associate_external_ip]
14
+ end
15
+
16
+ def interfaces_attrs_name
17
+ 'network_interfaces_nics_attributes'
18
+ end
19
+
20
+ def volume_attributes
21
+ [
22
+ ['size_gb', _('Volume size in GB, integer value')]
23
+ ]
24
+ end
25
+
26
+ def provider_specific_fields
27
+ [
28
+ Fields::Field.new(label: _('Project'), path: [:project]),
29
+ Fields::Field.new(label: _('Email'), path: [:email]),
30
+ Fields::Field.new(label: _('Key Path'), path: [:key_path]),
31
+ Fields::Field.new(label: _('Zone'), path: [:zone])
32
+ ]
33
+ end
34
+
35
+ def provider_vm_specific_fields
36
+ [
37
+ Fields::Field.new(label: _('Machine Type'), path: [:machine_type]),
38
+ Fields::Field.new(label: _('Status'), path: [:status]),
39
+ Fields::Field.new(label: _('Description'), path: [:description]),
40
+ Fields::Field.new(label: _('Zone'), path: [:zone])
41
+ ]
42
+ end
43
+
44
+ def mandatory_resource_options
45
+ super + %i[project key_path zone]
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,5 @@
1
+ module HammerCLIForemanGoogle
2
+ def self.version
3
+ @version ||= Gem::Version.new '0.0.1'
4
+ end
5
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HammerCLIForemanGoogle
4
+ require 'hammer_cli_foreman/compute_resource/register_compute_resources'
5
+
6
+ require 'hammer_cli_foreman_google/version'
7
+ require 'hammer_cli_foreman_google/compute_resources/google'
8
+
9
+ HammerCLIForeman.register_compute_resource(
10
+ 'gce',
11
+ HammerCLIForemanGoogle::ComputeResources::Google.new
12
+ )
13
+ end
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hammer_cli_foreman_google
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - The Foreman Team
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-10-25 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: 3.4.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 3.4.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: gettext
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 3.1.3
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: 4.0.0
37
+ type: :development
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 3.1.3
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: 4.0.0
47
+ - !ruby/object:Gem::Dependency
48
+ name: rake
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ description:
62
+ email:
63
+ - dev@community.theforeman.org
64
+ executables: []
65
+ extensions: []
66
+ extra_rdoc_files: []
67
+ files:
68
+ - LICENSE
69
+ - README.md
70
+ - config/foreman_google.yml
71
+ - lib/hammer_cli_foreman_google.rb
72
+ - lib/hammer_cli_foreman_google/compute_resources/google.rb
73
+ - lib/hammer_cli_foreman_google/version.rb
74
+ homepage: https://github.com/theforeman/hammer-cli-foreman-google
75
+ licenses:
76
+ - GPL-3.0
77
+ metadata: {}
78
+ post_install_message:
79
+ rdoc_options: []
80
+ require_paths:
81
+ - lib
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: '2.5'
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ requirements: []
93
+ rubygems_version: 3.1.2
94
+ signing_key:
95
+ specification_version: 4
96
+ summary: Foreman Google plugin for Hammer CLI
97
+ test_files: []