ocpclient 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +3 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +22 -0
- data/README.md +342 -0
- data/Rakefile +12 -0
- data/examples/create_project.rb +23 -0
- data/examples/list_projects.rb +21 -0
- data/lib/ocpclient/version.rb +4 -0
- data/lib/ocpclient.rb +50 -0
- data/ocpclient.gemspec +30 -0
- metadata +166 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 10a1cc075addebee25ca5a78bb9bd6c5935c164f
|
4
|
+
data.tar.gz: 9becb489777b7a81f97e23619f1e9fbea19f1af3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 22557b366c3712c1e4fe0350bda7af0054d65196fcc3bad3a78d53936ade22a9fa78dfd200b5d6a1856877df8feb122cb18a8b0d0ef00e337a3f621a33a330ca
|
7
|
+
data.tar.gz: 95cfeedc2ccd9073e1ead39569480490aec31658f2a8d92181086fc540fd33fed57d29bb6dc4d4a12f66cc52e81c9d9b2a0bc76e39276b9e0f7b81f5eb4ea7b3
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Alissa Bonas
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,342 @@
|
|
1
|
+
# Ocpclient
|
2
|
+
|
3
|
+
|
4
|
+
A Ruby client for OpenShift Container Platform REST api.
|
5
|
+
The client supports GET, POST, PUT, DELETE on projects, build configs, quotas, and role bindings.
|
6
|
+
The client currently supports OCP REST api version v1.
|
7
|
+
|
8
|
+
This client heavily leverages the [Kubeclient](https://github.com/abonas/kubeclient) Ruby Gem and operates almost identically.
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
Add this line to your application's Gemfile:
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
gem 'ocpclient'
|
16
|
+
```
|
17
|
+
|
18
|
+
And then execute:
|
19
|
+
|
20
|
+
$ bundle
|
21
|
+
|
22
|
+
Or install it yourself as:
|
23
|
+
|
24
|
+
$ gem install ocpclient
|
25
|
+
|
26
|
+
## Usage
|
27
|
+
|
28
|
+
Initialize the client:
|
29
|
+
```ruby
|
30
|
+
client = Ocpclient::Client.new 'https://localhost:8443/' , "v1"
|
31
|
+
```
|
32
|
+
|
33
|
+
Or without specifying version (it will be set by default to "v1")
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
client = Ocpclient::Client.new 'https://localhost:8443/'
|
37
|
+
```
|
38
|
+
|
39
|
+
Another option is to initialize the client with URI object:
|
40
|
+
|
41
|
+
```ruby
|
42
|
+
uri = URI::HTTP.build(host: "somehostname", port: 8443)
|
43
|
+
client = Ocpclient::Client.new uri
|
44
|
+
```
|
45
|
+
|
46
|
+
It is also possible to use https and configure ssl with:
|
47
|
+
|
48
|
+
```ruby
|
49
|
+
ssl_options = {
|
50
|
+
client_cert: OpenSSL::X509::Certificate.new(File.read('/path/to/client.crt')),
|
51
|
+
client_key: OpenSSL::PKey::RSA.new(File.read('/path/to/client.key')),
|
52
|
+
ca_file: '/path/to/ca.crt',
|
53
|
+
verify_ssl: OpenSSL::SSL::VERIFY_PEER
|
54
|
+
}
|
55
|
+
client = Ocpclient::Client.new 'https://localhost:8443/' , "v1",
|
56
|
+
ssl_options: ssl_options
|
57
|
+
```
|
58
|
+
|
59
|
+
As an alternative to the `ca_file` it's possible to use the `cert_store`:
|
60
|
+
|
61
|
+
```ruby
|
62
|
+
cert_store = OpenSSL::X509::Store.new
|
63
|
+
cert_store.add_cert(OpenSSL::X509::Certificate.new(ca_cert_data))
|
64
|
+
ssl_options = {
|
65
|
+
cert_store: cert_store,
|
66
|
+
verify_ssl: OpenSSL::SSL::VERIFY_PEER
|
67
|
+
}
|
68
|
+
client = Ocpclient::Client.new 'https://localhost:8443/' , "v1",
|
69
|
+
ssl_options: ssl_options
|
70
|
+
```
|
71
|
+
|
72
|
+
For testing and development purpose you can disable the ssl check with:
|
73
|
+
|
74
|
+
```ruby
|
75
|
+
ssl_options = { verify_ssl: OpenSSL::SSL::VERIFY_NONE }
|
76
|
+
client = Ocpclient::Client.new 'https://localhost:8443/' , 'v1',
|
77
|
+
ssl_options: ssl_options
|
78
|
+
```
|
79
|
+
|
80
|
+
If you are using basic authentication or bearer tokens as described
|
81
|
+
[here](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/authentication.md) then you can specify one
|
82
|
+
of the following:
|
83
|
+
|
84
|
+
```ruby
|
85
|
+
auth_options = {
|
86
|
+
username: 'username',
|
87
|
+
password: 'password'
|
88
|
+
}
|
89
|
+
client = Ocpclient::Client.new 'https://localhost:8443/' , 'v1',
|
90
|
+
auth_options: auth_options
|
91
|
+
```
|
92
|
+
|
93
|
+
or
|
94
|
+
|
95
|
+
```ruby
|
96
|
+
auth_options = {
|
97
|
+
bearer_token: 'MDExMWJkMjItOWY1Ny00OGM5LWJlNDEtMjBiMzgxODkxYzYz'
|
98
|
+
}
|
99
|
+
client = Ocpclient::Client.new 'https://localhost:8443/' , 'v1',
|
100
|
+
auth_options: auth_options
|
101
|
+
```
|
102
|
+
|
103
|
+
or
|
104
|
+
|
105
|
+
```ruby
|
106
|
+
auth_options = {
|
107
|
+
bearer_token_file: '/path/to/token_file'
|
108
|
+
}
|
109
|
+
client = Ocpclient::Client.new 'https://localhost:8443/' , 'v1',
|
110
|
+
auth_options: auth_options
|
111
|
+
```
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
### Kubeclient::Config
|
116
|
+
|
117
|
+
If you've been using `kubectl` and have a `.kube/config` file, you can auto-populate a config object using `Kubeclient::Config`:
|
118
|
+
```ruby
|
119
|
+
config = Kubeclient::Config.read('/path/to/.kube/config')
|
120
|
+
```
|
121
|
+
|
122
|
+
...and then pass that object to `Kubeclient::Client`:
|
123
|
+
|
124
|
+
```
|
125
|
+
Kubeclient::Client.new(
|
126
|
+
config.context.api_endpoint,
|
127
|
+
config.context.api_version,
|
128
|
+
{
|
129
|
+
ssl_options: config.context.ssl_options,
|
130
|
+
auth_options: config.context.auth_options
|
131
|
+
}
|
132
|
+
)
|
133
|
+
```
|
134
|
+
|
135
|
+
You can also load your JSONified config in from an ENV variable (e.g. `KUBE_CONFIG`) like so:
|
136
|
+
|
137
|
+
```
|
138
|
+
Kubeclient::Config.new(JSON.parse(ENV['KUBE_CONFIG']), nil)
|
139
|
+
```
|
140
|
+
|
141
|
+
## Examples:
|
142
|
+
|
143
|
+
#### Get all instances of a specific entity type
|
144
|
+
Such as: `get_pods`, `get_secrets`, `get_services`, `get_nodes`, `get_replication_controllers`, `get_resource_quotas`, `get_limit_ranges`, `get_persistent_volumes`, `get_persistent_volume_claims`, `get_component_statuses`, `get_service_accounts`
|
145
|
+
|
146
|
+
```ruby
|
147
|
+
pods = client.get_pods
|
148
|
+
```
|
149
|
+
|
150
|
+
Get all entities of a specific type in a namespace:<br>
|
151
|
+
|
152
|
+
```ruby
|
153
|
+
services = client.get_services(namespace: 'development')
|
154
|
+
```
|
155
|
+
|
156
|
+
You can get entities which have specific labels by specifying a parameter named `label_selector` (named `labelSelector` in Kubernetes server):
|
157
|
+
|
158
|
+
```ruby
|
159
|
+
pods = client.get_pods(label_selector: 'name=redis-master')
|
160
|
+
```
|
161
|
+
|
162
|
+
You can specify multiple labels (that option will return entities which have both labels:
|
163
|
+
```ruby
|
164
|
+
pods = client.get_pods(label_selector: 'name=redis-master,app=redis')
|
165
|
+
```
|
166
|
+
|
167
|
+
#### Get a specific instance of an entity (by name)
|
168
|
+
Such as: `get_service "service name"` , `get_pod "pod name"` , `get_replication_controller "rc name"`, `get_secret "secret name"`, `get_resource_quota "resource quota name"`, `get_limit_range "limit range name"` , `get_persistent_volume "persistent volume name"` , `get_persistent_volume_claim "persistent volume claim name"`, `get_component_status "component name"`, `get_service_account "service account name"`
|
169
|
+
|
170
|
+
The GET request should include the namespace name, except for nodes and namespaces entities.
|
171
|
+
|
172
|
+
```ruby
|
173
|
+
node = client.get_node "127.0.0.1"
|
174
|
+
```
|
175
|
+
|
176
|
+
```ruby
|
177
|
+
service = client.get_service "guestbook", 'development'
|
178
|
+
```
|
179
|
+
|
180
|
+
Note - Kubernetes doesn't work with the uid, but rather with the 'name' property.
|
181
|
+
Querying with uid causes 404.
|
182
|
+
|
183
|
+
#### Delete an entity (by name)
|
184
|
+
|
185
|
+
For example: `delete_pod "pod name"` , `delete_replication_controller "rc name"`, `delete_node "node name"`, `delete_secret "secret name"`
|
186
|
+
|
187
|
+
Input parameter - name (string) specifying service name, pod name, replication controller name.
|
188
|
+
```ruby
|
189
|
+
client.delete_service "redis-service"
|
190
|
+
```
|
191
|
+
|
192
|
+
#### Create an entity
|
193
|
+
For example: `create_pod pod_object`, `create_replication_controller rc_obj`, `create_secret secret_object`, `create_resource_quota resource_quota_object`, `create_limit_range limit_range_object`, `create_persistent_volume persistent_volume_object`, `create_persistent_volume_claim persistent_volume_claim_object`, `create_service_account service_account_object`
|
194
|
+
|
195
|
+
Input parameter - object of type `Service`, `Pod`, `ReplicationController`.
|
196
|
+
|
197
|
+
The below example is for v1
|
198
|
+
|
199
|
+
```ruby
|
200
|
+
service = Service.new
|
201
|
+
service.metadata = {}
|
202
|
+
service.metadata.name = "redis-master"
|
203
|
+
service.metadata.namespace = 'staging'
|
204
|
+
service.spec = {}
|
205
|
+
service.spec.ports = [{ 'port' => 6379,
|
206
|
+
'targetPort' => 'redis-server'
|
207
|
+
}]
|
208
|
+
service.spec.selector = {}
|
209
|
+
service.spec.selector.name = "redis"
|
210
|
+
service.spec.selector.role = "master"
|
211
|
+
service.metadata.labels = {}
|
212
|
+
service.metadata.labels.app = 'redis'
|
213
|
+
service.metadata.labels.role = 'slave'
|
214
|
+
client.create_service service`
|
215
|
+
```
|
216
|
+
|
217
|
+
#### Update an entity
|
218
|
+
For example: `update_pod`, `update_service`, `update_replication_controller`, `update_secret`, `update_resource_quota`, `update_limit_range`, `update_persistent_volume`, `update_persistent_volume_claim`, `update_service_account`
|
219
|
+
|
220
|
+
Input parameter - object of type `Pod`, `Service`, `ReplicationController` etc.
|
221
|
+
|
222
|
+
The below example is for v1
|
223
|
+
|
224
|
+
```ruby
|
225
|
+
client.update_service service1
|
226
|
+
```
|
227
|
+
|
228
|
+
#### Patch an entity (by name)
|
229
|
+
For example: `patch_pod`, `patch_service`, `patch_secret`, `patch_resource_quota`, `patch_persistent_volume`
|
230
|
+
|
231
|
+
Input parameters - name (string) specifying the entity name, patch (hash) to be applied to the resource, optional: namespace name (string)
|
232
|
+
|
233
|
+
The PATCH request should include the namespace name, except for nodes and namespaces entities.
|
234
|
+
|
235
|
+
The below example is for v1
|
236
|
+
|
237
|
+
```ruby
|
238
|
+
client.patch_pod "docker-registry", {:metadata => {:annotations => {:key => 'value'}}}, "default"
|
239
|
+
```
|
240
|
+
|
241
|
+
#### Get all entities of all types : all_entities
|
242
|
+
Returns a hash with the following keys (node, secret, service, pod, replication_controller, namespace, resource_quota, limit_range, endpoint, event, persistent_volume, persistent_volume_claim, component_status and service_account). Each key points to an EntityList of same type.
|
243
|
+
This method is a convenience method instead of calling each entity's get method separately.
|
244
|
+
|
245
|
+
```ruby
|
246
|
+
client.all_entities
|
247
|
+
```
|
248
|
+
|
249
|
+
#### Receive entity updates
|
250
|
+
It is possible to receive live update notices watching the relevant entities:
|
251
|
+
|
252
|
+
```ruby
|
253
|
+
watcher = client.watch_pods
|
254
|
+
watcher.each do |notice|
|
255
|
+
# process notice data
|
256
|
+
end
|
257
|
+
```
|
258
|
+
|
259
|
+
It is possible to interrupt the watcher from another thread with:
|
260
|
+
|
261
|
+
```ruby
|
262
|
+
watcher.finish
|
263
|
+
```
|
264
|
+
|
265
|
+
#### Watch events for a particular object
|
266
|
+
You can use the `field_selector` option as part of the watch methods.
|
267
|
+
|
268
|
+
```ruby
|
269
|
+
watcher = client.watch_events(namespace: 'development', field_selector: 'involvedObject.name=redis-master')
|
270
|
+
watcher.each do |notice|
|
271
|
+
# process notice date
|
272
|
+
end
|
273
|
+
```
|
274
|
+
|
275
|
+
#### Get a proxy URL
|
276
|
+
You can get a complete URL for connecting a kubernetes entity via the proxy.
|
277
|
+
|
278
|
+
```ruby
|
279
|
+
client.proxy_url('service', 'srvname', 'srvportname', 'ns')
|
280
|
+
=> "https://localhost.localdomain:8443/api/v1/proxy/namespaces/ns/services/srvname:srvportname"
|
281
|
+
```
|
282
|
+
|
283
|
+
Note the third parameter, port, is a port name for services and an integer for pods:
|
284
|
+
|
285
|
+
```ruby
|
286
|
+
client.proxy_url('pod', 'podname', 5001, 'ns')
|
287
|
+
=> "https://localhost.localdomain:8443/api/v1/namespaces/ns/pods/podname:5001/proxy"
|
288
|
+
```
|
289
|
+
|
290
|
+
#### Get the logs of a pod
|
291
|
+
You can get the logs of a running pod, specifying the name of the pod and the
|
292
|
+
namespace where the pod is running:
|
293
|
+
|
294
|
+
```ruby
|
295
|
+
client.get_pod_log('pod-name', 'default')
|
296
|
+
=> "Running...\nRunning...\nRunning...\n"
|
297
|
+
```
|
298
|
+
|
299
|
+
If that pod has more than one container, you must specify the container:
|
300
|
+
|
301
|
+
```ruby
|
302
|
+
client.get_pod_log('pod-name', 'default', container: 'ruby')
|
303
|
+
=> "..."
|
304
|
+
```
|
305
|
+
|
306
|
+
If a container in a pod terminates, a new container is started, and you want to
|
307
|
+
retrieve the logs of the dead container, you can pass in the `:previous` option:
|
308
|
+
|
309
|
+
```ruby
|
310
|
+
client.get_pod_log('pod-name', 'default', previous: true)
|
311
|
+
=> "..."
|
312
|
+
```
|
313
|
+
|
314
|
+
You can also watch the logs of a pod to get a stream of data:
|
315
|
+
|
316
|
+
```ruby
|
317
|
+
watcher = client.watch_pod_log('pod-name', 'default', container: 'ruby')
|
318
|
+
watcher.each do |line|
|
319
|
+
puts line
|
320
|
+
end
|
321
|
+
```
|
322
|
+
|
323
|
+
|
324
|
+
## Contributing
|
325
|
+
|
326
|
+
1. Fork it ( https://github.com/[my-github-username]/kubeclient/fork )
|
327
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
328
|
+
3. Test your changes with `rake test rubocop`, add new tests if needed.
|
329
|
+
4. If you added a new functionality, add it to README
|
330
|
+
5. Commit your changes (`git commit -am 'Add some feature'`)
|
331
|
+
6. Push to the branch (`git push origin my-new-feature`)
|
332
|
+
7. Create a new Pull Request
|
333
|
+
|
334
|
+
## Tests
|
335
|
+
|
336
|
+
This client is tested with Minitest and also uses VCR recordings in some tests.
|
337
|
+
Please run all tests before submitting a Pull Request, and add new tests for new functionality.
|
338
|
+
|
339
|
+
Running tests:
|
340
|
+
```ruby
|
341
|
+
rake test
|
342
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
|
3
|
+
require 'ocpclient'
|
4
|
+
require 'kubeclient'
|
5
|
+
require 'json'
|
6
|
+
|
7
|
+
ssl_options = {
|
8
|
+
client_cert: OpenSSL::X509::Certificate.new(File.read('certs/admincrt.pem')),
|
9
|
+
client_key: OpenSSL::PKey::RSA.new(File.read('certs/adminkey.pem')),
|
10
|
+
ca_file: 'certs/adminca.pem',
|
11
|
+
verify_ssl: OpenSSL::SSL::VERIFY_NONE }
|
12
|
+
|
13
|
+
|
14
|
+
client = Ocpclient::Client.new 'https://openshift.kenscloud.io:8443', "v1", ssl_options: ssl_options
|
15
|
+
|
16
|
+
project = Kubeclient::ProjectRequest.new
|
17
|
+
|
18
|
+
project.metadata = {}
|
19
|
+
project.metadata.name = "testproject"
|
20
|
+
project.displayName = "Test Project"
|
21
|
+
project.description = "This is a test project"
|
22
|
+
|
23
|
+
puts "#{client.create_project_request project}"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
|
3
|
+
require 'ocpclient'
|
4
|
+
require 'json'
|
5
|
+
|
6
|
+
ssl_options = {
|
7
|
+
client_cert: OpenSSL::X509::Certificate.new(File.read('certs/admincrt.pem')),
|
8
|
+
client_key: OpenSSL::PKey::RSA.new(File.read('certs/adminkey.pem')),
|
9
|
+
ca_file: 'certs/adminca.pem',
|
10
|
+
verify_ssl: OpenSSL::SSL::VERIFY_NONE }
|
11
|
+
|
12
|
+
|
13
|
+
client = Ocpclient::Client.new 'https://openshift.kenscloud.io:8443', "v1", ssl_options: ssl_options
|
14
|
+
|
15
|
+
project_list = client.get_projects
|
16
|
+
|
17
|
+
|
18
|
+
project_list.each do |project|
|
19
|
+
puts "Project ==> #{project.metadata.name}"
|
20
|
+
end
|
21
|
+
|
data/lib/ocpclient.rb
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'kubeclient'
|
2
|
+
require 'ocpclient/version'
|
3
|
+
require 'json'
|
4
|
+
require 'rest-client'
|
5
|
+
require 'kubeclient/entity_list'
|
6
|
+
require 'kubeclient/kube_exception'
|
7
|
+
require 'kubeclient/watch_notice'
|
8
|
+
require 'kubeclient/watch_stream'
|
9
|
+
require 'kubeclient/common'
|
10
|
+
require 'kubeclient/config'
|
11
|
+
|
12
|
+
module Ocpclient
|
13
|
+
# OCP Client
|
14
|
+
class Client < Kubeclient::Client
|
15
|
+
include Kubeclient::ClientMixin
|
16
|
+
# Dynamically creating classes definitions (class Project, class BuildConfig, etc.),
|
17
|
+
# The classes are extending RecursiveOpenStruct.
|
18
|
+
# This cancels the need to define the classes
|
19
|
+
# manually on every new entity addition,
|
20
|
+
# and especially since currently the class body is empty
|
21
|
+
ENTITY_TYPES = %w(Project ProjectRequest BuildConfig RoleBinding).map do |et|
|
22
|
+
clazz = Class.new(RecursiveOpenStruct) do
|
23
|
+
def initialize(hash = nil, args = {})
|
24
|
+
args.merge!(recurse_over_arrays: true)
|
25
|
+
super(hash, args)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
[Kubeclient.const_set(et, clazz), et]
|
29
|
+
end
|
30
|
+
|
31
|
+
Kubeclient::ClientMixin.define_entity_methods(ENTITY_TYPES)
|
32
|
+
|
33
|
+
def initialize(
|
34
|
+
uri,
|
35
|
+
version = 'v1',
|
36
|
+
**options
|
37
|
+
)
|
38
|
+
initialize_client(
|
39
|
+
uri,
|
40
|
+
'/oapi',
|
41
|
+
version,
|
42
|
+
options
|
43
|
+
)
|
44
|
+
end
|
45
|
+
|
46
|
+
def all_entities
|
47
|
+
retrieve_all_entities(ENTITY_TYPES)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
data/ocpclient.gemspec
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'ocpclient/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'ocpclient'
|
8
|
+
spec.version = Ocpclient::VERSION
|
9
|
+
spec.authors = ['Kenneth Evensen']
|
10
|
+
spec.email = ['kevensen@redhat.com']
|
11
|
+
spec.summary = 'A client for OpenShift Container Platform REST api'
|
12
|
+
spec.description = 'A client for OpenShift Container Platform REST api'
|
13
|
+
spec.homepage = 'https://github.com/kevensen/ocpclient'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
spec.required_ruby_version = '>= 2.0.0'
|
21
|
+
|
22
|
+
spec.add_development_dependency 'bundler', '~> 1.6'
|
23
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
24
|
+
spec.add_development_dependency 'minitest'
|
25
|
+
spec.add_development_dependency 'webmock', '~> 1.24.2'
|
26
|
+
spec.add_development_dependency 'vcr'
|
27
|
+
spec.add_development_dependency 'rubocop', '= 0.30.0'
|
28
|
+
spec.add_development_dependency 'kubeclient'
|
29
|
+
spec.add_runtime_dependency 'kubeclient'
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,166 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ocpclient
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Kenneth Evensen
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-09-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.6'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: webmock
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.24.2
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.24.2
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: vcr
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.30.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.30.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: kubeclient
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: kubeclient
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
description: A client for OpenShift Container Platform REST api
|
126
|
+
email:
|
127
|
+
- kevensen@redhat.com
|
128
|
+
executables: []
|
129
|
+
extensions: []
|
130
|
+
extra_rdoc_files: []
|
131
|
+
files:
|
132
|
+
- ".gitignore"
|
133
|
+
- Gemfile
|
134
|
+
- LICENSE.txt
|
135
|
+
- README.md
|
136
|
+
- Rakefile
|
137
|
+
- examples/create_project.rb
|
138
|
+
- examples/list_projects.rb
|
139
|
+
- lib/ocpclient.rb
|
140
|
+
- lib/ocpclient/version.rb
|
141
|
+
- ocpclient.gemspec
|
142
|
+
homepage: https://github.com/kevensen/ocpclient
|
143
|
+
licenses:
|
144
|
+
- MIT
|
145
|
+
metadata: {}
|
146
|
+
post_install_message:
|
147
|
+
rdoc_options: []
|
148
|
+
require_paths:
|
149
|
+
- lib
|
150
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
151
|
+
requirements:
|
152
|
+
- - ">="
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: 2.0.0
|
155
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
requirements: []
|
161
|
+
rubyforge_project:
|
162
|
+
rubygems_version: 2.5.1
|
163
|
+
signing_key:
|
164
|
+
specification_version: 4
|
165
|
+
summary: A client for OpenShift Container Platform REST api
|
166
|
+
test_files: []
|