hammer_cli_foreman 0.16.0 → 0.17.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.
- checksums.yaml +5 -5
- data/doc/release_notes.md +13 -0
- data/lib/hammer_cli_foreman.rb +4 -0
- data/lib/hammer_cli_foreman/common_parameter.rb +4 -0
- data/lib/hammer_cli_foreman/compute_attribute.rb +318 -0
- data/lib/hammer_cli_foreman/compute_profile.rb +61 -0
- data/lib/hammer_cli_foreman/compute_resource.rb +29 -13
- data/lib/hammer_cli_foreman/compute_resource/base.rb +12 -0
- data/lib/hammer_cli_foreman/compute_resource/ec2.rb +24 -0
- data/lib/hammer_cli_foreman/compute_resource/gce.rb +23 -0
- data/lib/hammer_cli_foreman/compute_resource/help_utils.rb +34 -0
- data/lib/hammer_cli_foreman/compute_resource/libvirt.rb +49 -0
- data/lib/hammer_cli_foreman/compute_resource/openstack.rb +25 -0
- data/lib/hammer_cli_foreman/compute_resource/ovirt.rb +47 -0
- data/lib/hammer_cli_foreman/compute_resource/rackspace.rb +22 -0
- data/lib/hammer_cli_foreman/compute_resource/register_compute_resources.rb +20 -0
- data/lib/hammer_cli_foreman/compute_resource/vmware.rb +68 -0
- data/lib/hammer_cli_foreman/host.rb +4 -11
- data/lib/hammer_cli_foreman/hostgroup.rb +9 -0
- data/lib/hammer_cli_foreman/hosts/common_update_help.rb +1 -7
- data/lib/hammer_cli_foreman/hosts/common_update_options.rb +1 -1
- data/lib/hammer_cli_foreman/id_resolver.rb +3 -1
- data/lib/hammer_cli_foreman/parameter.rb +7 -0
- data/lib/hammer_cli_foreman/references.rb +8 -0
- data/lib/hammer_cli_foreman/report_template.rb +79 -0
- data/lib/hammer_cli_foreman/smart_variable.rb +1 -2
- data/lib/hammer_cli_foreman/version.rb +1 -1
- data/locale/ca/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/de/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/en/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/en_GB/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/es/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/fr/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/it/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/ja/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/ko/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/pt_BR/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/ru/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/zh_CN/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/zh_TW/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/test/data/1.21/foreman_api.json +1 -0
- data/test/data/1.22/foreman_api.json +1 -0
- data/test/functional/compute_attribute_test.rb +654 -0
- data/test/functional/compute_profile_test.rb +99 -0
- data/test/functional/compute_resource_test.rb +42 -18
- data/test/functional/location_test.rb +6 -5
- data/test/functional/organization_test.rb +6 -5
- data/test/functional/report_template_test.rb +107 -7
- data/test/test_helper.rb +1 -1
- data/test/unit/common_parameter_test.rb +17 -5
- data/test/unit/domain_test.rb +2 -0
- data/test/unit/host_test.rb +1 -0
- data/test/unit/hostgroup_test.rb +14 -1
- data/test/unit/operating_system_test.rb +1 -0
- metadata +25 -20
- data/lib/hammer_cli_foreman/compute_resources/all.rb +0 -7
- data/lib/hammer_cli_foreman/compute_resources/ec2.rb +0 -9
- data/lib/hammer_cli_foreman/compute_resources/ec2/host_help_extenstion.rb +0 -23
- data/lib/hammer_cli_foreman/compute_resources/gce.rb +0 -9
- data/lib/hammer_cli_foreman/compute_resources/gce/host_help_extenstion.rb +0 -22
- data/lib/hammer_cli_foreman/compute_resources/libvirt.rb +0 -9
- data/lib/hammer_cli_foreman/compute_resources/libvirt/host_help_extenstion.rb +0 -35
- data/lib/hammer_cli_foreman/compute_resources/openstack.rb +0 -9
- data/lib/hammer_cli_foreman/compute_resources/openstack/host_help_extenstion.rb +0 -23
- data/lib/hammer_cli_foreman/compute_resources/ovirt.rb +0 -9
- data/lib/hammer_cli_foreman/compute_resources/ovirt/host_help_extenstion.rb +0 -36
- data/lib/hammer_cli_foreman/compute_resources/rackspace.rb +0 -9
- data/lib/hammer_cli_foreman/compute_resources/rackspace/host_help_extenstion.rb +0 -20
- data/lib/hammer_cli_foreman/compute_resources/vmware.rb +0 -9
- data/lib/hammer_cli_foreman/compute_resources/vmware/host_help_extenstion.rb +0 -66
data/test/unit/domain_test.rb
CHANGED
@@ -102,6 +102,8 @@ describe HammerCLIForeman::Domain do
|
|
102
102
|
context "parameters" do
|
103
103
|
it_should_accept "name, value and domain name", ["--name=name", "--value=val", "--domain=name"]
|
104
104
|
it_should_accept "name, value and domain id", ["--name=name", "--value=val", "--domain-id=1"]
|
105
|
+
it_should_accept "name, value, parameter type and domain name",
|
106
|
+
["--name=name", "--value=val", "--parameter-type=integer", "--domain=name"]
|
105
107
|
# it_should_fail_with "name missing", ["--value=val", "--domain=name"]
|
106
108
|
# it_should_fail_with "value missing", ["--name=name", "--domain=name"]
|
107
109
|
# it_should_fail_with "domain name or id missing", ["--name=name", "--value=val"]
|
data/test/unit/host_test.rb
CHANGED
@@ -318,6 +318,7 @@ describe HammerCLIForeman::Host do
|
|
318
318
|
context "parameters" do
|
319
319
|
it_should_accept "name, value and host name", ["--name=name", "--value=val", "--host=name"]
|
320
320
|
it_should_accept "name, value and host id", ["--name=name", "--value=val", "--host-id=1"]
|
321
|
+
it_should_accept "name, value, type and host id", ["--name=name", "--parameter-type=integer", "--value=1", "--host-id=1"]
|
321
322
|
it_should_fail_with "name missing", ["--value=val", "--host=name"]
|
322
323
|
it_should_fail_with "value missing", ["--name=name", "--host=name"]
|
323
324
|
# it_should_fail_with "host name or id missing", ["--name=name", "--value=val"]
|
data/test/unit/hostgroup_test.rb
CHANGED
@@ -101,7 +101,7 @@ describe HammerCLIForeman::Hostgroup do
|
|
101
101
|
let(:cmd) { HammerCLIForeman::Hostgroup::SetParameterCommand.new("", ctx) }
|
102
102
|
|
103
103
|
context "parameters" do
|
104
|
-
it_should_accept "name, value and hostgroup id", ["--name=name", "--value=val", "--hostgroup-id=1"]
|
104
|
+
it_should_accept "name, value, parameter-type and hostgroup id", ["--name=name", "--parameter-type=string", "--value=val", "--hostgroup-id=1"]
|
105
105
|
it_should_fail_with "name missing", ["--value=val", "--hostgroup-id=1"]
|
106
106
|
it_should_fail_with "value missing", ["--name=name", "--hostgroup-id=1"]
|
107
107
|
# it_should_fail_with "hostgroup id missing", ["--name=name", "--value=val"] # TODO: temporarily disabled, parameters are checked in the id resolver
|
@@ -156,4 +156,17 @@ describe HammerCLIForeman::Hostgroup do
|
|
156
156
|
|
157
157
|
end
|
158
158
|
|
159
|
+
context "RebuildConfigCommand" do
|
160
|
+
|
161
|
+
let(:cmd) { HammerCLIForeman::Hostgroup::RebuildConfigCommand.new("", ctx) }
|
162
|
+
|
163
|
+
context "parameters" do
|
164
|
+
it_should_accept "name", ["--name=host"]
|
165
|
+
it_should_accept "id", ["--id=1"]
|
166
|
+
# it_should_fail_with "no arguments"
|
167
|
+
# TODO: temporarily disabled, parameters are checked in the id resolver
|
168
|
+
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
159
172
|
end
|
@@ -125,6 +125,7 @@ describe HammerCLIForeman::OperatingSystem do
|
|
125
125
|
context "parameters" do
|
126
126
|
it_should_accept "name, value and os id", ["--name=domain", "--value=val", "--operatingsystem-id=1"]
|
127
127
|
it_should_accept "name, value and os title", ["--name=domain", "--value=val", "--operatingsystem=Rhel 6.5"]
|
128
|
+
it_should_accept "name, value, type and os id", ["--name=domain", "--value=val", "--parameter-type=string", "--operatingsystem-id=1"]
|
128
129
|
# it_should_fail_with "name missing", ["--value=val", "--operatingsystem-id=id"]
|
129
130
|
# it_should_fail_with "value missing", ["--name=name", "--operatingsystem-id=id"]
|
130
131
|
# it_should_fail_with "os id missing", ["--name=name", "--value=val"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hammer_cli_foreman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomáš Strachota
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-04-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: hammer_cli
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.
|
20
|
+
version: 0.17.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0.
|
27
|
+
version: 0.17.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: apipie-bindings
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -102,22 +102,19 @@ files:
|
|
102
102
|
- lib/hammer_cli_foreman/combination.rb
|
103
103
|
- lib/hammer_cli_foreman/commands.rb
|
104
104
|
- lib/hammer_cli_foreman/common_parameter.rb
|
105
|
+
- lib/hammer_cli_foreman/compute_attribute.rb
|
106
|
+
- lib/hammer_cli_foreman/compute_profile.rb
|
105
107
|
- lib/hammer_cli_foreman/compute_resource.rb
|
106
|
-
- lib/hammer_cli_foreman/
|
107
|
-
- lib/hammer_cli_foreman/
|
108
|
-
- lib/hammer_cli_foreman/
|
109
|
-
- lib/hammer_cli_foreman/
|
110
|
-
- lib/hammer_cli_foreman/
|
111
|
-
- lib/hammer_cli_foreman/
|
112
|
-
- lib/hammer_cli_foreman/
|
113
|
-
- lib/hammer_cli_foreman/
|
114
|
-
- lib/hammer_cli_foreman/
|
115
|
-
- lib/hammer_cli_foreman/
|
116
|
-
- lib/hammer_cli_foreman/compute_resources/ovirt/host_help_extenstion.rb
|
117
|
-
- lib/hammer_cli_foreman/compute_resources/rackspace.rb
|
118
|
-
- lib/hammer_cli_foreman/compute_resources/rackspace/host_help_extenstion.rb
|
119
|
-
- lib/hammer_cli_foreman/compute_resources/vmware.rb
|
120
|
-
- lib/hammer_cli_foreman/compute_resources/vmware/host_help_extenstion.rb
|
108
|
+
- lib/hammer_cli_foreman/compute_resource/base.rb
|
109
|
+
- lib/hammer_cli_foreman/compute_resource/ec2.rb
|
110
|
+
- lib/hammer_cli_foreman/compute_resource/gce.rb
|
111
|
+
- lib/hammer_cli_foreman/compute_resource/help_utils.rb
|
112
|
+
- lib/hammer_cli_foreman/compute_resource/libvirt.rb
|
113
|
+
- lib/hammer_cli_foreman/compute_resource/openstack.rb
|
114
|
+
- lib/hammer_cli_foreman/compute_resource/ovirt.rb
|
115
|
+
- lib/hammer_cli_foreman/compute_resource/rackspace.rb
|
116
|
+
- lib/hammer_cli_foreman/compute_resource/register_compute_resources.rb
|
117
|
+
- lib/hammer_cli_foreman/compute_resource/vmware.rb
|
121
118
|
- lib/hammer_cli_foreman/config_group.rb
|
122
119
|
- lib/hammer_cli_foreman/config_report.rb
|
123
120
|
- lib/hammer_cli_foreman/defaults.rb
|
@@ -195,10 +192,14 @@ files:
|
|
195
192
|
- test/data/1.17/foreman_api.json
|
196
193
|
- test/data/1.18/foreman_api.json
|
197
194
|
- test/data/1.20/foreman_api.json
|
195
|
+
- test/data/1.21/foreman_api.json
|
196
|
+
- test/data/1.22/foreman_api.json
|
198
197
|
- test/data/README.md
|
199
198
|
- test/functional/audit_test.rb
|
200
199
|
- test/functional/auth_source_test.rb
|
201
200
|
- test/functional/commands/list_test.rb
|
201
|
+
- test/functional/compute_attribute_test.rb
|
202
|
+
- test/functional/compute_profile_test.rb
|
202
203
|
- test/functional/compute_resource_test.rb
|
203
204
|
- test/functional/filter_test.rb
|
204
205
|
- test/functional/host_test.rb
|
@@ -535,7 +536,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
535
536
|
version: '0'
|
536
537
|
requirements: []
|
537
538
|
rubyforge_project:
|
538
|
-
rubygems_version: 2.
|
539
|
+
rubygems_version: 2.7.9
|
539
540
|
signing_key:
|
540
541
|
specification_version: 4
|
541
542
|
summary: Foreman commands for Hammer
|
@@ -840,6 +841,8 @@ test_files:
|
|
840
841
|
- test/functional/settings_test.rb
|
841
842
|
- test/functional/smart_variable_test.rb
|
842
843
|
- test/functional/smart_class_parameter_test.rb
|
844
|
+
- test/functional/compute_profile_test.rb
|
845
|
+
- test/functional/compute_attribute_test.rb
|
843
846
|
- test/functional/commands/list_test.rb
|
844
847
|
- test/functional/role_test.rb
|
845
848
|
- test/functional/compute_resource_test.rb
|
@@ -860,10 +863,12 @@ test_files:
|
|
860
863
|
- test/functional/test_helper.rb
|
861
864
|
- test/data/1.16/foreman_api.json
|
862
865
|
- test/data/1.11/foreman_api.json
|
866
|
+
- test/data/1.22/foreman_api.json
|
863
867
|
- test/data/1.20/foreman_api.json
|
864
868
|
- test/data/1.14/_foreman_api.json
|
865
869
|
- test/data/1.14/foreman_api.json
|
866
870
|
- test/data/1.18/foreman_api.json
|
871
|
+
- test/data/1.21/foreman_api.json
|
867
872
|
- test/data/1.15/foreman_api.json
|
868
873
|
- test/data/1.10/foreman_api.json
|
869
874
|
- test/data/README.md
|
@@ -1,7 +0,0 @@
|
|
1
|
-
require 'hammer_cli_foreman/compute_resources/ec2'
|
2
|
-
require 'hammer_cli_foreman/compute_resources/gce'
|
3
|
-
require 'hammer_cli_foreman/compute_resources/libvirt'
|
4
|
-
require 'hammer_cli_foreman/compute_resources/openstack'
|
5
|
-
require 'hammer_cli_foreman/compute_resources/ovirt'
|
6
|
-
require 'hammer_cli_foreman/compute_resources/rackspace'
|
7
|
-
require 'hammer_cli_foreman/compute_resources/vmware'
|
@@ -1,23 +0,0 @@
|
|
1
|
-
module HammerCLIForeman
|
2
|
-
module ComputeResources
|
3
|
-
module EC2
|
4
|
-
class HostHelpExtenstion
|
5
|
-
def name
|
6
|
-
_('EC2')
|
7
|
-
end
|
8
|
-
|
9
|
-
def host_create_help(h)
|
10
|
-
h.section '--compute-attributes' do |h|
|
11
|
-
h.list([
|
12
|
-
'flavor_id',
|
13
|
-
'image_id',
|
14
|
-
'availability_zone',
|
15
|
-
'security_group_ids',
|
16
|
-
'managed_ip',
|
17
|
-
])
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module HammerCLIForeman
|
2
|
-
module ComputeResources
|
3
|
-
module GCE
|
4
|
-
class HostHelpExtenstion
|
5
|
-
def name
|
6
|
-
_('GCE')
|
7
|
-
end
|
8
|
-
|
9
|
-
def host_create_help(h)
|
10
|
-
h.section '--compute-attributes' do |h|
|
11
|
-
h.list([
|
12
|
-
'machine_type',
|
13
|
-
'image_id',
|
14
|
-
'network',
|
15
|
-
'external_ip'
|
16
|
-
])
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
module HammerCLIForeman
|
2
|
-
module ComputeResources
|
3
|
-
module Libvirt
|
4
|
-
class HostHelpExtenstion
|
5
|
-
def name
|
6
|
-
_('Libvirt')
|
7
|
-
end
|
8
|
-
|
9
|
-
def host_create_help(h)
|
10
|
-
h.section '--compute-attributes' do |h|
|
11
|
-
h.list([
|
12
|
-
['cpus', _('Number of CPUs')],
|
13
|
-
['memory', _('String, amount of memory, value in bytes')],
|
14
|
-
['start', _('Boolean (expressed as 0 or 1), whether to start the machine or not')]
|
15
|
-
])
|
16
|
-
end
|
17
|
-
h.section '--interface' do |h|
|
18
|
-
h.list([
|
19
|
-
['compute_type', _('Possible values: %s') % 'bridge, network'],
|
20
|
-
['compute_network / compute_bridge', _('Name of interface according to type')],
|
21
|
-
['compute_model', _('Possible values: %s') % 'virtio, rtl8139, ne2k_pci, pcnet, e1000']
|
22
|
-
])
|
23
|
-
end
|
24
|
-
h.section '--volume' do |h|
|
25
|
-
h.list([
|
26
|
-
['pool_name', _('One of available storage pools')],
|
27
|
-
['capacity', _('String value, eg. 10G')],
|
28
|
-
['format_type', _('Possible values: %s') % 'raw, qcow2']
|
29
|
-
])
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
module HammerCLIForeman
|
2
|
-
module ComputeResources
|
3
|
-
module OpenStack
|
4
|
-
class HostHelpExtenstion
|
5
|
-
def name
|
6
|
-
_('OpenStack')
|
7
|
-
end
|
8
|
-
|
9
|
-
def host_create_help(h)
|
10
|
-
h.section '--compute-attributes' do |h|
|
11
|
-
h.list([
|
12
|
-
'flavor_ref',
|
13
|
-
'image_ref',
|
14
|
-
'tenant_id',
|
15
|
-
'security_groups',
|
16
|
-
'network'
|
17
|
-
])
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
module HammerCLIForeman
|
2
|
-
module ComputeResources
|
3
|
-
module Ovirt
|
4
|
-
class HostHelpExtenstion
|
5
|
-
def name
|
6
|
-
_('oVirt')
|
7
|
-
end
|
8
|
-
|
9
|
-
def host_create_help(h)
|
10
|
-
h.section '--compute-attributes' do |h|
|
11
|
-
h.list([
|
12
|
-
['cluster'],
|
13
|
-
['template', _('Hardware profile to use')],
|
14
|
-
['cores', _('Integer value, number of cores')],
|
15
|
-
['memory', _('Amount of memory, integer value in bytes')],
|
16
|
-
['start', _('Boolean (expressed as 0 or 1), whether to start the machine or not')]
|
17
|
-
])
|
18
|
-
end
|
19
|
-
h.section '--interface' do |h|
|
20
|
-
h.list([
|
21
|
-
['compute_name', _('Eg. eth0')],
|
22
|
-
['compute_network', _('Select one of available networks for a cluster')]
|
23
|
-
])
|
24
|
-
end
|
25
|
-
h.section '--volume' do |h|
|
26
|
-
h.list([
|
27
|
-
['size_gb', _('Volume size in GB, integer value')],
|
28
|
-
['storage_domain', _('Select one of available storage domains')],
|
29
|
-
['bootable', _('Boolean, only one volume can be bootable')]
|
30
|
-
])
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module HammerCLIForeman
|
2
|
-
module ComputeResources
|
3
|
-
module Rackspace
|
4
|
-
class HostHelpExtenstion
|
5
|
-
def name
|
6
|
-
_('Rackspace')
|
7
|
-
end
|
8
|
-
|
9
|
-
def host_create_help(h)
|
10
|
-
h.section '--compute-attributes' do |h|
|
11
|
-
h.list([
|
12
|
-
'flavor_id',
|
13
|
-
'image_id'
|
14
|
-
])
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,66 +0,0 @@
|
|
1
|
-
module HammerCLIForeman
|
2
|
-
module ComputeResources
|
3
|
-
module VMware
|
4
|
-
class HostHelpExtenstion
|
5
|
-
INTERFACE_TYPES = %w(
|
6
|
-
VirtualVmxnet3,
|
7
|
-
VirtualE1000
|
8
|
-
)
|
9
|
-
|
10
|
-
def name
|
11
|
-
_('VMware')
|
12
|
-
end
|
13
|
-
|
14
|
-
def host_create_help(h)
|
15
|
-
h.section '--compute-attributes' do |h|
|
16
|
-
h.list([
|
17
|
-
['cpus', _('CPU count')],
|
18
|
-
['corespersocket', _('Number of cores per socket (applicable to hardware versions < 10 only)')],
|
19
|
-
['memory_mb', _('Integer number, amount of memory in MB')],
|
20
|
-
['firmware', 'automatic/bios/efi'],
|
21
|
-
['cluster', _('Cluster ID from VMware')],
|
22
|
-
['resource_pool', _('Resource Pool ID from VMware')],
|
23
|
-
['path', _('Path to folder')],
|
24
|
-
['guest_id', _('Guest OS ID form VMware')],
|
25
|
-
['scsi_controller_type', _('ID of the controller from VMware')],
|
26
|
-
['hardware_version', _('Hardware version ID from VMware')],
|
27
|
-
['add_cdrom', _('Must be a 1 or 0, Add a CD-ROM drive to the virtual machine')],
|
28
|
-
['cpuHotAddEnabled', _('Must be a 1 or 0, lets you add memory resources while the machine is on')],
|
29
|
-
['memoryHotAddEnabled', _('Must be a 1 or 0, lets you add CPU resources while the machine is on')],
|
30
|
-
['start', _("Must be a 1 or 0, whether to start the machine or not")],
|
31
|
-
['annotation', _("Annotation Notes")]
|
32
|
-
])
|
33
|
-
end
|
34
|
-
h.section '--interface' do |h|
|
35
|
-
h.list([
|
36
|
-
['compute_type', interface_type_description(h)],
|
37
|
-
['compute_network', _('Network ID from VMware')]
|
38
|
-
])
|
39
|
-
end
|
40
|
-
h.section '--volume' do |h|
|
41
|
-
h.list([
|
42
|
-
['name'],
|
43
|
-
['storage_pod', _('Storage Pod ID from VMware')],
|
44
|
-
['datastore', _('Datastore ID from VMware')],
|
45
|
-
['size_gb', _('Integer number, volume size in GB')],
|
46
|
-
['thin', 'true/false'],
|
47
|
-
['eager_zero', 'true/false'],
|
48
|
-
['mode', 'persistent/independent_persistent/independent_nonpersistent']
|
49
|
-
])
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
private
|
54
|
-
|
55
|
-
def interface_type_description(h)
|
56
|
-
[
|
57
|
-
_('Type of the network adapter, for example one of:'),
|
58
|
-
h.indent(INTERFACE_TYPES),
|
59
|
-
_("See documentation center for your version of vSphere to find more details about available adapter types:"),
|
60
|
-
h.indent('https://www.vmware.com/support/pubs/')
|
61
|
-
].join("\n")
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|