rancher-api 0.3.7 → 0.3.8
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/CHANGELOG.md +6 -0
- data/Gemfile.lock +5 -5
- data/README.md +27 -0
- data/lib/rancher/api/models.rb +1 -0
- data/lib/rancher/api/models/host.rb +1 -0
- data/lib/rancher/api/models/ipaddress.rb +9 -0
- data/lib/rancher/api/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69a6c3ad0e66f587ef7c090231e136dae1eff7e2
|
4
|
+
data.tar.gz: 6a53f3f8f6787d21182880156c801d44326f2021
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 224e0a6906eb746047c3c88e3570bc6a8b1e7ddc691c0bfd43d854615ce3d916c8ed25199e7bbc4a634d713c55ca9d3e0f7f0a6c4fac42ab69b185799e35b113
|
7
|
+
data.tar.gz: 8251f67c299f13a58b4e826c5e51779543fec14daca31fe370654b44c148c93ea44989a00089a0e78bd28c86e89ccec2d9c2ccfa7c15a2e276716fe35ffa4198
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
|
5
|
+
|
6
|
+
## [0.3.8] - 2016-03-15
|
7
|
+
|
8
|
+
- add Ipaddress class and association to Host class
|
9
|
+
|
10
|
+
|
5
11
|
## [0.3.7] - 2016-03-15
|
6
12
|
|
7
13
|
- fix an issue with RANCHER_URL env variable (append `/v1/` to the RANCHER_URL env variable if it exists). This way RANCHER_URL becomes truly `rancher-compose`-compatible.
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rancher-api (0.3.
|
4
|
+
rancher-api (0.3.8)
|
5
5
|
faraday_middleware
|
6
6
|
faye-websocket
|
7
7
|
her (~> 0.7.6)
|
@@ -9,10 +9,10 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activemodel (4.2.
|
13
|
-
activesupport (= 4.2.
|
12
|
+
activemodel (4.2.6)
|
13
|
+
activesupport (= 4.2.6)
|
14
14
|
builder (~> 3.1)
|
15
|
-
activesupport (4.2.
|
15
|
+
activesupport (4.2.6)
|
16
16
|
i18n (~> 0.7)
|
17
17
|
json (~> 1.7, >= 1.7.7)
|
18
18
|
minitest (~> 5.1)
|
@@ -25,7 +25,7 @@ GEM
|
|
25
25
|
crack (0.4.2)
|
26
26
|
safe_yaml (~> 1.0.0)
|
27
27
|
diff-lcs (1.2.5)
|
28
|
-
eventmachine (1.0
|
28
|
+
eventmachine (1.2.0)
|
29
29
|
faraday (0.9.2)
|
30
30
|
multipart-post (>= 1.2, < 3)
|
31
31
|
faraday_middleware (0.10.0)
|
data/README.md
CHANGED
@@ -94,6 +94,33 @@ project = Rancher::Api::Project.all.to_a
|
|
94
94
|
machine = Rancher::Api::Machine.find('1ph1')
|
95
95
|
```
|
96
96
|
|
97
|
+
`rancher/api` gem uses ORM Her which hence inherently supports all of the features that Her has to offer. To get more details, review this page https://github.com/remiprev/her#fetching-data
|
98
|
+
|
99
|
+
Some of the example queries include:
|
100
|
+
|
101
|
+
```ruby
|
102
|
+
project = Rancher::Api::Project.all.to_a.first
|
103
|
+
|
104
|
+
project.machines
|
105
|
+
|
106
|
+
# exact machine name
|
107
|
+
project.machines.where(name: 'ciqa01')
|
108
|
+
|
109
|
+
# machine's name not equal to
|
110
|
+
project.machines.where(name_ne: 'qa')
|
111
|
+
|
112
|
+
# machine's name starts with
|
113
|
+
project.machines.where(name_prefix: 'qa')
|
114
|
+
|
115
|
+
# other attributes
|
116
|
+
|
117
|
+
# state not active
|
118
|
+
project.machines.where(state_ne: 'active')
|
119
|
+
|
120
|
+
# state activating
|
121
|
+
project.machines.where(state: 'activating')
|
122
|
+
```
|
123
|
+
|
97
124
|
### Creating new machines
|
98
125
|
Creating new machine using **Digital Ocean** driver:
|
99
126
|
|
data/lib/rancher/api/models.rb
CHANGED
data/lib/rancher/api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rancher-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Kurkin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: her
|
@@ -182,6 +182,7 @@ files:
|
|
182
182
|
- lib/rancher/api/models/host.rb
|
183
183
|
- lib/rancher/api/models/instance.rb
|
184
184
|
- lib/rancher/api/models/instance/action.rb
|
185
|
+
- lib/rancher/api/models/ipaddress.rb
|
185
186
|
- lib/rancher/api/models/machine.rb
|
186
187
|
- lib/rancher/api/models/machine/driver_config.rb
|
187
188
|
- lib/rancher/api/models/project.rb
|