vsphere-automation-content 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -6
- data/README.md +15 -16
- data/docs/ConfigurationApi.md +4 -8
- data/docs/LibraryApi.md +3 -5
- data/docs/LibraryItemApi.md +6 -10
- data/docs/LibraryItemDownloadSessionApi.md +3 -5
- data/docs/LibraryItemDownloadsessionFileApi.md +3 -5
- data/docs/LibraryItemFileApi.md +3 -5
- data/docs/LibraryItemStorageApi.md +3 -5
- data/docs/LibraryItemUpdateSessionApi.md +3 -5
- data/docs/LibraryItemUpdatesessionFileApi.md +3 -5
- data/docs/LibrarySubscribedItemApi.md +3 -5
- data/docs/LocalLibraryApi.md +3 -5
- data/docs/SubscribedLibraryApi.md +3 -5
- data/lib/vsphere-automation-content/api/configuration_api.rb +4 -15
- data/lib/vsphere-automation-content/api/library_api.rb +4 -15
- data/lib/vsphere-automation-content/api/library_item_api.rb +8 -30
- data/lib/vsphere-automation-content/api/library_item_download_session_api.rb +4 -15
- data/lib/vsphere-automation-content/api/library_item_downloadsession_file_api.rb +4 -15
- data/lib/vsphere-automation-content/api/library_item_file_api.rb +4 -15
- data/lib/vsphere-automation-content/api/library_item_storage_api.rb +4 -15
- data/lib/vsphere-automation-content/api/library_item_update_session_api.rb +4 -15
- data/lib/vsphere-automation-content/api/library_item_updatesession_file_api.rb +4 -15
- data/lib/vsphere-automation-content/api/library_subscribed_item_api.rb +4 -15
- data/lib/vsphere-automation-content/api/local_library_api.rb +4 -15
- data/lib/vsphere-automation-content/api/subscribed_library_api.rb +4 -15
- data/lib/vsphere-automation-content/api_client.rb +1 -1
- data/lib/vsphere-automation-content/version.rb +1 -1
- data/pkg/vsphere-automation-content-0.2.2.gem +0 -0
- data/vsphere-automation-content.gemspec +2 -2
- metadata +7 -6
@@ -18,23 +18,21 @@ module VSphereAutomation
|
|
18
18
|
end
|
19
19
|
# Requests file content to be changed (either created, or updated). Depending on the source type of the file, this {@term operation} will either return an upload endpoint where the client can push the content, or the server will pull from the provided source endpoint. If a file with the same name already exists in this session, this {@term operation} will be used to update the content of the existing file. <p> When importing a file directly from storage, where the source endpoint is a file or datastore URI, you will need to have the ContentLibrary.ReadStorage privilege on the library item. If the file is located in the same directory as the library storage backing folder, the server will move the file instead of copying it, thereby allowing instantaneous import of files for efficient backup and restore scenarios. In all other cases, a copy is performed rather than a move.
|
20
20
|
# @param update_session_id Identifier of the update session to be modified.
|
21
|
-
# @param action ~action=add
|
22
21
|
# @param request_body
|
23
22
|
# @param [Hash] opts the optional parameters
|
24
23
|
# @return [ContentLibraryItemUpdatesessionFileAddResult|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|]
|
25
|
-
def add(update_session_id,
|
26
|
-
data, _status_code, _headers = add_with_http_info(update_session_id,
|
24
|
+
def add(update_session_id, request_body, opts = {})
|
25
|
+
data, _status_code, _headers = add_with_http_info(update_session_id, request_body, opts)
|
27
26
|
data
|
28
27
|
end
|
29
28
|
|
30
29
|
# Requests file content to be changed (either created, or updated). Depending on the source type of the file, this {@term operation} will either return an upload endpoint where the client can push the content, or the server will pull from the provided source endpoint. If a file with the same name already exists in this session, this {@term operation} will be used to update the content of the existing file. <p> When importing a file directly from storage, where the source endpoint is a file or datastore URI, you will need to have the ContentLibrary.ReadStorage privilege on the library item. If the file is located in the same directory as the library storage backing folder, the server will move the file instead of copying it, thereby allowing instantaneous import of files for efficient backup and restore scenarios. In all other cases, a copy is performed rather than a move.
|
31
30
|
# @api private
|
32
31
|
# @param update_session_id Identifier of the update session to be modified.
|
33
|
-
# @param action ~action=add
|
34
32
|
# @param request_body
|
35
33
|
# @param [Hash] opts the optional parameters
|
36
34
|
# @return [Array<(ContentLibraryItemUpdatesessionFileAddResult|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|, Fixnum, Hash)>] data, response status code and response headers
|
37
|
-
def add_with_http_info(update_session_id,
|
35
|
+
def add_with_http_info(update_session_id, request_body, opts = {})
|
38
36
|
if @api_client.config.debugging
|
39
37
|
@api_client.config.logger.debug 'Calling API: LibraryItemUpdatesessionFileApi.add ...'
|
40
38
|
end
|
@@ -42,24 +40,15 @@ module VSphereAutomation
|
|
42
40
|
if @api_client.config.client_side_validation && update_session_id.nil?
|
43
41
|
fail ArgumentError, "Missing the required parameter 'update_session_id' when calling LibraryItemUpdatesessionFileApi.add"
|
44
42
|
end
|
45
|
-
# verify the required parameter 'action' is set
|
46
|
-
if @api_client.config.client_side_validation && action.nil?
|
47
|
-
fail ArgumentError, "Missing the required parameter 'action' when calling LibraryItemUpdatesessionFileApi.add"
|
48
|
-
end
|
49
|
-
# verify enum value
|
50
|
-
if @api_client.config.client_side_validation && !['add'].include?(action)
|
51
|
-
fail ArgumentError, "invalid value for 'action', must be one of add"
|
52
|
-
end
|
53
43
|
# verify the required parameter 'request_body' is set
|
54
44
|
if @api_client.config.client_side_validation && request_body.nil?
|
55
45
|
fail ArgumentError, "Missing the required parameter 'request_body' when calling LibraryItemUpdatesessionFileApi.add"
|
56
46
|
end
|
57
47
|
# resource path
|
58
|
-
local_var_path = '/com/vmware/content/library/item/updatesession/file/id:{update_session_id}'.sub('{' + 'update_session_id' + '}', update_session_id.to_s)
|
48
|
+
local_var_path = '/com/vmware/content/library/item/updatesession/file/id:{update_session_id}?~action=add'.sub('{' + 'update_session_id' + '}', update_session_id.to_s)
|
59
49
|
|
60
50
|
# query parameters
|
61
51
|
query_params = {}
|
62
|
-
query_params[:'~action'] = action
|
63
52
|
|
64
53
|
# header parameters
|
65
54
|
header_params = {}
|
@@ -18,21 +18,19 @@ module VSphereAutomation
|
|
18
18
|
end
|
19
19
|
# Evicts the cached content of a library item in a subscribed library. <p> This {@term operation} allows the cached content of a library item to be removed to free up storage capacity. This {@term operation} will only work when a library item is synchronized on-demand. When a library is not synchronized on-demand, it always attempts to keep its cache up-to-date with the published source. Evicting the library item will set {@link ItemModel#cached} to false.
|
20
20
|
# @param library_item_id Identifier of the library item whose content should be evicted.
|
21
|
-
# @param action ~action=evict
|
22
21
|
# @param [Hash] opts the optional parameters
|
23
22
|
# @return [|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsNotFoundError|nil]
|
24
|
-
def evict(library_item_id,
|
25
|
-
evict_with_http_info(library_item_id,
|
23
|
+
def evict(library_item_id, opts = {})
|
24
|
+
evict_with_http_info(library_item_id, opts)
|
26
25
|
nil
|
27
26
|
end
|
28
27
|
|
29
28
|
# Evicts the cached content of a library item in a subscribed library. <p> This {@term operation} allows the cached content of a library item to be removed to free up storage capacity. This {@term operation} will only work when a library item is synchronized on-demand. When a library is not synchronized on-demand, it always attempts to keep its cache up-to-date with the published source. Evicting the library item will set {@link ItemModel#cached} to false.
|
30
29
|
# @api private
|
31
30
|
# @param library_item_id Identifier of the library item whose content should be evicted.
|
32
|
-
# @param action ~action=evict
|
33
31
|
# @param [Hash] opts the optional parameters
|
34
32
|
# @return [Array<(|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>] nil, response status code and response headers
|
35
|
-
def evict_with_http_info(library_item_id,
|
33
|
+
def evict_with_http_info(library_item_id, opts = {})
|
36
34
|
if @api_client.config.debugging
|
37
35
|
@api_client.config.logger.debug 'Calling API: LibrarySubscribedItemApi.evict ...'
|
38
36
|
end
|
@@ -40,20 +38,11 @@ module VSphereAutomation
|
|
40
38
|
if @api_client.config.client_side_validation && library_item_id.nil?
|
41
39
|
fail ArgumentError, "Missing the required parameter 'library_item_id' when calling LibrarySubscribedItemApi.evict"
|
42
40
|
end
|
43
|
-
# verify the required parameter 'action' is set
|
44
|
-
if @api_client.config.client_side_validation && action.nil?
|
45
|
-
fail ArgumentError, "Missing the required parameter 'action' when calling LibrarySubscribedItemApi.evict"
|
46
|
-
end
|
47
|
-
# verify enum value
|
48
|
-
if @api_client.config.client_side_validation && !['evict'].include?(action)
|
49
|
-
fail ArgumentError, "invalid value for 'action', must be one of evict"
|
50
|
-
end
|
51
41
|
# resource path
|
52
|
-
local_var_path = '/com/vmware/content/library/subscribed-item/id:{library_item_id}'.sub('{' + 'library_item_id' + '}', library_item_id.to_s)
|
42
|
+
local_var_path = '/com/vmware/content/library/subscribed-item/id:{library_item_id}?~action=evict'.sub('{' + 'library_item_id' + '}', library_item_id.to_s)
|
53
43
|
|
54
44
|
# query parameters
|
55
45
|
query_params = {}
|
56
|
-
query_params[:'~action'] = action
|
57
46
|
|
58
47
|
# header parameters
|
59
48
|
header_params = {}
|
@@ -226,23 +226,21 @@ module VSphereAutomation
|
|
226
226
|
end
|
227
227
|
# Publishes the library to specified subscriptions. If no subscriptions are specified, then publishes the library to all its subscriptions.
|
228
228
|
# @param library_id Identifier of the published library.
|
229
|
-
# @param action ~action=publish
|
230
229
|
# @param [Hash] opts the optional parameters
|
231
230
|
# @option opts [ContentLocalLibraryPublish] :request_body
|
232
231
|
# @return [|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthenticatedError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil]
|
233
|
-
def publish(library_id,
|
234
|
-
publish_with_http_info(library_id,
|
232
|
+
def publish(library_id, opts = {})
|
233
|
+
publish_with_http_info(library_id, opts)
|
235
234
|
nil
|
236
235
|
end
|
237
236
|
|
238
237
|
# Publishes the library to specified subscriptions. If no subscriptions are specified, then publishes the library to all its subscriptions.
|
239
238
|
# @api private
|
240
239
|
# @param library_id Identifier of the published library.
|
241
|
-
# @param action ~action=publish
|
242
240
|
# @param [Hash] opts the optional parameters
|
243
241
|
# @option opts [ContentLocalLibraryPublish] :request_body
|
244
242
|
# @return [Array<(|VapiStdErrorsNotAllowedInCurrentStateError|VapiStdErrorsUnauthenticatedError|VapiStdErrorsUnauthorizedError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>] nil, response status code and response headers
|
245
|
-
def publish_with_http_info(library_id,
|
243
|
+
def publish_with_http_info(library_id, opts = {})
|
246
244
|
if @api_client.config.debugging
|
247
245
|
@api_client.config.logger.debug 'Calling API: LocalLibraryApi.publish ...'
|
248
246
|
end
|
@@ -250,20 +248,11 @@ module VSphereAutomation
|
|
250
248
|
if @api_client.config.client_side_validation && library_id.nil?
|
251
249
|
fail ArgumentError, "Missing the required parameter 'library_id' when calling LocalLibraryApi.publish"
|
252
250
|
end
|
253
|
-
# verify the required parameter 'action' is set
|
254
|
-
if @api_client.config.client_side_validation && action.nil?
|
255
|
-
fail ArgumentError, "Missing the required parameter 'action' when calling LocalLibraryApi.publish"
|
256
|
-
end
|
257
|
-
# verify enum value
|
258
|
-
if @api_client.config.client_side_validation && !['publish'].include?(action)
|
259
|
-
fail ArgumentError, "invalid value for 'action', must be one of publish"
|
260
|
-
end
|
261
251
|
# resource path
|
262
|
-
local_var_path = '/com/vmware/content/local-library/id:{library_id}'.sub('{' + 'library_id' + '}', library_id.to_s)
|
252
|
+
local_var_path = '/com/vmware/content/local-library/id:{library_id}?~action=publish'.sub('{' + 'library_id' + '}', library_id.to_s)
|
263
253
|
|
264
254
|
# query parameters
|
265
255
|
query_params = {}
|
266
|
-
query_params[:'~action'] = action
|
267
256
|
|
268
257
|
# header parameters
|
269
258
|
header_params = {}
|
@@ -331,21 +331,19 @@ module VSphereAutomation
|
|
331
331
|
end
|
332
332
|
# Forces the synchronization of the subscribed library. <p> Synchronizing a subscribed library forcefully with this {@term operation} will perform the same synchronization behavior as would run periodically for the library. The {@link SubscriptionInfo#onDemand} setting is respected. Calling this {@term operation} on a library that is already in the process of synchronizing will have no effect.
|
333
333
|
# @param library_id Identifier of the subscribed library to synchronize.
|
334
|
-
# @param action ~action=sync
|
335
334
|
# @param [Hash] opts the optional parameters
|
336
335
|
# @return [|VapiStdErrorsResourceInaccessibleError|VapiStdErrorsNotFoundError|nil]
|
337
|
-
def sync(library_id,
|
338
|
-
sync_with_http_info(library_id,
|
336
|
+
def sync(library_id, opts = {})
|
337
|
+
sync_with_http_info(library_id, opts)
|
339
338
|
nil
|
340
339
|
end
|
341
340
|
|
342
341
|
# Forces the synchronization of the subscribed library. <p> Synchronizing a subscribed library forcefully with this {@term operation} will perform the same synchronization behavior as would run periodically for the library. The {@link SubscriptionInfo#onDemand} setting is respected. Calling this {@term operation} on a library that is already in the process of synchronizing will have no effect.
|
343
342
|
# @api private
|
344
343
|
# @param library_id Identifier of the subscribed library to synchronize.
|
345
|
-
# @param action ~action=sync
|
346
344
|
# @param [Hash] opts the optional parameters
|
347
345
|
# @return [Array<(|VapiStdErrorsResourceInaccessibleError|VapiStdErrorsNotFoundError|nil, Fixnum, Hash)>] nil, response status code and response headers
|
348
|
-
def sync_with_http_info(library_id,
|
346
|
+
def sync_with_http_info(library_id, opts = {})
|
349
347
|
if @api_client.config.debugging
|
350
348
|
@api_client.config.logger.debug 'Calling API: SubscribedLibraryApi.sync ...'
|
351
349
|
end
|
@@ -353,20 +351,11 @@ module VSphereAutomation
|
|
353
351
|
if @api_client.config.client_side_validation && library_id.nil?
|
354
352
|
fail ArgumentError, "Missing the required parameter 'library_id' when calling SubscribedLibraryApi.sync"
|
355
353
|
end
|
356
|
-
# verify the required parameter 'action' is set
|
357
|
-
if @api_client.config.client_side_validation && action.nil?
|
358
|
-
fail ArgumentError, "Missing the required parameter 'action' when calling SubscribedLibraryApi.sync"
|
359
|
-
end
|
360
|
-
# verify enum value
|
361
|
-
if @api_client.config.client_side_validation && !['sync'].include?(action)
|
362
|
-
fail ArgumentError, "invalid value for 'action', must be one of sync"
|
363
|
-
end
|
364
354
|
# resource path
|
365
|
-
local_var_path = '/com/vmware/content/subscribed-library/id:{library_id}'.sub('{' + 'library_id' + '}', library_id.to_s)
|
355
|
+
local_var_path = '/com/vmware/content/subscribed-library/id:{library_id}?~action=sync'.sub('{' + 'library_id' + '}', library_id.to_s)
|
366
356
|
|
367
357
|
# query parameters
|
368
358
|
query_params = {}
|
369
|
-
query_params[:'~action'] = action
|
370
359
|
|
371
360
|
# header parameters
|
372
361
|
header_params = {}
|
@@ -29,7 +29,7 @@ module VSphereAutomation
|
|
29
29
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
30
30
|
def initialize(config = Configuration.default)
|
31
31
|
@config = config
|
32
|
-
@user_agent = "SDK/0.
|
32
|
+
@user_agent = "SDK/0.3.0 Ruby/#{RUBY_VERSION} (#{Gem::Platform.local.os}; #{Gem::Platform.local.version}; #{Gem::Platform.local.cpu})"
|
33
33
|
@default_headers = {
|
34
34
|
'Content-Type' => 'application/json',
|
35
35
|
'User-Agent' => @user_agent
|
Binary file
|
@@ -23,8 +23,8 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.license = 'MIT'
|
24
24
|
s.required_ruby_version = ">= 2.3"
|
25
25
|
|
26
|
-
s.add_runtime_dependency 'vsphere-automation-runtime', '~> 0.
|
27
|
-
s.add_runtime_dependency 'vsphere-automation-cis', '~> 0.
|
26
|
+
s.add_runtime_dependency 'vsphere-automation-runtime', '~> 0.3.0'
|
27
|
+
s.add_runtime_dependency 'vsphere-automation-cis', '~> 0.3.0'
|
28
28
|
|
29
29
|
s.add_development_dependency 'bundler', '~> 2.0'
|
30
30
|
s.add_development_dependency 'pry', '~> 0.12.2'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vsphere-automation-content
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- J.R. Garcia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: vsphere-automation-runtime
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.3.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
|
-
version: 0.
|
26
|
+
version: 0.3.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: vsphere-automation-cis
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.3.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.3.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -482,6 +482,7 @@ files:
|
|
482
482
|
- lib/vsphere-automation-content/models/vapi_std_localizable_message.rb
|
483
483
|
- lib/vsphere-automation-content/version.rb
|
484
484
|
- pkg/vsphere-automation-content-0.2.1.gem
|
485
|
+
- pkg/vsphere-automation-content-0.2.2.gem
|
485
486
|
- spec/api/configuration_api_spec.rb
|
486
487
|
- spec/api/library_api_spec.rb
|
487
488
|
- spec/api/library_item_api_spec.rb
|