pulpcore_client 3.18.34 → 3.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/docs/DistributionResponse.md +31 -0
- data/docs/DistributionsApi.md +92 -0
- data/docs/FilesystemExport.md +1 -3
- data/docs/OrphansCleanup.md +1 -1
- data/docs/PaginatedDistributionResponseList.md +23 -0
- data/docs/ReclaimSpace.md +1 -1
- data/docs/RolesApi.md +8 -0
- data/git_push.sh +58 -0
- data/lib/pulpcore_client/api/distributions_api.rb +123 -0
- data/lib/pulpcore_client/api/roles_api.rb +12 -0
- data/lib/pulpcore_client/api_client.rb +1 -1
- data/lib/pulpcore_client/models/distribution_response.rb +288 -0
- data/lib/pulpcore_client/models/filesystem_export.rb +4 -14
- data/lib/pulpcore_client/models/orphans_cleanup.rb +1 -1
- data/lib/pulpcore_client/models/paginated_distribution_response_list.rb +237 -0
- data/lib/pulpcore_client/models/reclaim_space.rb +1 -1
- data/lib/pulpcore_client/version.rb +1 -1
- data/lib/pulpcore_client.rb +3 -0
- data/pulpcore_client.gemspec +3 -3
- data/spec/api/distributions_api_spec.rb +61 -0
- data/spec/api/roles_api_spec.rb +4 -0
- data/spec/models/distribution_response_spec.rb +83 -0
- data/spec/models/filesystem_export_spec.rb +0 -6
- data/spec/models/paginated_distribution_response_list_spec.rb +59 -0
- metadata +141 -128
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70841b111af49356d131ead3fd1d91619de2848b712c860fa225bb94ce432f54
|
4
|
+
data.tar.gz: 0cf0de53b762c1ee596be6b7c0ef6f73c0ac414eeccc1d10a1d4b4cba6ec146f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db13d3eb375bfb0998cf3f28ca0eb49fa4eba533a118af2f2969e84992db438c288160e53fb447b676302f9f0c421941ff591e42ec9fa367350aaeb6b26865f9
|
7
|
+
data.tar.gz: 3d28d77814c96fa68f4b4a6cc1588e1585f199e2f6eec13be5e5822feccc23a6a85887d3d7b7aedd78c25467085938d6822976c4619d8cc1c6ec97078b92744c
|
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: 3.
|
10
|
+
- Package version: 3.19.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 pulpcore_client.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./pulpcore_client-3.
|
27
|
+
gem install ./pulpcore_client-3.19.0.gem
|
28
28
|
```
|
29
29
|
|
30
|
-
(for development, run `gem install --dev ./pulpcore_client-3.
|
30
|
+
(for development, run `gem install --dev ./pulpcore_client-3.19.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 'pulpcore_client', '~> 3.
|
36
|
+
gem 'pulpcore_client', '~> 3.19.0'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -122,6 +122,7 @@ Class | Method | HTTP request | Description
|
|
122
122
|
*PulpcoreClient::ContentguardsRbacApi* | [**read**](docs/ContentguardsRbacApi.md#read) | **GET** {r_b_a_c_content_guard_href} | Inspect a rbac content guard
|
123
123
|
*PulpcoreClient::ContentguardsRbacApi* | [**remove_role**](docs/ContentguardsRbacApi.md#remove_role) | **POST** {r_b_a_c_content_guard_href}remove_role/ |
|
124
124
|
*PulpcoreClient::ContentguardsRbacApi* | [**update**](docs/ContentguardsRbacApi.md#update) | **PUT** {r_b_a_c_content_guard_href} | Update a rbac content guard
|
125
|
+
*PulpcoreClient::DistributionsApi* | [**list**](docs/DistributionsApi.md#list) | **GET** /pulp/api/v3/distributions/ | List distributions
|
125
126
|
*PulpcoreClient::ExportersFilesystemApi* | [**create**](docs/ExportersFilesystemApi.md#create) | **POST** /pulp/api/v3/exporters/core/filesystem/ | Create a filesystem exporter
|
126
127
|
*PulpcoreClient::ExportersFilesystemApi* | [**delete**](docs/ExportersFilesystemApi.md#delete) | **DELETE** {filesystem_exporter_href} | Delete a filesystem exporter
|
127
128
|
*PulpcoreClient::ExportersFilesystemApi* | [**list**](docs/ExportersFilesystemApi.md#list) | **GET** /pulp/api/v3/exporters/core/filesystem/ | List filesystem exporters
|
@@ -245,6 +246,7 @@ Class | Method | HTTP request | Description
|
|
245
246
|
- [PulpcoreClient::ContentRedirectContentGuardResponse](docs/ContentRedirectContentGuardResponse.md)
|
246
247
|
- [PulpcoreClient::ContentSummaryResponse](docs/ContentSummaryResponse.md)
|
247
248
|
- [PulpcoreClient::DatabaseConnectionResponse](docs/DatabaseConnectionResponse.md)
|
249
|
+
- [PulpcoreClient::DistributionResponse](docs/DistributionResponse.md)
|
248
250
|
- [PulpcoreClient::EvaluationResponse](docs/EvaluationResponse.md)
|
249
251
|
- [PulpcoreClient::FilesystemExport](docs/FilesystemExport.md)
|
250
252
|
- [PulpcoreClient::FilesystemExportResponse](docs/FilesystemExportResponse.md)
|
@@ -270,6 +272,7 @@ Class | Method | HTTP request | Description
|
|
270
272
|
- [PulpcoreClient::PaginatedArtifactResponseList](docs/PaginatedArtifactResponseList.md)
|
271
273
|
- [PulpcoreClient::PaginatedContentGuardResponseList](docs/PaginatedContentGuardResponseList.md)
|
272
274
|
- [PulpcoreClient::PaginatedContentRedirectContentGuardResponseList](docs/PaginatedContentRedirectContentGuardResponseList.md)
|
275
|
+
- [PulpcoreClient::PaginatedDistributionResponseList](docs/PaginatedDistributionResponseList.md)
|
273
276
|
- [PulpcoreClient::PaginatedFilesystemExportResponseList](docs/PaginatedFilesystemExportResponseList.md)
|
274
277
|
- [PulpcoreClient::PaginatedFilesystemExporterResponseList](docs/PaginatedFilesystemExporterResponseList.md)
|
275
278
|
- [PulpcoreClient::PaginatedGroupResponseList](docs/PaginatedGroupResponseList.md)
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# PulpcoreClient::DistributionResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**pulp_href** | **String** | | [optional] [readonly]
|
8
|
+
**pulp_created** | **DateTime** | Timestamp of creation. | [optional] [readonly]
|
9
|
+
**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\") |
|
10
|
+
**base_url** | **String** | The URL for accessing the publication as defined by this distribution. | [optional] [readonly]
|
11
|
+
**content_guard** | **String** | An optional content-guard. | [optional]
|
12
|
+
**pulp_labels** | [**Object**](.md) | | [optional]
|
13
|
+
**name** | **String** | A unique name. Ex, `rawhide` and `stable`. |
|
14
|
+
**repository** | **String** | The latest RepositoryVersion for this Repository will be served. | [optional]
|
15
|
+
|
16
|
+
## Code Sample
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'PulpcoreClient'
|
20
|
+
|
21
|
+
instance = PulpcoreClient::DistributionResponse.new(pulp_href: null,
|
22
|
+
pulp_created: null,
|
23
|
+
base_path: null,
|
24
|
+
base_url: null,
|
25
|
+
content_guard: null,
|
26
|
+
pulp_labels: null,
|
27
|
+
name: null,
|
28
|
+
repository: null)
|
29
|
+
```
|
30
|
+
|
31
|
+
|
@@ -0,0 +1,92 @@
|
|
1
|
+
# PulpcoreClient::DistributionsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://pulp*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**list**](DistributionsApi.md#list) | **GET** /pulp/api/v3/distributions/ | List distributions
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
## list
|
12
|
+
|
13
|
+
> PaginatedDistributionResponseList list(opts)
|
14
|
+
|
15
|
+
List distributions
|
16
|
+
|
17
|
+
A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
|
18
|
+
|
19
|
+
### Example
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
# load the gem
|
23
|
+
require 'pulpcore_client'
|
24
|
+
# setup authorization
|
25
|
+
PulpcoreClient.configure do |config|
|
26
|
+
# Configure HTTP basic authorization: basicAuth
|
27
|
+
config.username = 'YOUR USERNAME'
|
28
|
+
config.password = 'YOUR PASSWORD'
|
29
|
+
end
|
30
|
+
|
31
|
+
api_instance = PulpcoreClient::DistributionsApi.new
|
32
|
+
opts = {
|
33
|
+
base_path: 'base_path_example', # String |
|
34
|
+
base_path__contains: 'base_path__contains_example', # String | Filter results where base_path contains value
|
35
|
+
base_path__icontains: 'base_path__icontains_example', # String | Filter results where base_path contains value
|
36
|
+
base_path__in: ['base_path__in_example'], # Array<String> | Filter results where base_path is in a comma-separated list of values
|
37
|
+
limit: 56, # Integer | Number of results to return per page.
|
38
|
+
name: 'name_example', # String |
|
39
|
+
name__contains: 'name__contains_example', # String | Filter results where name contains value
|
40
|
+
name__icontains: 'name__icontains_example', # String | Filter results where name contains value
|
41
|
+
name__in: ['name__in_example'], # Array<String> | Filter results where name is in a comma-separated list of values
|
42
|
+
name__startswith: 'name__startswith_example', # String | Filter results where name starts with value
|
43
|
+
offset: 56, # Integer | The initial index from which to return the results.
|
44
|
+
ordering: 'ordering_example', # String | Which field to use when ordering the results.
|
45
|
+
pulp_label_select: 'pulp_label_select_example', # String | Filter labels by search string
|
46
|
+
fields: 'fields_example', # String | A list of fields to include in the response.
|
47
|
+
exclude_fields: 'exclude_fields_example' # String | A list of fields to exclude from the response.
|
48
|
+
}
|
49
|
+
|
50
|
+
begin
|
51
|
+
#List distributions
|
52
|
+
result = api_instance.list(opts)
|
53
|
+
p result
|
54
|
+
rescue PulpcoreClient::ApiError => e
|
55
|
+
puts "Exception when calling DistributionsApi->list: #{e}"
|
56
|
+
end
|
57
|
+
```
|
58
|
+
|
59
|
+
### Parameters
|
60
|
+
|
61
|
+
|
62
|
+
Name | Type | Description | Notes
|
63
|
+
------------- | ------------- | ------------- | -------------
|
64
|
+
**base_path** | **String**| | [optional]
|
65
|
+
**base_path__contains** | **String**| Filter results where base_path contains value | [optional]
|
66
|
+
**base_path__icontains** | **String**| Filter results where base_path contains value | [optional]
|
67
|
+
**base_path__in** | [**Array<String>**](String.md)| Filter results where base_path is in a comma-separated list of values | [optional]
|
68
|
+
**limit** | **Integer**| Number of results to return per page. | [optional]
|
69
|
+
**name** | **String**| | [optional]
|
70
|
+
**name__contains** | **String**| Filter results where name contains value | [optional]
|
71
|
+
**name__icontains** | **String**| Filter results where name contains value | [optional]
|
72
|
+
**name__in** | [**Array<String>**](String.md)| Filter results where name is in a comma-separated list of values | [optional]
|
73
|
+
**name__startswith** | **String**| Filter results where name starts with value | [optional]
|
74
|
+
**offset** | **Integer**| The initial index from which to return the results. | [optional]
|
75
|
+
**ordering** | **String**| Which field to use when ordering the results. | [optional]
|
76
|
+
**pulp_label_select** | **String**| Filter labels by search string | [optional]
|
77
|
+
**fields** | **String**| A list of fields to include in the response. | [optional]
|
78
|
+
**exclude_fields** | **String**| A list of fields to exclude from the response. | [optional]
|
79
|
+
|
80
|
+
### Return type
|
81
|
+
|
82
|
+
[**PaginatedDistributionResponseList**](PaginatedDistributionResponseList.md)
|
83
|
+
|
84
|
+
### Authorization
|
85
|
+
|
86
|
+
[basicAuth](../README.md#basicAuth)
|
87
|
+
|
88
|
+
### HTTP request headers
|
89
|
+
|
90
|
+
- **Content-Type**: Not defined
|
91
|
+
- **Accept**: application/json
|
92
|
+
|
data/docs/FilesystemExport.md
CHANGED
@@ -7,7 +7,6 @@ Name | Type | Description | Notes
|
|
7
7
|
**task** | **String** | A URI of the task that ran the Export. | [optional]
|
8
8
|
**publication** | **String** | A URI of the publication to be exported. | [optional]
|
9
9
|
**repository_version** | **String** | A URI of the repository version export. | [optional]
|
10
|
-
**start_repository_version** | **String** | The URI of the last-exported-repo-version. | [optional]
|
11
10
|
|
12
11
|
## Code Sample
|
13
12
|
|
@@ -16,8 +15,7 @@ require 'PulpcoreClient'
|
|
16
15
|
|
17
16
|
instance = PulpcoreClient::FilesystemExport.new(task: null,
|
18
17
|
publication: null,
|
19
|
-
repository_version: null
|
20
|
-
start_repository_version: null)
|
18
|
+
repository_version: null)
|
21
19
|
```
|
22
20
|
|
23
21
|
|
data/docs/OrphansCleanup.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**content_hrefs** | [**Array<AnyType>**](AnyType.md) | Will delete specified content and associated Artifacts if they are orphans. | [optional]
|
8
|
-
**orphan_protection_time** | **Integer** | The time in minutes for how long Pulp will hold orphan Content and Artifacts before they become candidates for deletion by this orphan cleanup task. This should ideally be longer than your longest running task otherwise any content created during that task could be cleaned up before the task finishes. If not specified, default is
|
8
|
+
**orphan_protection_time** | **Integer** | The time in minutes for how long Pulp will hold orphan Content and Artifacts before they become candidates for deletion by this orphan cleanup task. This should ideally be longer than your longest running task otherwise any content created during that task could be cleaned up before the task finishes. If not specified, a default value is taken from the setting ORPHAN_PROTECTION_TIME. | [optional] [default to 0]
|
9
9
|
|
10
10
|
## Code Sample
|
11
11
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# PulpcoreClient::PaginatedDistributionResponseList
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**count** | **Integer** | | [optional]
|
8
|
+
**_next** | **String** | | [optional]
|
9
|
+
**previous** | **String** | | [optional]
|
10
|
+
**results** | [**Array<DistributionResponse>**](DistributionResponse.md) | | [optional]
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'PulpcoreClient'
|
16
|
+
|
17
|
+
instance = PulpcoreClient::PaginatedDistributionResponseList.new(count: 123,
|
18
|
+
_next: http://api.example.org/accounts/?offset=400&limit=100,
|
19
|
+
previous: http://api.example.org/accounts/?offset=200&limit=100,
|
20
|
+
results: null)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
data/docs/ReclaimSpace.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**repo_hrefs** | [**Array<AnyType>**](AnyType.md) | Will reclaim space for the specified list of repos. |
|
7
|
+
**repo_hrefs** | [**Array<AnyType>**](AnyType.md) | Will reclaim space for the specified list of repos. Use ['*'] to specify all repos. |
|
8
8
|
**repo_versions_keeplist** | **Array<String>** | Will exclude repo versions from space reclaim. | [optional]
|
9
9
|
|
10
10
|
## Code Sample
|
data/docs/RolesApi.md
CHANGED
@@ -140,6 +140,10 @@ end
|
|
140
140
|
|
141
141
|
api_instance = PulpcoreClient::RolesApi.new
|
142
142
|
opts = {
|
143
|
+
description: 'description_example', # String | Filter results where description matches value
|
144
|
+
description__contains: 'description__contains_example', # String | Filter results where description contains value
|
145
|
+
description__icontains: 'description__icontains_example', # String | Filter results where description contains value
|
146
|
+
description__iexact: 'description__iexact_example', # String | Filter results where description matches value
|
143
147
|
limit: 56, # Integer | Number of results to return per page.
|
144
148
|
locked: true, # Boolean | Filter results where locked matches value
|
145
149
|
name: 'name_example', # String | Filter results where name matches value
|
@@ -167,6 +171,10 @@ end
|
|
167
171
|
|
168
172
|
Name | Type | Description | Notes
|
169
173
|
------------- | ------------- | ------------- | -------------
|
174
|
+
**description** | **String**| Filter results where description matches value | [optional]
|
175
|
+
**description__contains** | **String**| Filter results where description contains value | [optional]
|
176
|
+
**description__icontains** | **String**| Filter results where description contains value | [optional]
|
177
|
+
**description__iexact** | **String**| Filter results where description matches value | [optional]
|
170
178
|
**limit** | **Integer**| Number of results to return per page. | [optional]
|
171
179
|
**locked** | **Boolean**| Filter results where locked matches value | [optional]
|
172
180
|
**name** | **String**| Filter results where name matches value | [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
|
+
|
@@ -0,0 +1,123 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
Contact: pulp-list@redhat.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module PulpcoreClient
|
16
|
+
class DistributionsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# List distributions
|
23
|
+
# A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [String] :base_path
|
26
|
+
# @option opts [String] :base_path__contains Filter results where base_path contains value
|
27
|
+
# @option opts [String] :base_path__icontains Filter results where base_path contains value
|
28
|
+
# @option opts [Array<String>] :base_path__in Filter results where base_path is in a comma-separated list of values
|
29
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
30
|
+
# @option opts [String] :name
|
31
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
32
|
+
# @option opts [String] :name__icontains Filter results where name contains value
|
33
|
+
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
34
|
+
# @option opts [String] :name__startswith Filter results where name starts with value
|
35
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
36
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
37
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
38
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
39
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
40
|
+
# @return [PaginatedDistributionResponseList]
|
41
|
+
def list(opts = {})
|
42
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
43
|
+
data
|
44
|
+
end
|
45
|
+
|
46
|
+
# List distributions
|
47
|
+
# A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
|
48
|
+
# @param [Hash] opts the optional parameters
|
49
|
+
# @option opts [String] :base_path
|
50
|
+
# @option opts [String] :base_path__contains Filter results where base_path contains value
|
51
|
+
# @option opts [String] :base_path__icontains Filter results where base_path contains value
|
52
|
+
# @option opts [Array<String>] :base_path__in Filter results where base_path is in a comma-separated list of values
|
53
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
54
|
+
# @option opts [String] :name
|
55
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
56
|
+
# @option opts [String] :name__icontains Filter results where name contains value
|
57
|
+
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
58
|
+
# @option opts [String] :name__startswith Filter results where name starts with value
|
59
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
60
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
61
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
62
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
63
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
64
|
+
# @return [Array<(PaginatedDistributionResponseList, Integer, Hash)>] PaginatedDistributionResponseList data, response status code and response headers
|
65
|
+
def list_with_http_info(opts = {})
|
66
|
+
if @api_client.config.debugging
|
67
|
+
@api_client.config.logger.debug 'Calling API: DistributionsApi.list ...'
|
68
|
+
end
|
69
|
+
# resource path
|
70
|
+
local_var_path = '/pulp/api/v3/distributions/'
|
71
|
+
|
72
|
+
# query parameters
|
73
|
+
query_params = opts[:query_params] || {}
|
74
|
+
query_params[:'base_path'] = opts[:'base_path'] if !opts[:'base_path'].nil?
|
75
|
+
query_params[:'base_path__contains'] = opts[:'base_path__contains'] if !opts[:'base_path__contains'].nil?
|
76
|
+
query_params[:'base_path__icontains'] = opts[:'base_path__icontains'] if !opts[:'base_path__icontains'].nil?
|
77
|
+
query_params[:'base_path__in'] = @api_client.build_collection_param(opts[:'base_path__in'], :csv) if !opts[:'base_path__in'].nil?
|
78
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
79
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
80
|
+
query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil?
|
81
|
+
query_params[:'name__icontains'] = opts[:'name__icontains'] if !opts[:'name__icontains'].nil?
|
82
|
+
query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
|
83
|
+
query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
|
84
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
85
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
86
|
+
query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
|
87
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
88
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
89
|
+
|
90
|
+
# header parameters
|
91
|
+
header_params = opts[:header_params] || {}
|
92
|
+
# HTTP header 'Accept' (if needed)
|
93
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
94
|
+
|
95
|
+
# form parameters
|
96
|
+
form_params = opts[:form_params] || {}
|
97
|
+
|
98
|
+
# http body (model)
|
99
|
+
post_body = opts[:body]
|
100
|
+
|
101
|
+
# return_type
|
102
|
+
return_type = opts[:return_type] || 'PaginatedDistributionResponseList'
|
103
|
+
|
104
|
+
# auth_names
|
105
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
106
|
+
|
107
|
+
new_options = opts.merge(
|
108
|
+
:header_params => header_params,
|
109
|
+
:query_params => query_params,
|
110
|
+
:form_params => form_params,
|
111
|
+
:body => post_body,
|
112
|
+
:auth_names => auth_names,
|
113
|
+
:return_type => return_type
|
114
|
+
)
|
115
|
+
|
116
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
117
|
+
if @api_client.config.debugging
|
118
|
+
@api_client.config.logger.debug "API called: DistributionsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
119
|
+
end
|
120
|
+
return data, status_code, headers
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
@@ -146,6 +146,10 @@ module PulpcoreClient
|
|
146
146
|
# List roles
|
147
147
|
# ViewSet for Role. NOTE: This API endpoint is in \"tech preview\" and subject to change
|
148
148
|
# @param [Hash] opts the optional parameters
|
149
|
+
# @option opts [String] :description Filter results where description matches value
|
150
|
+
# @option opts [String] :description__contains Filter results where description contains value
|
151
|
+
# @option opts [String] :description__icontains Filter results where description contains value
|
152
|
+
# @option opts [String] :description__iexact Filter results where description matches value
|
149
153
|
# @option opts [Integer] :limit Number of results to return per page.
|
150
154
|
# @option opts [Boolean] :locked Filter results where locked matches value
|
151
155
|
# @option opts [String] :name Filter results where name matches value
|
@@ -166,6 +170,10 @@ module PulpcoreClient
|
|
166
170
|
# List roles
|
167
171
|
# ViewSet for Role. NOTE: This API endpoint is in \"tech preview\" and subject to change
|
168
172
|
# @param [Hash] opts the optional parameters
|
173
|
+
# @option opts [String] :description Filter results where description matches value
|
174
|
+
# @option opts [String] :description__contains Filter results where description contains value
|
175
|
+
# @option opts [String] :description__icontains Filter results where description contains value
|
176
|
+
# @option opts [String] :description__iexact Filter results where description matches value
|
169
177
|
# @option opts [Integer] :limit Number of results to return per page.
|
170
178
|
# @option opts [Boolean] :locked Filter results where locked matches value
|
171
179
|
# @option opts [String] :name Filter results where name matches value
|
@@ -187,6 +195,10 @@ module PulpcoreClient
|
|
187
195
|
|
188
196
|
# query parameters
|
189
197
|
query_params = opts[:query_params] || {}
|
198
|
+
query_params[:'description'] = opts[:'description'] if !opts[:'description'].nil?
|
199
|
+
query_params[:'description__contains'] = opts[:'description__contains'] if !opts[:'description__contains'].nil?
|
200
|
+
query_params[:'description__icontains'] = opts[:'description__icontains'] if !opts[:'description__icontains'].nil?
|
201
|
+
query_params[:'description__iexact'] = opts[:'description__iexact'] if !opts[:'description__iexact'].nil?
|
190
202
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
191
203
|
query_params[:'locked'] = opts[:'locked'] if !opts[:'locked'].nil?
|
192
204
|
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
@@ -154,7 +154,7 @@ module PulpcoreClient
|
|
154
154
|
case value
|
155
155
|
when ::File, ::Tempfile
|
156
156
|
# TODO hardcode to application/octet-stream, need better way to detect content type
|
157
|
-
data[key] = Faraday::
|
157
|
+
data[key] = Faraday::UploadIO.new(value.path, 'application/octet-stream', value.path)
|
158
158
|
when ::Array, nil
|
159
159
|
# let Faraday handle Array and nil parameters
|
160
160
|
data[key] = value
|