deis_client 1.5.2 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/deis_client.rb +22 -2
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7f826b620567c9a7ea92afefc991f9e118badea
|
4
|
+
data.tar.gz: 78b6f6ca0ffca0ffc054bdf47c71e829886a0765
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3df854c6c7e43e0af96f4f9d65657cb47fcccef10627884194d72b69ea3f6ca96fac8374ab896edc677cff6476e14c2e443fa90608f7910fcd3deb1620e0917e
|
7
|
+
data.tar.gz: 9cf5d9d92c209caf6601cbdaffcc627d3903b1a6622d6d4cbf3df5d9a10143d0fd452a7ccd4a1dabdceea0d7b87764d1e09ec864915ff17f858fa31eadee5b17
|
data/lib/deis_client.rb
CHANGED
@@ -65,6 +65,10 @@ module Deis
|
|
65
65
|
app_logs: [:get, '/apps/:app/logs/'],
|
66
66
|
app_run: [:post, '/apps/:app/run/'],
|
67
67
|
containers: [:get, '/apps/:app/containers/'],
|
68
|
+
containers_by_type: [:get, '/apps/:app/containers/:type/'],
|
69
|
+
restart_containers: [:post, '/apps/:app/containers/restart/'],
|
70
|
+
restart_containers_by_type: [:post, '/apps/:app/containers/:type/restart/'],
|
71
|
+
restart_container: [:post, '/apps/:app/containers/:type/:number/restart'],
|
68
72
|
scale: [:post, '/apps/:app/scale/'],
|
69
73
|
config: [:get, '/apps/:app/config/'],
|
70
74
|
set_config: [:post, '/apps/:app/config/'],
|
@@ -123,8 +127,24 @@ module Deis
|
|
123
127
|
perform :app_run, { app: id }, command: command
|
124
128
|
end
|
125
129
|
|
126
|
-
def containers(app_id)
|
127
|
-
|
130
|
+
def containers(app_id, opts = {})
|
131
|
+
if opts[:type]
|
132
|
+
perform :containers_by_type, app: app_id, type: opts[:type]
|
133
|
+
else
|
134
|
+
perform :containers, app: app_id
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
def restart_containers(app_id, opts = {})
|
139
|
+
if opts[:type]
|
140
|
+
if opts[:number]
|
141
|
+
perform :restart_container, opts.merge(app: app_id)
|
142
|
+
else
|
143
|
+
perform :restart_containers_by_type, app: app_id, type: opts[:type]
|
144
|
+
end
|
145
|
+
else
|
146
|
+
perform :restart_containers, app: app_id
|
147
|
+
end
|
128
148
|
end
|
129
149
|
|
130
150
|
def scale(app_id, type_number_hash)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deis_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franz Liedke
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-03-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -26,9 +26,9 @@ dependencies:
|
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0.13'
|
28
28
|
description: |-
|
29
|
-
(
|
29
|
+
[Deis](http://deis.io/) is an open source application platform for public and private clouds.
|
30
30
|
This gem makes it easy to communicate with a Deis controller programmatically
|
31
|
-
via the
|
31
|
+
via the [Deis controller api](http://docs.deis.io/en/latest/reference/api-v1.5/)
|
32
32
|
email:
|
33
33
|
executables: []
|
34
34
|
extensions: []
|
@@ -55,8 +55,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
55
55
|
version: '0'
|
56
56
|
requirements: []
|
57
57
|
rubyforge_project:
|
58
|
-
rubygems_version: 2.4.
|
58
|
+
rubygems_version: 2.4.8
|
59
59
|
signing_key:
|
60
60
|
specification_version: 4
|
61
|
-
summary: Client library to communicate with a (
|
61
|
+
summary: Client library to communicate with a [Deis](http://deis.io/) Controller
|
62
62
|
test_files: []
|
63
|
+
has_rdoc:
|