maas-client 0.1.24 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -2
- data/lib/maas/client/cli.rb +7 -0
- data/lib/maas/client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73f12e91e3767fe4270994c37beda74dbc41b39d
|
4
|
+
data.tar.gz: 3c0b49ad32f9b91914d7b200687aa1209e8ee0c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 721562802f3f31e1b5c6c897abc56e6e07a9c02bf9c77dcacdfb1958cb319921fbe4dd12f6cd56da5c8a370fa16a890b9b13aca62f12dcf0a730ab969bccc39a
|
7
|
+
data.tar.gz: d916bdb2dced86c79db2529087031235781a41317993f8b28005229d8c6918e98f9f46000e586d930b867c513043a846d8352b63ca379cda38c13d10ebfcb63e
|
data/README.md
CHANGED
@@ -48,9 +48,11 @@ dns_records = con.request(:get, ['dnsresources'])
|
|
48
48
|
dns_records.each_with_index { |item, index| myarr << item['fqdn'] }
|
49
49
|
myarr
|
50
50
|
|
51
|
-
|
52
51
|
```
|
53
|
-
|
52
|
+
```bash
|
53
|
+
# to generate hosts file
|
54
|
+
rbmaas generate hosts
|
55
|
+
```
|
54
56
|
## Development and Contribution
|
55
57
|
|
56
58
|
Questions and pull requests are always welcome!
|
data/lib/maas/client/cli.rb
CHANGED
@@ -64,6 +64,13 @@ module Maas
|
|
64
64
|
conn.request(:get, ['dnsresources']).each do |d|
|
65
65
|
records << { ip: d['ip_addresses'][0]['ip'], fqdn: d['fqdn'] }
|
66
66
|
end
|
67
|
+
|
68
|
+
conn.request(:get, ['machines']).each do |m|
|
69
|
+
if m['ip_addresses'] != []
|
70
|
+
records << { ip: m['ip_addresses'][0], fqdn: m['fqdn'] }
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
67
74
|
records.sort_by! { |h| h[:fqdn] }
|
68
75
|
domain = conn.request(:get, ['domains'])[0]['name']
|
69
76
|
to_slice = ".#{domain}"
|
data/lib/maas/client/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maas-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Don Draper
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07
|
11
|
+
date: 2017-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|