fog-kubevirt 0.1.8 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fog/compute/kubevirt.rb +64 -20
- data/lib/fog/compute/kubevirt/models/networkattachmentdef.rb +25 -0
- data/lib/fog/compute/kubevirt/models/networkattachmentdefs.rb +59 -0
- data/lib/fog/compute/kubevirt/models/pvc.rb +59 -0
- data/lib/fog/compute/kubevirt/models/pvcs.rb +76 -0
- data/lib/fog/compute/kubevirt/models/server.rb +3 -1
- data/lib/fog/compute/kubevirt/models/vm_data.rb +5 -4
- data/lib/fog/compute/kubevirt/models/vms.rb +44 -7
- data/lib/fog/compute/kubevirt/models/volume.rb +73 -0
- data/lib/fog/compute/kubevirt/models/volumes.rb +61 -0
- data/lib/fog/compute/kubevirt/requests/create_networkattachmentdef.rb +37 -0
- data/lib/fog/compute/kubevirt/requests/create_vm.rb +1 -0
- data/lib/fog/compute/kubevirt/requests/create_volume.rb +19 -0
- data/lib/fog/compute/kubevirt/requests/delete_networkattachmentdef.rb +16 -0
- data/lib/fog/compute/kubevirt/requests/delete_pvc.rb +16 -0
- data/lib/fog/compute/kubevirt/requests/delete_volume.rb +16 -0
- data/lib/fog/compute/kubevirt/requests/get_networkattachmentdef.rb +19 -0
- data/lib/fog/compute/kubevirt/requests/get_pvc.rb +16 -0
- data/lib/fog/compute/kubevirt/requests/get_vminstance.rb +4 -4
- data/lib/fog/compute/kubevirt/requests/get_volume.rb +16 -0
- data/lib/fog/compute/kubevirt/requests/list_networkattachmentdefs.rb +21 -0
- data/lib/fog/compute/kubevirt/requests/list_pvcs.rb +22 -0
- data/lib/fog/compute/kubevirt/requests/list_vms.rb +4 -4
- data/lib/fog/compute/kubevirt/requests/list_volumes.rb +22 -0
- data/lib/fog/kubevirt/version.rb +1 -1
- data/spec/compute_v1alpha2_spec.rb +1 -1
- data/spec/fixtures/kubevirt/networkattachmentdefinition/networkattachmentdefinitions_crud.yml +320 -0
- data/spec/fixtures/kubevirt/pvc/pvcs_crud.yml +316 -0
- data/spec/fixtures/kubevirt/service/services_crud.yml +316 -0
- data/spec/fixtures/kubevirt/volume/volumes_crud.yml +316 -0
- data/spec/network_attachment_definition_v1alpha2_spec.rb +28 -0
- data/spec/pvcs_v1alpha2_spec.rb +52 -0
- data/spec/shared_context.rb +2 -2
- data/spec/volumes_v1alpha2_spec.rb +45 -0
- metadata +33 -20
- data/spec/fixtures/kubevirt/service/v1alpha2/services_crud.yml +0 -172
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require_relative './shared_context'
|
3
|
+
|
4
|
+
require 'fog/kubevirt'
|
5
|
+
|
6
|
+
describe Fog::Compute do
|
7
|
+
before :all do
|
8
|
+
vcr = KubevirtVCR.new(
|
9
|
+
vcr_directory: 'spec/fixtures/kubevirt/networkattachmentdefinition',
|
10
|
+
service_class: Fog::Compute
|
11
|
+
)
|
12
|
+
@service = vcr.service
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'CRUD services' do
|
16
|
+
VCR.use_cassette('networkattachmentdefinitions_crud') do
|
17
|
+
begin
|
18
|
+
name = 'ovs-red'
|
19
|
+
config = '{ cni_version: "0.3.1", type: "ovs", bridge: "red" }'
|
20
|
+
@service.networkattachmentdefs.create(name: name, config: config)
|
21
|
+
|
22
|
+
net_att_def = @service.networkattachmentdefs.get(name)
|
23
|
+
ensure
|
24
|
+
@service.networkattachmentdefs.delete(name) if net_att_def
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require_relative './shared_context'
|
3
|
+
|
4
|
+
require 'fog/kubevirt'
|
5
|
+
|
6
|
+
describe Fog::Compute do
|
7
|
+
before :all do
|
8
|
+
vcr = KubevirtVCR.new(
|
9
|
+
vcr_directory: 'spec/fixtures/kubevirt/pvc',
|
10
|
+
service_class: Fog::Compute
|
11
|
+
)
|
12
|
+
@service = vcr.service
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'CRUD services' do
|
16
|
+
VCR.use_cassette('pvcs_crud') do
|
17
|
+
begin
|
18
|
+
name = 'my-local-storage-pvc'
|
19
|
+
namespace = 'default'
|
20
|
+
access_modes = [ 'ReadWriteOnce' ]
|
21
|
+
volume_name = 'my-local-storage'
|
22
|
+
volume_mode = 'Filesystem'
|
23
|
+
match_labels = {}
|
24
|
+
match_expressions = []
|
25
|
+
storage_class = 'manual'
|
26
|
+
requests = { storage: "2Gi" }
|
27
|
+
limits = { storage: "3Gi" }
|
28
|
+
|
29
|
+
@service.pvcs.create(name: name,
|
30
|
+
namespace: namespace,
|
31
|
+
access_modes: access_modes,
|
32
|
+
volume_name: volume_name,
|
33
|
+
volume_mode: volume_mode,
|
34
|
+
match_labels: match_labels,
|
35
|
+
match_expressions: match_expressions,
|
36
|
+
storage_class: storage_class,
|
37
|
+
limits: limits,
|
38
|
+
requests: requests)
|
39
|
+
|
40
|
+
pvc = @service.pvcs.get(name)
|
41
|
+
assert_equal(pvc.name, 'my-local-storage-pvc')
|
42
|
+
assert_equal(pvc.access_modes, [ 'ReadWriteOnce' ])
|
43
|
+
assert_equal(pvc.storage_class, 'manual')
|
44
|
+
assert_equal(pvc.volume_name, 'my-local-storage')
|
45
|
+
assert_equal(pvc.requests[:storage], '2Gi')
|
46
|
+
assert_equal(pvc.limits[:storage], '3Gi')
|
47
|
+
ensure
|
48
|
+
@service.pvcs.delete(name) if pvc
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
data/spec/shared_context.rb
CHANGED
@@ -13,7 +13,7 @@ class KubevirtVCR
|
|
13
13
|
use_recorded = !ENV.key?('KUBE_HOST') || ENV['USE_VCR'] == 'true'
|
14
14
|
if use_recorded
|
15
15
|
Fog.interval = 0
|
16
|
-
@host = "
|
16
|
+
@host = "10.8.254.82"
|
17
17
|
@port = "8443"
|
18
18
|
else
|
19
19
|
@host = ENV['KUBE_HOST']
|
@@ -35,7 +35,7 @@ class KubevirtVCR
|
|
35
35
|
end
|
36
36
|
|
37
37
|
VCR.use_cassette('common_setup') do
|
38
|
-
@token = "eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.
|
38
|
+
@token = "eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJkZWZhdWx0Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZWNyZXQubmFtZSI6Im15LWFjY291bnQtdG9rZW4ta3FsZDYiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC5uYW1lIjoibXktYWNjb3VudCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6IjJlYjVjZjU1LTFlNDUtMTFlOS1iYmZmLWZhMTYzZTM4OTEyYSIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDpkZWZhdWx0Om15LWFjY291bnQifQ.aAigSXFZapxJdFy3FwgSNc77jZYFiSTlG7D_AnHzBT1ZP69xLmrqI_oXt73NDLpecNWezjIvsCU6sLf45tfPY2RQX_aEAOXKWjFs2SxWI7GeQ-sWRt0yd1sOB9R48ipTdpNpNs5pypnTRg6dYLvtePmBWyOSN2412F9XKeM79tuO9a_ynPDjkCwsWJXGj-gX9DwpHdGK-cup0YosJ-9OpvXoWOiUNeBi1KrvJxgQwgLytJk3PHFnJHv4mCNALvvo1cu89_ENwUQrvok267ACeq53YsivYn7B0QWuZoX3ca4Bx14kEdXbd-9BvIEBZzVovH2ZvPTYMmyXgnpO7c1eOw"
|
39
39
|
|
40
40
|
unless use_recorded
|
41
41
|
@token = ENV['KUBE_TOKEN'] || options[:token] || @token
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require_relative './shared_context'
|
3
|
+
|
4
|
+
require 'fog/kubevirt'
|
5
|
+
|
6
|
+
describe Fog::Compute do
|
7
|
+
before :all do
|
8
|
+
vcr = KubevirtVCR.new(
|
9
|
+
vcr_directory: 'spec/fixtures/kubevirt/volume',
|
10
|
+
service_class: Fog::Compute
|
11
|
+
)
|
12
|
+
@service = vcr.service
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'CRUD services' do
|
16
|
+
VCR.use_cassette('volumes_crud') do
|
17
|
+
begin
|
18
|
+
name = 'my-local-storage'
|
19
|
+
access_modes = [ 'ReadWriteOnce' ]
|
20
|
+
capacity = '1Gi'
|
21
|
+
labels = { type: 'local' }
|
22
|
+
storage_class = 'manual'
|
23
|
+
type = 'hostPath'
|
24
|
+
config = { path: "/mnt/data/datax", type: "Directory" }
|
25
|
+
|
26
|
+
@service.volumes.create(name: name,
|
27
|
+
access_modes: access_modes,
|
28
|
+
capacity: capacity,
|
29
|
+
labels: labels,
|
30
|
+
storage_class: storage_class,
|
31
|
+
type: type,
|
32
|
+
config: config)
|
33
|
+
|
34
|
+
volume = @service.volumes.get(name)
|
35
|
+
assert_equal(volume.name, 'my-local-storage')
|
36
|
+
assert_equal(volume.access_modes, [ 'ReadWriteOnce' ])
|
37
|
+
assert_equal(volume.capacity, '1Gi')
|
38
|
+
assert_equal(volume.storage_class, 'manual')
|
39
|
+
assert_equal(volume.type, 'hostPath')
|
40
|
+
ensure
|
41
|
+
@service.volumes.delete(name) if volume
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-kubevirt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Kliczewski
|
@@ -12,22 +12,8 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2019-01-23 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
|
-
- !ruby/object:Gem::Dependency
|
18
|
-
name: bundler
|
19
|
-
requirement: !ruby/object:Gem::Requirement
|
20
|
-
requirements:
|
21
|
-
- - "~>"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: '1.3'
|
24
|
-
type: :development
|
25
|
-
prerelease: false
|
26
|
-
version_requirements: !ruby/object:Gem::Requirement
|
27
|
-
requirements:
|
28
|
-
- - "~>"
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
version: '1.3'
|
31
17
|
- !ruby/object:Gem::Dependency
|
32
18
|
name: minitest
|
33
19
|
requirement: !ruby/object:Gem::Requirement
|
@@ -132,14 +118,14 @@ dependencies:
|
|
132
118
|
requirements:
|
133
119
|
- - "~>"
|
134
120
|
- !ruby/object:Gem::Version
|
135
|
-
version: 4.1.
|
121
|
+
version: 4.1.2
|
136
122
|
type: :runtime
|
137
123
|
prerelease: false
|
138
124
|
version_requirements: !ruby/object:Gem::Requirement
|
139
125
|
requirements:
|
140
126
|
- - "~>"
|
141
127
|
- !ruby/object:Gem::Version
|
142
|
-
version: 4.1.
|
128
|
+
version: 4.1.2
|
143
129
|
description: This library can be used as a module for `fog`.
|
144
130
|
email:
|
145
131
|
- piotr.kliczewski@gmail.com
|
@@ -155,8 +141,12 @@ files:
|
|
155
141
|
- README.md
|
156
142
|
- lib/fog/bin/kubevirt.rb
|
157
143
|
- lib/fog/compute/kubevirt.rb
|
144
|
+
- lib/fog/compute/kubevirt/models/networkattachmentdef.rb
|
145
|
+
- lib/fog/compute/kubevirt/models/networkattachmentdefs.rb
|
158
146
|
- lib/fog/compute/kubevirt/models/node.rb
|
159
147
|
- lib/fog/compute/kubevirt/models/nodes.rb
|
148
|
+
- lib/fog/compute/kubevirt/models/pvc.rb
|
149
|
+
- lib/fog/compute/kubevirt/models/pvcs.rb
|
160
150
|
- lib/fog/compute/kubevirt/models/server.rb
|
161
151
|
- lib/fog/compute/kubevirt/models/servers.rb
|
162
152
|
- lib/fog/compute/kubevirt/models/service.rb
|
@@ -171,32 +161,49 @@ files:
|
|
171
161
|
- lib/fog/compute/kubevirt/models/vms.rb
|
172
162
|
- lib/fog/compute/kubevirt/models/volume.rb
|
173
163
|
- lib/fog/compute/kubevirt/models/volumes.rb
|
164
|
+
- lib/fog/compute/kubevirt/requests/create_networkattachmentdef.rb
|
174
165
|
- lib/fog/compute/kubevirt/requests/create_pvc.rb
|
175
166
|
- lib/fog/compute/kubevirt/requests/create_service.rb
|
176
167
|
- lib/fog/compute/kubevirt/requests/create_vm.rb
|
177
168
|
- lib/fog/compute/kubevirt/requests/create_vminstance.rb
|
169
|
+
- lib/fog/compute/kubevirt/requests/create_volume.rb
|
170
|
+
- lib/fog/compute/kubevirt/requests/delete_networkattachmentdef.rb
|
171
|
+
- lib/fog/compute/kubevirt/requests/delete_pvc.rb
|
178
172
|
- lib/fog/compute/kubevirt/requests/delete_service.rb
|
179
173
|
- lib/fog/compute/kubevirt/requests/delete_vm.rb
|
180
174
|
- lib/fog/compute/kubevirt/requests/delete_vminstance.rb
|
175
|
+
- lib/fog/compute/kubevirt/requests/delete_volume.rb
|
176
|
+
- lib/fog/compute/kubevirt/requests/get_networkattachmentdef.rb
|
181
177
|
- lib/fog/compute/kubevirt/requests/get_node.rb
|
178
|
+
- lib/fog/compute/kubevirt/requests/get_pvc.rb
|
182
179
|
- lib/fog/compute/kubevirt/requests/get_server.rb
|
183
180
|
- lib/fog/compute/kubevirt/requests/get_service.rb
|
184
181
|
- lib/fog/compute/kubevirt/requests/get_template.rb
|
185
182
|
- lib/fog/compute/kubevirt/requests/get_vm.rb
|
186
183
|
- lib/fog/compute/kubevirt/requests/get_vminstance.rb
|
184
|
+
- lib/fog/compute/kubevirt/requests/get_volume.rb
|
185
|
+
- lib/fog/compute/kubevirt/requests/list_networkattachmentdefs.rb
|
187
186
|
- lib/fog/compute/kubevirt/requests/list_nodes.rb
|
187
|
+
- lib/fog/compute/kubevirt/requests/list_pvcs.rb
|
188
188
|
- lib/fog/compute/kubevirt/requests/list_servers.rb
|
189
189
|
- lib/fog/compute/kubevirt/requests/list_services.rb
|
190
190
|
- lib/fog/compute/kubevirt/requests/list_templates.rb
|
191
191
|
- lib/fog/compute/kubevirt/requests/list_vminstances.rb
|
192
192
|
- lib/fog/compute/kubevirt/requests/list_vms.rb
|
193
|
+
- lib/fog/compute/kubevirt/requests/list_volumes.rb
|
193
194
|
- lib/fog/compute/kubevirt/requests/update_vm.rb
|
194
195
|
- lib/fog/kubevirt.rb
|
195
196
|
- lib/fog/kubevirt/version.rb
|
196
197
|
- spec/compute_v1alpha2_spec.rb
|
197
|
-
- spec/fixtures/kubevirt/
|
198
|
+
- spec/fixtures/kubevirt/networkattachmentdefinition/networkattachmentdefinitions_crud.yml
|
199
|
+
- spec/fixtures/kubevirt/pvc/pvcs_crud.yml
|
200
|
+
- spec/fixtures/kubevirt/service/services_crud.yml
|
201
|
+
- spec/fixtures/kubevirt/volume/volumes_crud.yml
|
202
|
+
- spec/network_attachment_definition_v1alpha2_spec.rb
|
203
|
+
- spec/pvcs_v1alpha2_spec.rb
|
198
204
|
- spec/shared_context.rb
|
199
205
|
- spec/spec_helper.rb
|
206
|
+
- spec/volumes_v1alpha2_spec.rb
|
200
207
|
homepage: https://github.com/pkliczewski/fog-kubevirt
|
201
208
|
licenses:
|
202
209
|
- Apache-2.0
|
@@ -223,6 +230,12 @@ specification_version: 4
|
|
223
230
|
summary: Module for the 'fog' gem to support Kubevirt.
|
224
231
|
test_files:
|
225
232
|
- spec/compute_v1alpha2_spec.rb
|
226
|
-
- spec/fixtures/kubevirt/
|
233
|
+
- spec/fixtures/kubevirt/networkattachmentdefinition/networkattachmentdefinitions_crud.yml
|
234
|
+
- spec/fixtures/kubevirt/pvc/pvcs_crud.yml
|
235
|
+
- spec/fixtures/kubevirt/service/services_crud.yml
|
236
|
+
- spec/fixtures/kubevirt/volume/volumes_crud.yml
|
237
|
+
- spec/network_attachment_definition_v1alpha2_spec.rb
|
238
|
+
- spec/pvcs_v1alpha2_spec.rb
|
227
239
|
- spec/shared_context.rb
|
228
240
|
- spec/spec_helper.rb
|
241
|
+
- spec/volumes_v1alpha2_spec.rb
|
@@ -1,172 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://192.168.122.51:8443/api/v1
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
Accept:
|
11
|
-
- "*/*"
|
12
|
-
Accept-Encoding:
|
13
|
-
- gzip, deflate
|
14
|
-
User-Agent:
|
15
|
-
- rest-client/2.0.2 (linux-gnu x86_64) ruby/2.4.2p198
|
16
|
-
Authorization:
|
17
|
-
- Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJrdWJldmlydC1wcml2aWxlZ2VkLXRva2VuLW1xN252Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6Imt1YmV2aXJ0LXByaXZpbGVnZWQiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiJjNGQyODA4MS1jZDNlLTExZTgtOGYzYy1hYzAxYzZkMzhmZWIiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6a3ViZS1zeXN0ZW06a3ViZXZpcnQtcHJpdmlsZWdlZCJ9.BUBWJi9a_A_rOrsiil7wEqxxdDOtpYt9M42HHdQr0JQ5Y2ES5xI2yecpdXPypfX4wa-8blj7xJyU3EZCSTUUX2Z-KXoYieYr6sKB-umYiK4MR4eSiBFL8J0QP_2zxZleUOAuAT8JZCHh7JbccUM0ebOtNPBCVDPb_j-zSsuSISBtayGzTzo7RgkyyO_2NfyYBv1b3gxlznGsWuqw6Kw01OE5Xs7EIDAbGn6Z51NUU3fE_UGZg5588z_WurEV_tJhfDGBIuIsWaJHHTmwnQ6kll4nWaqV5r3NlrSmk_z5m14rlmDRf2G-oTMkFlHgDjTbkZeUF8G0TT4FShQzrWSFhA
|
18
|
-
response:
|
19
|
-
status:
|
20
|
-
code: 200
|
21
|
-
message: OK
|
22
|
-
headers:
|
23
|
-
Content-Type:
|
24
|
-
- application/json
|
25
|
-
Date:
|
26
|
-
- Tue, 16 Oct 2018 13:50:16 GMT
|
27
|
-
Transfer-Encoding:
|
28
|
-
- chunked
|
29
|
-
body:
|
30
|
-
encoding: UTF-8
|
31
|
-
string: '{"kind":"APIResourceList","groupVersion":"v1","resources":[{"name":"bindings","singularName":"","namespaced":true,"kind":"Binding","verbs":["create"]},{"name":"componentstatuses","singularName":"","namespaced":false,"kind":"ComponentStatus","verbs":["get","list"],"shortNames":["cs"]},{"name":"configmaps","singularName":"","namespaced":true,"kind":"ConfigMap","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["cm"]},{"name":"endpoints","singularName":"","namespaced":true,"kind":"Endpoints","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["ep"]},{"name":"events","singularName":"","namespaced":true,"kind":"Event","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["ev"]},{"name":"limitranges","singularName":"","namespaced":true,"kind":"LimitRange","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["limits"]},{"name":"namespaces","singularName":"","namespaced":false,"kind":"Namespace","verbs":["create","delete","get","list","patch","update","watch"],"shortNames":["ns"]},{"name":"namespaces/finalize","singularName":"","namespaced":false,"kind":"Namespace","verbs":["update"]},{"name":"namespaces/status","singularName":"","namespaced":false,"kind":"Namespace","verbs":["get","patch","update"]},{"name":"nodes","singularName":"","namespaced":false,"kind":"Node","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["no"]},{"name":"nodes/proxy","singularName":"","namespaced":false,"kind":"Node","verbs":[]},{"name":"nodes/status","singularName":"","namespaced":false,"kind":"Node","verbs":["get","patch","update"]},{"name":"persistentvolumeclaims","singularName":"","namespaced":true,"kind":"PersistentVolumeClaim","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["pvc"]},{"name":"persistentvolumeclaims/status","singularName":"","namespaced":true,"kind":"PersistentVolumeClaim","verbs":["get","patch","update"]},{"name":"persistentvolumes","singularName":"","namespaced":false,"kind":"PersistentVolume","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["pv"]},{"name":"persistentvolumes/status","singularName":"","namespaced":false,"kind":"PersistentVolume","verbs":["get","patch","update"]},{"name":"pods","singularName":"","namespaced":true,"kind":"Pod","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["po"],"categories":["all"]},{"name":"pods/attach","singularName":"","namespaced":true,"kind":"Pod","verbs":[]},{"name":"pods/binding","singularName":"","namespaced":true,"kind":"Binding","verbs":["create"]},{"name":"pods/eviction","singularName":"","namespaced":true,"group":"policy","version":"v1beta1","kind":"Eviction","verbs":["create"]},{"name":"pods/exec","singularName":"","namespaced":true,"kind":"Pod","verbs":[]},{"name":"pods/log","singularName":"","namespaced":true,"kind":"Pod","verbs":["get"]},{"name":"pods/portforward","singularName":"","namespaced":true,"kind":"Pod","verbs":[]},{"name":"pods/proxy","singularName":"","namespaced":true,"kind":"Pod","verbs":[]},{"name":"pods/status","singularName":"","namespaced":true,"kind":"Pod","verbs":["get","patch","update"]},{"name":"podtemplates","singularName":"","namespaced":true,"kind":"PodTemplate","verbs":["create","delete","deletecollection","get","list","patch","update","watch"]},{"name":"replicationcontrollers","singularName":"","namespaced":true,"kind":"ReplicationController","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["rc"],"categories":["all"]},{"name":"replicationcontrollers/scale","singularName":"","namespaced":true,"group":"autoscaling","version":"v1","kind":"Scale","verbs":["get","patch","update"]},{"name":"replicationcontrollers/status","singularName":"","namespaced":true,"kind":"ReplicationController","verbs":["get","patch","update"]},{"name":"resourcequotas","singularName":"","namespaced":true,"kind":"ResourceQuota","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["quota"]},{"name":"resourcequotas/status","singularName":"","namespaced":true,"kind":"ResourceQuota","verbs":["get","patch","update"]},{"name":"secrets","singularName":"","namespaced":true,"kind":"Secret","verbs":["create","delete","deletecollection","get","list","patch","update","watch"]},{"name":"serviceaccounts","singularName":"","namespaced":true,"kind":"ServiceAccount","verbs":["create","delete","deletecollection","get","list","patch","update","watch"],"shortNames":["sa"]},{"name":"services","singularName":"","namespaced":true,"kind":"Service","verbs":["create","delete","get","list","patch","update","watch"],"shortNames":["svc"],"categories":["all"]},{"name":"services/proxy","singularName":"","namespaced":true,"kind":"Service","verbs":[]},{"name":"services/status","singularName":"","namespaced":true,"kind":"Service","verbs":["get","patch","update"]}]}
|
32
|
-
|
33
|
-
'
|
34
|
-
http_version:
|
35
|
-
recorded_at: Tue, 16 Oct 2018 13:50:16 GMT
|
36
|
-
- request:
|
37
|
-
method: post
|
38
|
-
uri: https://192.168.122.51:8443/api/v1/namespaces/default/services
|
39
|
-
body:
|
40
|
-
encoding: UTF-8
|
41
|
-
string: '{"apiVersion":"v1","kind":"Service","metadata":{"name":"vmi-fedora-ssh","namespace":"default"},"spec":{"externalTrafficPolicy":"Cluster","ports":[{"nodePort":30000,"port":30000,"protocol":"TCP","targetPort":22}],"selector":{"kubevirt.io/vm":"vmi-fedora"},"type":"NodePort"}}'
|
42
|
-
headers:
|
43
|
-
Accept:
|
44
|
-
- "*/*"
|
45
|
-
Accept-Encoding:
|
46
|
-
- gzip, deflate
|
47
|
-
User-Agent:
|
48
|
-
- rest-client/2.0.2 (linux-gnu x86_64) ruby/2.4.2p198
|
49
|
-
Content-Type:
|
50
|
-
- application/json
|
51
|
-
Authorization:
|
52
|
-
- Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJrdWJldmlydC1wcml2aWxlZ2VkLXRva2VuLW1xN252Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6Imt1YmV2aXJ0LXByaXZpbGVnZWQiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiJjNGQyODA4MS1jZDNlLTExZTgtOGYzYy1hYzAxYzZkMzhmZWIiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6a3ViZS1zeXN0ZW06a3ViZXZpcnQtcHJpdmlsZWdlZCJ9.BUBWJi9a_A_rOrsiil7wEqxxdDOtpYt9M42HHdQr0JQ5Y2ES5xI2yecpdXPypfX4wa-8blj7xJyU3EZCSTUUX2Z-KXoYieYr6sKB-umYiK4MR4eSiBFL8J0QP_2zxZleUOAuAT8JZCHh7JbccUM0ebOtNPBCVDPb_j-zSsuSISBtayGzTzo7RgkyyO_2NfyYBv1b3gxlznGsWuqw6Kw01OE5Xs7EIDAbGn6Z51NUU3fE_UGZg5588z_WurEV_tJhfDGBIuIsWaJHHTmwnQ6kll4nWaqV5r3NlrSmk_z5m14rlmDRf2G-oTMkFlHgDjTbkZeUF8G0TT4FShQzrWSFhA
|
53
|
-
Content-Length:
|
54
|
-
- '274'
|
55
|
-
response:
|
56
|
-
status:
|
57
|
-
code: 201
|
58
|
-
message: Created
|
59
|
-
headers:
|
60
|
-
Content-Type:
|
61
|
-
- application/json
|
62
|
-
Date:
|
63
|
-
- Tue, 16 Oct 2018 13:50:16 GMT
|
64
|
-
Content-Length:
|
65
|
-
- '537'
|
66
|
-
body:
|
67
|
-
encoding: UTF-8
|
68
|
-
string: '{"kind":"Service","apiVersion":"v1","metadata":{"name":"vmi-fedora-ssh","namespace":"default","selfLink":"/api/v1/namespaces/default/services/vmi-fedora-ssh","uid":"69d29943-d14a-11e8-8f3c-ac01c6d38feb","resourceVersion":"165889","creationTimestamp":"2018-10-16T13:50:16Z"},"spec":{"ports":[{"protocol":"TCP","port":30000,"targetPort":22,"nodePort":30000}],"selector":{"kubevirt.io/vm":"vmi-fedora"},"clusterIP":"10.108.204.151","type":"NodePort","sessionAffinity":"None","externalTrafficPolicy":"Cluster"},"status":{"loadBalancer":{}}}
|
69
|
-
|
70
|
-
'
|
71
|
-
http_version:
|
72
|
-
recorded_at: Tue, 16 Oct 2018 13:50:16 GMT
|
73
|
-
- request:
|
74
|
-
method: get
|
75
|
-
uri: https://192.168.122.51:8443/api/v1/namespaces/default/services/vmi-fedora-ssh
|
76
|
-
body:
|
77
|
-
encoding: US-ASCII
|
78
|
-
string: ''
|
79
|
-
headers:
|
80
|
-
Accept:
|
81
|
-
- "*/*"
|
82
|
-
Accept-Encoding:
|
83
|
-
- gzip, deflate
|
84
|
-
User-Agent:
|
85
|
-
- rest-client/2.0.2 (linux-gnu x86_64) ruby/2.4.2p198
|
86
|
-
Authorization:
|
87
|
-
- Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJrdWJldmlydC1wcml2aWxlZ2VkLXRva2VuLW1xN252Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6Imt1YmV2aXJ0LXByaXZpbGVnZWQiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiJjNGQyODA4MS1jZDNlLTExZTgtOGYzYy1hYzAxYzZkMzhmZWIiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6a3ViZS1zeXN0ZW06a3ViZXZpcnQtcHJpdmlsZWdlZCJ9.BUBWJi9a_A_rOrsiil7wEqxxdDOtpYt9M42HHdQr0JQ5Y2ES5xI2yecpdXPypfX4wa-8blj7xJyU3EZCSTUUX2Z-KXoYieYr6sKB-umYiK4MR4eSiBFL8J0QP_2zxZleUOAuAT8JZCHh7JbccUM0ebOtNPBCVDPb_j-zSsuSISBtayGzTzo7RgkyyO_2NfyYBv1b3gxlznGsWuqw6Kw01OE5Xs7EIDAbGn6Z51NUU3fE_UGZg5588z_WurEV_tJhfDGBIuIsWaJHHTmwnQ6kll4nWaqV5r3NlrSmk_z5m14rlmDRf2G-oTMkFlHgDjTbkZeUF8G0TT4FShQzrWSFhA
|
88
|
-
response:
|
89
|
-
status:
|
90
|
-
code: 200
|
91
|
-
message: OK
|
92
|
-
headers:
|
93
|
-
Content-Type:
|
94
|
-
- application/json
|
95
|
-
Date:
|
96
|
-
- Tue, 16 Oct 2018 13:50:16 GMT
|
97
|
-
Content-Length:
|
98
|
-
- '537'
|
99
|
-
body:
|
100
|
-
encoding: UTF-8
|
101
|
-
string: '{"kind":"Service","apiVersion":"v1","metadata":{"name":"vmi-fedora-ssh","namespace":"default","selfLink":"/api/v1/namespaces/default/services/vmi-fedora-ssh","uid":"69d29943-d14a-11e8-8f3c-ac01c6d38feb","resourceVersion":"165889","creationTimestamp":"2018-10-16T13:50:16Z"},"spec":{"ports":[{"protocol":"TCP","port":30000,"targetPort":22,"nodePort":30000}],"selector":{"kubevirt.io/vm":"vmi-fedora"},"clusterIP":"10.108.204.151","type":"NodePort","sessionAffinity":"None","externalTrafficPolicy":"Cluster"},"status":{"loadBalancer":{}}}
|
102
|
-
|
103
|
-
'
|
104
|
-
http_version:
|
105
|
-
recorded_at: Tue, 16 Oct 2018 13:50:16 GMT
|
106
|
-
- request:
|
107
|
-
method: get
|
108
|
-
uri: https://192.168.122.51:8443/api/v1/namespaces/default/services/vmi-fedora-ssh
|
109
|
-
body:
|
110
|
-
encoding: US-ASCII
|
111
|
-
string: ''
|
112
|
-
headers:
|
113
|
-
Accept:
|
114
|
-
- "*/*"
|
115
|
-
Accept-Encoding:
|
116
|
-
- gzip, deflate
|
117
|
-
User-Agent:
|
118
|
-
- rest-client/2.0.2 (linux-gnu x86_64) ruby/2.4.2p198
|
119
|
-
Authorization:
|
120
|
-
- Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJrdWJldmlydC1wcml2aWxlZ2VkLXRva2VuLW1xN252Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6Imt1YmV2aXJ0LXByaXZpbGVnZWQiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiJjNGQyODA4MS1jZDNlLTExZTgtOGYzYy1hYzAxYzZkMzhmZWIiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6a3ViZS1zeXN0ZW06a3ViZXZpcnQtcHJpdmlsZWdlZCJ9.BUBWJi9a_A_rOrsiil7wEqxxdDOtpYt9M42HHdQr0JQ5Y2ES5xI2yecpdXPypfX4wa-8blj7xJyU3EZCSTUUX2Z-KXoYieYr6sKB-umYiK4MR4eSiBFL8J0QP_2zxZleUOAuAT8JZCHh7JbccUM0ebOtNPBCVDPb_j-zSsuSISBtayGzTzo7RgkyyO_2NfyYBv1b3gxlznGsWuqw6Kw01OE5Xs7EIDAbGn6Z51NUU3fE_UGZg5588z_WurEV_tJhfDGBIuIsWaJHHTmwnQ6kll4nWaqV5r3NlrSmk_z5m14rlmDRf2G-oTMkFlHgDjTbkZeUF8G0TT4FShQzrWSFhA
|
121
|
-
response:
|
122
|
-
status:
|
123
|
-
code: 200
|
124
|
-
message: OK
|
125
|
-
headers:
|
126
|
-
Content-Type:
|
127
|
-
- application/json
|
128
|
-
Date:
|
129
|
-
- Tue, 16 Oct 2018 13:50:16 GMT
|
130
|
-
Content-Length:
|
131
|
-
- '537'
|
132
|
-
body:
|
133
|
-
encoding: UTF-8
|
134
|
-
string: '{"kind":"Service","apiVersion":"v1","metadata":{"name":"vmi-fedora-ssh","namespace":"default","selfLink":"/api/v1/namespaces/default/services/vmi-fedora-ssh","uid":"69d29943-d14a-11e8-8f3c-ac01c6d38feb","resourceVersion":"165889","creationTimestamp":"2018-10-16T13:50:16Z"},"spec":{"ports":[{"protocol":"TCP","port":30000,"targetPort":22,"nodePort":30000}],"selector":{"kubevirt.io/vm":"vmi-fedora"},"clusterIP":"10.108.204.151","type":"NodePort","sessionAffinity":"None","externalTrafficPolicy":"Cluster"},"status":{"loadBalancer":{}}}
|
135
|
-
|
136
|
-
'
|
137
|
-
http_version:
|
138
|
-
recorded_at: Tue, 16 Oct 2018 13:50:16 GMT
|
139
|
-
- request:
|
140
|
-
method: delete
|
141
|
-
uri: https://192.168.122.51:8443/api/v1/namespaces/default/services/vmi-fedora-ssh
|
142
|
-
body:
|
143
|
-
encoding: US-ASCII
|
144
|
-
string: ''
|
145
|
-
headers:
|
146
|
-
Accept:
|
147
|
-
- "*/*"
|
148
|
-
Accept-Encoding:
|
149
|
-
- gzip, deflate
|
150
|
-
User-Agent:
|
151
|
-
- rest-client/2.0.2 (linux-gnu x86_64) ruby/2.4.2p198
|
152
|
-
Authorization:
|
153
|
-
- Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJrdWJldmlydC1wcml2aWxlZ2VkLXRva2VuLW1xN252Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6Imt1YmV2aXJ0LXByaXZpbGVnZWQiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiJjNGQyODA4MS1jZDNlLTExZTgtOGYzYy1hYzAxYzZkMzhmZWIiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6a3ViZS1zeXN0ZW06a3ViZXZpcnQtcHJpdmlsZWdlZCJ9.BUBWJi9a_A_rOrsiil7wEqxxdDOtpYt9M42HHdQr0JQ5Y2ES5xI2yecpdXPypfX4wa-8blj7xJyU3EZCSTUUX2Z-KXoYieYr6sKB-umYiK4MR4eSiBFL8J0QP_2zxZleUOAuAT8JZCHh7JbccUM0ebOtNPBCVDPb_j-zSsuSISBtayGzTzo7RgkyyO_2NfyYBv1b3gxlznGsWuqw6Kw01OE5Xs7EIDAbGn6Z51NUU3fE_UGZg5588z_WurEV_tJhfDGBIuIsWaJHHTmwnQ6kll4nWaqV5r3NlrSmk_z5m14rlmDRf2G-oTMkFlHgDjTbkZeUF8G0TT4FShQzrWSFhA
|
154
|
-
response:
|
155
|
-
status:
|
156
|
-
code: 200
|
157
|
-
message: OK
|
158
|
-
headers:
|
159
|
-
Content-Type:
|
160
|
-
- application/json
|
161
|
-
Date:
|
162
|
-
- Tue, 16 Oct 2018 13:50:16 GMT
|
163
|
-
Content-Length:
|
164
|
-
- '168'
|
165
|
-
body:
|
166
|
-
encoding: UTF-8
|
167
|
-
string: '{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Success","details":{"name":"vmi-fedora-ssh","kind":"services","uid":"69d29943-d14a-11e8-8f3c-ac01c6d38feb"}}
|
168
|
-
|
169
|
-
'
|
170
|
-
http_version:
|
171
|
-
recorded_at: Tue, 16 Oct 2018 13:50:16 GMT
|
172
|
-
recorded_with: VCR 3.0.3
|