hammer_cli_foreman_kubevirt 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +1460 -0
- data/README.md +24 -0
- data/config/foreman_kubevirt.yml +2 -0
- data/lib/hammer_cli_foreman_kubevirt.rb +6 -0
- data/lib/hammer_cli_foreman_kubevirt/compute_resources/kubevirt.rb +43 -0
- data/lib/hammer_cli_foreman_kubevirt/version.rb +5 -0
- metadata +110 -0
data/README.md
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
hammer_cli_foreman_kubevirt
|
2
|
+
=========================================
|
3
|
+
|
4
|
+
This [Hammer CLI](https://github.com/theforeman/hammer-cli) plugin contains
|
5
|
+
set of commands for [foreman_kubevirt](https://github.com/theforeman/foreman_kubevirt),
|
6
|
+
a plugin to [Foreman](http://theforeman.org/) for KubeVirt.
|
7
|
+
|
8
|
+
Check out the [release notes](release_notes.md#release-notes) to see what's new in the latest version.
|
9
|
+
|
10
|
+
Configuration
|
11
|
+
-------------
|
12
|
+
|
13
|
+
Configuration is expected to be placed in one of hammer's configuration directories for plugins:
|
14
|
+
- `/etc/hammer/cli.modules.d/`
|
15
|
+
- `~/.hammer/cli.modules.d/`
|
16
|
+
- `./.config/cli.modules.d/` (config dir in CWD)
|
17
|
+
|
18
|
+
If you install `hammer_cli_foreman_kubevirt` from source you'll have to copy the config file manually
|
19
|
+
from `config/foreman_kubevirt.yml`.
|
20
|
+
|
21
|
+
License
|
22
|
+
-------
|
23
|
+
|
24
|
+
This project is licensed under the GPLv3+.
|
@@ -0,0 +1,6 @@
|
|
1
|
+
module HammerCLIForemanKubevirt
|
2
|
+
require 'hammer_cli_foreman_kubevirt/compute_resources/kubevirt'
|
3
|
+
require 'hammer_cli_foreman/compute_resource/register_compute_resources'
|
4
|
+
|
5
|
+
HammerCLIForeman.register_compute_resource('KubeVirt', HammerCLIForemanKubevirt::ComputeResources::Kubevirt.new)
|
6
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'hammer_cli_foreman/compute_resource/base'
|
2
|
+
|
3
|
+
module HammerCLIForemanKubevirt
|
4
|
+
module ComputeResources
|
5
|
+
class Kubevirt < HammerCLIForeman::ComputeResources::Base
|
6
|
+
def name
|
7
|
+
_('KubeVirt')
|
8
|
+
end
|
9
|
+
|
10
|
+
def compute_attributes
|
11
|
+
[
|
12
|
+
['cores', _('number of cores, Integer value')],
|
13
|
+
['memory', _('Amount of memory, integer value in bytes')]
|
14
|
+
]
|
15
|
+
end
|
16
|
+
|
17
|
+
def host_attributes
|
18
|
+
[
|
19
|
+
['start', _('Boolean (expressed as 0 or 1), whether to start the machine or not')]
|
20
|
+
]
|
21
|
+
end
|
22
|
+
|
23
|
+
def interface_attributes
|
24
|
+
[
|
25
|
+
['cni_provider', _('Container Network Interface Provider name')],
|
26
|
+
['network', _('The network to connect the vm to')]
|
27
|
+
]
|
28
|
+
end
|
29
|
+
|
30
|
+
def volume_attributes
|
31
|
+
[
|
32
|
+
['capacity', _('Volume size in GB, integer value')],
|
33
|
+
['storage_class', _('Name of the storage class')],
|
34
|
+
['bootable', _('Boolean, only one volume can be bootable (overrides network interface boot)')]
|
35
|
+
]
|
36
|
+
end
|
37
|
+
|
38
|
+
def mandatory_resource_options
|
39
|
+
super + %i[hostname api_port namespace token]
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
metadata
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hammer_cli_foreman_kubevirt
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Shira Maximov
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-05-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: gettext
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.1.3
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 4.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: 3.1.3
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 4.0.0
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: hammer_cli_foreman
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "<="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 0.17.0
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "<="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 0.17.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: '12.3'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '12.3'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rubocop
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0.64'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0.64'
|
75
|
+
description: Foreman kubevirt commands for Hammer CLI.
|
76
|
+
email:
|
77
|
+
executables: []
|
78
|
+
extensions: []
|
79
|
+
extra_rdoc_files: []
|
80
|
+
files:
|
81
|
+
- LICENSE
|
82
|
+
- README.md
|
83
|
+
- config/foreman_kubevirt.yml
|
84
|
+
- lib/hammer_cli_foreman_kubevirt.rb
|
85
|
+
- lib/hammer_cli_foreman_kubevirt/compute_resources/kubevirt.rb
|
86
|
+
- lib/hammer_cli_foreman_kubevirt/version.rb
|
87
|
+
homepage: https://github.com/theforeman/hammer-cli-foreman-kubevirt
|
88
|
+
licenses:
|
89
|
+
- GPL-3.0
|
90
|
+
metadata: {}
|
91
|
+
post_install_message:
|
92
|
+
rdoc_options: []
|
93
|
+
require_paths:
|
94
|
+
- lib
|
95
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
requirements: []
|
106
|
+
rubygems_version: 3.0.3
|
107
|
+
signing_key:
|
108
|
+
specification_version: 4
|
109
|
+
summary: Foreman kubevirt commands for Hammer CLI
|
110
|
+
test_files: []
|