ibm_cloud_resource_controller 1.0.1
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 +7 -0
- data/Gemfile +9 -0
- data/README.md +148 -0
- data/Rakefile +10 -0
- data/docs/Credentials.md +25 -0
- data/docs/ErrorReport.md +23 -0
- data/docs/PlanHistoryItem.md +19 -0
- data/docs/Reclamation.md +45 -0
- data/docs/ReclamationActionsPost.md +19 -0
- data/docs/ReclamationsList.md +17 -0
- data/docs/ResourceAlias.md +57 -0
- data/docs/ResourceAliasPatch.md +17 -0
- data/docs/ResourceAliasPost.md +21 -0
- data/docs/ResourceAliasesApi.md +302 -0
- data/docs/ResourceAliasesList.md +21 -0
- data/docs/ResourceBinding.md +57 -0
- data/docs/ResourceBindingPatch.md +17 -0
- data/docs/ResourceBindingPost.md +25 -0
- data/docs/ResourceBindingPostParameters.md +17 -0
- data/docs/ResourceBindingsApi.md +300 -0
- data/docs/ResourceBindingsList.md +21 -0
- data/docs/ResourceInstance.md +81 -0
- data/docs/ResourceInstancePatch.md +23 -0
- data/docs/ResourceInstancePost.md +29 -0
- data/docs/ResourceInstancesApi.md +418 -0
- data/docs/ResourceInstancesList.md +21 -0
- data/docs/ResourceKey.md +53 -0
- data/docs/ResourceKeyPatch.md +17 -0
- data/docs/ResourceKeyPost.md +23 -0
- data/docs/ResourceKeysApi.md +298 -0
- data/docs/ResourceKeysList.md +21 -0
- data/docs/ResourceReclamationsApi.md +128 -0
- data/git_push.sh +58 -0
- data/ibm_cloud_resource_controller.gemspec +38 -0
- data/lib/ibm_cloud_resource_controller.rb +67 -0
- data/lib/ibm_cloud_resource_controller/api/resource_aliases_api.rb +363 -0
- data/lib/ibm_cloud_resource_controller/api/resource_bindings_api.rb +360 -0
- data/lib/ibm_cloud_resource_controller/api/resource_instances_api.rb +493 -0
- data/lib/ibm_cloud_resource_controller/api/resource_keys_api.rb +357 -0
- data/lib/ibm_cloud_resource_controller/api/resource_reclamations_api.rb +156 -0
- data/lib/ibm_cloud_resource_controller/api_client.rb +388 -0
- data/lib/ibm_cloud_resource_controller/api_error.rb +57 -0
- data/lib/ibm_cloud_resource_controller/configuration.rb +248 -0
- data/lib/ibm_cloud_resource_controller/models/credentials.rb +250 -0
- data/lib/ibm_cloud_resource_controller/models/error_report.rb +240 -0
- data/lib/ibm_cloud_resource_controller/models/plan_history_item.rb +230 -0
- data/lib/ibm_cloud_resource_controller/models/reclamation.rb +352 -0
- data/lib/ibm_cloud_resource_controller/models/reclamation_actions_post.rb +220 -0
- data/lib/ibm_cloud_resource_controller/models/reclamations_list.rb +212 -0
- data/lib/ibm_cloud_resource_controller/models/resource_alias.rb +410 -0
- data/lib/ibm_cloud_resource_controller/models/resource_alias_patch.rb +236 -0
- data/lib/ibm_cloud_resource_controller/models/resource_alias_post.rb +266 -0
- data/lib/ibm_cloud_resource_controller/models/resource_aliases_list.rb +247 -0
- data/lib/ibm_cloud_resource_controller/models/resource_binding.rb +410 -0
- data/lib/ibm_cloud_resource_controller/models/resource_binding_patch.rb +236 -0
- data/lib/ibm_cloud_resource_controller/models/resource_binding_post.rb +278 -0
- data/lib/ibm_cloud_resource_controller/models/resource_binding_post_parameters.rb +210 -0
- data/lib/ibm_cloud_resource_controller/models/resource_bindings_list.rb +247 -0
- data/lib/ibm_cloud_resource_controller/models/resource_instance.rb +536 -0
- data/lib/ibm_cloud_resource_controller/models/resource_instance_patch.rb +259 -0
- data/lib/ibm_cloud_resource_controller/models/resource_instance_post.rb +317 -0
- data/lib/ibm_cloud_resource_controller/models/resource_instances_list.rb +247 -0
- data/lib/ibm_cloud_resource_controller/models/resource_key.rb +390 -0
- data/lib/ibm_cloud_resource_controller/models/resource_key_patch.rb +236 -0
- data/lib/ibm_cloud_resource_controller/models/resource_key_post.rb +251 -0
- data/lib/ibm_cloud_resource_controller/models/resource_keys_list.rb +247 -0
- data/lib/ibm_cloud_resource_controller/version.rb +15 -0
- data/spec/api/resource_aliases_api_spec.rb +104 -0
- data/spec/api/resource_bindings_api_spec.rb +103 -0
- data/spec/api/resource_instances_api_spec.rb +130 -0
- data/spec/api/resource_keys_api_spec.rb +102 -0
- data/spec/api/resource_reclamations_api_spec.rb +62 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/credentials_spec.rb +65 -0
- data/spec/models/error_report_spec.rb +59 -0
- data/spec/models/plan_history_item_spec.rb +47 -0
- data/spec/models/reclamation_actions_post_spec.rb +47 -0
- data/spec/models/reclamation_spec.rb +125 -0
- data/spec/models/reclamations_list_spec.rb +41 -0
- data/spec/models/resource_alias_patch_spec.rb +41 -0
- data/spec/models/resource_alias_post_spec.rb +53 -0
- data/spec/models/resource_alias_spec.rb +143 -0
- data/spec/models/resource_aliases_list_spec.rb +53 -0
- data/spec/models/resource_binding_patch_spec.rb +41 -0
- data/spec/models/resource_binding_post_parameters_spec.rb +41 -0
- data/spec/models/resource_binding_post_spec.rb +65 -0
- data/spec/models/resource_binding_spec.rb +137 -0
- data/spec/models/resource_bindings_list_spec.rb +53 -0
- data/spec/models/resource_instance_patch_spec.rb +59 -0
- data/spec/models/resource_instance_post_spec.rb +77 -0
- data/spec/models/resource_instance_spec.rb +191 -0
- data/spec/models/resource_instances_list_spec.rb +53 -0
- data/spec/models/resource_key_patch_spec.rb +41 -0
- data/spec/models/resource_key_post_spec.rb +59 -0
- data/spec/models/resource_key_spec.rb +125 -0
- data/spec/models/resource_keys_list_spec.rb +53 -0
- data/spec/spec_helper.rb +111 -0
- metadata +211 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#IBM Cloud Resource Controller API
|
|
3
|
+
|
|
4
|
+
#Manage lifecycle of your Cloud resources using Resource Controller APIs. Resources are provisioned globally in an account scope. Supports asynchronous provisioning of resources. Enables consumption of a global resource through a Cloud Foundry space in any region.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 5.0.0-beta2
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module IbmCloudResourceController
|
|
16
|
+
# A list of resource keys.
|
|
17
|
+
class ResourceKeysList
|
|
18
|
+
# The URL for requesting the next page of results.
|
|
19
|
+
attr_accessor :next_url
|
|
20
|
+
|
|
21
|
+
# A list of resource keys.
|
|
22
|
+
attr_accessor :resources
|
|
23
|
+
|
|
24
|
+
# The number of resource keys in `resources`.
|
|
25
|
+
attr_accessor :rows_count
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'next_url' => :'next_url',
|
|
31
|
+
:'resources' => :'resources',
|
|
32
|
+
:'rows_count' => :'rows_count'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Attribute type mapping.
|
|
37
|
+
def self.openapi_types
|
|
38
|
+
{
|
|
39
|
+
:'next_url' => :'String',
|
|
40
|
+
:'resources' => :'Array<ResourceKey>',
|
|
41
|
+
:'rows_count' => :'Integer'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `IbmCloudResourceController::ResourceKeysList` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `IbmCloudResourceController::ResourceKeysList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'next_url')
|
|
67
|
+
self.next_url = attributes[:'next_url']
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'resources')
|
|
71
|
+
if (value = attributes[:'resources']).is_a?(Array)
|
|
72
|
+
self.resources = value
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'rows_count')
|
|
77
|
+
self.rows_count = attributes[:'rows_count']
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
82
|
+
# @return Array for valid properties with the reasons
|
|
83
|
+
def list_invalid_properties
|
|
84
|
+
invalid_properties = Array.new
|
|
85
|
+
if @next_url.nil?
|
|
86
|
+
invalid_properties.push('invalid value for "next_url", next_url cannot be nil.')
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if @resources.nil?
|
|
90
|
+
invalid_properties.push('invalid value for "resources", resources cannot be nil.')
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if @rows_count.nil?
|
|
94
|
+
invalid_properties.push('invalid value for "rows_count", rows_count cannot be nil.')
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
invalid_properties
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Check to see if the all the properties in the model are valid
|
|
101
|
+
# @return true if the model is valid
|
|
102
|
+
def valid?
|
|
103
|
+
return false if @next_url.nil?
|
|
104
|
+
return false if @resources.nil?
|
|
105
|
+
return false if @rows_count.nil?
|
|
106
|
+
true
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Checks equality by comparing each attribute.
|
|
110
|
+
# @param [Object] Object to be compared
|
|
111
|
+
def ==(o)
|
|
112
|
+
return true if self.equal?(o)
|
|
113
|
+
self.class == o.class &&
|
|
114
|
+
next_url == o.next_url &&
|
|
115
|
+
resources == o.resources &&
|
|
116
|
+
rows_count == o.rows_count
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# @see the `==` method
|
|
120
|
+
# @param [Object] Object to be compared
|
|
121
|
+
def eql?(o)
|
|
122
|
+
self == o
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Calculates hash code according to all attributes.
|
|
126
|
+
# @return [Integer] Hash code
|
|
127
|
+
def hash
|
|
128
|
+
[next_url, resources, rows_count].hash
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Builds the object from hash
|
|
132
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
133
|
+
# @return [Object] Returns the model itself
|
|
134
|
+
def self.build_from_hash(attributes)
|
|
135
|
+
new.build_from_hash(attributes)
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Builds the object from hash
|
|
139
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
140
|
+
# @return [Object] Returns the model itself
|
|
141
|
+
def build_from_hash(attributes)
|
|
142
|
+
return nil unless attributes.is_a?(Hash)
|
|
143
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
144
|
+
if type =~ /\AArray<(.*)>/i
|
|
145
|
+
# check to ensure the input is an array given that the attribute
|
|
146
|
+
# is documented as an array but the input is not
|
|
147
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
148
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
149
|
+
end
|
|
150
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
151
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
152
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
153
|
+
self.send("#{key}=", nil)
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
self
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Deserializes the data based on type
|
|
161
|
+
# @param string type Data type
|
|
162
|
+
# @param string value Value to be deserialized
|
|
163
|
+
# @return [Object] Deserialized data
|
|
164
|
+
def _deserialize(type, value)
|
|
165
|
+
case type.to_sym
|
|
166
|
+
when :DateTime
|
|
167
|
+
DateTime.parse(value)
|
|
168
|
+
when :Date
|
|
169
|
+
Date.parse(value)
|
|
170
|
+
when :String
|
|
171
|
+
value.to_s
|
|
172
|
+
when :Integer
|
|
173
|
+
value.to_i
|
|
174
|
+
when :Float
|
|
175
|
+
value.to_f
|
|
176
|
+
when :Boolean
|
|
177
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
178
|
+
true
|
|
179
|
+
else
|
|
180
|
+
false
|
|
181
|
+
end
|
|
182
|
+
when :Object
|
|
183
|
+
# generic object (usually a Hash), return directly
|
|
184
|
+
value
|
|
185
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
186
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
187
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
188
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
189
|
+
k_type = Regexp.last_match[:k_type]
|
|
190
|
+
v_type = Regexp.last_match[:v_type]
|
|
191
|
+
{}.tap do |hash|
|
|
192
|
+
value.each do |k, v|
|
|
193
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
194
|
+
end
|
|
195
|
+
end
|
|
196
|
+
else # model
|
|
197
|
+
IbmCloudResourceController.const_get(type).build_from_hash(value)
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Returns the string representation of the object
|
|
202
|
+
# @return [String] String presentation of the object
|
|
203
|
+
def to_s
|
|
204
|
+
to_hash.to_s
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
208
|
+
# @return [Hash] Returns the object in the form of hash
|
|
209
|
+
def to_body
|
|
210
|
+
to_hash
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Returns the object in the form of hash
|
|
214
|
+
# @return [Hash] Returns the object in the form of hash
|
|
215
|
+
def to_hash
|
|
216
|
+
hash = {}
|
|
217
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
218
|
+
value = self.send(attr)
|
|
219
|
+
if value.nil?
|
|
220
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
221
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
hash[param] = _to_hash(value)
|
|
225
|
+
end
|
|
226
|
+
hash
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Outputs non-array value in the form of hash
|
|
230
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
231
|
+
# @param [Object] value Any valid value
|
|
232
|
+
# @return [Hash] Returns the value in the form of hash
|
|
233
|
+
def _to_hash(value)
|
|
234
|
+
if value.is_a?(Array)
|
|
235
|
+
value.compact.map { |v| _to_hash(v) }
|
|
236
|
+
elsif value.is_a?(Hash)
|
|
237
|
+
{}.tap do |hash|
|
|
238
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
239
|
+
end
|
|
240
|
+
elsif value.respond_to? :to_hash
|
|
241
|
+
value.to_hash
|
|
242
|
+
else
|
|
243
|
+
value
|
|
244
|
+
end
|
|
245
|
+
end
|
|
246
|
+
end
|
|
247
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#IBM Cloud Resource Controller API
|
|
3
|
+
|
|
4
|
+
#Manage lifecycle of your Cloud resources using Resource Controller APIs. Resources are provisioned globally in an account scope. Supports asynchronous provisioning of resources. Enables consumption of a global resource through a Cloud Foundry space in any region.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 5.0.0-beta2
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
module IbmCloudResourceController
|
|
14
|
+
VERSION = '1.0.1'
|
|
15
|
+
end
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#IBM Cloud Resource Controller API
|
|
3
|
+
|
|
4
|
+
#Manage lifecycle of your Cloud resources using Resource Controller APIs. Resources are provisioned globally in an account scope. Supports asynchronous provisioning of resources. Enables consumption of a global resource through a Cloud Foundry space in any region.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 5.0.0-beta2
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for IbmCloudResourceController::ResourceAliasesApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'ResourceAliasesApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = IbmCloudResourceController::ResourceAliasesApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of ResourceAliasesApi' do
|
|
30
|
+
it 'should create an instance of ResourceAliasesApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(IbmCloudResourceController::ResourceAliasesApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for create_resource_alias
|
|
36
|
+
# Create a new resource alias
|
|
37
|
+
# Alias a resource instance into a targeted environment's (name)space.
|
|
38
|
+
# @param resource_alias_post
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [ResourceAlias]
|
|
41
|
+
describe 'create_resource_alias test' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# unit tests for delete_resource_alias
|
|
48
|
+
# Delete a resource alias
|
|
49
|
+
# Delete a resource alias by ID.
|
|
50
|
+
# @param id The short or long ID of the alias.
|
|
51
|
+
# @param [Hash] opts the optional parameters
|
|
52
|
+
# @return [nil]
|
|
53
|
+
describe 'delete_resource_alias test' do
|
|
54
|
+
it 'should work' do
|
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# unit tests for get_resource_alias
|
|
60
|
+
# Get a resource alias
|
|
61
|
+
# Retrieve a resource alias by ID.
|
|
62
|
+
# @param id The short or long ID of the alias.
|
|
63
|
+
# @param [Hash] opts the optional parameters
|
|
64
|
+
# @return [ResourceAlias]
|
|
65
|
+
describe 'get_resource_alias test' do
|
|
66
|
+
it 'should work' do
|
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# unit tests for list_resource_aliases
|
|
72
|
+
# Get a list of all resource aliases
|
|
73
|
+
# Get a list of all resource aliases.
|
|
74
|
+
# @param [Hash] opts the optional parameters
|
|
75
|
+
# @option opts [String] :guid Short ID of the alias.
|
|
76
|
+
# @option opts [String] :name The human-readable name of the alias.
|
|
77
|
+
# @option opts [String] :resource_instance_id Resource instance short ID.
|
|
78
|
+
# @option opts [String] :region_instance_id Short ID of the instance in a specific targeted environment. For example, `service_instance_id` in a given IBM Cloud environment.
|
|
79
|
+
# @option opts [String] :resource_id The unique ID of the offering (service name). This value is provided by and stored in the global catalog.
|
|
80
|
+
# @option opts [String] :resource_group_id Short ID of Resource group.
|
|
81
|
+
# @option opts [String] :limit Limit on how many items should be returned.
|
|
82
|
+
# @option opts [String] :updated_from Start date inclusive filter.
|
|
83
|
+
# @option opts [String] :updated_to End date inclusive filter.
|
|
84
|
+
# @return [ResourceAliasesList]
|
|
85
|
+
describe 'list_resource_aliases test' do
|
|
86
|
+
it 'should work' do
|
|
87
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# unit tests for update_resource_alias
|
|
92
|
+
# Update a resource alias
|
|
93
|
+
# Update a resource alias by ID.
|
|
94
|
+
# @param id The short or long ID of the alias.
|
|
95
|
+
# @param resource_alias_patch
|
|
96
|
+
# @param [Hash] opts the optional parameters
|
|
97
|
+
# @return [ResourceAlias]
|
|
98
|
+
describe 'update_resource_alias test' do
|
|
99
|
+
it 'should work' do
|
|
100
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
end
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#IBM Cloud Resource Controller API
|
|
3
|
+
|
|
4
|
+
#Manage lifecycle of your Cloud resources using Resource Controller APIs. Resources are provisioned globally in an account scope. Supports asynchronous provisioning of resources. Enables consumption of a global resource through a Cloud Foundry space in any region.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 5.0.0-beta2
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for IbmCloudResourceController::ResourceBindingsApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'ResourceBindingsApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = IbmCloudResourceController::ResourceBindingsApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of ResourceBindingsApi' do
|
|
30
|
+
it 'should create an instance of ResourceBindingsApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(IbmCloudResourceController::ResourceBindingsApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for create_resource_binding
|
|
36
|
+
# Create a new resource binding
|
|
37
|
+
# Create a new resource binding.
|
|
38
|
+
# @param resource_binding_post
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [ResourceBinding]
|
|
41
|
+
describe 'create_resource_binding test' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# unit tests for delete_resource_binding
|
|
48
|
+
# Delete a resource binding
|
|
49
|
+
# Delete a resource binding by ID
|
|
50
|
+
# @param id The short or long ID of the binding.
|
|
51
|
+
# @param [Hash] opts the optional parameters
|
|
52
|
+
# @return [nil]
|
|
53
|
+
describe 'delete_resource_binding test' do
|
|
54
|
+
it 'should work' do
|
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# unit tests for get_resource_binding
|
|
60
|
+
# Get a resource binding
|
|
61
|
+
# Retrieve a resource binding by ID.
|
|
62
|
+
# @param id The short or long ID of the binding.
|
|
63
|
+
# @param [Hash] opts the optional parameters
|
|
64
|
+
# @return [ResourceBinding]
|
|
65
|
+
describe 'get_resource_binding test' do
|
|
66
|
+
it 'should work' do
|
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# unit tests for list_resource_bindings
|
|
72
|
+
# Get a list of all resource bindings
|
|
73
|
+
# Get a list of all resource bindings.
|
|
74
|
+
# @param [Hash] opts the optional parameters
|
|
75
|
+
# @option opts [String] :guid The short ID of the binding.
|
|
76
|
+
# @option opts [String] :name The human-readable name of the binding.
|
|
77
|
+
# @option opts [String] :resource_group_id Short ID of the resource group.
|
|
78
|
+
# @option opts [String] :resource_id The unique ID of the offering (service name). This value is provided by and stored in the global catalog.
|
|
79
|
+
# @option opts [String] :region_binding_id Short ID of the binding in the specific targeted environment, e.g. service_binding_id in a given IBM Cloud environment.
|
|
80
|
+
# @option opts [String] :limit Limit on how many items should be returned
|
|
81
|
+
# @option opts [String] :updated_from Start date inclusive filter.
|
|
82
|
+
# @option opts [String] :updated_to End date inclusive filter.
|
|
83
|
+
# @return [ResourceBindingsList]
|
|
84
|
+
describe 'list_resource_bindings test' do
|
|
85
|
+
it 'should work' do
|
|
86
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# unit tests for update_resource_binding
|
|
91
|
+
# Update a resource binding
|
|
92
|
+
# Update a resource binding by ID.
|
|
93
|
+
# @param id The short or long ID of the binding.
|
|
94
|
+
# @param resource_binding_patch
|
|
95
|
+
# @param [Hash] opts the optional parameters
|
|
96
|
+
# @return [ResourceBinding]
|
|
97
|
+
describe 'update_resource_binding test' do
|
|
98
|
+
it 'should work' do
|
|
99
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
end
|