pulp_container_client 2.9.10 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/docs/ContainerContainerDistribution.md +7 -7
- data/docs/ContainerContainerDistributionResponse.md +9 -9
- data/docs/ContainerContainerPushRepository.md +6 -6
- data/docs/ContainerContainerPushRepositoryResponse.md +11 -11
- data/docs/ContainerContainerRemote.md +1 -1
- data/docs/ContainerContainerRemoteResponse.md +1 -1
- data/docs/PatchedcontainerContainerDistribution.md +7 -7
- data/docs/PatchedcontainerContainerPushRepository.md +6 -6
- data/docs/PatchedcontainerContainerRemote.md +1 -1
- data/git_push.sh +58 -0
- data/lib/pulp_container_client/api/repositories_container_api.rb +4 -0
- data/lib/pulp_container_client/api_client.rb +5 -2
- data/lib/pulp_container_client/configuration.rb +0 -1
- data/lib/pulp_container_client/models/container_container_distribution.rb +81 -28
- data/lib/pulp_container_client/models/container_container_distribution_response.rb +40 -40
- data/lib/pulp_container_client/models/container_container_namespace.rb +9 -0
- data/lib/pulp_container_client/models/container_container_push_repository.rb +62 -28
- data/lib/pulp_container_client/models/container_container_push_repository_response.rb +52 -52
- data/lib/pulp_container_client/models/container_container_remote.rb +178 -1
- data/lib/pulp_container_client/models/container_container_remote_response.rb +1 -1
- data/lib/pulp_container_client/models/container_container_repository.rb +34 -0
- data/lib/pulp_container_client/models/container_content_redirect_content_guard.rb +34 -0
- data/lib/pulp_container_client/models/oci_build_image.rb +15 -0
- data/lib/pulp_container_client/models/patchedcontainer_container_distribution.rb +70 -25
- data/lib/pulp_container_client/models/patchedcontainer_container_push_repository.rb +55 -25
- data/lib/pulp_container_client/models/patchedcontainer_container_remote.rb +166 -1
- data/lib/pulp_container_client/models/patchedcontainer_container_repository.rb +30 -0
- data/lib/pulp_container_client/models/patchedcontainer_content_redirect_content_guard.rb +30 -0
- data/lib/pulp_container_client/models/remove_image.rb +19 -0
- data/lib/pulp_container_client/models/tag_image.rb +28 -0
- data/lib/pulp_container_client/models/un_tag_image.rb +9 -0
- data/lib/pulp_container_client/version.rb +1 -1
- data/pulp_container_client.gemspec +3 -3
- data/spec/models/container_container_distribution_response_spec.rb +7 -7
- data/spec/models/container_container_distribution_spec.rb +4 -4
- data/spec/models/container_container_push_repository_response_spec.rb +8 -8
- data/spec/models/container_container_push_repository_spec.rb +4 -4
- data/spec/models/patchedcontainer_container_distribution_spec.rb +4 -4
- data/spec/models/patchedcontainer_container_push_repository_spec.rb +4 -4
- metadata +50 -55
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 890ae806d5568796d9d695cf6fc9fabe107715259b000e5066e6c55ccf86b4be
|
4
|
+
data.tar.gz: 856d0397b844b86d74638cea8ed9a987133dc44fa13a9cedf2ef1a96bdd917e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30979b01677ff0bde2da7071967eb6d7c3de35910ebef1235adc72c4fa426ebb79d009fbcb248e8d91f8559f3d36464f1d22a6c7583b09545d460373a34f4e7e
|
7
|
+
data.tar.gz: 10aa556ab8550edf0ab51ac18bf8b434054760db5213a916fb04f8d1cd03b8c6226fe5634542435f8dca1fa3df61bc7956f8462b04ec373b2cd1f8d42d8bccb0
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Fetch, Upload, Organize, and Distribute Software Packages
|
|
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: 2.
|
10
|
+
- Package version: 2.10.0
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [https://pulpproject.org](https://pulpproject.org)
|
13
13
|
|
@@ -24,16 +24,16 @@ gem build pulp_container_client.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./pulp_container_client-2.
|
27
|
+
gem install ./pulp_container_client-2.10.0.gem
|
28
28
|
```
|
29
29
|
|
30
|
-
(for development, run `gem install --dev ./pulp_container_client-2.
|
30
|
+
(for development, run `gem install --dev ./pulp_container_client-2.10.0.gem` to install the development dependencies)
|
31
31
|
|
32
32
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
33
33
|
|
34
34
|
Finally add this to the Gemfile:
|
35
35
|
|
36
|
-
gem 'pulp_container_client', '~> 2.
|
36
|
+
gem 'pulp_container_client', '~> 2.10.0'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -4,11 +4,11 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**base_path** | **String** | The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") |
|
8
|
-
**repository** | **String** | The latest RepositoryVersion for this Repository will be served. | [optional]
|
9
|
-
**name** | **String** | A unique name. Ex, `rawhide` and `stable`. |
|
10
7
|
**pulp_labels** | [**Object**](.md) | | [optional]
|
11
8
|
**content_guard** | **String** | An optional content-guard. If none is specified, a default one will be used. | [optional]
|
9
|
+
**name** | **String** | A unique name. Ex, `rawhide` and `stable`. |
|
10
|
+
**base_path** | **String** | The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") |
|
11
|
+
**repository** | **String** | The latest RepositoryVersion for this Repository will be served. | [optional]
|
12
12
|
**repository_version** | **String** | RepositoryVersion to be served | [optional]
|
13
13
|
**private** | **Boolean** | Restrict pull access to explicitly authorized users. Defaults to unrestricted pull access. | [optional]
|
14
14
|
**description** | **String** | An optional description. | [optional]
|
@@ -18,11 +18,11 @@ Name | Type | Description | Notes
|
|
18
18
|
```ruby
|
19
19
|
require 'PulpContainerClient'
|
20
20
|
|
21
|
-
instance = PulpContainerClient::ContainerContainerDistribution.new(
|
22
|
-
repository: null,
|
23
|
-
name: null,
|
24
|
-
pulp_labels: null,
|
21
|
+
instance = PulpContainerClient::ContainerContainerDistribution.new(pulp_labels: null,
|
25
22
|
content_guard: null,
|
23
|
+
name: null,
|
24
|
+
base_path: null,
|
25
|
+
repository: null,
|
26
26
|
repository_version: null,
|
27
27
|
private: null,
|
28
28
|
description: null)
|
@@ -4,13 +4,13 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**base_path** | **String** | The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") |
|
8
|
-
**repository** | **String** | The latest RepositoryVersion for this Repository will be served. | [optional]
|
9
|
-
**name** | **String** | A unique name. Ex, `rawhide` and `stable`. |
|
10
7
|
**pulp_created** | **DateTime** | Timestamp of creation. | [optional] [readonly]
|
11
|
-
**pulp_href** | **String** | | [optional] [readonly]
|
12
8
|
**pulp_labels** | [**Object**](.md) | | [optional]
|
13
9
|
**content_guard** | **String** | An optional content-guard. If none is specified, a default one will be used. | [optional]
|
10
|
+
**name** | **String** | A unique name. Ex, `rawhide` and `stable`. |
|
11
|
+
**base_path** | **String** | The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") |
|
12
|
+
**pulp_href** | **String** | | [optional] [readonly]
|
13
|
+
**repository** | **String** | The latest RepositoryVersion for this Repository will be served. | [optional]
|
14
14
|
**repository_version** | **String** | RepositoryVersion to be served | [optional]
|
15
15
|
**registry_path** | **String** | The Registry hostame/name/ to use with docker pull command defined by this distribution. | [optional] [readonly]
|
16
16
|
**namespace** | **String** | Namespace this distribution belongs to. | [optional] [readonly]
|
@@ -22,13 +22,13 @@ Name | Type | Description | Notes
|
|
22
22
|
```ruby
|
23
23
|
require 'PulpContainerClient'
|
24
24
|
|
25
|
-
instance = PulpContainerClient::ContainerContainerDistributionResponse.new(
|
26
|
-
repository: null,
|
27
|
-
name: null,
|
28
|
-
pulp_created: null,
|
29
|
-
pulp_href: null,
|
25
|
+
instance = PulpContainerClient::ContainerContainerDistributionResponse.new(pulp_created: null,
|
30
26
|
pulp_labels: null,
|
31
27
|
content_guard: null,
|
28
|
+
name: null,
|
29
|
+
base_path: null,
|
30
|
+
pulp_href: null,
|
31
|
+
repository: null,
|
32
32
|
repository_version: null,
|
33
33
|
registry_path: null,
|
34
34
|
namespace: null,
|
@@ -4,20 +4,20 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**name** | **String** | A unique name for this repository. |
|
8
|
-
**retain_repo_versions** | **Integer** | Retain X versions of the repository. Default is null which retains all versions. This is provided as a tech preview in Pulp 3 and may change in the future. | [optional]
|
9
|
-
**pulp_labels** | [**Object**](.md) | | [optional]
|
10
7
|
**description** | **String** | An optional description. | [optional]
|
8
|
+
**pulp_labels** | [**Object**](.md) | | [optional]
|
9
|
+
**retain_repo_versions** | **Integer** | Retain X versions of the repository. Default is null which retains all versions. This is provided as a tech preview in Pulp 3 and may change in the future. | [optional]
|
10
|
+
**name** | **String** | A unique name for this repository. |
|
11
11
|
|
12
12
|
## Code Sample
|
13
13
|
|
14
14
|
```ruby
|
15
15
|
require 'PulpContainerClient'
|
16
16
|
|
17
|
-
instance = PulpContainerClient::ContainerContainerPushRepository.new(
|
18
|
-
retain_repo_versions: null,
|
17
|
+
instance = PulpContainerClient::ContainerContainerPushRepository.new(description: null,
|
19
18
|
pulp_labels: null,
|
20
|
-
|
19
|
+
retain_repo_versions: null,
|
20
|
+
name: null)
|
21
21
|
```
|
22
22
|
|
23
23
|
|
@@ -4,28 +4,28 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**latest_version_href** | **String** | | [optional] [readonly]
|
8
|
-
**name** | **String** | A unique name for this repository. |
|
9
|
-
**versions_href** | **String** | | [optional] [readonly]
|
10
7
|
**pulp_created** | **DateTime** | Timestamp of creation. | [optional] [readonly]
|
8
|
+
**description** | **String** | An optional description. | [optional]
|
9
|
+
**pulp_labels** | [**Object**](.md) | | [optional]
|
11
10
|
**retain_repo_versions** | **Integer** | Retain X versions of the repository. Default is null which retains all versions. This is provided as a tech preview in Pulp 3 and may change in the future. | [optional]
|
11
|
+
**name** | **String** | A unique name for this repository. |
|
12
|
+
**versions_href** | **String** | | [optional] [readonly]
|
13
|
+
**latest_version_href** | **String** | | [optional] [readonly]
|
12
14
|
**pulp_href** | **String** | | [optional] [readonly]
|
13
|
-
**pulp_labels** | [**Object**](.md) | | [optional]
|
14
|
-
**description** | **String** | An optional description. | [optional]
|
15
15
|
|
16
16
|
## Code Sample
|
17
17
|
|
18
18
|
```ruby
|
19
19
|
require 'PulpContainerClient'
|
20
20
|
|
21
|
-
instance = PulpContainerClient::ContainerContainerPushRepositoryResponse.new(
|
21
|
+
instance = PulpContainerClient::ContainerContainerPushRepositoryResponse.new(pulp_created: null,
|
22
|
+
description: null,
|
23
|
+
pulp_labels: null,
|
24
|
+
retain_repo_versions: null,
|
22
25
|
name: null,
|
23
26
|
versions_href: null,
|
24
|
-
|
25
|
-
|
26
|
-
pulp_href: null,
|
27
|
-
pulp_labels: null,
|
28
|
-
description: null)
|
27
|
+
latest_version_href: null,
|
28
|
+
pulp_href: null)
|
29
29
|
```
|
30
30
|
|
31
31
|
|
@@ -24,7 +24,7 @@ Name | Type | Description | Notes
|
|
24
24
|
**sock_connect_timeout** | **Float** | aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional]
|
25
25
|
**sock_read_timeout** | **Float** | aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional]
|
26
26
|
**headers** | **Array<Object>** | Headers for aiohttp.Clientsession | [optional]
|
27
|
-
**rate_limit** | **Integer** | Limits
|
27
|
+
**rate_limit** | **Integer** | Limits requests per second for each concurrent downloader | [optional]
|
28
28
|
**upstream_name** | **String** | Name of the upstream repository |
|
29
29
|
**include_tags** | **Array<String>** | A list of tags to include during sync. Wildcards *, ? are recognized. 'include_tags' is evaluated before 'exclude_tags'. | [optional]
|
30
30
|
**exclude_tags** | **Array<String>** | A list of tags to exclude during sync. Wildcards *, ? are recognized. 'exclude_tags' is evaluated after 'include_tags'. | [optional]
|
@@ -22,7 +22,7 @@ Name | Type | Description | Notes
|
|
22
22
|
**sock_connect_timeout** | **Float** | aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional]
|
23
23
|
**sock_read_timeout** | **Float** | aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional]
|
24
24
|
**headers** | **Array<Object>** | Headers for aiohttp.Clientsession | [optional]
|
25
|
-
**rate_limit** | **Integer** | Limits
|
25
|
+
**rate_limit** | **Integer** | Limits requests per second for each concurrent downloader | [optional]
|
26
26
|
**upstream_name** | **String** | Name of the upstream repository |
|
27
27
|
**include_tags** | **Array<String>** | A list of tags to include during sync. Wildcards *, ? are recognized. 'include_tags' is evaluated before 'exclude_tags'. | [optional]
|
28
28
|
**exclude_tags** | **Array<String>** | A list of tags to exclude during sync. Wildcards *, ? are recognized. 'exclude_tags' is evaluated after 'include_tags'. | [optional]
|
@@ -4,11 +4,11 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**base_path** | **String** | The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") | [optional]
|
8
|
-
**repository** | **String** | The latest RepositoryVersion for this Repository will be served. | [optional]
|
9
|
-
**name** | **String** | A unique name. Ex, `rawhide` and `stable`. | [optional]
|
10
7
|
**pulp_labels** | [**Object**](.md) | | [optional]
|
11
8
|
**content_guard** | **String** | An optional content-guard. If none is specified, a default one will be used. | [optional]
|
9
|
+
**name** | **String** | A unique name. Ex, `rawhide` and `stable`. | [optional]
|
10
|
+
**base_path** | **String** | The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") | [optional]
|
11
|
+
**repository** | **String** | The latest RepositoryVersion for this Repository will be served. | [optional]
|
12
12
|
**repository_version** | **String** | RepositoryVersion to be served | [optional]
|
13
13
|
**private** | **Boolean** | Restrict pull access to explicitly authorized users. Defaults to unrestricted pull access. | [optional]
|
14
14
|
**description** | **String** | An optional description. | [optional]
|
@@ -18,11 +18,11 @@ Name | Type | Description | Notes
|
|
18
18
|
```ruby
|
19
19
|
require 'PulpContainerClient'
|
20
20
|
|
21
|
-
instance = PulpContainerClient::PatchedcontainerContainerDistribution.new(
|
22
|
-
repository: null,
|
23
|
-
name: null,
|
24
|
-
pulp_labels: null,
|
21
|
+
instance = PulpContainerClient::PatchedcontainerContainerDistribution.new(pulp_labels: null,
|
25
22
|
content_guard: null,
|
23
|
+
name: null,
|
24
|
+
base_path: null,
|
25
|
+
repository: null,
|
26
26
|
repository_version: null,
|
27
27
|
private: null,
|
28
28
|
description: null)
|
@@ -4,20 +4,20 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**name** | **String** | A unique name for this repository. | [optional]
|
8
|
-
**retain_repo_versions** | **Integer** | Retain X versions of the repository. Default is null which retains all versions. This is provided as a tech preview in Pulp 3 and may change in the future. | [optional]
|
9
|
-
**pulp_labels** | [**Object**](.md) | | [optional]
|
10
7
|
**description** | **String** | An optional description. | [optional]
|
8
|
+
**pulp_labels** | [**Object**](.md) | | [optional]
|
9
|
+
**retain_repo_versions** | **Integer** | Retain X versions of the repository. Default is null which retains all versions. This is provided as a tech preview in Pulp 3 and may change in the future. | [optional]
|
10
|
+
**name** | **String** | A unique name for this repository. | [optional]
|
11
11
|
|
12
12
|
## Code Sample
|
13
13
|
|
14
14
|
```ruby
|
15
15
|
require 'PulpContainerClient'
|
16
16
|
|
17
|
-
instance = PulpContainerClient::PatchedcontainerContainerPushRepository.new(
|
18
|
-
retain_repo_versions: null,
|
17
|
+
instance = PulpContainerClient::PatchedcontainerContainerPushRepository.new(description: null,
|
19
18
|
pulp_labels: null,
|
20
|
-
|
19
|
+
retain_repo_versions: null,
|
20
|
+
name: null)
|
21
21
|
```
|
22
22
|
|
23
23
|
|
@@ -24,7 +24,7 @@ Name | Type | Description | Notes
|
|
24
24
|
**sock_connect_timeout** | **Float** | aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional]
|
25
25
|
**sock_read_timeout** | **Float** | aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional]
|
26
26
|
**headers** | **Array<Object>** | Headers for aiohttp.Clientsession | [optional]
|
27
|
-
**rate_limit** | **Integer** | Limits
|
27
|
+
**rate_limit** | **Integer** | Limits requests per second for each concurrent downloader | [optional]
|
28
28
|
**upstream_name** | **String** | Name of the upstream repository | [optional]
|
29
29
|
**include_tags** | **Array<String>** | A list of tags to include during sync. Wildcards *, ? are recognized. 'include_tags' is evaluated before 'exclude_tags'. | [optional]
|
30
30
|
**exclude_tags** | **Array<String>** | A list of tags to exclude during sync. Wildcards *, ? are recognized. 'exclude_tags' is evaluated after 'include_tags'. | [optional]
|
data/git_push.sh
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
3
|
+
#
|
4
|
+
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
|
5
|
+
|
6
|
+
git_user_id=$1
|
7
|
+
git_repo_id=$2
|
8
|
+
release_note=$3
|
9
|
+
git_host=$4
|
10
|
+
|
11
|
+
if [ "$git_host" = "" ]; then
|
12
|
+
git_host="github.com"
|
13
|
+
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
14
|
+
fi
|
15
|
+
|
16
|
+
if [ "$git_user_id" = "" ]; then
|
17
|
+
git_user_id="GIT_USER_ID"
|
18
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
19
|
+
fi
|
20
|
+
|
21
|
+
if [ "$git_repo_id" = "" ]; then
|
22
|
+
git_repo_id="GIT_REPO_ID"
|
23
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
24
|
+
fi
|
25
|
+
|
26
|
+
if [ "$release_note" = "" ]; then
|
27
|
+
release_note="Minor update"
|
28
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
29
|
+
fi
|
30
|
+
|
31
|
+
# Initialize the local directory as a Git repository
|
32
|
+
git init
|
33
|
+
|
34
|
+
# Adds the files in the local repository and stages them for commit.
|
35
|
+
git add .
|
36
|
+
|
37
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
38
|
+
git commit -m "$release_note"
|
39
|
+
|
40
|
+
# Sets the new remote
|
41
|
+
git_remote=`git remote`
|
42
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
43
|
+
|
44
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
45
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
46
|
+
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
47
|
+
else
|
48
|
+
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
|
49
|
+
fi
|
50
|
+
|
51
|
+
fi
|
52
|
+
|
53
|
+
git pull origin master
|
54
|
+
|
55
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
56
|
+
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
57
|
+
git push origin master 2>&1 | grep -v 'To https'
|
58
|
+
|
@@ -120,6 +120,10 @@ module PulpContainerClient
|
|
120
120
|
if @api_client.config.client_side_validation && container_container_repository_href.nil?
|
121
121
|
fail ArgumentError, "Missing the required parameter 'container_container_repository_href' when calling RepositoriesContainerApi.build_image"
|
122
122
|
end
|
123
|
+
if @api_client.config.client_side_validation && !opts[:'tag'].nil? && opts[:'tag'].to_s.length < 1
|
124
|
+
fail ArgumentError, 'invalid value for "opts[:"tag"]" when calling RepositoriesContainerApi.build_image, the character length must be great than or equal to 1.'
|
125
|
+
end
|
126
|
+
|
123
127
|
# resource path
|
124
128
|
local_var_path = '{container_container_repository_href}build_image/'.sub('{' + 'container_container_repository_href' + '}', CGI.escape(container_container_repository_href.to_s).gsub('%2F', '/'))
|
125
129
|
|
@@ -118,6 +118,9 @@ module PulpContainerClient
|
|
118
118
|
update_params_for_auth! header_params, query_params, opts[:auth_names]
|
119
119
|
|
120
120
|
req_opts = {
|
121
|
+
:method => http_method,
|
122
|
+
:headers => header_params,
|
123
|
+
:params => query_params,
|
121
124
|
:params_encoding => @config.params_encoding,
|
122
125
|
:timeout => @config.timeout,
|
123
126
|
:verbose => @config.debugging
|
@@ -125,13 +128,13 @@ module PulpContainerClient
|
|
125
128
|
|
126
129
|
if [:post, :patch, :put, :delete].include?(http_method)
|
127
130
|
req_body = build_request_body(header_params, form_params, opts[:body])
|
131
|
+
req_opts.update :body => req_body
|
128
132
|
if @config.debugging
|
129
133
|
@config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
|
130
134
|
end
|
131
135
|
end
|
132
136
|
request.headers = header_params
|
133
137
|
request.body = req_body
|
134
|
-
request.options = OpenStruct.new(req_opts)
|
135
138
|
request.url url
|
136
139
|
request.params = query_params
|
137
140
|
download_file(request) if opts[:return_type] == 'File'
|
@@ -154,7 +157,7 @@ module PulpContainerClient
|
|
154
157
|
case value
|
155
158
|
when ::File, ::Tempfile
|
156
159
|
# TODO hardcode to application/octet-stream, need better way to detect content type
|
157
|
-
data[key] = Faraday::
|
160
|
+
data[key] = Faraday::UploadIO.new(value.path, 'application/octet-stream', value.path)
|
158
161
|
when ::Array, nil
|
159
162
|
# let Faraday handle Array and nil parameters
|
160
163
|
data[key] = value
|
@@ -15,19 +15,19 @@ require 'date'
|
|
15
15
|
module PulpContainerClient
|
16
16
|
# A serializer for ContainerDistribution.
|
17
17
|
class ContainerContainerDistribution
|
18
|
-
|
19
|
-
attr_accessor :base_path
|
18
|
+
attr_accessor :pulp_labels
|
20
19
|
|
21
|
-
#
|
22
|
-
attr_accessor :
|
20
|
+
# An optional content-guard. If none is specified, a default one will be used.
|
21
|
+
attr_accessor :content_guard
|
23
22
|
|
24
23
|
# A unique name. Ex, `rawhide` and `stable`.
|
25
24
|
attr_accessor :name
|
26
25
|
|
27
|
-
|
26
|
+
# The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
|
27
|
+
attr_accessor :base_path
|
28
28
|
|
29
|
-
#
|
30
|
-
attr_accessor :
|
29
|
+
# The latest RepositoryVersion for this Repository will be served.
|
30
|
+
attr_accessor :repository
|
31
31
|
|
32
32
|
# RepositoryVersion to be served
|
33
33
|
attr_accessor :repository_version
|
@@ -41,11 +41,11 @@ module PulpContainerClient
|
|
41
41
|
# Attribute mapping from ruby-style variable name to JSON key.
|
42
42
|
def self.attribute_map
|
43
43
|
{
|
44
|
-
:'base_path' => :'base_path',
|
45
|
-
:'repository' => :'repository',
|
46
|
-
:'name' => :'name',
|
47
44
|
:'pulp_labels' => :'pulp_labels',
|
48
45
|
:'content_guard' => :'content_guard',
|
46
|
+
:'name' => :'name',
|
47
|
+
:'base_path' => :'base_path',
|
48
|
+
:'repository' => :'repository',
|
49
49
|
:'repository_version' => :'repository_version',
|
50
50
|
:'private' => :'private',
|
51
51
|
:'description' => :'description'
|
@@ -55,11 +55,11 @@ module PulpContainerClient
|
|
55
55
|
# Attribute type mapping.
|
56
56
|
def self.openapi_types
|
57
57
|
{
|
58
|
-
:'base_path' => :'String',
|
59
|
-
:'repository' => :'String',
|
60
|
-
:'name' => :'String',
|
61
58
|
:'pulp_labels' => :'Object',
|
62
59
|
:'content_guard' => :'String',
|
60
|
+
:'name' => :'String',
|
61
|
+
:'base_path' => :'String',
|
62
|
+
:'repository' => :'String',
|
63
63
|
:'repository_version' => :'String',
|
64
64
|
:'private' => :'Boolean',
|
65
65
|
:'description' => :'String'
|
@@ -90,24 +90,24 @@ module PulpContainerClient
|
|
90
90
|
h[k.to_sym] = v
|
91
91
|
}
|
92
92
|
|
93
|
-
if attributes.key?(:'
|
94
|
-
self.
|
93
|
+
if attributes.key?(:'pulp_labels')
|
94
|
+
self.pulp_labels = attributes[:'pulp_labels']
|
95
95
|
end
|
96
96
|
|
97
|
-
if attributes.key?(:'
|
98
|
-
self.
|
97
|
+
if attributes.key?(:'content_guard')
|
98
|
+
self.content_guard = attributes[:'content_guard']
|
99
99
|
end
|
100
100
|
|
101
101
|
if attributes.key?(:'name')
|
102
102
|
self.name = attributes[:'name']
|
103
103
|
end
|
104
104
|
|
105
|
-
if attributes.key?(:'
|
106
|
-
self.
|
105
|
+
if attributes.key?(:'base_path')
|
106
|
+
self.base_path = attributes[:'base_path']
|
107
107
|
end
|
108
108
|
|
109
|
-
if attributes.key?(:'
|
110
|
-
self.
|
109
|
+
if attributes.key?(:'repository')
|
110
|
+
self.repository = attributes[:'repository']
|
111
111
|
end
|
112
112
|
|
113
113
|
if attributes.key?(:'repository_version')
|
@@ -127,12 +127,24 @@ module PulpContainerClient
|
|
127
127
|
# @return Array for valid properties with the reasons
|
128
128
|
def list_invalid_properties
|
129
129
|
invalid_properties = Array.new
|
130
|
+
if @name.nil?
|
131
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
132
|
+
end
|
133
|
+
|
134
|
+
if @name.to_s.length < 1
|
135
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
136
|
+
end
|
137
|
+
|
130
138
|
if @base_path.nil?
|
131
139
|
invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
|
132
140
|
end
|
133
141
|
|
134
|
-
if @
|
135
|
-
invalid_properties.push('invalid value for "
|
142
|
+
if @base_path.to_s.length < 1
|
143
|
+
invalid_properties.push('invalid value for "base_path", the character length must be great than or equal to 1.')
|
144
|
+
end
|
145
|
+
|
146
|
+
if !@description.nil? && @description.to_s.length < 1
|
147
|
+
invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
|
136
148
|
end
|
137
149
|
|
138
150
|
invalid_properties
|
@@ -141,21 +153,62 @@ module PulpContainerClient
|
|
141
153
|
# Check to see if the all the properties in the model are valid
|
142
154
|
# @return true if the model is valid
|
143
155
|
def valid?
|
144
|
-
return false if @base_path.nil?
|
145
156
|
return false if @name.nil?
|
157
|
+
return false if @name.to_s.length < 1
|
158
|
+
return false if @base_path.nil?
|
159
|
+
return false if @base_path.to_s.length < 1
|
160
|
+
return false if !@description.nil? && @description.to_s.length < 1
|
146
161
|
true
|
147
162
|
end
|
148
163
|
|
164
|
+
# Custom attribute writer method with validation
|
165
|
+
# @param [Object] name Value to be assigned
|
166
|
+
def name=(name)
|
167
|
+
if name.nil?
|
168
|
+
fail ArgumentError, 'name cannot be nil'
|
169
|
+
end
|
170
|
+
|
171
|
+
if name.to_s.length < 1
|
172
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
173
|
+
end
|
174
|
+
|
175
|
+
@name = name
|
176
|
+
end
|
177
|
+
|
178
|
+
# Custom attribute writer method with validation
|
179
|
+
# @param [Object] base_path Value to be assigned
|
180
|
+
def base_path=(base_path)
|
181
|
+
if base_path.nil?
|
182
|
+
fail ArgumentError, 'base_path cannot be nil'
|
183
|
+
end
|
184
|
+
|
185
|
+
if base_path.to_s.length < 1
|
186
|
+
fail ArgumentError, 'invalid value for "base_path", the character length must be great than or equal to 1.'
|
187
|
+
end
|
188
|
+
|
189
|
+
@base_path = base_path
|
190
|
+
end
|
191
|
+
|
192
|
+
# Custom attribute writer method with validation
|
193
|
+
# @param [Object] description Value to be assigned
|
194
|
+
def description=(description)
|
195
|
+
if !description.nil? && description.to_s.length < 1
|
196
|
+
fail ArgumentError, 'invalid value for "description", the character length must be great than or equal to 1.'
|
197
|
+
end
|
198
|
+
|
199
|
+
@description = description
|
200
|
+
end
|
201
|
+
|
149
202
|
# Checks equality by comparing each attribute.
|
150
203
|
# @param [Object] Object to be compared
|
151
204
|
def ==(o)
|
152
205
|
return true if self.equal?(o)
|
153
206
|
self.class == o.class &&
|
154
|
-
base_path == o.base_path &&
|
155
|
-
repository == o.repository &&
|
156
|
-
name == o.name &&
|
157
207
|
pulp_labels == o.pulp_labels &&
|
158
208
|
content_guard == o.content_guard &&
|
209
|
+
name == o.name &&
|
210
|
+
base_path == o.base_path &&
|
211
|
+
repository == o.repository &&
|
159
212
|
repository_version == o.repository_version &&
|
160
213
|
private == o.private &&
|
161
214
|
description == o.description
|
@@ -170,7 +223,7 @@ module PulpContainerClient
|
|
170
223
|
# Calculates hash code according to all attributes.
|
171
224
|
# @return [Integer] Hash code
|
172
225
|
def hash
|
173
|
-
[
|
226
|
+
[pulp_labels, content_guard, name, base_path, repository, repository_version, private, description].hash
|
174
227
|
end
|
175
228
|
|
176
229
|
# Builds the object from hash
|