pulp_ansible_client 0.2.0b3 → 0.2.0b5
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 +4 -4
- data/README.md +14 -12
- data/docs/AnsibleCollectionsApi.md +18 -14
- data/docs/CollectionVersion.md +31 -21
- data/docs/ContentCollectionVersionsApi.md +21 -7
- data/docs/ContentRolesApi.md +19 -7
- data/docs/PulpAnsibleGalaxyApiV3CollectionsApi.md +8 -22
- data/docs/Role.md +8 -4
- data/lib/pulp_ansible_client/api/ansible_collections_api.rb +34 -28
- data/lib/pulp_ansible_client/api/content_collection_versions_api.rb +50 -15
- data/lib/pulp_ansible_client/api/content_roles_api.rb +51 -15
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v3_collections_api.rb +9 -50
- data/lib/pulp_ansible_client/models/collection_version.rb +165 -169
- data/lib/pulp_ansible_client/models/role.rb +34 -19
- data/lib/pulp_ansible_client/version.rb +1 -1
- data/spec/api/ansible_collections_api_spec.rb +9 -7
- data/spec/api/content_collection_versions_api_spec.rb +9 -3
- data/spec/api/content_roles_api_spec.rb +8 -3
- data/spec/api/pulp_ansible_galaxy_api_v3_collections_api_spec.rb +2 -8
- data/spec/models/collection_version_spec.rb +35 -5
- data/spec/models/role_spec.rb +14 -2
- metadata +2 -2
@@ -20,28 +20,56 @@ module PulpAnsibleClient
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
# Create a collection version
|
23
|
-
#
|
24
|
-
# @param
|
23
|
+
# Trigger an asynchronous task to create content,optionally create new repository version.
|
24
|
+
# @param relative_path [String] Path where the artifact is located relative to distributions base_path
|
25
25
|
# @param [Hash] opts the optional parameters
|
26
|
-
# @
|
27
|
-
|
28
|
-
|
26
|
+
# @option opts [String] :artifact Artifact file representing the physical content
|
27
|
+
# @option opts [File] :file An uploaded file that should be turned into the artifact of the content unit.
|
28
|
+
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
29
|
+
# @option opts [String] :expected_name The expected 'name' of the Collection to be verified against the metadata during import.
|
30
|
+
# @option opts [String] :expected_namespace The expected 'namespace' of the Collection to be verified against the metadata during import.
|
31
|
+
# @option opts [String] :expected_version The expected version of the Collection to be verified against the metadata during import.
|
32
|
+
# @return [AsyncOperationResponse]
|
33
|
+
def create(relative_path, opts = {})
|
34
|
+
data, _status_code, _headers = create_with_http_info(relative_path, opts)
|
29
35
|
data
|
30
36
|
end
|
31
37
|
|
32
38
|
# Create a collection version
|
33
|
-
#
|
34
|
-
# @param
|
39
|
+
# Trigger an asynchronous task to create content,optionally create new repository version.
|
40
|
+
# @param relative_path [String] Path where the artifact is located relative to distributions base_path
|
35
41
|
# @param [Hash] opts the optional parameters
|
36
|
-
# @
|
37
|
-
|
42
|
+
# @option opts [String] :artifact Artifact file representing the physical content
|
43
|
+
# @option opts [File] :file An uploaded file that should be turned into the artifact of the content unit.
|
44
|
+
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
45
|
+
# @option opts [String] :expected_name The expected 'name' of the Collection to be verified against the metadata during import.
|
46
|
+
# @option opts [String] :expected_namespace The expected 'namespace' of the Collection to be verified against the metadata during import.
|
47
|
+
# @option opts [String] :expected_version The expected version of the Collection to be verified against the metadata during import.
|
48
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
49
|
+
def create_with_http_info(relative_path, opts = {})
|
38
50
|
if @api_client.config.debugging
|
39
51
|
@api_client.config.logger.debug 'Calling API: ContentCollectionVersionsApi.create ...'
|
40
52
|
end
|
41
|
-
# verify the required parameter '
|
42
|
-
if @api_client.config.client_side_validation &&
|
43
|
-
fail ArgumentError, "Missing the required parameter '
|
53
|
+
# verify the required parameter 'relative_path' is set
|
54
|
+
if @api_client.config.client_side_validation && relative_path.nil?
|
55
|
+
fail ArgumentError, "Missing the required parameter 'relative_path' when calling ContentCollectionVersionsApi.create"
|
56
|
+
end
|
57
|
+
if @api_client.config.client_side_validation && relative_path.to_s.length < 1
|
58
|
+
fail ArgumentError, 'invalid value for "relative_path" when calling ContentCollectionVersionsApi.create, the character length must be great than or equal to 1.'
|
59
|
+
end
|
60
|
+
|
61
|
+
if @api_client.config.client_side_validation && !opts[:'expected_name'].nil? && opts[:'expected_name'].to_s.length < 1
|
62
|
+
fail ArgumentError, 'invalid value for "opts[:"expected_name"]" when calling ContentCollectionVersionsApi.create, the character length must be great than or equal to 1.'
|
63
|
+
end
|
64
|
+
|
65
|
+
if @api_client.config.client_side_validation && !opts[:'expected_namespace'].nil? && opts[:'expected_namespace'].to_s.length < 1
|
66
|
+
fail ArgumentError, 'invalid value for "opts[:"expected_namespace"]" when calling ContentCollectionVersionsApi.create, the character length must be great than or equal to 1.'
|
67
|
+
end
|
68
|
+
|
69
|
+
if @api_client.config.client_side_validation && !opts[:'expected_version'].nil? && opts[:'expected_version'].to_s.length < 1
|
70
|
+
fail ArgumentError, 'invalid value for "opts[:"expected_version"]" when calling ContentCollectionVersionsApi.create, the character length must be great than or equal to 1.'
|
44
71
|
end
|
72
|
+
|
45
73
|
# resource path
|
46
74
|
local_var_path = '/pulp/api/v3/content/ansible/collection_versions/'
|
47
75
|
|
@@ -53,16 +81,23 @@ module PulpAnsibleClient
|
|
53
81
|
# HTTP header 'Accept' (if needed)
|
54
82
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
83
|
# HTTP header 'Content-Type'
|
56
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/
|
84
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
|
57
85
|
|
58
86
|
# form parameters
|
59
87
|
form_params = opts[:form_params] || {}
|
88
|
+
form_params['relative_path'] = relative_path
|
89
|
+
form_params['artifact'] = opts[:'artifact'] if !opts[:'artifact'].nil?
|
90
|
+
form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
|
91
|
+
form_params['repository'] = opts[:'repository'] if !opts[:'repository'].nil?
|
92
|
+
form_params['expected_name'] = opts[:'expected_name'] if !opts[:'expected_name'].nil?
|
93
|
+
form_params['expected_namespace'] = opts[:'expected_namespace'] if !opts[:'expected_namespace'].nil?
|
94
|
+
form_params['expected_version'] = opts[:'expected_version'] if !opts[:'expected_version'].nil?
|
60
95
|
|
61
96
|
# http body (model)
|
62
|
-
post_body = opts[:body]
|
97
|
+
post_body = opts[:body]
|
63
98
|
|
64
99
|
# return_type
|
65
|
-
return_type = opts[:return_type] || '
|
100
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
66
101
|
|
67
102
|
# auth_names
|
68
103
|
auth_names = opts[:auth_names] || ['Basic']
|
@@ -20,28 +20,58 @@ module PulpAnsibleClient
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
# Create a role
|
23
|
-
#
|
24
|
-
# @param
|
23
|
+
# Trigger an asynchronous task to create content,optionally create new repository version.
|
24
|
+
# @param version [String]
|
25
|
+
# @param name [String]
|
26
|
+
# @param namespace [String]
|
25
27
|
# @param [Hash] opts the optional parameters
|
26
|
-
# @
|
27
|
-
|
28
|
-
|
28
|
+
# @option opts [File] :file An uploaded file that should be turned into the artifact of the content unit.
|
29
|
+
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
30
|
+
# @option opts [String] :artifact Artifact file representing the physical content
|
31
|
+
# @return [AsyncOperationResponse]
|
32
|
+
def create(version, name, namespace, opts = {})
|
33
|
+
data, _status_code, _headers = create_with_http_info(version, name, namespace, opts)
|
29
34
|
data
|
30
35
|
end
|
31
36
|
|
32
37
|
# Create a role
|
33
|
-
#
|
34
|
-
# @param
|
38
|
+
# Trigger an asynchronous task to create content,optionally create new repository version.
|
39
|
+
# @param version [String]
|
40
|
+
# @param name [String]
|
41
|
+
# @param namespace [String]
|
35
42
|
# @param [Hash] opts the optional parameters
|
36
|
-
# @
|
37
|
-
|
43
|
+
# @option opts [File] :file An uploaded file that should be turned into the artifact of the content unit.
|
44
|
+
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
45
|
+
# @option opts [String] :artifact Artifact file representing the physical content
|
46
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
47
|
+
def create_with_http_info(version, name, namespace, opts = {})
|
38
48
|
if @api_client.config.debugging
|
39
49
|
@api_client.config.logger.debug 'Calling API: ContentRolesApi.create ...'
|
40
50
|
end
|
41
|
-
# verify the required parameter '
|
42
|
-
if @api_client.config.client_side_validation &&
|
43
|
-
fail ArgumentError, "Missing the required parameter '
|
51
|
+
# verify the required parameter 'version' is set
|
52
|
+
if @api_client.config.client_side_validation && version.nil?
|
53
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling ContentRolesApi.create"
|
54
|
+
end
|
55
|
+
if @api_client.config.client_side_validation && version.to_s.length < 1
|
56
|
+
fail ArgumentError, 'invalid value for "version" when calling ContentRolesApi.create, the character length must be great than or equal to 1.'
|
57
|
+
end
|
58
|
+
|
59
|
+
# verify the required parameter 'name' is set
|
60
|
+
if @api_client.config.client_side_validation && name.nil?
|
61
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling ContentRolesApi.create"
|
62
|
+
end
|
63
|
+
if @api_client.config.client_side_validation && name.to_s.length < 1
|
64
|
+
fail ArgumentError, 'invalid value for "name" when calling ContentRolesApi.create, the character length must be great than or equal to 1.'
|
65
|
+
end
|
66
|
+
|
67
|
+
# verify the required parameter 'namespace' is set
|
68
|
+
if @api_client.config.client_side_validation && namespace.nil?
|
69
|
+
fail ArgumentError, "Missing the required parameter 'namespace' when calling ContentRolesApi.create"
|
70
|
+
end
|
71
|
+
if @api_client.config.client_side_validation && namespace.to_s.length < 1
|
72
|
+
fail ArgumentError, 'invalid value for "namespace" when calling ContentRolesApi.create, the character length must be great than or equal to 1.'
|
44
73
|
end
|
74
|
+
|
45
75
|
# resource path
|
46
76
|
local_var_path = '/pulp/api/v3/content/ansible/roles/'
|
47
77
|
|
@@ -53,16 +83,22 @@ module PulpAnsibleClient
|
|
53
83
|
# HTTP header 'Accept' (if needed)
|
54
84
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
85
|
# HTTP header 'Content-Type'
|
56
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/
|
86
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
|
57
87
|
|
58
88
|
# form parameters
|
59
89
|
form_params = opts[:form_params] || {}
|
90
|
+
form_params['version'] = version
|
91
|
+
form_params['name'] = name
|
92
|
+
form_params['namespace'] = namespace
|
93
|
+
form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
|
94
|
+
form_params['repository'] = opts[:'repository'] if !opts[:'repository'].nil?
|
95
|
+
form_params['artifact'] = opts[:'artifact'] if !opts[:'artifact'].nil?
|
60
96
|
|
61
97
|
# http body (model)
|
62
|
-
post_body = opts[:body]
|
98
|
+
post_body = opts[:body]
|
63
99
|
|
64
100
|
# return_type
|
65
|
-
return_type = opts[:return_type] || '
|
101
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
66
102
|
|
67
103
|
# auth_names
|
68
104
|
auth_names = opts[:auth_names] || ['Basic']
|
@@ -19,32 +19,20 @@ module PulpAnsibleClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
#
|
23
|
-
# Create an artifact and trigger an asynchronous task to create Collection content from it.
|
22
|
+
# ViewSet for CollectionVersions.
|
24
23
|
# @param path [String]
|
25
|
-
# @param file [File] The Collection tarball.
|
26
24
|
# @param [Hash] opts the optional parameters
|
27
|
-
# @
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
# @return [AsyncOperationResponse]
|
32
|
-
def create(path, file, opts = {})
|
33
|
-
data, _status_code, _headers = create_with_http_info(path, file, opts)
|
34
|
-
data
|
25
|
+
# @return [nil]
|
26
|
+
def create(path, opts = {})
|
27
|
+
create_with_http_info(path, opts)
|
28
|
+
nil
|
35
29
|
end
|
36
30
|
|
37
|
-
#
|
38
|
-
# Create an artifact and trigger an asynchronous task to create Collection content from it.
|
31
|
+
# ViewSet for CollectionVersions.
|
39
32
|
# @param path [String]
|
40
|
-
# @param file [File] The Collection tarball.
|
41
33
|
# @param [Hash] opts the optional parameters
|
42
|
-
# @
|
43
|
-
|
44
|
-
# @option opts [String] :expected_name The expected 'name' of the Collection to be verified against the metadata during import.
|
45
|
-
# @option opts [String] :expected_version The expected version of the Collection to be verified against the metadata during import.
|
46
|
-
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
47
|
-
def create_with_http_info(path, file, opts = {})
|
34
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
35
|
+
def create_with_http_info(path, opts = {})
|
48
36
|
if @api_client.config.debugging
|
49
37
|
@api_client.config.logger.debug 'Calling API: PulpAnsibleGalaxyApiV3CollectionsApi.create ...'
|
50
38
|
end
|
@@ -52,26 +40,6 @@ module PulpAnsibleClient
|
|
52
40
|
if @api_client.config.client_side_validation && path.nil?
|
53
41
|
fail ArgumentError, "Missing the required parameter 'path' when calling PulpAnsibleGalaxyApiV3CollectionsApi.create"
|
54
42
|
end
|
55
|
-
# verify the required parameter 'file' is set
|
56
|
-
if @api_client.config.client_side_validation && file.nil?
|
57
|
-
fail ArgumentError, "Missing the required parameter 'file' when calling PulpAnsibleGalaxyApiV3CollectionsApi.create"
|
58
|
-
end
|
59
|
-
if @api_client.config.client_side_validation && !opts[:'sha256'].nil? && opts[:'sha256'].to_s.length < 1
|
60
|
-
fail ArgumentError, 'invalid value for "opts[:"sha256"]" when calling PulpAnsibleGalaxyApiV3CollectionsApi.create, the character length must be great than or equal to 1.'
|
61
|
-
end
|
62
|
-
|
63
|
-
if @api_client.config.client_side_validation && !opts[:'expected_namespace'].nil? && opts[:'expected_namespace'].to_s.length < 1
|
64
|
-
fail ArgumentError, 'invalid value for "opts[:"expected_namespace"]" when calling PulpAnsibleGalaxyApiV3CollectionsApi.create, the character length must be great than or equal to 1.'
|
65
|
-
end
|
66
|
-
|
67
|
-
if @api_client.config.client_side_validation && !opts[:'expected_name'].nil? && opts[:'expected_name'].to_s.length < 1
|
68
|
-
fail ArgumentError, 'invalid value for "opts[:"expected_name"]" when calling PulpAnsibleGalaxyApiV3CollectionsApi.create, the character length must be great than or equal to 1.'
|
69
|
-
end
|
70
|
-
|
71
|
-
if @api_client.config.client_side_validation && !opts[:'expected_version'].nil? && opts[:'expected_version'].to_s.length < 1
|
72
|
-
fail ArgumentError, 'invalid value for "opts[:"expected_version"]" when calling PulpAnsibleGalaxyApiV3CollectionsApi.create, the character length must be great than or equal to 1.'
|
73
|
-
end
|
74
|
-
|
75
43
|
# resource path
|
76
44
|
local_var_path = '/pulp_ansible/galaxy/{path}/api/v3/artifacts/collections/'.sub('{' + 'path' + '}', CGI.escape(path.to_s).gsub('%2F', '/'))
|
77
45
|
|
@@ -80,24 +48,15 @@ module PulpAnsibleClient
|
|
80
48
|
|
81
49
|
# header parameters
|
82
50
|
header_params = opts[:header_params] || {}
|
83
|
-
# HTTP header 'Accept' (if needed)
|
84
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
85
|
-
# HTTP header 'Content-Type'
|
86
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
|
87
51
|
|
88
52
|
# form parameters
|
89
53
|
form_params = opts[:form_params] || {}
|
90
|
-
form_params['file'] = file
|
91
|
-
form_params['sha256'] = opts[:'sha256'] if !opts[:'sha256'].nil?
|
92
|
-
form_params['expected_namespace'] = opts[:'expected_namespace'] if !opts[:'expected_namespace'].nil?
|
93
|
-
form_params['expected_name'] = opts[:'expected_name'] if !opts[:'expected_name'].nil?
|
94
|
-
form_params['expected_version'] = opts[:'expected_version'] if !opts[:'expected_version'].nil?
|
95
54
|
|
96
55
|
# http body (model)
|
97
56
|
post_body = opts[:body]
|
98
57
|
|
99
58
|
# return_type
|
100
|
-
return_type = opts[:return_type]
|
59
|
+
return_type = opts[:return_type]
|
101
60
|
|
102
61
|
# auth_names
|
103
62
|
auth_names = opts[:auth_names] || ['Basic']
|