fog-vsphere 3.5.2 → 3.5.3
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/.github/workflows/ruby.yml +42 -0
- data/.rubocop.yml +8 -5
- data/.rubocop_todo.yml +476 -75
- data/README.md +3 -3
- data/Rakefile +0 -5
- data/fog-vsphere.gemspec +6 -3
- data/lib/fog/vsphere/requests/compute/get_network.rb +3 -3
- data/lib/fog/vsphere/requests/compute/list_networks.rb +8 -6
- data/lib/fog/vsphere/requests/compute/vm_clone.rb +2 -2
- data/lib/fog/vsphere/version.rb +1 -1
- metadata +83 -42
- data/.travis.yml +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b322423afd3ecad80527e44435b63e4ac851f51c62371621fcf2fbc7a9db70d6
|
4
|
+
data.tar.gz: 2c76db9aad7f1e54e2cb6925916f4b4f8f8948c6f9c1e42858edba243b1a5c1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb0a501011df49b658895e4dac2adc0e56ab6836a02cca91798dfda684f4a0d36afbf4585760c64e16a4be73ad109f39bb16500c356f2fdc375b2eed16cac82c
|
7
|
+
data.tar.gz: b608e695c586fb22b81a00c43c7680437dd61e60233c6a9760debddfa47246884303c098a6a78844658b2903e95f46fff95272af989ccd3f08241924f9ae29e9
|
@@ -0,0 +1,42 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
rubocop:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v3
|
14
|
+
- name: Set up Ruby
|
15
|
+
uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: '3.1'
|
18
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
19
|
+
- name: Run Rubocop
|
20
|
+
run: bundle exec rubocop --format github
|
21
|
+
|
22
|
+
test:
|
23
|
+
runs-on: ubuntu-latest
|
24
|
+
needs: rubocop
|
25
|
+
strategy:
|
26
|
+
matrix:
|
27
|
+
ruby-version:
|
28
|
+
- '2.7'
|
29
|
+
- '3.0'
|
30
|
+
- '3.1'
|
31
|
+
- 'head'
|
32
|
+
continue-on-error: ${{ matrix.ruby-version == 'head' }}
|
33
|
+
|
34
|
+
steps:
|
35
|
+
- uses: actions/checkout@v3
|
36
|
+
- name: Set up Ruby
|
37
|
+
uses: ruby/setup-ruby@v1
|
38
|
+
with:
|
39
|
+
ruby-version: ${{ matrix.ruby-version }}
|
40
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
41
|
+
- name: Run tests
|
42
|
+
run: bundle exec rake test
|
data/.rubocop.yml
CHANGED
@@ -1,13 +1,19 @@
|
|
1
1
|
inherit_from:
|
2
2
|
- .rubocop_todo.yml
|
3
3
|
|
4
|
+
require:
|
5
|
+
- rubocop-minitest
|
6
|
+
- rubocop-performance
|
7
|
+
- rubocop-rake
|
8
|
+
|
4
9
|
AllCops:
|
5
|
-
TargetRubyVersion: 2.
|
10
|
+
TargetRubyVersion: 2.7
|
11
|
+
NewCops: enable
|
6
12
|
|
7
13
|
Style/Documentation:
|
8
14
|
Enabled: false
|
9
15
|
|
10
|
-
HashSyntax:
|
16
|
+
Style/HashSyntax:
|
11
17
|
Enabled: false # don't force 1.9 hash syntax
|
12
18
|
|
13
19
|
Style/StringLiterals:
|
@@ -31,9 +37,6 @@ Metrics/CyclomaticComplexity:
|
|
31
37
|
Metrics/PerceivedComplexity:
|
32
38
|
Enabled: false
|
33
39
|
|
34
|
-
Performance/Casecmp:
|
35
|
-
Enabled: false
|
36
|
-
|
37
40
|
Style/RescueModifier:
|
38
41
|
Enabled: false
|
39
42
|
|
data/.rubocop_todo.yml
CHANGED
@@ -1,23 +1,62 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2022-11-18 13:06:52 UTC using RuboCop version 1.39.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
10
|
-
#
|
11
|
-
|
9
|
+
# Offense count: 1
|
10
|
+
# This cop supports safe autocorrection (--autocorrect).
|
11
|
+
# Configuration parameters: Include.
|
12
|
+
# Include: **/*.gemspec
|
13
|
+
Gemspec/DeprecatedAttributeAssignment:
|
12
14
|
Exclude:
|
13
|
-
- '
|
14
|
-
|
15
|
+
- 'fog-vsphere.gemspec'
|
16
|
+
|
17
|
+
# Offense count: 3
|
18
|
+
# This cop supports safe autocorrection (--autocorrect).
|
19
|
+
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
|
20
|
+
# Include: **/*.gemspec
|
21
|
+
Gemspec/OrderedDependencies:
|
22
|
+
Exclude:
|
23
|
+
- 'fog-vsphere.gemspec'
|
24
|
+
|
25
|
+
# Offense count: 1
|
26
|
+
# This cop supports safe autocorrection (--autocorrect).
|
27
|
+
# Configuration parameters: Include.
|
28
|
+
# Include: **/*.gemspec
|
29
|
+
Gemspec/RequireMFA:
|
30
|
+
Exclude:
|
31
|
+
- 'fog-vsphere.gemspec'
|
32
|
+
|
33
|
+
# Offense count: 12
|
34
|
+
# This cop supports safe autocorrection (--autocorrect).
|
35
|
+
# Configuration parameters: EnforcedStyleAlignWith, Severity.
|
36
|
+
# SupportedStylesAlignWith: start_of_line, begin
|
37
|
+
Layout/BeginEndAlignment:
|
38
|
+
Exclude:
|
39
|
+
- 'lib/fog/vsphere/compute.rb'
|
40
|
+
- 'lib/fog/vsphere/requests/compute/list_hosts.rb'
|
41
|
+
- 'lib/fog/vsphere/requests/compute/list_vm_cdroms.rb'
|
42
|
+
- 'lib/fog/vsphere/requests/compute/list_vm_volumes.rb'
|
43
|
+
|
44
|
+
# Offense count: 105
|
45
|
+
# This cop supports safe autocorrection (--autocorrect).
|
46
|
+
Layout/EmptyLineAfterGuardClause:
|
47
|
+
Enabled: false
|
48
|
+
|
49
|
+
# Offense count: 22
|
50
|
+
# This cop supports safe autocorrection (--autocorrect).
|
51
|
+
# Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
|
52
|
+
Layout/EmptyLineBetweenDefs:
|
53
|
+
Enabled: false
|
15
54
|
|
16
55
|
# Offense count: 7
|
17
|
-
#
|
18
|
-
# Configuration parameters: EnforcedStyleAlignWith,
|
56
|
+
# This cop supports safe autocorrection (--autocorrect).
|
57
|
+
# Configuration parameters: EnforcedStyleAlignWith, Severity.
|
19
58
|
# SupportedStylesAlignWith: keyword, variable, start_of_line
|
20
|
-
|
59
|
+
Layout/EndAlignment:
|
21
60
|
Exclude:
|
22
61
|
- 'lib/fog/vsphere/models/compute/customfields.rb'
|
23
62
|
- 'lib/fog/vsphere/models/compute/customvalues.rb'
|
@@ -26,6 +65,107 @@ Lint/EndAlignment:
|
|
26
65
|
- 'lib/fog/vsphere/requests/compute/create_vm.rb'
|
27
66
|
- 'lib/fog/vsphere/requests/compute/host_start_maintenance.rb'
|
28
67
|
|
68
|
+
# Offense count: 137
|
69
|
+
# This cop supports safe autocorrection (--autocorrect).
|
70
|
+
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
71
|
+
# SupportedHashRocketStyles: key, separator, table
|
72
|
+
# SupportedColonStyles: key, separator, table
|
73
|
+
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
74
|
+
Layout/HashAlignment:
|
75
|
+
Exclude:
|
76
|
+
- 'lib/fog/vsphere/compute.rb'
|
77
|
+
- 'lib/fog/vsphere/requests/compute/create_folder.rb'
|
78
|
+
- 'lib/fog/vsphere/requests/compute/create_vm.rb'
|
79
|
+
- 'lib/fog/vsphere/requests/compute/list_child_snapshots.rb'
|
80
|
+
- 'lib/fog/vsphere/requests/compute/list_hosts.rb'
|
81
|
+
- 'lib/fog/vsphere/requests/compute/vm_clone.rb'
|
82
|
+
- 'lib/fog/vsphere/requests/compute/vm_power_off.rb'
|
83
|
+
- 'lib/fog/vsphere/requests/compute/vm_suspend.rb'
|
84
|
+
|
85
|
+
# Offense count: 2
|
86
|
+
# This cop supports safe autocorrection (--autocorrect).
|
87
|
+
Layout/LeadingEmptyLines:
|
88
|
+
Exclude:
|
89
|
+
- 'fog-vsphere.gemspec'
|
90
|
+
- 'lib/fog/vsphere/requests/compute/get_vm_first_scsi_controller.rb'
|
91
|
+
|
92
|
+
# Offense count: 12
|
93
|
+
# This cop supports safe autocorrection (--autocorrect).
|
94
|
+
Layout/RescueEnsureAlignment:
|
95
|
+
Exclude:
|
96
|
+
- 'lib/fog/vsphere/compute.rb'
|
97
|
+
- 'lib/fog/vsphere/requests/compute/list_hosts.rb'
|
98
|
+
- 'lib/fog/vsphere/requests/compute/list_vm_cdroms.rb'
|
99
|
+
- 'lib/fog/vsphere/requests/compute/list_vm_volumes.rb'
|
100
|
+
|
101
|
+
# Offense count: 2
|
102
|
+
# This cop supports safe autocorrection (--autocorrect).
|
103
|
+
# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
|
104
|
+
# SupportedStylesForExponentOperator: space, no_space
|
105
|
+
Layout/SpaceAroundOperators:
|
106
|
+
Exclude:
|
107
|
+
- 'lib/fog/vsphere/compute.rb'
|
108
|
+
- 'lib/fog/vsphere/requests/compute/vm_clone.rb'
|
109
|
+
|
110
|
+
# Offense count: 2
|
111
|
+
# Configuration parameters: AllowSafeAssignment.
|
112
|
+
Lint/AssignmentInCondition:
|
113
|
+
Exclude:
|
114
|
+
- 'lib/fog/vsphere/requests/compute/create_vm.rb'
|
115
|
+
- 'lib/fog/vsphere/requests/compute/vm_clone.rb'
|
116
|
+
|
117
|
+
# Offense count: 1
|
118
|
+
# Configuration parameters: AllowedMethods.
|
119
|
+
# AllowedMethods: enums
|
120
|
+
Lint/ConstantDefinitionInBlock:
|
121
|
+
Exclude:
|
122
|
+
- 'tests/compute_tests.rb'
|
123
|
+
|
124
|
+
# Offense count: 1
|
125
|
+
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
|
126
|
+
Lint/DuplicateBranch:
|
127
|
+
Exclude:
|
128
|
+
- 'lib/fog/vsphere/requests/compute/create_vm.rb'
|
129
|
+
|
130
|
+
# Offense count: 1
|
131
|
+
# Configuration parameters: AllowComments.
|
132
|
+
Lint/EmptyClass:
|
133
|
+
Exclude:
|
134
|
+
- 'tests/class_from_string_tests.rb'
|
135
|
+
|
136
|
+
# Offense count: 7
|
137
|
+
# Configuration parameters: MaximumRangeSize.
|
138
|
+
Lint/MissingCopEnableDirective:
|
139
|
+
Exclude:
|
140
|
+
- 'lib/fog/vsphere/compute.rb'
|
141
|
+
- 'lib/fog/vsphere/requests/compute/create_vm.rb'
|
142
|
+
- 'lib/fog/vsphere/requests/compute/list_hosts.rb'
|
143
|
+
- 'lib/fog/vsphere/requests/compute/list_vm_cdroms.rb'
|
144
|
+
- 'lib/fog/vsphere/requests/compute/list_vm_volumes.rb'
|
145
|
+
- 'tests/compute_tests.rb'
|
146
|
+
|
147
|
+
# Offense count: 4
|
148
|
+
# This cop supports safe autocorrection (--autocorrect).
|
149
|
+
Lint/RedundantCopDisableDirective:
|
150
|
+
Exclude:
|
151
|
+
- 'lib/fog/vsphere/compute.rb'
|
152
|
+
- 'lib/fog/vsphere/requests/compute/list_hosts.rb'
|
153
|
+
- 'lib/fog/vsphere/requests/compute/list_vm_cdroms.rb'
|
154
|
+
- 'lib/fog/vsphere/requests/compute/list_vm_volumes.rb'
|
155
|
+
|
156
|
+
# Offense count: 1
|
157
|
+
# This cop supports safe autocorrection (--autocorrect).
|
158
|
+
Lint/RedundantCopEnableDirective:
|
159
|
+
Exclude:
|
160
|
+
- 'lib/fog/vsphere/requests/compute/list_vm_interfaces.rb'
|
161
|
+
|
162
|
+
# Offense count: 2
|
163
|
+
# This cop supports safe autocorrection (--autocorrect).
|
164
|
+
Lint/SendWithMixinArgument:
|
165
|
+
Exclude:
|
166
|
+
- 'tests/helper.rb'
|
167
|
+
- 'tests/test_helper.rb'
|
168
|
+
|
29
169
|
# Offense count: 3
|
30
170
|
Lint/ShadowingOuterLocalVariable:
|
31
171
|
Exclude:
|
@@ -33,7 +173,7 @@ Lint/ShadowingOuterLocalVariable:
|
|
33
173
|
- 'lib/fog/vsphere/requests/compute/destroy_rule.rb'
|
34
174
|
- 'lib/fog/vsphere/requests/compute/get_vm_first_scsi_controller.rb'
|
35
175
|
|
36
|
-
# Offense count:
|
176
|
+
# Offense count: 8
|
37
177
|
Lint/UselessAssignment:
|
38
178
|
Exclude:
|
39
179
|
- 'lib/fog/vsphere/compute.rb'
|
@@ -42,16 +182,12 @@ Lint/UselessAssignment:
|
|
42
182
|
- 'lib/fog/vsphere/requests/compute/create_rule.rb'
|
43
183
|
- 'lib/fog/vsphere/requests/compute/create_vm.rb'
|
44
184
|
- 'lib/fog/vsphere/requests/compute/get_interface_type.rb'
|
45
|
-
- 'lib/fog/vsphere/requests/compute/vm_clone.rb'
|
46
185
|
- 'lib/fog/vsphere/requests/compute/vm_migrate.rb'
|
47
186
|
- 'tests/requests/compute/vm_clone_tests.rb'
|
48
187
|
|
49
|
-
# Offense count: 64
|
50
|
-
Metrics/AbcSize:
|
51
|
-
Max: 635
|
52
|
-
|
53
188
|
# Offense count: 12
|
54
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
189
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
|
190
|
+
# AllowedMethods: refine
|
55
191
|
Metrics/BlockLength:
|
56
192
|
Max: 264
|
57
193
|
|
@@ -61,44 +197,144 @@ Metrics/BlockNesting:
|
|
61
197
|
Max: 5
|
62
198
|
|
63
199
|
# Offense count: 6
|
64
|
-
# Configuration parameters: CountComments.
|
200
|
+
# Configuration parameters: CountComments, CountAsOne.
|
65
201
|
Metrics/ClassLength:
|
66
202
|
Max: 284
|
67
203
|
|
68
|
-
# Offense count:
|
69
|
-
|
70
|
-
|
204
|
+
# Offense count: 1
|
205
|
+
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
|
206
|
+
Metrics/ParameterLists:
|
207
|
+
Max: 6
|
71
208
|
|
72
|
-
# Offense count:
|
73
|
-
# Configuration parameters:
|
74
|
-
|
75
|
-
|
76
|
-
|
209
|
+
# Offense count: 2
|
210
|
+
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
211
|
+
Naming/BlockParameterName:
|
212
|
+
Exclude:
|
213
|
+
- 'lib/fog/vsphere/requests/compute/list_datacenters.rb'
|
214
|
+
- 'lib/fog/vsphere/requests/compute/list_resource_pools.rb'
|
215
|
+
|
216
|
+
# Offense count: 1
|
217
|
+
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
|
218
|
+
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src
|
219
|
+
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
|
220
|
+
Naming/FileName:
|
221
|
+
Exclude:
|
222
|
+
- 'lib/fog-vsphere.rb'
|
77
223
|
|
78
|
-
# Offense count:
|
79
|
-
# Configuration parameters:
|
80
|
-
|
81
|
-
|
224
|
+
# Offense count: 1
|
225
|
+
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
|
226
|
+
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
|
227
|
+
Naming/MemoizedInstanceVariableName:
|
228
|
+
Exclude:
|
229
|
+
- 'tests/test_helper.rb'
|
230
|
+
|
231
|
+
# Offense count: 11
|
232
|
+
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
233
|
+
# AllowedNames: as, at, by, db, id, if, in, io, ip, of, on, os, pp, to
|
234
|
+
Naming/MethodParameterName:
|
235
|
+
Exclude:
|
236
|
+
- 'lib/fog/vsphere/compute.rb'
|
237
|
+
- 'lib/fog/vsphere/models/compute/volume.rb'
|
238
|
+
- 'lib/fog/vsphere/requests/compute/create_vm.rb'
|
239
|
+
- 'lib/fog/vsphere/requests/compute/get_virtual_machine.rb'
|
240
|
+
- 'lib/fog/vsphere/requests/compute/list_datacenters.rb'
|
241
|
+
- 'lib/fog/vsphere/requests/compute/list_resource_pools.rb'
|
242
|
+
- 'lib/fog/vsphere/requests/compute/vm_suspend.rb'
|
243
|
+
- 'tests/compute_tests.rb'
|
82
244
|
|
83
245
|
# Offense count: 1
|
84
|
-
# Configuration parameters:
|
85
|
-
|
86
|
-
|
246
|
+
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
|
247
|
+
# NamePrefix: is_, has_, have_
|
248
|
+
# ForbiddenPrefixes: is_, has_, have_
|
249
|
+
# AllowedMethods: is_a?
|
250
|
+
# MethodDefinitionMacros: define_method, define_singleton_method
|
251
|
+
Naming/PredicateName:
|
252
|
+
Exclude:
|
253
|
+
- 'spec/**/*'
|
254
|
+
- 'lib/fog/vsphere/compute.rb'
|
255
|
+
|
256
|
+
# Offense count: 41
|
257
|
+
# Configuration parameters: EnforcedStyle, AllowedIdentifiers, AllowedPatterns.
|
258
|
+
# SupportedStyles: snake_case, camelCase
|
259
|
+
Naming/VariableName:
|
260
|
+
Exclude:
|
261
|
+
- 'lib/fog/vsphere/requests/compute/create_vm.rb'
|
262
|
+
- 'lib/fog/vsphere/requests/compute/list_datacenters.rb'
|
263
|
+
- 'lib/fog/vsphere/requests/compute/list_resource_pools.rb'
|
264
|
+
- 'lib/fog/vsphere/requests/compute/list_server_types.rb'
|
265
|
+
- 'lib/fog/vsphere/requests/compute/vm_clone.rb'
|
266
|
+
|
267
|
+
# Offense count: 3
|
268
|
+
# Configuration parameters: MinSize.
|
269
|
+
Performance/CollectionLiteralInLoop:
|
270
|
+
Exclude:
|
271
|
+
- 'lib/fog/vsphere/requests/compute/vm_clone.rb'
|
87
272
|
|
88
273
|
# Offense count: 2
|
89
|
-
#
|
90
|
-
|
91
|
-
|
274
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
275
|
+
Performance/Detect:
|
276
|
+
Exclude:
|
277
|
+
- 'lib/fog/vsphere/requests/compute/get_server_type.rb'
|
278
|
+
- 'lib/fog/vsphere/requests/compute/get_vm_first_scsi_controller.rb'
|
92
279
|
|
93
|
-
# Offense count:
|
94
|
-
|
95
|
-
|
280
|
+
# Offense count: 10
|
281
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
282
|
+
Performance/MapCompact:
|
283
|
+
Exclude:
|
284
|
+
- 'lib/fog/vsphere/compute.rb'
|
285
|
+
- 'lib/fog/vsphere/requests/compute/get_virtual_machine.rb'
|
286
|
+
- 'lib/fog/vsphere/requests/compute/list_clusters.rb'
|
287
|
+
- 'lib/fog/vsphere/requests/compute/list_compute_resources.rb'
|
288
|
+
- 'lib/fog/vsphere/requests/compute/list_datastores.rb'
|
289
|
+
- 'lib/fog/vsphere/requests/compute/list_folders.rb'
|
290
|
+
- 'lib/fog/vsphere/requests/compute/list_interface_types.rb'
|
291
|
+
- 'lib/fog/vsphere/requests/compute/list_networks.rb'
|
292
|
+
- 'lib/fog/vsphere/requests/compute/list_server_types.rb'
|
293
|
+
- 'lib/fog/vsphere/requests/compute/vm_config_vnc.rb'
|
96
294
|
|
97
|
-
|
295
|
+
# Offense count: 4
|
296
|
+
Performance/MethodObjectAsBlock:
|
98
297
|
Exclude:
|
99
|
-
- 'lib/fog
|
298
|
+
- 'lib/fog/vsphere/requests/compute/list_folders.rb'
|
299
|
+
- 'lib/fog/vsphere/requests/compute/list_templates.rb'
|
300
|
+
- 'lib/fog/vsphere/requests/compute/list_virtual_machines.rb'
|
301
|
+
|
302
|
+
# Offense count: 8
|
303
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
304
|
+
Performance/RedundantEqualityComparisonBlock:
|
305
|
+
Exclude:
|
306
|
+
- 'tests/requests/compute/list_child_snapshots_tests.rb'
|
307
|
+
- 'tests/requests/compute/list_datastores_tests.rb'
|
308
|
+
- 'tests/requests/compute/list_hosts_tests.rb'
|
309
|
+
- 'tests/requests/compute/list_networks_tests.rb'
|
310
|
+
- 'tests/requests/compute/list_vm_cdroms_tests.rb'
|
311
|
+
- 'tests/requests/compute/list_vm_snapshots_tests.rb'
|
312
|
+
|
313
|
+
# Offense count: 7
|
314
|
+
# This cop supports safe autocorrection (--autocorrect).
|
315
|
+
Performance/StringIdentifierArgument:
|
316
|
+
Exclude:
|
317
|
+
- 'tests/models/compute/server_tests.rb'
|
318
|
+
|
319
|
+
# Offense count: 1
|
320
|
+
# This cop supports safe autocorrection (--autocorrect).
|
321
|
+
Rake/Desc:
|
322
|
+
Exclude:
|
323
|
+
- 'Rakefile'
|
324
|
+
|
325
|
+
# Offense count: 12
|
326
|
+
# This cop supports safe autocorrection (--autocorrect).
|
327
|
+
# Configuration parameters: EnforcedStyle.
|
328
|
+
# SupportedStyles: separated, grouped
|
329
|
+
Style/AccessorGrouping:
|
330
|
+
Exclude:
|
331
|
+
- 'lib/fog/vsphere/compute.rb'
|
332
|
+
- 'lib/fog/vsphere/models/compute/interfacetypes.rb'
|
333
|
+
- 'lib/fog/vsphere/models/compute/servers.rb'
|
100
334
|
|
101
335
|
# Offense count: 10
|
336
|
+
# This cop supports safe autocorrection (--autocorrect).
|
337
|
+
# Configuration parameters: AllowOnConstant, AllowOnSelfClass.
|
102
338
|
Style/CaseEquality:
|
103
339
|
Exclude:
|
104
340
|
- 'lib/fog/vsphere/requests/compute/list_child_snapshots.rb'
|
@@ -110,36 +346,108 @@ Style/CaseEquality:
|
|
110
346
|
- 'tests/requests/compute/list_vm_cdroms_tests.rb'
|
111
347
|
- 'tests/requests/compute/list_vm_snapshots_tests.rb'
|
112
348
|
|
349
|
+
# Offense count: 8
|
350
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
351
|
+
Style/CaseLikeIf:
|
352
|
+
Exclude:
|
353
|
+
- 'lib/fog/vsphere/requests/compute/create_group.rb'
|
354
|
+
- 'lib/fog/vsphere/requests/compute/create_rule.rb'
|
355
|
+
- 'lib/fog/vsphere/requests/compute/create_vm.rb'
|
356
|
+
- 'lib/fog/vsphere/requests/compute/list_clusters.rb'
|
357
|
+
- 'lib/fog/vsphere/requests/compute/list_datacenters.rb'
|
358
|
+
- 'lib/fog/vsphere/requests/compute/list_networks.rb'
|
359
|
+
- 'lib/fog/vsphere/requests/compute/list_rules.rb'
|
360
|
+
|
361
|
+
# Offense count: 3
|
362
|
+
# This cop supports safe autocorrection (--autocorrect).
|
363
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
|
364
|
+
# AllowedMethods: ==, equal?, eql?
|
365
|
+
Style/ClassEqualityComparison:
|
366
|
+
Exclude:
|
367
|
+
- 'lib/fog/vsphere/requests/compute/create_folder.rb'
|
368
|
+
- 'lib/fog/vsphere/requests/compute/list_vm_cdroms.rb'
|
369
|
+
- 'lib/fog/vsphere/requests/compute/vm_clone.rb'
|
370
|
+
|
113
371
|
# Offense count: 1
|
114
372
|
Style/ClassVars:
|
115
373
|
Exclude:
|
116
374
|
- 'lib/fog/bin/vsphere.rb'
|
117
375
|
|
118
|
-
# Offense count:
|
119
|
-
|
376
|
+
# Offense count: 2
|
377
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
378
|
+
Style/CollectionCompact:
|
120
379
|
Exclude:
|
121
|
-
- '
|
380
|
+
- 'lib/fog/vsphere/requests/compute/list_folders.rb'
|
381
|
+
- 'lib/fog/vsphere/requests/compute/list_virtual_machines.rb'
|
122
382
|
|
123
|
-
# Offense count:
|
124
|
-
#
|
125
|
-
Style/
|
383
|
+
# Offense count: 3
|
384
|
+
# This cop supports safe autocorrection (--autocorrect).
|
385
|
+
Style/ExpandPathArguments:
|
386
|
+
Exclude:
|
387
|
+
- 'fog-vsphere.gemspec'
|
388
|
+
- 'lib/fog/vsphere.rb'
|
389
|
+
- 'tests/helper.rb'
|
390
|
+
|
391
|
+
# Offense count: 185
|
392
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
393
|
+
# Configuration parameters: EnforcedStyle.
|
394
|
+
# SupportedStyles: always, always_true, never
|
395
|
+
Style/FrozenStringLiteralComment:
|
396
|
+
Enabled: false
|
397
|
+
|
398
|
+
# Offense count: 2
|
399
|
+
# This cop supports safe autocorrection (--autocorrect).
|
400
|
+
# Configuration parameters: AllowSplatArgument.
|
401
|
+
Style/HashConversion:
|
126
402
|
Exclude:
|
127
403
|
- 'lib/fog/vsphere/compute.rb'
|
404
|
+
- 'lib/fog/vsphere/requests/compute/vm_config_vnc.rb'
|
405
|
+
|
406
|
+
# Offense count: 2
|
407
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
408
|
+
Style/HashTransformKeys:
|
409
|
+
Exclude:
|
410
|
+
- 'lib/fog/vsphere/models/compute/server.rb'
|
411
|
+
|
412
|
+
# Offense count: 1
|
413
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
414
|
+
Style/HashTransformValues:
|
415
|
+
Exclude:
|
416
|
+
- 'lib/fog/vsphere/requests/compute/list_hosts.rb'
|
417
|
+
|
418
|
+
# Offense count: 2
|
419
|
+
# This cop supports safe autocorrection (--autocorrect).
|
420
|
+
# Configuration parameters: AllowIfModifier.
|
421
|
+
Style/IfInsideElse:
|
422
|
+
Exclude:
|
423
|
+
- 'lib/fog/vsphere/models/compute/cdrom.rb'
|
424
|
+
- 'lib/fog/vsphere/models/compute/volume.rb'
|
425
|
+
|
426
|
+
# Offense count: 27
|
427
|
+
# This cop supports safe autocorrection (--autocorrect).
|
428
|
+
Style/IfUnlessModifier:
|
429
|
+
Exclude:
|
430
|
+
- 'lib/fog/vsphere/models/compute/cdrom.rb'
|
431
|
+
- 'lib/fog/vsphere/models/compute/interface.rb'
|
128
432
|
- 'lib/fog/vsphere/models/compute/interfaces.rb'
|
129
433
|
- 'lib/fog/vsphere/models/compute/rule.rb'
|
130
|
-
- 'lib/fog/vsphere/models/compute/
|
434
|
+
- 'lib/fog/vsphere/models/compute/volume.rb'
|
131
435
|
- 'lib/fog/vsphere/requests/compute/create_group.rb'
|
132
436
|
- 'lib/fog/vsphere/requests/compute/create_rule.rb'
|
133
437
|
- 'lib/fog/vsphere/requests/compute/create_vm.rb'
|
438
|
+
- 'lib/fog/vsphere/requests/compute/folder_destroy.rb'
|
439
|
+
- 'lib/fog/vsphere/requests/compute/list_groups.rb'
|
134
440
|
- 'lib/fog/vsphere/requests/compute/list_resource_pools.rb'
|
135
441
|
- 'lib/fog/vsphere/requests/compute/list_server_types.rb'
|
136
|
-
- 'lib/fog/vsphere/requests/compute/
|
442
|
+
- 'lib/fog/vsphere/requests/compute/revert_to_snapshot.rb'
|
443
|
+
- 'lib/fog/vsphere/requests/compute/vm_clone.rb'
|
444
|
+
- 'lib/fog/vsphere/requests/compute/vm_config_vnc.rb'
|
137
445
|
|
138
|
-
# Offense count:
|
139
|
-
|
446
|
+
# Offense count: 1
|
447
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
448
|
+
Style/MapToHash:
|
140
449
|
Exclude:
|
141
|
-
- 'lib/fog/vsphere/
|
142
|
-
- 'lib/fog/vsphere/models/compute/volume.rb'
|
450
|
+
- 'lib/fog/vsphere/compute.rb'
|
143
451
|
|
144
452
|
# Offense count: 2
|
145
453
|
Style/MultilineBlockChain:
|
@@ -147,46 +455,104 @@ Style/MultilineBlockChain:
|
|
147
455
|
- 'lib/fog/vsphere/requests/compute/vm_clone.rb'
|
148
456
|
|
149
457
|
# Offense count: 4
|
458
|
+
# This cop supports safe autocorrection (--autocorrect).
|
150
459
|
Style/MultilineTernaryOperator:
|
151
460
|
Exclude:
|
152
461
|
- 'lib/fog/vsphere/models/compute/cluster.rb'
|
153
462
|
- 'lib/fog/vsphere/requests/compute/list_child_snapshots.rb'
|
154
463
|
|
155
|
-
# Offense count:
|
156
|
-
#
|
157
|
-
# Configuration parameters:
|
464
|
+
# Offense count: 2
|
465
|
+
# This cop supports safe autocorrection (--autocorrect).
|
466
|
+
# Configuration parameters: Strict, AllowedNumbers, AllowedPatterns.
|
467
|
+
Style/NumericLiterals:
|
468
|
+
MinDigits: 6
|
469
|
+
|
470
|
+
# Offense count: 4
|
471
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
472
|
+
# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns, IgnoredMethods.
|
158
473
|
# SupportedStyles: predicate, comparison
|
159
474
|
Style/NumericPredicate:
|
160
475
|
Exclude:
|
161
476
|
- 'spec/**/*'
|
162
477
|
- 'lib/fog/vsphere/requests/compute/list_compute_resources.rb'
|
478
|
+
- 'lib/fog/vsphere/requests/compute/modify_vm_interface.rb'
|
479
|
+
- 'tests/models/compute/rules_tests.rb'
|
480
|
+
|
481
|
+
# Offense count: 3
|
482
|
+
Style/OpenStructUse:
|
483
|
+
Exclude:
|
484
|
+
- 'tests/requests/compute/get_network_tests.rb'
|
485
|
+
|
486
|
+
# Offense count: 7
|
487
|
+
# Configuration parameters: AllowedMethods.
|
488
|
+
# AllowedMethods: respond_to_missing?
|
489
|
+
Style/OptionalBooleanParameter:
|
490
|
+
Exclude:
|
491
|
+
- 'lib/fog/vsphere/models/compute/snapshot.rb'
|
492
|
+
- 'lib/fog/vsphere/requests/compute/get_virtual_machine.rb'
|
493
|
+
- 'lib/fog/vsphere/requests/compute/host_shutdown.rb'
|
494
|
+
- 'lib/fog/vsphere/requests/compute/host_start_maintenance.rb'
|
495
|
+
- 'lib/fog/vsphere/requests/compute/vm_remove_snapshot.rb'
|
163
496
|
|
164
497
|
# Offense count: 1
|
165
|
-
#
|
498
|
+
# This cop supports safe autocorrection (--autocorrect).
|
166
499
|
# Configuration parameters: PreferredDelimiters.
|
167
500
|
Style/PercentLiteralDelimiters:
|
168
501
|
Exclude:
|
169
502
|
- 'Rakefile'
|
170
503
|
|
171
504
|
# Offense count: 1
|
172
|
-
#
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
505
|
+
# This cop supports safe autocorrection (--autocorrect).
|
506
|
+
Style/RedundantAssignment:
|
507
|
+
Exclude:
|
508
|
+
- 'lib/fog/vsphere/requests/compute/vm_clone.rb'
|
509
|
+
|
510
|
+
# Offense count: 6
|
511
|
+
# This cop supports safe autocorrection (--autocorrect).
|
512
|
+
Style/RedundantBegin:
|
177
513
|
Exclude:
|
178
|
-
- 'spec/**/*'
|
179
514
|
- 'lib/fog/vsphere/compute.rb'
|
515
|
+
- 'lib/fog/vsphere/requests/compute/get_virtual_machine.rb'
|
516
|
+
- 'lib/fog/vsphere/requests/compute/list_hosts.rb'
|
517
|
+
- 'lib/fog/vsphere/requests/compute/vm_clone.rb'
|
518
|
+
|
519
|
+
# Offense count: 3
|
520
|
+
# This cop supports safe autocorrection (--autocorrect).
|
521
|
+
Style/RedundantCondition:
|
522
|
+
Exclude:
|
523
|
+
- 'lib/fog/vsphere/requests/compute/create_vm.rb'
|
524
|
+
- 'lib/fog/vsphere/requests/compute/get_virtual_machine.rb'
|
525
|
+
|
526
|
+
# Offense count: 2
|
527
|
+
# This cop supports safe autocorrection (--autocorrect).
|
528
|
+
Style/RedundantRegexpEscape:
|
529
|
+
Exclude:
|
530
|
+
- 'fog-vsphere.gemspec'
|
531
|
+
- 'lib/fog/vsphere/requests/compute/list_clusters.rb'
|
532
|
+
|
533
|
+
# Offense count: 2
|
534
|
+
# This cop supports safe autocorrection (--autocorrect).
|
535
|
+
# Configuration parameters: AllowMultipleReturnValues.
|
536
|
+
Style/RedundantReturn:
|
537
|
+
Exclude:
|
538
|
+
- 'lib/fog/vsphere/requests/compute/create_group.rb'
|
539
|
+
- 'lib/fog/vsphere/requests/compute/create_rule.rb'
|
180
540
|
|
181
541
|
# Offense count: 2
|
182
|
-
#
|
542
|
+
# This cop supports safe autocorrection (--autocorrect).
|
183
543
|
Style/RedundantSelf:
|
184
544
|
Exclude:
|
185
545
|
- 'lib/fog/vsphere/models/compute/volume.rb'
|
186
546
|
|
547
|
+
# Offense count: 1
|
548
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
549
|
+
Style/RedundantSort:
|
550
|
+
Exclude:
|
551
|
+
- 'lib/fog/vsphere/models/compute/interface.rb'
|
552
|
+
|
187
553
|
# Offense count: 3
|
188
|
-
#
|
189
|
-
# Configuration parameters: EnforcedStyle,
|
554
|
+
# This cop supports safe autocorrection (--autocorrect).
|
555
|
+
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
|
190
556
|
# SupportedStyles: slashes, percent_r, mixed
|
191
557
|
Style/RegexpLiteral:
|
192
558
|
Exclude:
|
@@ -194,20 +560,55 @@ Style/RegexpLiteral:
|
|
194
560
|
- 'lib/fog/vsphere/requests/compute/get_folder.rb'
|
195
561
|
- 'lib/fog/vsphere/requests/compute/list_resource_pools.rb'
|
196
562
|
|
197
|
-
# Offense count:
|
198
|
-
#
|
563
|
+
# Offense count: 14
|
564
|
+
# This cop supports safe autocorrection (--autocorrect).
|
565
|
+
# Configuration parameters: EnforcedStyle.
|
566
|
+
# SupportedStyles: implicit, explicit
|
567
|
+
Style/RescueStandardError:
|
568
|
+
Exclude:
|
569
|
+
- 'lib/fog/vsphere/compute.rb'
|
570
|
+
- 'lib/fog/vsphere/requests/compute/list_hosts.rb'
|
571
|
+
- 'lib/fog/vsphere/requests/compute/list_vm_cdroms.rb'
|
572
|
+
- 'lib/fog/vsphere/requests/compute/list_vm_volumes.rb'
|
573
|
+
|
574
|
+
# Offense count: 9
|
575
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
576
|
+
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
|
577
|
+
# AllowedMethods: present?, blank?, presence, try, try!
|
578
|
+
Style/SafeNavigation:
|
579
|
+
Exclude:
|
580
|
+
- 'lib/fog/vsphere/models/compute/server.rb'
|
581
|
+
- 'lib/fog/vsphere/requests/compute/create_vm.rb'
|
582
|
+
- 'lib/fog/vsphere/requests/compute/list_server_types.rb'
|
583
|
+
- 'lib/fog/vsphere/requests/compute/modify_vm_interface.rb'
|
584
|
+
|
585
|
+
# Offense count: 2
|
586
|
+
# This cop supports safe autocorrection (--autocorrect).
|
199
587
|
# Configuration parameters: AllowAsExpressionSeparator.
|
200
588
|
Style/Semicolon:
|
201
589
|
Exclude:
|
202
590
|
- 'tests/models/compute/rules_tests.rb'
|
203
591
|
|
204
|
-
# Offense count:
|
205
|
-
#
|
206
|
-
#
|
207
|
-
Style/
|
592
|
+
# Offense count: 1
|
593
|
+
# This cop supports safe autocorrection (--autocorrect).
|
594
|
+
# Configuration parameters: AllowModifier.
|
595
|
+
Style/SoleNestedConditional:
|
208
596
|
Exclude:
|
209
|
-
- 'lib/fog/vsphere/requests/compute/create_vm.rb'
|
210
|
-
- 'lib/fog/vsphere/requests/compute/list_datacenters.rb'
|
211
|
-
- 'lib/fog/vsphere/requests/compute/list_resource_pools.rb'
|
212
|
-
- 'lib/fog/vsphere/requests/compute/list_server_types.rb'
|
213
597
|
- 'lib/fog/vsphere/requests/compute/vm_clone.rb'
|
598
|
+
|
599
|
+
# Offense count: 5
|
600
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
601
|
+
# Configuration parameters: Mode.
|
602
|
+
Style/StringConcatenation:
|
603
|
+
Exclude:
|
604
|
+
- 'lib/fog/vsphere/compute.rb'
|
605
|
+
- 'lib/fog/vsphere/requests/compute/get_folder.rb'
|
606
|
+
- 'lib/fog/vsphere/requests/compute/upload_iso.rb'
|
607
|
+
- 'lib/fog/vsphere/requests/compute/vm_clone.rb'
|
608
|
+
|
609
|
+
# Offense count: 174
|
610
|
+
# This cop supports safe autocorrection (--autocorrect).
|
611
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
|
612
|
+
# URISchemes: http, https
|
613
|
+
Layout/LineLength:
|
614
|
+
Max: 317
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
> VMware vSphere® provider for the Fog cloud services library
|
4
4
|
|
5
|
-
[![Gem Version][gemfury-image]][gemfury-url] [![Build Status][
|
5
|
+
[![Gem Version][gemfury-image]][gemfury-url] [![Build Status][gha-image]][gha-url] [![Test Coverage][coverage-image]][coverage-url] [![Code Climate][climate-image]][climate-url]
|
6
6
|
|
7
7
|
The VMware vSphere® provider allows you to use the abstractions of the Fog cloud services library to communicate with vSphere.
|
8
8
|
|
@@ -95,5 +95,5 @@ For more details see [CONTRIBUTING.md file](CONTRIBUTING.md)
|
|
95
95
|
[coverage-url]: https://codeclimate.com/github/fog/fog-vsphere/coverage
|
96
96
|
[gemfury-image]: https://badge.fury.io/rb/fog-vsphere.svg
|
97
97
|
[gemfury-url]: http://badge.fury.io/rb/fog-vsphere
|
98
|
-
[
|
99
|
-
[
|
98
|
+
[gha-image]: TODO
|
99
|
+
[gha-url]: TODO
|
data/Rakefile
CHANGED
@@ -4,11 +4,6 @@ require 'rubocop/rake_task'
|
|
4
4
|
desc 'Run Ruby style checks'
|
5
5
|
RuboCop::RakeTask.new(:style)
|
6
6
|
|
7
|
-
namespace :travis do
|
8
|
-
desc 'Run tests on Travis'
|
9
|
-
task ci: %w(style test)
|
10
|
-
end
|
11
|
-
|
12
7
|
mock = ENV['FOG_MOCK'] || 'true'
|
13
8
|
task :test do
|
14
9
|
sh("export FOG_MOCK=#{mock} && bundle exec shindont")
|
data/fog-vsphere.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
|
-
spec.required_ruby_version = '>= 2.
|
22
|
+
spec.required_ruby_version = '>= 2.7'
|
23
23
|
|
24
24
|
spec.add_runtime_dependency 'fog-core'
|
25
25
|
spec.add_runtime_dependency 'rbvmomi', '>= 1.9', '< 3'
|
@@ -28,9 +28,12 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.add_development_dependency 'pry', '~> 0.10'
|
29
29
|
spec.add_development_dependency 'rake', '>= 12.3.3'
|
30
30
|
spec.add_development_dependency 'minitest', '~> 5.8'
|
31
|
-
spec.add_development_dependency 'rubocop', '~>
|
31
|
+
spec.add_development_dependency 'rubocop', '~> 1.39.0'
|
32
|
+
spec.add_development_dependency 'rubocop-minitest'
|
33
|
+
spec.add_development_dependency 'rubocop-performance'
|
34
|
+
spec.add_development_dependency 'rubocop-rake'
|
32
35
|
spec.add_development_dependency 'mocha', '~> 1.8'
|
33
36
|
spec.add_development_dependency 'shindo', '~> 0.3'
|
34
37
|
spec.add_development_dependency 'webmock', '~> 3.5'
|
35
|
-
spec.add_development_dependency 'vcr', '~>
|
38
|
+
spec.add_development_dependency 'vcr', '~> 6.0'
|
36
39
|
end
|
@@ -38,7 +38,7 @@ module Fog
|
|
38
38
|
# only the one will do
|
39
39
|
proc do |n|
|
40
40
|
n._ref == ref_or_name || (
|
41
|
-
n.is_a?(RbVmomi::VIM::DistributedVirtualPortgroup) && (n.name == ref_or_name) &&
|
41
|
+
n.is_a?(RbVmomi::VIM::DistributedVirtualPortgroup) && (n.name == ref_or_name || n.key == ref_or_name) &&
|
42
42
|
(n.config.distributedVirtualSwitch.name == distributedswitch)
|
43
43
|
)
|
44
44
|
end
|
@@ -46,12 +46,12 @@ module Fog
|
|
46
46
|
# the first distributed virtual switch will do - selected by network - gives control to vsphere
|
47
47
|
proc do |n|
|
48
48
|
n._ref == ref_or_name || (
|
49
|
-
n.is_a?(RbVmomi::VIM::DistributedVirtualPortgroup) && (n.name == ref_or_name)
|
49
|
+
n.is_a?(RbVmomi::VIM::DistributedVirtualPortgroup) && (n.name == ref_or_name || n.key == ref_or_name)
|
50
50
|
)
|
51
51
|
end
|
52
52
|
else
|
53
53
|
# the first matching network will do, seems like the non-distributed networks come first
|
54
|
-
proc { |n| n._ref == ref_or_name || n.name == ref_or_name }
|
54
|
+
proc { |n| n._ref == ref_or_name || n.name == ref_or_name || (n.is_a?(RbVmomi::VIM::DistributedVirtualPortgroup) && n.key == ref_or_name) }
|
55
55
|
end
|
56
56
|
end
|
57
57
|
end
|
@@ -30,15 +30,17 @@ module Fog
|
|
30
30
|
virtualswitch: dvswitches[network['config.distributedVirtualSwitch']._ref]
|
31
31
|
)
|
32
32
|
elsif network.obj.is_a?(RbVmomi::VIM::OpaqueNetwork)
|
33
|
-
map_attrs_to_hash(network,
|
33
|
+
map_attrs_to_hash(network, network_dvportgroup_attribute_mapping).merge(
|
34
|
+
id: network.obj._ref,
|
34
35
|
opaqueNetworkId: network.obj.summary.opaqueNetworkId
|
35
36
|
)
|
36
37
|
else
|
37
|
-
map_attrs_to_hash(network, network_attribute_mapping)
|
38
|
+
map_attrs_to_hash(network, network_attribute_mapping).merge(
|
39
|
+
id: network.obj._ref
|
40
|
+
)
|
38
41
|
end.merge(
|
39
|
-
|
40
|
-
|
41
|
-
datacenter: datacenter_name
|
42
|
+
datacenter: datacenter_name,
|
43
|
+
_ref: network.obj._ref
|
42
44
|
)
|
43
45
|
end.compact
|
44
46
|
end
|
@@ -54,7 +56,7 @@ module Fog
|
|
54
56
|
|
55
57
|
def network_dvportgroup_attribute_mapping
|
56
58
|
network_attribute_mapping.merge(
|
57
|
-
|
59
|
+
id: 'config.key'
|
58
60
|
)
|
59
61
|
end
|
60
62
|
|
@@ -37,7 +37,7 @@ module Fog
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
# rubocop:disable ClassLength
|
40
|
+
# rubocop:disable Metrics/ClassLength
|
41
41
|
class Real
|
42
42
|
include Shared
|
43
43
|
|
@@ -887,7 +887,7 @@ module Fog
|
|
887
887
|
end
|
888
888
|
end
|
889
889
|
|
890
|
-
# rubocop:enable ClassLength
|
890
|
+
# rubocop:enable Metrics/ClassLength
|
891
891
|
class Mock
|
892
892
|
include Shared
|
893
893
|
def vm_clone(options = {})
|
data/lib/fog/vsphere/version.rb
CHANGED
metadata
CHANGED
@@ -1,175 +1,217 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-vsphere
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- J.R. Garcia
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog-core
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rbvmomi
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.9'
|
34
|
-
- - <
|
34
|
+
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: '3'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- -
|
41
|
+
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: '1.9'
|
44
|
-
- - <
|
44
|
+
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '3'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: bundler
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- -
|
51
|
+
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '0'
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
|
-
- -
|
58
|
+
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: pry
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- - ~>
|
65
|
+
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '0.10'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- - ~>
|
72
|
+
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0.10'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: rake
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
|
-
- -
|
79
|
+
- - ">="
|
80
80
|
- !ruby/object:Gem::Version
|
81
81
|
version: 12.3.3
|
82
82
|
type: :development
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
|
-
- -
|
86
|
+
- - ">="
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: 12.3.3
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: minitest
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
|
-
- - ~>
|
93
|
+
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '5.8'
|
96
96
|
type: :development
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
|
-
- - ~>
|
100
|
+
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '5.8'
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: rubocop
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- - ~>
|
107
|
+
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
109
|
+
version: 1.39.0
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
|
-
- - ~>
|
114
|
+
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version:
|
116
|
+
version: 1.39.0
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: rubocop-minitest
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: rubocop-performance
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
145
|
+
- !ruby/object:Gem::Dependency
|
146
|
+
name: rubocop-rake
|
147
|
+
requirement: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - ">="
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0'
|
152
|
+
type: :development
|
153
|
+
prerelease: false
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0'
|
117
159
|
- !ruby/object:Gem::Dependency
|
118
160
|
name: mocha
|
119
161
|
requirement: !ruby/object:Gem::Requirement
|
120
162
|
requirements:
|
121
|
-
- - ~>
|
163
|
+
- - "~>"
|
122
164
|
- !ruby/object:Gem::Version
|
123
165
|
version: '1.8'
|
124
166
|
type: :development
|
125
167
|
prerelease: false
|
126
168
|
version_requirements: !ruby/object:Gem::Requirement
|
127
169
|
requirements:
|
128
|
-
- - ~>
|
170
|
+
- - "~>"
|
129
171
|
- !ruby/object:Gem::Version
|
130
172
|
version: '1.8'
|
131
173
|
- !ruby/object:Gem::Dependency
|
132
174
|
name: shindo
|
133
175
|
requirement: !ruby/object:Gem::Requirement
|
134
176
|
requirements:
|
135
|
-
- - ~>
|
177
|
+
- - "~>"
|
136
178
|
- !ruby/object:Gem::Version
|
137
179
|
version: '0.3'
|
138
180
|
type: :development
|
139
181
|
prerelease: false
|
140
182
|
version_requirements: !ruby/object:Gem::Requirement
|
141
183
|
requirements:
|
142
|
-
- - ~>
|
184
|
+
- - "~>"
|
143
185
|
- !ruby/object:Gem::Version
|
144
186
|
version: '0.3'
|
145
187
|
- !ruby/object:Gem::Dependency
|
146
188
|
name: webmock
|
147
189
|
requirement: !ruby/object:Gem::Requirement
|
148
190
|
requirements:
|
149
|
-
- - ~>
|
191
|
+
- - "~>"
|
150
192
|
- !ruby/object:Gem::Version
|
151
193
|
version: '3.5'
|
152
194
|
type: :development
|
153
195
|
prerelease: false
|
154
196
|
version_requirements: !ruby/object:Gem::Requirement
|
155
197
|
requirements:
|
156
|
-
- - ~>
|
198
|
+
- - "~>"
|
157
199
|
- !ruby/object:Gem::Version
|
158
200
|
version: '3.5'
|
159
201
|
- !ruby/object:Gem::Dependency
|
160
202
|
name: vcr
|
161
203
|
requirement: !ruby/object:Gem::Requirement
|
162
204
|
requirements:
|
163
|
-
- - ~>
|
205
|
+
- - "~>"
|
164
206
|
- !ruby/object:Gem::Version
|
165
|
-
version: '
|
207
|
+
version: '6.0'
|
166
208
|
type: :development
|
167
209
|
prerelease: false
|
168
210
|
version_requirements: !ruby/object:Gem::Requirement
|
169
211
|
requirements:
|
170
|
-
- - ~>
|
212
|
+
- - "~>"
|
171
213
|
- !ruby/object:Gem::Version
|
172
|
-
version: '
|
214
|
+
version: '6.0'
|
173
215
|
description: This library can be used as a module for `fog` or as standalone provider
|
174
216
|
to use vSphere in applications.
|
175
217
|
email:
|
@@ -178,10 +220,10 @@ executables: []
|
|
178
220
|
extensions: []
|
179
221
|
extra_rdoc_files: []
|
180
222
|
files:
|
181
|
-
- .
|
182
|
-
- .
|
183
|
-
- .
|
184
|
-
- .
|
223
|
+
- ".github/workflows/ruby.yml"
|
224
|
+
- ".gitignore"
|
225
|
+
- ".rubocop.yml"
|
226
|
+
- ".rubocop_todo.yml"
|
185
227
|
- CHANGELOG.md
|
186
228
|
- CONTRIBUTING.md
|
187
229
|
- CONTRIBUTORS.md
|
@@ -323,24 +365,23 @@ homepage: https://github.com/fog/fog-vsphere
|
|
323
365
|
licenses:
|
324
366
|
- MIT
|
325
367
|
metadata: {}
|
326
|
-
post_install_message:
|
368
|
+
post_install_message:
|
327
369
|
rdoc_options: []
|
328
370
|
require_paths:
|
329
371
|
- lib
|
330
372
|
required_ruby_version: !ruby/object:Gem::Requirement
|
331
373
|
requirements:
|
332
|
-
- -
|
374
|
+
- - ">="
|
333
375
|
- !ruby/object:Gem::Version
|
334
|
-
version: 2.
|
376
|
+
version: '2.7'
|
335
377
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
336
378
|
requirements:
|
337
|
-
- -
|
379
|
+
- - ">="
|
338
380
|
- !ruby/object:Gem::Version
|
339
381
|
version: '0'
|
340
382
|
requirements: []
|
341
|
-
|
342
|
-
|
343
|
-
signing_key:
|
383
|
+
rubygems_version: 3.3.26
|
384
|
+
signing_key:
|
344
385
|
specification_version: 4
|
345
386
|
summary: Module for the 'fog' gem to support VMware vSphere.
|
346
387
|
test_files: []
|
data/.travis.yml
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
sudo: false
|
3
|
-
matrix:
|
4
|
-
allow_failures:
|
5
|
-
- rvm: jruby-head
|
6
|
-
fast_finish: true
|
7
|
-
include:
|
8
|
-
- rvm: 2.0.0
|
9
|
-
gemfile: Gemfile
|
10
|
-
- rvm: 2.1.10
|
11
|
-
gemfile: Gemfile
|
12
|
-
- rvm: 2.2.6
|
13
|
-
gemfile: Gemfile
|
14
|
-
- rvm: 2.3.3
|
15
|
-
gemfile: Gemfile
|
16
|
-
- rvm: 2.4.0
|
17
|
-
gemfile: Gemfile
|
18
|
-
- rvm: jruby-head
|
19
|
-
gemfile: Gemfile
|
20
|
-
script: bundle exec rake travis:ci
|
21
|
-
notifications:
|
22
|
-
email:
|
23
|
-
- chrobert@redhat.com
|