pulp_ansible_client 0.2.0b3 → 0.2.0b5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 680d90db954637400ca903a323d11d4338e9b25270b401f68fbdfbad66a3083f
4
- data.tar.gz: 5e0abf33279c41e2c92134b2180000e892a589cebef61586210f11c867abecab
3
+ metadata.gz: afc8cdf2863c7a2c02156258d426bc64ce59364e7b0997319023f222f8f60094
4
+ data.tar.gz: 1aaca2a19f48901f57734a2f94374623d46f3bfbcf45e2e63afa63b6cd042cd4
5
5
  SHA512:
6
- metadata.gz: 104c6d41b297f964ed029e0b4028cc6bda3d50d7b47629b69972ce9ff76d89d732ac72942da04be79d277f0a0f633636454550317e30bb15c3b9c34cc17a3718
7
- data.tar.gz: 42aa06ddf32c4cc075d7fcabadada8ef3b55025c580aa6f85cc16caa88428b820f5b5d10f5684d64a76ac2be65178e80d53fb56ec242e2ae576a25b68e03b0bb
6
+ metadata.gz: bfd068d5c0ea289bba07068b5a8379f135aa9e26f8ad686dacb7f78a98f1e504b6c36f98695a81ff08b43f386f06be2eb92f5d4389e1f767f9b2cad0c3e5862b
7
+ data.tar.gz: f12d5213e02aea8c43aa64b08e5b986abc11e83ee60ea560a49a0f818c2bf4489f7fbb29b0e5527dbb35ee4fba821042e2ab6d2ea06d4760fb84a35fd055625f
data/README.md CHANGED
@@ -7,7 +7,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: v3
10
- - Package version: 0.2.0b3
10
+ - Package version: 0.2.0b5
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
 
13
13
  ## Installation
@@ -23,16 +23,16 @@ gem build pulp_ansible_client.gemspec
23
23
  Then either install the gem locally:
24
24
 
25
25
  ```shell
26
- gem install ./pulp_ansible_client-0.2.0b3.gem
26
+ gem install ./pulp_ansible_client-0.2.0b5.gem
27
27
  ```
28
28
 
29
- (for development, run `gem install --dev ./pulp_ansible_client-0.2.0b3.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./pulp_ansible_client-0.2.0b5.gem` to install the development dependencies)
30
30
 
31
31
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
32
32
 
33
33
  Finally add this to the Gemfile:
34
34
 
35
- gem 'pulp_ansible_client', '~> 0.2.0b3'
35
+ gem 'pulp_ansible_client', '~> 0.2.0b5'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -64,20 +64,22 @@ PulpAnsibleClient.configure do |config|
64
64
  end
65
65
 
66
66
  api_instance = PulpAnsibleClient::AnsibleCollectionsApi.new
67
- file = File.new('/path/to/file') # File | The Collection tarball.
67
+ relative_path = 'relative_path_example' # String | Path where the artifact is located relative to distributions base_path
68
68
  opts = {
69
- sha256: 'sha256_example', # String | An optional sha256 checksum of the uploaded file.
70
- expected_namespace: 'expected_namespace_example', # String | The expected 'namespace' of the Collection to be verified against the metadata during import.
69
+ artifact: 'artifact_example', # String | Artifact file representing the physical content
70
+ file: File.new('/path/to/file'), # File | An uploaded file that should be turned into the artifact of the content unit.
71
+ repository: 'repository_example', # String | A URI of a repository the new content unit should be associated with.
71
72
  expected_name: 'expected_name_example', # String | The expected 'name' of the Collection to be verified against the metadata during import.
73
+ expected_namespace: 'expected_namespace_example', # String | The expected 'namespace' of the Collection to be verified against the metadata during import.
72
74
  expected_version: 'expected_version_example' # String | The expected version of the Collection to be verified against the metadata during import.
73
75
  }
74
76
 
75
77
  begin
76
- #Upload a collection
77
- result = api_instance.upload_collection(file, opts)
78
+ #Create a collection version
79
+ result = api_instance.create(relative_path, opts)
78
80
  p result
79
81
  rescue PulpAnsibleClient::ApiError => e
80
- puts "Exception when calling AnsibleCollectionsApi->upload_collection: #{e}"
82
+ puts "Exception when calling AnsibleCollectionsApi->create: #{e}"
81
83
  end
82
84
 
83
85
  ```
@@ -88,7 +90,7 @@ All URIs are relative to *http://localhost:24817*
88
90
 
89
91
  Class | Method | HTTP request | Description
90
92
  ------------ | ------------- | ------------- | -------------
91
- *PulpAnsibleClient::AnsibleCollectionsApi* | [**upload_collection**](docs/AnsibleCollectionsApi.md#upload_collection) | **POST** /ansible/collections/ | Upload a collection
93
+ *PulpAnsibleClient::AnsibleCollectionsApi* | [**create**](docs/AnsibleCollectionsApi.md#create) | **POST** /ansible/collections/ | Create a collection version
92
94
  *PulpAnsibleClient::ContentCollectionVersionsApi* | [**create**](docs/ContentCollectionVersionsApi.md#create) | **POST** /pulp/api/v3/content/ansible/collection_versions/ | Create a collection version
93
95
  *PulpAnsibleClient::ContentCollectionVersionsApi* | [**list**](docs/ContentCollectionVersionsApi.md#list) | **GET** /pulp/api/v3/content/ansible/collection_versions/ | List collection versions
94
96
  *PulpAnsibleClient::ContentCollectionVersionsApi* | [**read**](docs/ContentCollectionVersionsApi.md#read) | **GET** {collection_version_href} | Inspect a collection version
@@ -109,7 +111,7 @@ Class | Method | HTTP request | Description
109
111
  *PulpAnsibleClient::PulpAnsibleGalaxyApiRolesApi* | [**list**](docs/PulpAnsibleGalaxyApiRolesApi.md#list) | **GET** /pulp_ansible/galaxy/{path}/api/v1/roles/ |
110
112
  *PulpAnsibleClient::PulpAnsibleGalaxyApiV1VersionsApi* | [**list**](docs/PulpAnsibleGalaxyApiV1VersionsApi.md#list) | **GET** /pulp_ansible/galaxy/{path}/api/v1/roles/{role_pk}/versions/ |
111
113
  *PulpAnsibleClient::PulpAnsibleGalaxyApiV2VersionsApi* | [**list**](docs/PulpAnsibleGalaxyApiV2VersionsApi.md#list) | **GET** {collection_href}versions/ |
112
- *PulpAnsibleClient::PulpAnsibleGalaxyApiV3CollectionsApi* | [**create**](docs/PulpAnsibleGalaxyApiV3CollectionsApi.md#create) | **POST** /pulp_ansible/galaxy/{path}/api/v3/artifacts/collections/ | Upload a collection
114
+ *PulpAnsibleClient::PulpAnsibleGalaxyApiV3CollectionsApi* | [**create**](docs/PulpAnsibleGalaxyApiV3CollectionsApi.md#create) | **POST** /pulp_ansible/galaxy/{path}/api/v3/artifacts/collections/ |
113
115
  *PulpAnsibleClient::PulpAnsibleGalaxyApiV3CollectionsApi* | [**read**](docs/PulpAnsibleGalaxyApiV3CollectionsApi.md#read) | **GET** {collection_import_href} | Inspect a collection import
114
116
  *PulpAnsibleClient::PulpAnsibleTagsApi* | [**list**](docs/PulpAnsibleTagsApi.md#list) | **GET** /pulp/api/v3/pulp_ansible/tags/ | List tags
115
117
  *PulpAnsibleClient::RemotesAnsibleApi* | [**create**](docs/RemotesAnsibleApi.md#create) | **POST** /pulp/api/v3/remotes/ansible/ansible/ | Create an ansible remote
@@ -4,17 +4,17 @@ All URIs are relative to *http://localhost:24817*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
- [**upload_collection**](AnsibleCollectionsApi.md#upload_collection) | **POST** /ansible/collections/ | Upload a collection
7
+ [**create**](AnsibleCollectionsApi.md#create) | **POST** /ansible/collections/ | Create a collection version
8
8
 
9
9
 
10
10
 
11
- ## upload_collection
11
+ ## create
12
12
 
13
- > AsyncOperationResponse upload_collection(file, opts)
13
+ > AsyncOperationResponse create(relative_path, opts)
14
14
 
15
- Upload a collection
15
+ Create a collection version
16
16
 
17
- Create an artifact and trigger an asynchronous task to create Collection content from it.
17
+ Trigger an asynchronous task to create content,optionally create new repository version.
18
18
 
19
19
  ### Example
20
20
 
@@ -29,20 +29,22 @@ PulpAnsibleClient.configure do |config|
29
29
  end
30
30
 
31
31
  api_instance = PulpAnsibleClient::AnsibleCollectionsApi.new
32
- file = File.new('/path/to/file') # File | The Collection tarball.
32
+ relative_path = 'relative_path_example' # String | Path where the artifact is located relative to distributions base_path
33
33
  opts = {
34
- sha256: 'sha256_example', # String | An optional sha256 checksum of the uploaded file.
35
- expected_namespace: 'expected_namespace_example', # String | The expected 'namespace' of the Collection to be verified against the metadata during import.
34
+ artifact: 'artifact_example', # String | Artifact file representing the physical content
35
+ file: File.new('/path/to/file'), # File | An uploaded file that should be turned into the artifact of the content unit.
36
+ repository: 'repository_example', # String | A URI of a repository the new content unit should be associated with.
36
37
  expected_name: 'expected_name_example', # String | The expected 'name' of the Collection to be verified against the metadata during import.
38
+ expected_namespace: 'expected_namespace_example', # String | The expected 'namespace' of the Collection to be verified against the metadata during import.
37
39
  expected_version: 'expected_version_example' # String | The expected version of the Collection to be verified against the metadata during import.
38
40
  }
39
41
 
40
42
  begin
41
- #Upload a collection
42
- result = api_instance.upload_collection(file, opts)
43
+ #Create a collection version
44
+ result = api_instance.create(relative_path, opts)
43
45
  p result
44
46
  rescue PulpAnsibleClient::ApiError => e
45
- puts "Exception when calling AnsibleCollectionsApi->upload_collection: #{e}"
47
+ puts "Exception when calling AnsibleCollectionsApi->create: #{e}"
46
48
  end
47
49
  ```
48
50
 
@@ -51,10 +53,12 @@ end
51
53
 
52
54
  Name | Type | Description | Notes
53
55
  ------------- | ------------- | ------------- | -------------
54
- **file** | **File**| The Collection tarball. |
55
- **sha256** | **String**| An optional sha256 checksum of the uploaded file. | [optional]
56
- **expected_namespace** | **String**| The expected 'namespace' of the Collection to be verified against the metadata during import. | [optional]
56
+ **relative_path** | **String**| Path where the artifact is located relative to distributions base_path |
57
+ **artifact** | **String**| Artifact file representing the physical content | [optional]
58
+ **file** | **File**| An uploaded file that should be turned into the artifact of the content unit. | [optional]
59
+ **repository** | **String**| A URI of a repository the new content unit should be associated with. | [optional]
57
60
  **expected_name** | **String**| The expected 'name' of the Collection to be verified against the metadata during import. | [optional]
61
+ **expected_namespace** | **String**| The expected 'namespace' of the Collection to be verified against the metadata during import. | [optional]
58
62
  **expected_version** | **String**| The expected version of the Collection to be verified against the metadata during import. | [optional]
59
63
 
60
64
  ### Return type
@@ -4,42 +4,50 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **artifact** | **String** | Artifact file representing the physical content |
7
+ **_href** | **String** | | [optional]
8
8
  **_created** | **DateTime** | Timestamp of creation. | [optional]
9
9
  **_type** | **String** | | [optional]
10
- **_href** | **String** | | [optional]
10
+ **artifact** | **String** | Artifact file representing the physical content | [optional]
11
+ **relative_path** | **String** | Path where the artifact is located relative to distributions base_path |
12
+ **file** | **String** | An uploaded file that should be turned into the artifact of the content unit. | [optional]
13
+ **repository** | **String** | A URI of a repository the new content unit should be associated with. | [optional]
11
14
  **md5** | **String** | The MD5 checksum if available. | [optional]
12
15
  **sha1** | **String** | The SHA-1 checksum if available. | [optional]
13
16
  **sha224** | **String** | The SHA-224 checksum if available. | [optional]
14
17
  **sha256** | **String** | The SHA-256 checksum if available. | [optional]
15
18
  **sha384** | **String** | The SHA-384 checksum if available. | [optional]
16
19
  **sha512** | **String** | The SHA-512 checksum if available. | [optional]
17
- **id** | **String** | A collection identifier. |
18
- **authors** | **Array<String>** | A list of the CollectionVersion content's authors. |
19
- **contents** | **Array<Hash<String, String>>** | A JSON field with data about the contents. |
20
- **dependencies** | **Hash<String, String>** | A dict declaring Collections that this collection requires to be installed for it to be usable. |
21
- **description** | **String** | A short summary description of the collection. |
22
- **docs_blob** | **Hash<String, String>** | A JSON field holding the various documentation blobs in the collection. |
23
- **documentation** | **String** | The URL to any online docs. |
24
- **homepage** | **String** | The URL to the homepage of the collection/project. |
25
- **issues** | **String** | The URL to the collection issue tracker. |
26
- **is_certified** | **Boolean** | Indicates that the version is certified |
27
- **license** | **Array<String>** | A list of licenses for content inside of a collection. |
28
- **name** | **String** | The name of the collection. |
29
- **namespace** | **String** | The namespace of the collection. |
30
- **repository** | **String** | The URL of the originating SCM repository. |
20
+ **id** | **String** | A collection identifier. | [optional]
21
+ **authors** | **Array<String>** | A list of the CollectionVersion content's authors. | [optional]
22
+ **contents** | **Array<Hash<String, String>>** | A JSON field with data about the contents. | [optional]
23
+ **dependencies** | **Hash<String, String>** | A dict declaring Collections that this collection requires to be installed for it to be usable. | [optional]
24
+ **description** | **String** | A short summary description of the collection. | [optional]
25
+ **docs_blob** | **Hash<String, String>** | A JSON field holding the various documentation blobs in the collection. | [optional]
26
+ **documentation** | **String** | The URL to any online docs. | [optional]
27
+ **homepage** | **String** | The URL to the homepage of the collection/project. | [optional]
28
+ **issues** | **String** | The URL to the collection issue tracker. | [optional]
29
+ **is_certified** | **Boolean** | Indicates that the version is certified | [optional]
30
+ **license** | **Array<String>** | A list of licenses for content inside of a collection. | [optional]
31
+ **name** | **String** | The name of the collection. | [optional]
32
+ **namespace** | **String** | The namespace of the collection. | [optional]
31
33
  **tags** | [**Array<TagNested>**](TagNested.md) | | [optional]
32
- **version** | **String** | The version of the collection. |
34
+ **version** | **String** | The version of the collection. | [optional]
35
+ **expected_name** | **String** | The expected 'name' of the Collection to be verified against the metadata during import. | [optional]
36
+ **expected_namespace** | **String** | The expected 'namespace' of the Collection to be verified against the metadata during import. | [optional]
37
+ **expected_version** | **String** | The expected version of the Collection to be verified against the metadata during import. | [optional]
33
38
 
34
39
  ## Code Sample
35
40
 
36
41
  ```ruby
37
42
  require 'PulpAnsibleClient'
38
43
 
39
- instance = PulpAnsibleClient::CollectionVersion.new(artifact: null,
44
+ instance = PulpAnsibleClient::CollectionVersion.new(_href: null,
40
45
  _created: null,
41
46
  _type: null,
42
- _href: null,
47
+ artifact: null,
48
+ relative_path: null,
49
+ file: null,
50
+ repository: null,
43
51
  md5: null,
44
52
  sha1: null,
45
53
  sha224: null,
@@ -59,9 +67,11 @@ instance = PulpAnsibleClient::CollectionVersion.new(artifact: null,
59
67
  license: null,
60
68
  name: null,
61
69
  namespace: null,
62
- repository: null,
63
70
  tags: null,
64
- version: null)
71
+ version: null,
72
+ expected_name: null,
73
+ expected_namespace: null,
74
+ expected_version: null)
65
75
  ```
66
76
 
67
77
 
@@ -12,11 +12,11 @@ Method | HTTP request | Description
12
12
 
13
13
  ## create
14
14
 
15
- > CollectionVersion create(data)
15
+ > AsyncOperationResponse create(relative_path, opts)
16
16
 
17
17
  Create a collection version
18
18
 
19
- ViewSet for Ansible Collection.
19
+ Trigger an asynchronous task to create content,optionally create new repository version.
20
20
 
21
21
  ### Example
22
22
 
@@ -31,11 +31,19 @@ PulpAnsibleClient.configure do |config|
31
31
  end
32
32
 
33
33
  api_instance = PulpAnsibleClient::ContentCollectionVersionsApi.new
34
- data = PulpAnsibleClient::CollectionVersion.new # CollectionVersion |
34
+ relative_path = 'relative_path_example' # String | Path where the artifact is located relative to distributions base_path
35
+ opts = {
36
+ artifact: 'artifact_example', # String | Artifact file representing the physical content
37
+ file: File.new('/path/to/file'), # File | An uploaded file that should be turned into the artifact of the content unit.
38
+ repository: 'repository_example', # String | A URI of a repository the new content unit should be associated with.
39
+ expected_name: 'expected_name_example', # String | The expected 'name' of the Collection to be verified against the metadata during import.
40
+ expected_namespace: 'expected_namespace_example', # String | The expected 'namespace' of the Collection to be verified against the metadata during import.
41
+ expected_version: 'expected_version_example' # String | The expected version of the Collection to be verified against the metadata during import.
42
+ }
35
43
 
36
44
  begin
37
45
  #Create a collection version
38
- result = api_instance.create(data)
46
+ result = api_instance.create(relative_path, opts)
39
47
  p result
40
48
  rescue PulpAnsibleClient::ApiError => e
41
49
  puts "Exception when calling ContentCollectionVersionsApi->create: #{e}"
@@ -47,11 +55,17 @@ end
47
55
 
48
56
  Name | Type | Description | Notes
49
57
  ------------- | ------------- | ------------- | -------------
50
- **data** | [**CollectionVersion**](CollectionVersion.md)| |
58
+ **relative_path** | **String**| Path where the artifact is located relative to distributions base_path |
59
+ **artifact** | **String**| Artifact file representing the physical content | [optional]
60
+ **file** | **File**| An uploaded file that should be turned into the artifact of the content unit. | [optional]
61
+ **repository** | **String**| A URI of a repository the new content unit should be associated with. | [optional]
62
+ **expected_name** | **String**| The expected 'name' of the Collection to be verified against the metadata during import. | [optional]
63
+ **expected_namespace** | **String**| The expected 'namespace' of the Collection to be verified against the metadata during import. | [optional]
64
+ **expected_version** | **String**| The expected version of the Collection to be verified against the metadata during import. | [optional]
51
65
 
52
66
  ### Return type
53
67
 
54
- [**CollectionVersion**](CollectionVersion.md)
68
+ [**AsyncOperationResponse**](AsyncOperationResponse.md)
55
69
 
56
70
  ### Authorization
57
71
 
@@ -59,7 +73,7 @@ Name | Type | Description | Notes
59
73
 
60
74
  ### HTTP request headers
61
75
 
62
- - **Content-Type**: application/json
76
+ - **Content-Type**: multipart/form-data, application/x-www-form-urlencoded
63
77
  - **Accept**: application/json
64
78
 
65
79
 
@@ -12,11 +12,11 @@ Method | HTTP request | Description
12
12
 
13
13
  ## create
14
14
 
15
- > Role create(data)
15
+ > AsyncOperationResponse create(version, name, namespace, opts)
16
16
 
17
17
  Create a role
18
18
 
19
- ViewSet for Role.
19
+ Trigger an asynchronous task to create content,optionally create new repository version.
20
20
 
21
21
  ### Example
22
22
 
@@ -31,11 +31,18 @@ PulpAnsibleClient.configure do |config|
31
31
  end
32
32
 
33
33
  api_instance = PulpAnsibleClient::ContentRolesApi.new
34
- data = PulpAnsibleClient::Role.new # Role |
34
+ version = 'version_example' # String |
35
+ name = 'name_example' # String |
36
+ namespace = 'namespace_example' # String |
37
+ opts = {
38
+ file: File.new('/path/to/file'), # File | An uploaded file that should be turned into the artifact of the content unit.
39
+ repository: 'repository_example', # String | A URI of a repository the new content unit should be associated with.
40
+ artifact: 'artifact_example' # String | Artifact file representing the physical content
41
+ }
35
42
 
36
43
  begin
37
44
  #Create a role
38
- result = api_instance.create(data)
45
+ result = api_instance.create(version, name, namespace, opts)
39
46
  p result
40
47
  rescue PulpAnsibleClient::ApiError => e
41
48
  puts "Exception when calling ContentRolesApi->create: #{e}"
@@ -47,11 +54,16 @@ end
47
54
 
48
55
  Name | Type | Description | Notes
49
56
  ------------- | ------------- | ------------- | -------------
50
- **data** | [**Role**](Role.md)| |
57
+ **version** | **String**| |
58
+ **name** | **String**| |
59
+ **namespace** | **String**| |
60
+ **file** | **File**| An uploaded file that should be turned into the artifact of the content unit. | [optional]
61
+ **repository** | **String**| A URI of a repository the new content unit should be associated with. | [optional]
62
+ **artifact** | **String**| Artifact file representing the physical content | [optional]
51
63
 
52
64
  ### Return type
53
65
 
54
- [**Role**](Role.md)
66
+ [**AsyncOperationResponse**](AsyncOperationResponse.md)
55
67
 
56
68
  ### Authorization
57
69
 
@@ -59,7 +71,7 @@ Name | Type | Description | Notes
59
71
 
60
72
  ### HTTP request headers
61
73
 
62
- - **Content-Type**: application/json
74
+ - **Content-Type**: multipart/form-data, application/x-www-form-urlencoded
63
75
  - **Accept**: application/json
64
76
 
65
77
 
@@ -4,18 +4,18 @@ All URIs are relative to *http://localhost:24817*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
- [**create**](PulpAnsibleGalaxyApiV3CollectionsApi.md#create) | **POST** /pulp_ansible/galaxy/{path}/api/v3/artifacts/collections/ | Upload a collection
7
+ [**create**](PulpAnsibleGalaxyApiV3CollectionsApi.md#create) | **POST** /pulp_ansible/galaxy/{path}/api/v3/artifacts/collections/ |
8
8
  [**read**](PulpAnsibleGalaxyApiV3CollectionsApi.md#read) | **GET** {collection_import_href} | Inspect a collection import
9
9
 
10
10
 
11
11
 
12
12
  ## create
13
13
 
14
- > AsyncOperationResponse create(path, file, opts)
14
+ > create(path)
15
15
 
16
- Upload a collection
17
16
 
18
- Create an artifact and trigger an asynchronous task to create Collection content from it.
17
+
18
+ ViewSet for CollectionVersions.
19
19
 
20
20
  ### Example
21
21
 
@@ -31,18 +31,9 @@ end
31
31
 
32
32
  api_instance = PulpAnsibleClient::PulpAnsibleGalaxyApiV3CollectionsApi.new
33
33
  path = 'path_example' # String |
34
- file = File.new('/path/to/file') # File | The Collection tarball.
35
- opts = {
36
- sha256: 'sha256_example', # String | An optional sha256 checksum of the uploaded file.
37
- expected_namespace: 'expected_namespace_example', # String | The expected 'namespace' of the Collection to be verified against the metadata during import.
38
- expected_name: 'expected_name_example', # String | The expected 'name' of the Collection to be verified against the metadata during import.
39
- expected_version: 'expected_version_example' # String | The expected version of the Collection to be verified against the metadata during import.
40
- }
41
34
 
42
35
  begin
43
- #Upload a collection
44
- result = api_instance.create(path, file, opts)
45
- p result
36
+ api_instance.create(path)
46
37
  rescue PulpAnsibleClient::ApiError => e
47
38
  puts "Exception when calling PulpAnsibleGalaxyApiV3CollectionsApi->create: #{e}"
48
39
  end
@@ -54,15 +45,10 @@ end
54
45
  Name | Type | Description | Notes
55
46
  ------------- | ------------- | ------------- | -------------
56
47
  **path** | **String**| |
57
- **file** | **File**| The Collection tarball. |
58
- **sha256** | **String**| An optional sha256 checksum of the uploaded file. | [optional]
59
- **expected_namespace** | **String**| The expected 'namespace' of the Collection to be verified against the metadata during import. | [optional]
60
- **expected_name** | **String**| The expected 'name' of the Collection to be verified against the metadata during import. | [optional]
61
- **expected_version** | **String**| The expected version of the Collection to be verified against the metadata during import. | [optional]
62
48
 
63
49
  ### Return type
64
50
 
65
- [**AsyncOperationResponse**](AsyncOperationResponse.md)
51
+ nil (empty response body)
66
52
 
67
53
  ### Authorization
68
54
 
@@ -70,8 +56,8 @@ Name | Type | Description | Notes
70
56
 
71
57
  ### HTTP request headers
72
58
 
73
- - **Content-Type**: multipart/form-data, application/x-www-form-urlencoded
74
- - **Accept**: application/json
59
+ - **Content-Type**: Not defined
60
+ - **Accept**: Not defined
75
61
 
76
62
 
77
63
  ## read
data/docs/Role.md CHANGED
@@ -4,10 +4,12 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **artifact** | **String** | Artifact file representing the physical content |
7
+ **file** | **String** | An uploaded file that should be turned into the artifact of the content unit. | [optional]
8
8
  **_created** | **DateTime** | Timestamp of creation. | [optional]
9
- **_type** | **String** | | [optional]
9
+ **repository** | **String** | A URI of a repository the new content unit should be associated with. | [optional]
10
10
  **_href** | **String** | | [optional]
11
+ **_type** | **String** | | [optional]
12
+ **artifact** | **String** | Artifact file representing the physical content | [optional]
11
13
  **version** | **String** | |
12
14
  **name** | **String** | |
13
15
  **namespace** | **String** | |
@@ -17,10 +19,12 @@ Name | Type | Description | Notes
17
19
  ```ruby
18
20
  require 'PulpAnsibleClient'
19
21
 
20
- instance = PulpAnsibleClient::Role.new(artifact: null,
22
+ instance = PulpAnsibleClient::Role.new(file: null,
21
23
  _created: null,
22
- _type: null,
24
+ repository: null,
23
25
  _href: null,
26
+ _type: null,
27
+ artifact: null,
24
28
  version: null,
25
29
  name: null,
26
30
  namespace: null)
@@ -19,51 +19,55 @@ module PulpAnsibleClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Upload a collection
23
- # Create an artifact and trigger an asynchronous task to create Collection content from it.
24
- # @param file [File] The Collection tarball.
22
+ # Create a collection version
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
- # @option opts [String] :sha256 An optional sha256 checksum of the uploaded file.
27
- # @option opts [String] :expected_namespace The expected 'namespace' of the Collection to be verified against the metadata during import.
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.
28
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.
29
31
  # @option opts [String] :expected_version The expected version of the Collection to be verified against the metadata during import.
30
32
  # @return [AsyncOperationResponse]
31
- def upload_collection(file, opts = {})
32
- data, _status_code, _headers = upload_collection_with_http_info(file, opts)
33
+ def create(relative_path, opts = {})
34
+ data, _status_code, _headers = create_with_http_info(relative_path, opts)
33
35
  data
34
36
  end
35
37
 
36
- # Upload a collection
37
- # Create an artifact and trigger an asynchronous task to create Collection content from it.
38
- # @param file [File] The Collection tarball.
38
+ # Create a collection version
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
39
41
  # @param [Hash] opts the optional parameters
40
- # @option opts [String] :sha256 An optional sha256 checksum of the uploaded file.
41
- # @option opts [String] :expected_namespace The expected 'namespace' of the Collection to be verified against the metadata during import.
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.
42
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.
43
47
  # @option opts [String] :expected_version The expected version of the Collection to be verified against the metadata during import.
44
48
  # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
45
- def upload_collection_with_http_info(file, opts = {})
49
+ def create_with_http_info(relative_path, opts = {})
46
50
  if @api_client.config.debugging
47
- @api_client.config.logger.debug 'Calling API: AnsibleCollectionsApi.upload_collection ...'
51
+ @api_client.config.logger.debug 'Calling API: AnsibleCollectionsApi.create ...'
48
52
  end
49
- # verify the required parameter 'file' is set
50
- if @api_client.config.client_side_validation && file.nil?
51
- fail ArgumentError, "Missing the required parameter 'file' when calling AnsibleCollectionsApi.upload_collection"
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 AnsibleCollectionsApi.create"
52
56
  end
53
- if @api_client.config.client_side_validation && !opts[:'sha256'].nil? && opts[:'sha256'].to_s.length < 1
54
- fail ArgumentError, 'invalid value for "opts[:"sha256"]" when calling AnsibleCollectionsApi.upload_collection, the character length must be great than or equal to 1.'
57
+ if @api_client.config.client_side_validation && relative_path.to_s.length < 1
58
+ fail ArgumentError, 'invalid value for "relative_path" when calling AnsibleCollectionsApi.create, the character length must be great than or equal to 1.'
55
59
  end
56
60
 
57
- if @api_client.config.client_side_validation && !opts[:'expected_namespace'].nil? && opts[:'expected_namespace'].to_s.length < 1
58
- fail ArgumentError, 'invalid value for "opts[:"expected_namespace"]" when calling AnsibleCollectionsApi.upload_collection, the character length must be great than or equal to 1.'
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 AnsibleCollectionsApi.create, the character length must be great than or equal to 1.'
59
63
  end
60
64
 
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 AnsibleCollectionsApi.upload_collection, the character length must be great than or equal to 1.'
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 AnsibleCollectionsApi.create, the character length must be great than or equal to 1.'
63
67
  end
64
68
 
65
69
  if @api_client.config.client_side_validation && !opts[:'expected_version'].nil? && opts[:'expected_version'].to_s.length < 1
66
- fail ArgumentError, 'invalid value for "opts[:"expected_version"]" when calling AnsibleCollectionsApi.upload_collection, the character length must be great than or equal to 1.'
70
+ fail ArgumentError, 'invalid value for "opts[:"expected_version"]" when calling AnsibleCollectionsApi.create, the character length must be great than or equal to 1.'
67
71
  end
68
72
 
69
73
  # resource path
@@ -81,10 +85,12 @@ module PulpAnsibleClient
81
85
 
82
86
  # form parameters
83
87
  form_params = opts[:form_params] || {}
84
- form_params['file'] = file
85
- form_params['sha256'] = opts[:'sha256'] if !opts[:'sha256'].nil?
86
- form_params['expected_namespace'] = opts[:'expected_namespace'] if !opts[:'expected_namespace'].nil?
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?
87
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?
88
94
  form_params['expected_version'] = opts[:'expected_version'] if !opts[:'expected_version'].nil?
89
95
 
90
96
  # http body (model)
@@ -107,7 +113,7 @@ module PulpAnsibleClient
107
113
 
108
114
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
109
115
  if @api_client.config.debugging
110
- @api_client.config.logger.debug "API called: AnsibleCollectionsApi#upload_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
116
+ @api_client.config.logger.debug "API called: AnsibleCollectionsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
111
117
  end
112
118
  return data, status_code, headers
113
119
  end