kitchen-oci 1.25.0 → 1.27.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.
@@ -1,48 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- #
4
- # Author:: Justin Steele (<justin.steele@oracle.com>)
5
- #
6
- # Copyright (C) 2024, Stephen Pearson
7
- #
8
- # Licensed under the Apache License, Version 2.0 (the "License");
9
- # you may not use this file except in compliance with the License.
10
- # You may obtain a copy of the License at
11
- #
12
- # http://www.apache.org/licenses/LICENSE-2.0
13
- #
14
- # Unless required by applicable law or agreed to in writing, software
15
- # distributed under the License is distributed on an "AS IS" BASIS,
16
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- # See the License for the specific language governing permissions and
18
- # limitations under the License.
19
-
20
- module Kitchen
21
- module Driver
22
- class Oci
23
- # models definitions
24
- module Models
25
- require_relative "instance"
26
- require_relative "blockstorage"
27
-
28
- def instance_class(config, state, oci, api, action)
29
- Oci::Models.const_get(config[:instance_type].capitalize).new(config, state, oci, api, action)
30
- end
31
-
32
- def volume_class(type, config, state, oci, api)
33
- Oci::Models.const_get(volume_attachment_type(type)).new(config, state, oci, api)
34
- end
35
-
36
- private
37
-
38
- def volume_attachment_type(type)
39
- if type.nil?
40
- "Paravirtual"
41
- else
42
- type.capitalize
43
- end
44
- end
45
- end
46
- end
47
- end
48
- end