anamo 1.1.4 → 1.1.9
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/anamo/api.rb +2 -2
- data/lib/anamo/node/start +1 -1
- data/lib/anamo/node/thor.rb +20 -4
- data/lib/anamo/runner.rb +1 -1
- data/lib/anamo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 585bdfa59d1816cf15caf399a5a5f1b68edb07e88ceaff4f98066ae8a446f0ff
|
4
|
+
data.tar.gz: fee35d1d0357dd8ff87110cebec9ba41396c9fb8e32a5be8ff48de75f37091e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca8f4d5b4dbbe9446e8894f00803dd9c6b5bb90dd0c137b80f69ff6da4a8ca84f71472bbffa69d197f700a15f15fe756e0c6152ce3272bcf71eb29fca8c39b0e
|
7
|
+
data.tar.gz: 90cad52413673704ecf4b2aa7fd6707dd327659753028f28f6dc51bd81658b460201657bef9de1d65c761478c85f973592e0d62ff2fca11e1bd035526d0a136d
|
data/lib/anamo/api.rb
CHANGED
@@ -7,8 +7,8 @@ module Anamo
|
|
7
7
|
|
8
8
|
def initialize
|
9
9
|
@api_base_url = 'https://app.anamo.io/api'
|
10
|
-
@config = YAML.load_file "/
|
11
|
-
@client_key = File.exists?("/
|
10
|
+
@config = YAML.load_file "/$HOME/anamo.conf.yml"
|
11
|
+
@client_key = File.exists?("/$HOME/anamo.client.key") ? File.open("/$HOME/anamo.client.key", 'rb') { |f| f.read } : nil
|
12
12
|
end
|
13
13
|
|
14
14
|
def make_url path
|
data/lib/anamo/node/start
CHANGED
data/lib/anamo/node/thor.rb
CHANGED
@@ -37,8 +37,12 @@ module Anamo
|
|
37
37
|
|
38
38
|
ret = {}
|
39
39
|
|
40
|
-
config = YAML.load_file "/
|
40
|
+
config = YAML.load_file "/$HOME/anamo.conf.yml"
|
41
|
+
|
42
|
+
#train
|
41
43
|
train = Train.create('local')
|
44
|
+
# start or reuse a connection
|
45
|
+
conn = train.connection
|
42
46
|
|
43
47
|
ret['api_key'] = config['api_key']
|
44
48
|
ret['beacon_modules'] = config['modules']
|
@@ -48,12 +52,24 @@ module Anamo
|
|
48
52
|
ret['node']['os_name'] = Train.create('local').connection.os[:name]
|
49
53
|
ret['node']['os_family'] = Train.create('local').connection.os[:family]
|
50
54
|
ret['node']['os_release'] = Train.create('local').connection.os[:release]
|
55
|
+
|
56
|
+
# run a command on Linux/Unix/Mac
|
57
|
+
ret['node']['cpe'] = conn.run_command('hostnamectl | grep "Static hostname: "').stdout
|
58
|
+
ret['node']['chassis'] = conn.run_command('hostnamectl | grep "Chassis: "').stdout
|
59
|
+
ret['node']['machine_id'] = conn.run_command('hostnamectl | grep "Machine ID: "').stdout
|
60
|
+
ret['node']['boot_id'] = conn.run_command('hostnamectl | grep "Boot ID: "').stdout
|
61
|
+
ret['node']['virtualization'] = conn.run_command('hostnamectl | grep "Virtualization: "').stdout
|
62
|
+
ret['node']['operating_system'] = conn.run_command('hostnamectl | grep "Operating System: "').stdout
|
63
|
+
ret['node']['kernel'] = conn.run_command('hostnamectl | grep "Kernel: "').stdout
|
64
|
+
ret['node']['architecture'] = conn.run_command('hostnamectl | grep "Architecture: "').stdout
|
65
|
+
|
66
|
+
#Uname (General)
|
51
67
|
ret['node']['uname_sysname'] = Uname.sysname # => The operating system name. e.g. "SunOS"
|
52
68
|
ret['node']['uname_machine'] = Uname.machine # => The machine hardware type. e.g. "i686"
|
53
69
|
ret['node']['uname_version'] = Uname.version # => The operating system version. e.g. "5.8". Windows includes patch information.
|
54
70
|
ret['node']['uname_release'] = Uname.release # => The operating system release. e.g. "2.2.16-3"
|
55
71
|
|
56
|
-
#Solaris
|
72
|
+
#Uname (Solaris-Only)
|
57
73
|
#ret['node']['uname_architecture'] = Uname.architecture # => Returns the instruction set architecture. e.g. "sparc"
|
58
74
|
#ret['node']['uname_platform'] = Uname.platform # => The platform identifier. e.g. "SUNW,Sun-Blade-100"
|
59
75
|
#ret['node']['uname_isa_list'] = Uname.isa_list # => List of supported instr. sets, e.g. "amd64 pentium_pro+mmx pentium_pro"
|
@@ -131,7 +147,7 @@ module Anamo
|
|
131
147
|
if defined? @config_file_path
|
132
148
|
@config_file_path
|
133
149
|
else
|
134
|
-
return '/
|
150
|
+
return '/$HOME/anamo.conf.yml'
|
135
151
|
end
|
136
152
|
end
|
137
153
|
|
@@ -140,7 +156,7 @@ module Anamo
|
|
140
156
|
private
|
141
157
|
|
142
158
|
def key_file
|
143
|
-
"/
|
159
|
+
"/$HOME/anamo.client.key"
|
144
160
|
end
|
145
161
|
|
146
162
|
end
|
data/lib/anamo/runner.rb
CHANGED
data/lib/anamo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anamo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anamo, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|