pulp_certguard_client 0.1.0rc4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +113 -0
- data/Rakefile +10 -0
- data/docs/CertguardRHSMCertGuard.md +25 -0
- data/docs/CertguardX509CertGuard.md +25 -0
- data/docs/ContentguardsRhsmApi.md +355 -0
- data/docs/ContentguardsX509Api.md +355 -0
- data/docs/InlineResponse200.md +23 -0
- data/docs/InlineResponse2001.md +23 -0
- data/git_push.sh +58 -0
- data/lib/pulp_certguard_client/api/contentguards_rhsm_api.rb +431 -0
- data/lib/pulp_certguard_client/api/contentguards_x509_api.rb +431 -0
- data/lib/pulp_certguard_client/api_client.rb +402 -0
- data/lib/pulp_certguard_client/api_error.rb +57 -0
- data/lib/pulp_certguard_client/configuration.rb +243 -0
- data/lib/pulp_certguard_client/models/certguard_rhsm_cert_guard.rb +310 -0
- data/lib/pulp_certguard_client/models/certguard_x509_cert_guard.rb +310 -0
- data/lib/pulp_certguard_client/models/inline_response200.rb +247 -0
- data/lib/pulp_certguard_client/models/inline_response2001.rb +247 -0
- data/lib/pulp_certguard_client/version.rb +15 -0
- data/lib/pulp_certguard_client.rb +45 -0
- data/pulp_certguard_client.gemspec +39 -0
- data/spec/api/contentguards_rhsm_api_spec.rb +117 -0
- data/spec/api/contentguards_x509_api_spec.rb +117 -0
- data/spec/api_client_spec.rb +188 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/certguard_rhsm_cert_guard_spec.rb +65 -0
- data/spec/models/certguard_x509_cert_guard_spec.rb +65 -0
- data/spec/models/inline_response2001_spec.rb +59 -0
- data/spec/models/inline_response200_spec.rb +59 -0
- data/spec/spec_helper.rb +111 -0
- metadata +137 -0
@@ -0,0 +1,355 @@
|
|
1
|
+
# PulpCertguardClient::ContentguardsX509Api
|
2
|
+
|
3
|
+
All URIs are relative to *http://localhost:24817*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**create**](ContentguardsX509Api.md#create) | **POST** /pulp/api/v3/contentguards/certguard/x509/ | Create a x509 cert guard
|
8
|
+
[**delete**](ContentguardsX509Api.md#delete) | **DELETE** {x509_cert_guard_href} | Delete a x509 cert guard
|
9
|
+
[**list**](ContentguardsX509Api.md#list) | **GET** /pulp/api/v3/contentguards/certguard/x509/ | List x509 cert guards
|
10
|
+
[**partial_update**](ContentguardsX509Api.md#partial_update) | **PATCH** {x509_cert_guard_href} | Partially update a x509 cert guard
|
11
|
+
[**read**](ContentguardsX509Api.md#read) | **GET** {x509_cert_guard_href} | Inspect a x509 cert guard
|
12
|
+
[**update**](ContentguardsX509Api.md#update) | **PUT** {x509_cert_guard_href} | Update a x509 cert guard
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
## create
|
17
|
+
|
18
|
+
> CertguardX509CertGuard create(data)
|
19
|
+
|
20
|
+
Create a x509 cert guard
|
21
|
+
|
22
|
+
X509CertGuard API Viewsets.
|
23
|
+
|
24
|
+
### Example
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
# load the gem
|
28
|
+
require 'pulp_certguard_client'
|
29
|
+
# setup authorization
|
30
|
+
PulpCertguardClient.configure do |config|
|
31
|
+
# Configure HTTP basic authorization: Basic
|
32
|
+
config.username = 'YOUR USERNAME'
|
33
|
+
config.password = 'YOUR PASSWORD'
|
34
|
+
end
|
35
|
+
|
36
|
+
api_instance = PulpCertguardClient::ContentguardsX509Api.new
|
37
|
+
data = PulpCertguardClient::CertguardX509CertGuard.new # CertguardX509CertGuard |
|
38
|
+
|
39
|
+
begin
|
40
|
+
#Create a x509 cert guard
|
41
|
+
result = api_instance.create(data)
|
42
|
+
p result
|
43
|
+
rescue PulpCertguardClient::ApiError => e
|
44
|
+
puts "Exception when calling ContentguardsX509Api->create: #{e}"
|
45
|
+
end
|
46
|
+
```
|
47
|
+
|
48
|
+
### Parameters
|
49
|
+
|
50
|
+
|
51
|
+
Name | Type | Description | Notes
|
52
|
+
------------- | ------------- | ------------- | -------------
|
53
|
+
**data** | [**CertguardX509CertGuard**](CertguardX509CertGuard.md)| |
|
54
|
+
|
55
|
+
### Return type
|
56
|
+
|
57
|
+
[**CertguardX509CertGuard**](CertguardX509CertGuard.md)
|
58
|
+
|
59
|
+
### Authorization
|
60
|
+
|
61
|
+
[Basic](../README.md#Basic)
|
62
|
+
|
63
|
+
### HTTP request headers
|
64
|
+
|
65
|
+
- **Content-Type**: application/json
|
66
|
+
- **Accept**: application/json
|
67
|
+
|
68
|
+
|
69
|
+
## delete
|
70
|
+
|
71
|
+
> delete(x509_cert_guard_href)
|
72
|
+
|
73
|
+
Delete a x509 cert guard
|
74
|
+
|
75
|
+
X509CertGuard API Viewsets.
|
76
|
+
|
77
|
+
### Example
|
78
|
+
|
79
|
+
```ruby
|
80
|
+
# load the gem
|
81
|
+
require 'pulp_certguard_client'
|
82
|
+
# setup authorization
|
83
|
+
PulpCertguardClient.configure do |config|
|
84
|
+
# Configure HTTP basic authorization: Basic
|
85
|
+
config.username = 'YOUR USERNAME'
|
86
|
+
config.password = 'YOUR PASSWORD'
|
87
|
+
end
|
88
|
+
|
89
|
+
api_instance = PulpCertguardClient::ContentguardsX509Api.new
|
90
|
+
x509_cert_guard_href = 'x509_cert_guard_href_example' # String | URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
|
91
|
+
|
92
|
+
begin
|
93
|
+
#Delete a x509 cert guard
|
94
|
+
api_instance.delete(x509_cert_guard_href)
|
95
|
+
rescue PulpCertguardClient::ApiError => e
|
96
|
+
puts "Exception when calling ContentguardsX509Api->delete: #{e}"
|
97
|
+
end
|
98
|
+
```
|
99
|
+
|
100
|
+
### Parameters
|
101
|
+
|
102
|
+
|
103
|
+
Name | Type | Description | Notes
|
104
|
+
------------- | ------------- | ------------- | -------------
|
105
|
+
**x509_cert_guard_href** | **String**| URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/ |
|
106
|
+
|
107
|
+
### Return type
|
108
|
+
|
109
|
+
nil (empty response body)
|
110
|
+
|
111
|
+
### Authorization
|
112
|
+
|
113
|
+
[Basic](../README.md#Basic)
|
114
|
+
|
115
|
+
### HTTP request headers
|
116
|
+
|
117
|
+
- **Content-Type**: Not defined
|
118
|
+
- **Accept**: Not defined
|
119
|
+
|
120
|
+
|
121
|
+
## list
|
122
|
+
|
123
|
+
> InlineResponse2001 list(opts)
|
124
|
+
|
125
|
+
List x509 cert guards
|
126
|
+
|
127
|
+
X509CertGuard API Viewsets.
|
128
|
+
|
129
|
+
### Example
|
130
|
+
|
131
|
+
```ruby
|
132
|
+
# load the gem
|
133
|
+
require 'pulp_certguard_client'
|
134
|
+
# setup authorization
|
135
|
+
PulpCertguardClient.configure do |config|
|
136
|
+
# Configure HTTP basic authorization: Basic
|
137
|
+
config.username = 'YOUR USERNAME'
|
138
|
+
config.password = 'YOUR PASSWORD'
|
139
|
+
end
|
140
|
+
|
141
|
+
api_instance = PulpCertguardClient::ContentguardsX509Api.new
|
142
|
+
opts = {
|
143
|
+
ordering: 'ordering_example', # String | Which field to use when ordering the results.
|
144
|
+
name: 'name_example', # String |
|
145
|
+
name__in: 'name__in_example', # String | Filter results where name is in a comma-separated list of values
|
146
|
+
limit: 56, # Integer | Number of results to return per page.
|
147
|
+
offset: 56, # Integer | The initial index from which to return the results.
|
148
|
+
fields: 'fields_example', # String | A list of fields to include in the response.
|
149
|
+
exclude_fields: 'exclude_fields_example' # String | A list of fields to exclude from the response.
|
150
|
+
}
|
151
|
+
|
152
|
+
begin
|
153
|
+
#List x509 cert guards
|
154
|
+
result = api_instance.list(opts)
|
155
|
+
p result
|
156
|
+
rescue PulpCertguardClient::ApiError => e
|
157
|
+
puts "Exception when calling ContentguardsX509Api->list: #{e}"
|
158
|
+
end
|
159
|
+
```
|
160
|
+
|
161
|
+
### Parameters
|
162
|
+
|
163
|
+
|
164
|
+
Name | Type | Description | Notes
|
165
|
+
------------- | ------------- | ------------- | -------------
|
166
|
+
**ordering** | **String**| Which field to use when ordering the results. | [optional]
|
167
|
+
**name** | **String**| | [optional]
|
168
|
+
**name__in** | **String**| Filter results where name is in a comma-separated list of values | [optional]
|
169
|
+
**limit** | **Integer**| Number of results to return per page. | [optional]
|
170
|
+
**offset** | **Integer**| The initial index from which to return the results. | [optional]
|
171
|
+
**fields** | **String**| A list of fields to include in the response. | [optional]
|
172
|
+
**exclude_fields** | **String**| A list of fields to exclude from the response. | [optional]
|
173
|
+
|
174
|
+
### Return type
|
175
|
+
|
176
|
+
[**InlineResponse2001**](InlineResponse2001.md)
|
177
|
+
|
178
|
+
### Authorization
|
179
|
+
|
180
|
+
[Basic](../README.md#Basic)
|
181
|
+
|
182
|
+
### HTTP request headers
|
183
|
+
|
184
|
+
- **Content-Type**: Not defined
|
185
|
+
- **Accept**: application/json
|
186
|
+
|
187
|
+
|
188
|
+
## partial_update
|
189
|
+
|
190
|
+
> CertguardX509CertGuard partial_update(x509_cert_guard_href, data)
|
191
|
+
|
192
|
+
Partially update a x509 cert guard
|
193
|
+
|
194
|
+
X509CertGuard API Viewsets.
|
195
|
+
|
196
|
+
### Example
|
197
|
+
|
198
|
+
```ruby
|
199
|
+
# load the gem
|
200
|
+
require 'pulp_certguard_client'
|
201
|
+
# setup authorization
|
202
|
+
PulpCertguardClient.configure do |config|
|
203
|
+
# Configure HTTP basic authorization: Basic
|
204
|
+
config.username = 'YOUR USERNAME'
|
205
|
+
config.password = 'YOUR PASSWORD'
|
206
|
+
end
|
207
|
+
|
208
|
+
api_instance = PulpCertguardClient::ContentguardsX509Api.new
|
209
|
+
x509_cert_guard_href = 'x509_cert_guard_href_example' # String | URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
|
210
|
+
data = PulpCertguardClient::CertguardX509CertGuard.new # CertguardX509CertGuard |
|
211
|
+
|
212
|
+
begin
|
213
|
+
#Partially update a x509 cert guard
|
214
|
+
result = api_instance.partial_update(x509_cert_guard_href, data)
|
215
|
+
p result
|
216
|
+
rescue PulpCertguardClient::ApiError => e
|
217
|
+
puts "Exception when calling ContentguardsX509Api->partial_update: #{e}"
|
218
|
+
end
|
219
|
+
```
|
220
|
+
|
221
|
+
### Parameters
|
222
|
+
|
223
|
+
|
224
|
+
Name | Type | Description | Notes
|
225
|
+
------------- | ------------- | ------------- | -------------
|
226
|
+
**x509_cert_guard_href** | **String**| URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/ |
|
227
|
+
**data** | [**CertguardX509CertGuard**](CertguardX509CertGuard.md)| |
|
228
|
+
|
229
|
+
### Return type
|
230
|
+
|
231
|
+
[**CertguardX509CertGuard**](CertguardX509CertGuard.md)
|
232
|
+
|
233
|
+
### Authorization
|
234
|
+
|
235
|
+
[Basic](../README.md#Basic)
|
236
|
+
|
237
|
+
### HTTP request headers
|
238
|
+
|
239
|
+
- **Content-Type**: application/json
|
240
|
+
- **Accept**: application/json
|
241
|
+
|
242
|
+
|
243
|
+
## read
|
244
|
+
|
245
|
+
> CertguardX509CertGuard read(x509_cert_guard_href, opts)
|
246
|
+
|
247
|
+
Inspect a x509 cert guard
|
248
|
+
|
249
|
+
X509CertGuard API Viewsets.
|
250
|
+
|
251
|
+
### Example
|
252
|
+
|
253
|
+
```ruby
|
254
|
+
# load the gem
|
255
|
+
require 'pulp_certguard_client'
|
256
|
+
# setup authorization
|
257
|
+
PulpCertguardClient.configure do |config|
|
258
|
+
# Configure HTTP basic authorization: Basic
|
259
|
+
config.username = 'YOUR USERNAME'
|
260
|
+
config.password = 'YOUR PASSWORD'
|
261
|
+
end
|
262
|
+
|
263
|
+
api_instance = PulpCertguardClient::ContentguardsX509Api.new
|
264
|
+
x509_cert_guard_href = 'x509_cert_guard_href_example' # String | URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
|
265
|
+
opts = {
|
266
|
+
fields: 'fields_example', # String | A list of fields to include in the response.
|
267
|
+
exclude_fields: 'exclude_fields_example' # String | A list of fields to exclude from the response.
|
268
|
+
}
|
269
|
+
|
270
|
+
begin
|
271
|
+
#Inspect a x509 cert guard
|
272
|
+
result = api_instance.read(x509_cert_guard_href, opts)
|
273
|
+
p result
|
274
|
+
rescue PulpCertguardClient::ApiError => e
|
275
|
+
puts "Exception when calling ContentguardsX509Api->read: #{e}"
|
276
|
+
end
|
277
|
+
```
|
278
|
+
|
279
|
+
### Parameters
|
280
|
+
|
281
|
+
|
282
|
+
Name | Type | Description | Notes
|
283
|
+
------------- | ------------- | ------------- | -------------
|
284
|
+
**x509_cert_guard_href** | **String**| URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/ |
|
285
|
+
**fields** | **String**| A list of fields to include in the response. | [optional]
|
286
|
+
**exclude_fields** | **String**| A list of fields to exclude from the response. | [optional]
|
287
|
+
|
288
|
+
### Return type
|
289
|
+
|
290
|
+
[**CertguardX509CertGuard**](CertguardX509CertGuard.md)
|
291
|
+
|
292
|
+
### Authorization
|
293
|
+
|
294
|
+
[Basic](../README.md#Basic)
|
295
|
+
|
296
|
+
### HTTP request headers
|
297
|
+
|
298
|
+
- **Content-Type**: Not defined
|
299
|
+
- **Accept**: application/json
|
300
|
+
|
301
|
+
|
302
|
+
## update
|
303
|
+
|
304
|
+
> CertguardX509CertGuard update(x509_cert_guard_href, data)
|
305
|
+
|
306
|
+
Update a x509 cert guard
|
307
|
+
|
308
|
+
X509CertGuard API Viewsets.
|
309
|
+
|
310
|
+
### Example
|
311
|
+
|
312
|
+
```ruby
|
313
|
+
# load the gem
|
314
|
+
require 'pulp_certguard_client'
|
315
|
+
# setup authorization
|
316
|
+
PulpCertguardClient.configure do |config|
|
317
|
+
# Configure HTTP basic authorization: Basic
|
318
|
+
config.username = 'YOUR USERNAME'
|
319
|
+
config.password = 'YOUR PASSWORD'
|
320
|
+
end
|
321
|
+
|
322
|
+
api_instance = PulpCertguardClient::ContentguardsX509Api.new
|
323
|
+
x509_cert_guard_href = 'x509_cert_guard_href_example' # String | URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
|
324
|
+
data = PulpCertguardClient::CertguardX509CertGuard.new # CertguardX509CertGuard |
|
325
|
+
|
326
|
+
begin
|
327
|
+
#Update a x509 cert guard
|
328
|
+
result = api_instance.update(x509_cert_guard_href, data)
|
329
|
+
p result
|
330
|
+
rescue PulpCertguardClient::ApiError => e
|
331
|
+
puts "Exception when calling ContentguardsX509Api->update: #{e}"
|
332
|
+
end
|
333
|
+
```
|
334
|
+
|
335
|
+
### Parameters
|
336
|
+
|
337
|
+
|
338
|
+
Name | Type | Description | Notes
|
339
|
+
------------- | ------------- | ------------- | -------------
|
340
|
+
**x509_cert_guard_href** | **String**| URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/ |
|
341
|
+
**data** | [**CertguardX509CertGuard**](CertguardX509CertGuard.md)| |
|
342
|
+
|
343
|
+
### Return type
|
344
|
+
|
345
|
+
[**CertguardX509CertGuard**](CertguardX509CertGuard.md)
|
346
|
+
|
347
|
+
### Authorization
|
348
|
+
|
349
|
+
[Basic](../README.md#Basic)
|
350
|
+
|
351
|
+
### HTTP request headers
|
352
|
+
|
353
|
+
- **Content-Type**: application/json
|
354
|
+
- **Accept**: application/json
|
355
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# PulpCertguardClient::InlineResponse200
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**count** | **Integer** | |
|
8
|
+
**_next** | **String** | | [optional]
|
9
|
+
**previous** | **String** | | [optional]
|
10
|
+
**results** | [**Array<CertguardRHSMCertGuard>**](CertguardRHSMCertGuard.md) | |
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'PulpCertguardClient'
|
16
|
+
|
17
|
+
instance = PulpCertguardClient::InlineResponse200.new(count: null,
|
18
|
+
_next: null,
|
19
|
+
previous: null,
|
20
|
+
results: null)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# PulpCertguardClient::InlineResponse2001
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**count** | **Integer** | |
|
8
|
+
**_next** | **String** | | [optional]
|
9
|
+
**previous** | **String** | | [optional]
|
10
|
+
**results** | [**Array<CertguardX509CertGuard>**](CertguardX509CertGuard.md) | |
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'PulpCertguardClient'
|
16
|
+
|
17
|
+
instance = PulpCertguardClient::InlineResponse2001.new(count: null,
|
18
|
+
_next: null,
|
19
|
+
previous: null,
|
20
|
+
results: null)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
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
|
+
|