pulp_file_client 0.1.0b1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +79 -0
  4. data/README.md +127 -0
  5. data/Rakefile +10 -0
  6. data/docs/AsyncOperationResponse.md +17 -0
  7. data/docs/ContentFilesApi.md +184 -0
  8. data/docs/DistributionsFileApi.md +352 -0
  9. data/docs/FileContent.md +37 -0
  10. data/docs/FileDistribution.md +29 -0
  11. data/docs/FilePublication.md +31 -0
  12. data/docs/FileRemote.md +45 -0
  13. data/docs/InlineResponse200.md +23 -0
  14. data/docs/InlineResponse2001.md +23 -0
  15. data/docs/InlineResponse2002.md +23 -0
  16. data/docs/InlineResponse2003.md +23 -0
  17. data/docs/PublicationsFileApi.md +229 -0
  18. data/docs/RemotesFileApi.md +411 -0
  19. data/docs/RepositorySyncURL.md +19 -0
  20. data/git_push.sh +55 -0
  21. data/lib/pulp_file_client/api/content_files_api.rb +225 -0
  22. data/lib/pulp_file_client/api/distributions_file_api.rb +430 -0
  23. data/lib/pulp_file_client/api/publications_file_api.rb +273 -0
  24. data/lib/pulp_file_client/api/remotes_file_api.rb +504 -0
  25. data/lib/pulp_file_client/api_client.rb +387 -0
  26. data/lib/pulp_file_client/api_error.rb +57 -0
  27. data/lib/pulp_file_client/configuration.rb +251 -0
  28. data/lib/pulp_file_client/models/async_operation_response.rb +202 -0
  29. data/lib/pulp_file_client/models/file_content.rb +429 -0
  30. data/lib/pulp_file_client/models/file_distribution.rb +337 -0
  31. data/lib/pulp_file_client/models/file_publication.rb +297 -0
  32. data/lib/pulp_file_client/models/file_remote.rb +539 -0
  33. data/lib/pulp_file_client/models/inline_response200.rb +235 -0
  34. data/lib/pulp_file_client/models/inline_response2001.rb +235 -0
  35. data/lib/pulp_file_client/models/inline_response2002.rb +235 -0
  36. data/lib/pulp_file_client/models/inline_response2003.rb +235 -0
  37. data/lib/pulp_file_client/models/repository_sync_url.rb +214 -0
  38. data/lib/pulp_file_client/version.rb +15 -0
  39. data/lib/pulp_file_client.rb +53 -0
  40. data/pulp_file_client.gemspec +45 -0
  41. data/spec/api/content_files_api_spec.rb +77 -0
  42. data/spec/api/distributions_file_api_spec.rb +116 -0
  43. data/spec/api/publications_file_api_spec.rb +85 -0
  44. data/spec/api/remotes_file_api_spec.rb +130 -0
  45. data/spec/api_client_spec.rb +226 -0
  46. data/spec/configuration_spec.rb +42 -0
  47. data/spec/models/async_operation_response_spec.rb +41 -0
  48. data/spec/models/file_content_spec.rb +101 -0
  49. data/spec/models/file_distribution_spec.rb +77 -0
  50. data/spec/models/file_publication_spec.rb +83 -0
  51. data/spec/models/file_remote_spec.rb +129 -0
  52. data/spec/models/inline_response2001_spec.rb +59 -0
  53. data/spec/models/inline_response2002_spec.rb +59 -0
  54. data/spec/models/inline_response2003_spec.rb +59 -0
  55. data/spec/models/inline_response200_spec.rb +59 -0
  56. data/spec/models/repository_sync_url_spec.rb +47 -0
  57. data/spec/spec_helper.rb +111 -0
  58. metadata +297 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 50d046dd679d64ae09a6c4e3a6cb3eda04eef253971e369b727e72070dbdf634
4
+ data.tar.gz: e83da6f101e2a1ef4d6359bb76c13e5ecfca6c59002271223cac617d1cafa074
5
+ SHA512:
6
+ metadata.gz: ff4dddab242262052453c811b22b128bfae52a9c0c9a656391f30abb72872d0f32574179f105033536f936fa24d04b4ef4194cb1b534d1dd0c34f72f3981b9a6
7
+ data.tar.gz: 146aabec554b0a4675e9cc3618c9b65b1afac8d324ffb330586d49d77a444cff62a6c86386ff7e0407f57f1c4508995298764b3a20f598f354024d1a74fd5e36
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 12.0.0'
7
+ gem 'pry-byebug'
8
+ gem 'rubocop', '~> 0.66.0'
9
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,79 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ pulp_file_client (0.1.0b1)
5
+ json (~> 2.1, >= 2.1.0)
6
+ typhoeus (~> 1.0, >= 1.0.1)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ ZenTest (4.11.2)
12
+ addressable (2.5.2)
13
+ public_suffix (>= 2.0.2, < 4.0)
14
+ autotest (4.4.6)
15
+ ZenTest (>= 4.4.1)
16
+ autotest-fsevent (0.2.14)
17
+ sys-uname
18
+ autotest-growl (0.2.16)
19
+ autotest-rails-pure (4.1.2)
20
+ byebug (10.0.2)
21
+ coderay (1.1.2)
22
+ crack (0.4.3)
23
+ safe_yaml (~> 1.0.0)
24
+ diff-lcs (1.3)
25
+ ethon (0.11.0)
26
+ ffi (>= 1.3.0)
27
+ ffi (1.9.25)
28
+ hashdiff (0.3.7)
29
+ json (2.1.0)
30
+ method_source (0.9.0)
31
+ pry (0.11.3)
32
+ coderay (~> 1.1.0)
33
+ method_source (~> 0.9.0)
34
+ pry-byebug (3.6.0)
35
+ byebug (~> 10.0)
36
+ pry (~> 0.10)
37
+ public_suffix (3.0.3)
38
+ rake (12.0.0)
39
+ rspec (3.8.0)
40
+ rspec-core (~> 3.8.0)
41
+ rspec-expectations (~> 3.8.0)
42
+ rspec-mocks (~> 3.8.0)
43
+ rspec-core (3.8.0)
44
+ rspec-support (~> 3.8.0)
45
+ rspec-expectations (3.8.1)
46
+ diff-lcs (>= 1.2.0, < 2.0)
47
+ rspec-support (~> 3.8.0)
48
+ rspec-mocks (3.8.0)
49
+ diff-lcs (>= 1.2.0, < 2.0)
50
+ rspec-support (~> 3.8.0)
51
+ rspec-support (3.8.0)
52
+ safe_yaml (1.0.4)
53
+ sys-uname (1.0.3)
54
+ ffi (>= 1.0.0)
55
+ typhoeus (1.3.0)
56
+ ethon (>= 0.9.0)
57
+ vcr (3.0.3)
58
+ webmock (1.24.6)
59
+ addressable (>= 2.3.6)
60
+ crack (>= 0.3.2)
61
+ hashdiff
62
+
63
+ PLATFORMS
64
+ ruby
65
+
66
+ DEPENDENCIES
67
+ autotest (~> 4.4, >= 4.4.6)
68
+ autotest-fsevent (~> 0.2, >= 0.2.12)
69
+ autotest-growl (~> 0.2, >= 0.2.16)
70
+ autotest-rails-pure (~> 4.1, >= 4.1.2)
71
+ pulp_file_client!
72
+ pry-byebug
73
+ rake (~> 12.0.0)
74
+ rspec (~> 3.6, >= 3.6.0)
75
+ vcr (~> 3.0, >= 3.0.1)
76
+ webmock (~> 1.24, >= 1.24.3)
77
+
78
+ BUNDLED WITH
79
+ 1.16.1
data/README.md ADDED
@@ -0,0 +1,127 @@
1
+ # pulp_file_client
2
+
3
+ PulpFileClient - the Ruby gem for the Pulp 3 API
4
+
5
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+
7
+ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
+
9
+ - API version: v3
10
+ - Package version: 0.1.0b1
11
+ - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
+
13
+ ## Installation
14
+
15
+ ### Build a gem
16
+
17
+ To build the Ruby code into a gem:
18
+
19
+ ```shell
20
+ gem build pulp_file_client.gemspec
21
+ ```
22
+
23
+ Then either install the gem locally:
24
+
25
+ ```shell
26
+ gem install ./pulp_file_client-0.1.0b1.gem
27
+ ```
28
+
29
+ (for development, run `gem install --dev ./pulp_file_client-0.1.0b1.gem` to install the development dependencies)
30
+
31
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
32
+
33
+ Finally add this to the Gemfile:
34
+
35
+ gem 'pulp_file_client', '~> 0.1.0b1'
36
+
37
+ ### Install from Git
38
+
39
+ If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
40
+
41
+ gem 'pulp_file_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
42
+
43
+ ### Include the Ruby code directly
44
+
45
+ Include the Ruby code directly using `-I` as follows:
46
+
47
+ ```shell
48
+ ruby -Ilib script.rb
49
+ ```
50
+
51
+ ## Getting Started
52
+
53
+ Please follow the [installation](#installation) procedure and then run the following code:
54
+
55
+ ```ruby
56
+ # Load the gem
57
+ require 'pulp_file_client'
58
+
59
+ # Setup authorization
60
+ PulpFileClient.configure do |config|
61
+ # Configure HTTP basic authorization: Basic
62
+ config.username = 'YOUR USERNAME'
63
+ config.password = 'YOUR PASSWORD'
64
+ end
65
+
66
+ api_instance = PulpFileClient::ContentFilesApi.new
67
+ data = PulpFileClient::FileContent.new # FileContent |
68
+
69
+ begin
70
+ #Create a file content
71
+ result = api_instance.create(data)
72
+ p result
73
+ rescue PulpFileClient::ApiError => e
74
+ puts "Exception when calling ContentFilesApi->create: #{e}"
75
+ end
76
+
77
+ ```
78
+
79
+ ## Documentation for API Endpoints
80
+
81
+ All URIs are relative to *http://localhost:24817*
82
+
83
+ Class | Method | HTTP request | Description
84
+ ------------ | ------------- | ------------- | -------------
85
+ *PulpFileClient::ContentFilesApi* | [**create**](docs/ContentFilesApi.md#create) | **POST** /pulp/api/v3/content/file/files/ | Create a file content
86
+ *PulpFileClient::ContentFilesApi* | [**list**](docs/ContentFilesApi.md#list) | **GET** /pulp/api/v3/content/file/files/ | List file contents
87
+ *PulpFileClient::ContentFilesApi* | [**read**](docs/ContentFilesApi.md#read) | **GET** {file_content_href} | Inspect a file content
88
+ *PulpFileClient::DistributionsFileApi* | [**create**](docs/DistributionsFileApi.md#create) | **POST** /pulp/api/v3/distributions/file/file/ | Create a file distribution
89
+ *PulpFileClient::DistributionsFileApi* | [**delete**](docs/DistributionsFileApi.md#delete) | **DELETE** {file_distribution_href} | Delete a file distribution
90
+ *PulpFileClient::DistributionsFileApi* | [**list**](docs/DistributionsFileApi.md#list) | **GET** /pulp/api/v3/distributions/file/file/ | List file distributions
91
+ *PulpFileClient::DistributionsFileApi* | [**partial_update**](docs/DistributionsFileApi.md#partial_update) | **PATCH** {file_distribution_href} | Partially update a file distribution
92
+ *PulpFileClient::DistributionsFileApi* | [**read**](docs/DistributionsFileApi.md#read) | **GET** {file_distribution_href} | Inspect a file distribution
93
+ *PulpFileClient::DistributionsFileApi* | [**update**](docs/DistributionsFileApi.md#update) | **PUT** {file_distribution_href} | Update a file distribution
94
+ *PulpFileClient::PublicationsFileApi* | [**create**](docs/PublicationsFileApi.md#create) | **POST** /pulp/api/v3/publications/file/file/ | Create a file publication
95
+ *PulpFileClient::PublicationsFileApi* | [**delete**](docs/PublicationsFileApi.md#delete) | **DELETE** {file_publication_href} | Delete a file publication
96
+ *PulpFileClient::PublicationsFileApi* | [**list**](docs/PublicationsFileApi.md#list) | **GET** /pulp/api/v3/publications/file/file/ | List file publications
97
+ *PulpFileClient::PublicationsFileApi* | [**read**](docs/PublicationsFileApi.md#read) | **GET** {file_publication_href} | Inspect a file publication
98
+ *PulpFileClient::RemotesFileApi* | [**create**](docs/RemotesFileApi.md#create) | **POST** /pulp/api/v3/remotes/file/file/ | Create a file remote
99
+ *PulpFileClient::RemotesFileApi* | [**delete**](docs/RemotesFileApi.md#delete) | **DELETE** {file_remote_href} | Delete a file remote
100
+ *PulpFileClient::RemotesFileApi* | [**list**](docs/RemotesFileApi.md#list) | **GET** /pulp/api/v3/remotes/file/file/ | List file remotes
101
+ *PulpFileClient::RemotesFileApi* | [**partial_update**](docs/RemotesFileApi.md#partial_update) | **PATCH** {file_remote_href} | Partially update a file remote
102
+ *PulpFileClient::RemotesFileApi* | [**read**](docs/RemotesFileApi.md#read) | **GET** {file_remote_href} | Inspect a file remote
103
+ *PulpFileClient::RemotesFileApi* | [**sync**](docs/RemotesFileApi.md#sync) | **POST** {file_remote_href}sync/ |
104
+ *PulpFileClient::RemotesFileApi* | [**update**](docs/RemotesFileApi.md#update) | **PUT** {file_remote_href} | Update a file remote
105
+
106
+
107
+ ## Documentation for Models
108
+
109
+ - [PulpFileClient::AsyncOperationResponse](docs/AsyncOperationResponse.md)
110
+ - [PulpFileClient::FileContent](docs/FileContent.md)
111
+ - [PulpFileClient::FileDistribution](docs/FileDistribution.md)
112
+ - [PulpFileClient::FilePublication](docs/FilePublication.md)
113
+ - [PulpFileClient::FileRemote](docs/FileRemote.md)
114
+ - [PulpFileClient::InlineResponse200](docs/InlineResponse200.md)
115
+ - [PulpFileClient::InlineResponse2001](docs/InlineResponse2001.md)
116
+ - [PulpFileClient::InlineResponse2002](docs/InlineResponse2002.md)
117
+ - [PulpFileClient::InlineResponse2003](docs/InlineResponse2003.md)
118
+ - [PulpFileClient::RepositorySyncURL](docs/RepositorySyncURL.md)
119
+
120
+
121
+ ## Documentation for Authorization
122
+
123
+
124
+ ### Basic
125
+
126
+ - **Type**: HTTP basic authentication
127
+
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task default: :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end
@@ -0,0 +1,17 @@
1
+ # PulpFileClient::AsyncOperationResponse
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **task** | **String** | The href of the task. |
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'PulpFileClient'
13
+
14
+ instance = PulpFileClient::AsyncOperationResponse.new(task: null)
15
+ ```
16
+
17
+
@@ -0,0 +1,184 @@
1
+ # PulpFileClient::ContentFilesApi
2
+
3
+ All URIs are relative to *http://localhost:24817*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**create**](ContentFilesApi.md#create) | **POST** /pulp/api/v3/content/file/files/ | Create a file content
8
+ [**list**](ContentFilesApi.md#list) | **GET** /pulp/api/v3/content/file/files/ | List file contents
9
+ [**read**](ContentFilesApi.md#read) | **GET** {file_content_href} | Inspect a file content
10
+
11
+
12
+
13
+ ## create
14
+
15
+ > FileContent create(data)
16
+
17
+ Create a file content
18
+
19
+ <!-- User-facing documentation, rendered as html--> FileContent represents a single file and its metadata, which can be added and removed from repositories.
20
+
21
+ ### Example
22
+
23
+ ```ruby
24
+ # load the gem
25
+ require 'pulp_file_client'
26
+ # setup authorization
27
+ PulpFileClient.configure do |config|
28
+ # Configure HTTP basic authorization: Basic
29
+ config.username = 'YOUR USERNAME'
30
+ config.password = 'YOUR PASSWORD'
31
+ end
32
+
33
+ api_instance = PulpFileClient::ContentFilesApi.new
34
+ data = PulpFileClient::FileContent.new # FileContent |
35
+
36
+ begin
37
+ #Create a file content
38
+ result = api_instance.create(data)
39
+ p result
40
+ rescue PulpFileClient::ApiError => e
41
+ puts "Exception when calling ContentFilesApi->create: #{e}"
42
+ end
43
+ ```
44
+
45
+ ### Parameters
46
+
47
+
48
+ Name | Type | Description | Notes
49
+ ------------- | ------------- | ------------- | -------------
50
+ **data** | [**FileContent**](FileContent.md)| |
51
+
52
+ ### Return type
53
+
54
+ [**FileContent**](FileContent.md)
55
+
56
+ ### Authorization
57
+
58
+ [Basic](../README.md#Basic)
59
+
60
+ ### HTTP request headers
61
+
62
+ - **Content-Type**: application/json
63
+ - **Accept**: application/json
64
+
65
+
66
+ ## list
67
+
68
+ > InlineResponse200 list(opts)
69
+
70
+ List file contents
71
+
72
+ <!-- User-facing documentation, rendered as html--> FileContent represents a single file and its metadata, which can be added and removed from repositories.
73
+
74
+ ### Example
75
+
76
+ ```ruby
77
+ # load the gem
78
+ require 'pulp_file_client'
79
+ # setup authorization
80
+ PulpFileClient.configure do |config|
81
+ # Configure HTTP basic authorization: Basic
82
+ config.username = 'YOUR USERNAME'
83
+ config.password = 'YOUR PASSWORD'
84
+ end
85
+
86
+ api_instance = PulpFileClient::ContentFilesApi.new
87
+ opts = {
88
+ relative_path: 'relative_path_example', # String | Filter results where relative_path matches value
89
+ digest: 'digest_example', # String | Filter results where digest matches value
90
+ repository_version: 'repository_version_example', # String | Repository Version referenced by HREF
91
+ repository_version_added: 'repository_version_added_example', # String | Repository Version referenced by HREF
92
+ repository_version_removed: 'repository_version_removed_example', # String | Repository Version referenced by HREF
93
+ page: 56, # Integer | A page number within the paginated result set.
94
+ page_size: 56 # Integer | Number of results to return per page.
95
+ }
96
+
97
+ begin
98
+ #List file contents
99
+ result = api_instance.list(opts)
100
+ p result
101
+ rescue PulpFileClient::ApiError => e
102
+ puts "Exception when calling ContentFilesApi->list: #{e}"
103
+ end
104
+ ```
105
+
106
+ ### Parameters
107
+
108
+
109
+ Name | Type | Description | Notes
110
+ ------------- | ------------- | ------------- | -------------
111
+ **relative_path** | **String**| Filter results where relative_path matches value | [optional]
112
+ **digest** | **String**| Filter results where digest matches value | [optional]
113
+ **repository_version** | **String**| Repository Version referenced by HREF | [optional]
114
+ **repository_version_added** | **String**| Repository Version referenced by HREF | [optional]
115
+ **repository_version_removed** | **String**| Repository Version referenced by HREF | [optional]
116
+ **page** | **Integer**| A page number within the paginated result set. | [optional]
117
+ **page_size** | **Integer**| Number of results to return per page. | [optional]
118
+
119
+ ### Return type
120
+
121
+ [**InlineResponse200**](InlineResponse200.md)
122
+
123
+ ### Authorization
124
+
125
+ [Basic](../README.md#Basic)
126
+
127
+ ### HTTP request headers
128
+
129
+ - **Content-Type**: Not defined
130
+ - **Accept**: application/json
131
+
132
+
133
+ ## read
134
+
135
+ > FileContent read(file_content_href)
136
+
137
+ Inspect a file content
138
+
139
+ <!-- User-facing documentation, rendered as html--> FileContent represents a single file and its metadata, which can be added and removed from repositories.
140
+
141
+ ### Example
142
+
143
+ ```ruby
144
+ # load the gem
145
+ require 'pulp_file_client'
146
+ # setup authorization
147
+ PulpFileClient.configure do |config|
148
+ # Configure HTTP basic authorization: Basic
149
+ config.username = 'YOUR USERNAME'
150
+ config.password = 'YOUR PASSWORD'
151
+ end
152
+
153
+ api_instance = PulpFileClient::ContentFilesApi.new
154
+ file_content_href = 'file_content_href_example' # String | URI of File Content. e.g.: /pulp/api/v3/content/file/files/1/
155
+
156
+ begin
157
+ #Inspect a file content
158
+ result = api_instance.read(file_content_href)
159
+ p result
160
+ rescue PulpFileClient::ApiError => e
161
+ puts "Exception when calling ContentFilesApi->read: #{e}"
162
+ end
163
+ ```
164
+
165
+ ### Parameters
166
+
167
+
168
+ Name | Type | Description | Notes
169
+ ------------- | ------------- | ------------- | -------------
170
+ **file_content_href** | **String**| URI of File Content. e.g.: /pulp/api/v3/content/file/files/1/ |
171
+
172
+ ### Return type
173
+
174
+ [**FileContent**](FileContent.md)
175
+
176
+ ### Authorization
177
+
178
+ [Basic](../README.md#Basic)
179
+
180
+ ### HTTP request headers
181
+
182
+ - **Content-Type**: Not defined
183
+ - **Accept**: application/json
184
+