fauxhai 0.1.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 1.9.3-p362
1
+ 1.9.3-p392
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
data/README.md CHANGED
@@ -9,7 +9,7 @@ require 'chefspec'
9
9
 
10
10
  describe 'awesome_cookbook::default' do
11
11
  before do
12
- Fauxhai.mock(platform:'ubuntu', version:'12.04')
12
+ Fauxhai.mock(platform: 'ubuntu', version: '12.04')
13
13
  end
14
14
 
15
15
  it 'should install awesome' do
@@ -26,7 +26,7 @@ require 'chefspec'
26
26
 
27
27
  describe 'awesome_cookbook::default' do
28
28
  before do
29
- Fauxhai.fetch(host:'server01.example.com')
29
+ Fauxhai.fetch(host: 'server01.example.com')
30
30
  end
31
31
 
32
32
  it 'should install awesome' do
@@ -61,7 +61,7 @@ require 'chefspec'
61
61
 
62
62
  describe 'awesome_cookbook::default' do
63
63
  before do
64
- Fauxhai.mock(platform:'ubuntu', version:'12.04') do |node|
64
+ Fauxhai.mock(platform: 'ubuntu', version: '12.04') do |node|
65
65
  node['languages']['ruby']['version'] = 'ree'
66
66
  end
67
67
  end
@@ -87,7 +87,7 @@ require 'chefspec'
87
87
 
88
88
  describe 'awesome_cookbook::default' do
89
89
  before do
90
- Fauxhai.fetch(host:'server01.example.com')
90
+ Fauxhai.fetch(host: 'server01.example.com')
91
91
  end
92
92
 
93
93
  it 'should install awesome' do
@@ -107,7 +107,7 @@ require 'chefspec'
107
107
 
108
108
  describe 'awesome_cookbook::default' do
109
109
  before do
110
- Fauxhai.fetch(host:'server01.example.com') do |node|
110
+ Fauxhai.fetch(host: 'server01.example.com') do |node|
111
111
  node['languages']['ruby']['version'] = 'ree'
112
112
  end
113
113
  end
@@ -119,6 +119,34 @@ describe 'awesome_cookbook::default' do
119
119
  end
120
120
  ```
121
121
 
122
+ ### Fixturing
123
+ If you want to use fauxhai as "fixture" data, you can store real JSON in your project and use the `:path` option:
124
+
125
+ ```ruby
126
+ require 'chefspec'
127
+
128
+ describe 'awesome_cookbook::default' do
129
+ before do
130
+ Fauxhai.mock(path: 'fixtures/my_node.json')
131
+ end
132
+ end
133
+ ```
134
+
135
+ ### Overriding + Fixturing
136
+ You can also change specific attributes in your fixture:
137
+
138
+ ```ruby
139
+ require 'chefspec'
140
+
141
+ describe 'awesome_cookbook::default' do
142
+ before do
143
+ Fauxhai.mock(path: 'fixtures/my_node.json') do |node|
144
+ node['languages']['ruby']['version'] = 'ree'
145
+ end
146
+ end
147
+ end
148
+ ```
149
+
122
150
  Testing Multiple Versions
123
151
  -------------------------
124
152
  It's a common use case to test multiple version of the same operating system. Here's a simple example to get your started. This is more rspec-related that fauxhai related, but here ya go:
@@ -176,7 +204,7 @@ Fauxhai is community-maintained and updated. Aside from the initial files, all o
176
204
  10. Verify the installation was successful by doing the following:
177
205
 
178
206
  irb -rubygems -rfauxhai
179
- Fauxhai.mock('platform: [os], version: [version]') # e.g. Fauxhai.mock(platform:'ubuntu', version:'12.04')
207
+ Fauxhai.mock('platform: [os], version: [version]') # e.g. Fauxhai.mock(platform: 'ubuntu', version: '12.04')
180
208
 
181
209
  As long as that does not throw an error, you're good to go!
182
210
 
data/fauxhai.gemspec CHANGED
@@ -2,9 +2,9 @@ lib = File.expand_path('../lib', __FILE__)
2
2
  $:.unshift(lib) unless $:.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
- gem.version = '0.1.1'
5
+ gem.version = '1.0.0'
6
6
  gem.authors = ['Seth Vargo']
7
- gem.email = ['svargo@customink.com']
7
+ gem.email = ['sethvargo@gmail.com']
8
8
  gem.description = %q{Easily mock out ohai data}
9
9
  gem.summary = %q{Fauxhai provides an easy way to mock out your ohai data for testing with chefspec!}
10
10
  gem.homepage = 'https://github.com/customink/fauxhai'
@@ -1,8 +1,6 @@
1
1
  module Fauxhai
2
2
  module Exception
3
- class InvalidVersion < ArgumentError; end
4
3
  class InvalidPlatform < ArgumentError; end
5
-
6
- class NoDefaultVersion < StandardError; end
4
+ class InvalidVersion < ArgumentError; end
7
5
  end
8
6
  end
@@ -14,6 +14,8 @@ module Fauxhai
14
14
  # the platform to mock
15
15
  # @option options [String] :version
16
16
  # the version of the platform to mock
17
+ # @option options [String] :path
18
+ # the path to a local JSON file
17
19
  def initialize(options = {}, &override_attributes)
18
20
  @options = options
19
21
 
@@ -33,27 +35,18 @@ module Fauxhai
33
35
  end
34
36
 
35
37
  private
36
- def default_version
37
- @default_version ||= lambda do
38
- default_filepath = File.join(platform_path, 'default.json')
39
-
40
- if File.exists?(default_filepath)
41
- JSON.parse( File.read(default_filepath) )['version']
42
- else
43
- filename = Dir["#{platform_path}/*.json"].sort.pop
38
+ def fauxhai_data
39
+ @fauxhai_data ||= lambda do
40
+ # If a path option was specified, use it
41
+ if @options[:path]
42
+ filepath = File.expand_path(@options[:path])
44
43
 
45
- if filename
46
- filename.split('/').last.gsub(/\.json/, '')
47
- else
48
- raise Fauxhai::Exception::NoDefaultVersion.new('Could not detect default version!')
44
+ unless File.exists?(filepath)
45
+ raise Fauxhai::Exception::InvalidPlatform.new("You specified a path to a JSON file on the local system that does not exist: '#{filepath}'")
49
46
  end
47
+ else
48
+ filepath = File.join(platform_path, "#{version}.json")
50
49
  end
51
- end.call
52
- end
53
-
54
- def fauxhai_data
55
- @fauxhai_data ||= lambda do
56
- filepath = File.join(platform_path, "#{version}.json")
57
50
 
58
51
  if File.exists?(filepath)
59
52
  JSON.parse( File.read(filepath) )
@@ -65,7 +58,7 @@ module Fauxhai
65
58
  File.open(filepath, 'w'){ |f| f.write(response.body) }
66
59
  return JSON.parse(response.body)
67
60
  else
68
- raise Fauxhai::Exception::InvalidVersion.new("Could not find version #{@options[:version]} in any of the sources!")
61
+ raise Fauxhai::Exception::InvalidPlatform.new("Could not find platform '#{platform}/#{version}' in any of the sources!")
69
62
  end
70
63
  end
71
64
  end.call
@@ -76,17 +69,15 @@ module Fauxhai
76
69
  end
77
70
 
78
71
  def platform_path
79
- @platform_path ||= lambda do
80
- if path = File.join(Fauxhai.root, 'lib', 'fauxhai', 'platforms', platform)
81
- path
82
- else
83
- raise Fauxhai::Exception::InvalidPlatform.new('Platform not found!')
84
- end
85
- end.call
72
+ File.join(Fauxhai.root, 'lib', 'fauxhai', 'platforms', platform)
86
73
  end
87
74
 
88
75
  def version
89
- @version ||= @options[:version] || default_version
76
+ @options[:version] ||= chefspec_version || raise(Fauxhai::Exception::InvalidVersion.new('Platform version not specified'))
77
+ end
78
+
79
+ def chefspec_version
80
+ platform == 'chefspec' ? '0.6.1' : nil
90
81
  end
91
82
  end
92
83
  end
@@ -0,0 +1,585 @@
1
+ {
2
+ "kernel": {
3
+ "name": "Linux",
4
+ "release": "3.2.0-4-amd64",
5
+ "version": "#1 SMP Debian 3.2.41-2",
6
+ "machine": "x86_64",
7
+ "modules": {
8
+ "vboxvideo": {
9
+ "size": "12437",
10
+ "refcount": "0"
11
+ },
12
+ "drm": {
13
+ "size": "183952",
14
+ "refcount": "1"
15
+ },
16
+ "vboxsf": {
17
+ "size": "33359",
18
+ "refcount": "0"
19
+ },
20
+ "nfsd": {
21
+ "size": "216029",
22
+ "refcount": "2"
23
+ },
24
+ "nfs": {
25
+ "size": "312433",
26
+ "refcount": "0"
27
+ },
28
+ "nfs_acl": {
29
+ "size": "12511",
30
+ "refcount": "2"
31
+ },
32
+ "auth_rpcgss": {
33
+ "size": "37143",
34
+ "refcount": "2"
35
+ },
36
+ "fscache": {
37
+ "size": "36739",
38
+ "refcount": "1"
39
+ },
40
+ "lockd": {
41
+ "size": "67306",
42
+ "refcount": "2"
43
+ },
44
+ "sunrpc": {
45
+ "size": "173730",
46
+ "refcount": "6"
47
+ },
48
+ "ext2": {
49
+ "size": "59231",
50
+ "refcount": "1"
51
+ },
52
+ "loop": {
53
+ "size": "22641",
54
+ "refcount": "0"
55
+ },
56
+ "parport_pc": {
57
+ "size": "22364",
58
+ "refcount": "0"
59
+ },
60
+ "parport": {
61
+ "size": "31858",
62
+ "refcount": "1"
63
+ },
64
+ "ac": {
65
+ "size": "12624",
66
+ "refcount": "0"
67
+ },
68
+ "processor": {
69
+ "size": "28157",
70
+ "refcount": "0"
71
+ },
72
+ "battery": {
73
+ "size": "13146",
74
+ "refcount": "0"
75
+ },
76
+ "power_supply": {
77
+ "size": "13475",
78
+ "refcount": "2"
79
+ },
80
+ "psmouse": {
81
+ "size": "64497",
82
+ "refcount": "0"
83
+ },
84
+ "serio_raw": {
85
+ "size": "12931",
86
+ "refcount": "0"
87
+ },
88
+ "evdev": {
89
+ "size": "17562",
90
+ "refcount": "3"
91
+ },
92
+ "button": {
93
+ "size": "12937",
94
+ "refcount": "0"
95
+ },
96
+ "thermal_sys": {
97
+ "size": "18040",
98
+ "refcount": "1"
99
+ },
100
+ "snd_pcm": {
101
+ "size": "68083",
102
+ "refcount": "0"
103
+ },
104
+ "snd_page_alloc": {
105
+ "size": "13003",
106
+ "refcount": "1"
107
+ },
108
+ "i2c_piix4": {
109
+ "size": "12536",
110
+ "refcount": "0"
111
+ },
112
+ "i2c_core": {
113
+ "size": "23876",
114
+ "refcount": "2"
115
+ },
116
+ "snd_timer": {
117
+ "size": "22917",
118
+ "refcount": "1"
119
+ },
120
+ "vboxguest": {
121
+ "size": "149385",
122
+ "refcount": "2"
123
+ },
124
+ "snd": {
125
+ "size": "52889",
126
+ "refcount": "2"
127
+ },
128
+ "soundcore": {
129
+ "size": "13065",
130
+ "refcount": "1"
131
+ },
132
+ "pcspkr": {
133
+ "size": "12579",
134
+ "refcount": "0"
135
+ },
136
+ "ext3": {
137
+ "size": "161867",
138
+ "refcount": "1"
139
+ },
140
+ "mbcache": {
141
+ "size": "13114",
142
+ "refcount": "2"
143
+ },
144
+ "jbd": {
145
+ "size": "56902",
146
+ "refcount": "1"
147
+ },
148
+ "dm_mod": {
149
+ "size": "63645",
150
+ "refcount": "6"
151
+ },
152
+ "sg": {
153
+ "size": "25874",
154
+ "refcount": "0"
155
+ },
156
+ "sd_mod": {
157
+ "size": "36136",
158
+ "refcount": "3"
159
+ },
160
+ "sr_mod": {
161
+ "size": "21899",
162
+ "refcount": "0"
163
+ },
164
+ "crc_t10dif": {
165
+ "size": "12348",
166
+ "refcount": "1"
167
+ },
168
+ "cdrom": {
169
+ "size": "35401",
170
+ "refcount": "1"
171
+ },
172
+ "ata_generic": {
173
+ "size": "12479",
174
+ "refcount": "0"
175
+ },
176
+ "ata_piix": {
177
+ "size": "29535",
178
+ "refcount": "0"
179
+ },
180
+ "ahci": {
181
+ "size": "24997",
182
+ "refcount": "2"
183
+ },
184
+ "libahci": {
185
+ "size": "22860",
186
+ "refcount": "1"
187
+ },
188
+ "libata": {
189
+ "size": "140630",
190
+ "refcount": "4"
191
+ },
192
+ "scsi_mod": {
193
+ "size": "162269",
194
+ "refcount": "4"
195
+ },
196
+ "e1000": {
197
+ "size": "86156",
198
+ "refcount": "0"
199
+ }
200
+ },
201
+ "os": "GNU/Linux"
202
+ },
203
+ "os": "linux",
204
+ "os_version": "3.2.0-4-amd64",
205
+ "platform": "debian",
206
+ "platform_version": "7.0",
207
+ "platform_family": "debian",
208
+ "command": {
209
+ "ps": "ps -ef"
210
+ },
211
+ "dmi": {
212
+ "dmidecode_version": "2.11",
213
+ "smbios_version": "2.5",
214
+ "structures": {
215
+ "count": "9",
216
+ "size": "439"
217
+ },
218
+ "table_location": "0x000E1000",
219
+ "bios": {
220
+ "all_records": [
221
+ {
222
+ "record_id": "0x0000",
223
+ "size": "0",
224
+ "application_identifier": "BIOS Information",
225
+ "Vendor": "innotek GmbH",
226
+ "Version": "VirtualBox",
227
+ "Release Date": "12/01/2006",
228
+ "Address": "0xE0000",
229
+ "Runtime Size": "128 kB",
230
+ "ROM Size": "128 kB",
231
+ "Characteristics": {
232
+ "ISA is supported": null,
233
+ "PCI is supported": null,
234
+ "Boot from CD is supported": null,
235
+ "Selectable boot is supported": null,
236
+ "8042 keyboard services are supported (int 9h)": null,
237
+ "CGA/mono video services are supported (int 10h)": null,
238
+ "ACPI is supported": null
239
+ }
240
+ }
241
+ ],
242
+ "vendor": "innotek GmbH",
243
+ "version": "VirtualBox",
244
+ "release_date": "12/01/2006",
245
+ "address": "0xE0000",
246
+ "runtime_size": "128 kB",
247
+ "rom_size": "128 kB"
248
+ },
249
+ "system": {
250
+ "all_records": [
251
+ {
252
+ "record_id": "0x0001",
253
+ "size": "1",
254
+ "application_identifier": "System Information",
255
+ "Manufacturer": "innotek GmbH",
256
+ "Product Name": "VirtualBox",
257
+ "Version": "1.2",
258
+ "Serial Number": "0",
259
+ "UUID": "BEC5E1BC-C53B-48F3-8793-EB9A3DD6FB4B",
260
+ "Wake-up Type": "Power Switch",
261
+ "SKU Number": "Not Specified",
262
+ "Family": "Virtual Machine"
263
+ }
264
+ ],
265
+ "manufacturer": "innotek GmbH",
266
+ "product_name": "VirtualBox",
267
+ "version": "1.2",
268
+ "serial_number": "0",
269
+ "uuid": "BEC5E1BC-C53B-48F3-8793-EB9A3DD6FB4B",
270
+ "wake_up_type": "Power Switch",
271
+ "sku_number": "Not Specified",
272
+ "family": "Virtual Machine"
273
+ },
274
+ "base_board": {
275
+ "all_records": [
276
+ {
277
+ "record_id": "0x0008",
278
+ "size": "2",
279
+ "application_identifier": "Base Board Information",
280
+ "Manufacturer": "Oracle Corporation",
281
+ "Product Name": "VirtualBox",
282
+ "Version": "1.2",
283
+ "Serial Number": "0",
284
+ "Asset Tag": "Not Specified",
285
+ "Features": {
286
+ "Board is a hosting board": null
287
+ },
288
+ "Location In Chassis": "Not Specified",
289
+ "Chassis Handle": "0x0003",
290
+ "Type": "Motherboard",
291
+ "Contained Object Handles": "0"
292
+ }
293
+ ],
294
+ "manufacturer": "Oracle Corporation",
295
+ "product_name": "VirtualBox",
296
+ "version": "1.2",
297
+ "serial_number": "0",
298
+ "asset_tag": "Not Specified",
299
+ "location_in_chassis": "Not Specified",
300
+ "chassis_handle": "0x0003",
301
+ "type": "Motherboard",
302
+ "contained_object_handles": "0"
303
+ },
304
+ "chassis": {
305
+ "all_records": [
306
+ {
307
+ "record_id": "0x0003",
308
+ "size": "3",
309
+ "application_identifier": "Inactive",
310
+ "Manufacturer": "Oracle Corporation",
311
+ "Type": "Other",
312
+ "Lock": "Not Present",
313
+ "Version": "Not Specified",
314
+ "Serial Number": "Not Specified",
315
+ "Asset Tag": "Not Specified",
316
+ "Boot-up State": "Safe",
317
+ "Power Supply State": "Safe",
318
+ "Thermal State": "Safe",
319
+ "Security Status": "None"
320
+ }
321
+ ],
322
+ "manufacturer": "Oracle Corporation",
323
+ "type": "Other",
324
+ "lock": "Not Present",
325
+ "version": "Not Specified",
326
+ "serial_number": "Not Specified",
327
+ "asset_tag": "Not Specified",
328
+ "boot_up_state": "Safe",
329
+ "power_supply_state": "Safe",
330
+ "thermal_state": "Safe",
331
+ "security_status": "None"
332
+ },
333
+ "oem_strings": {
334
+ "all_records": [
335
+ {
336
+ "record_id": "0x0002",
337
+ "size": "11",
338
+ "application_identifier": "End Of Table",
339
+ "String 1": "vboxVer_4.2.12",
340
+ "String 2": "vboxRev_84980"
341
+ }
342
+ ],
343
+ "string_1": "vboxVer_4.2.12",
344
+ "string_2": "vboxRev_84980"
345
+ }
346
+ },
347
+ "ohai_time": 1367942222.2884336,
348
+ "filesystem": {
349
+ "rootfs": {
350
+ "kb_size": "9510544",
351
+ "kb_used": "1017496",
352
+ "kb_available": "8009928",
353
+ "percent_used": "12%",
354
+ "mount": "/"
355
+ },
356
+ "udev": {
357
+ "kb_size": "10240",
358
+ "kb_used": "0",
359
+ "kb_available": "10240",
360
+ "percent_used": "0%",
361
+ "mount": "/dev",
362
+ "fs_type": "devtmpfs",
363
+ "mount_options": [
364
+ "rw",
365
+ "relatime",
366
+ "size=10240k",
367
+ "nr_inodes=62047",
368
+ "mode=755"
369
+ ]
370
+ },
371
+ "tmpfs": {
372
+ "kb_size": "101760",
373
+ "kb_used": "0",
374
+ "kb_available": "101760",
375
+ "percent_used": "0%",
376
+ "mount": "/run/shm",
377
+ "fs_type": "tmpfs",
378
+ "mount_options": [
379
+ "rw",
380
+ "nosuid",
381
+ "nodev",
382
+ "noexec",
383
+ "relatime",
384
+ "size=101760k"
385
+ ]
386
+ },
387
+ "/dev/mapper/debian--7-root": {
388
+ "kb_size": "9510544",
389
+ "kb_used": "1017496",
390
+ "kb_available": "8009928",
391
+ "percent_used": "12%",
392
+ "mount": "/",
393
+ "fs_type": "ext3",
394
+ "mount_options": [
395
+ "rw",
396
+ "relatime",
397
+ "errors=remount-ro",
398
+ "user_xattr",
399
+ "acl",
400
+ "barrier=1",
401
+ "data=ordered"
402
+ ],
403
+ "uuid": "ef2ee92b-13dd-4046-adb1-dbd1e772f7fd"
404
+ },
405
+ "/dev/sda1": {
406
+ "kb_size": "233191",
407
+ "kb_used": "17758",
408
+ "kb_available": "202992",
409
+ "percent_used": "9%",
410
+ "mount": "/boot",
411
+ "fs_type": "ext2",
412
+ "mount_options": [
413
+ "rw",
414
+ "relatime",
415
+ "errors=continue"
416
+ ],
417
+ "uuid": "bcaad6fe-16bd-4a38-8aae-8a2923b07218"
418
+ },
419
+ "sysfs": {
420
+ "mount": "/sys",
421
+ "fs_type": "sysfs",
422
+ "mount_options": [
423
+ "rw",
424
+ "nosuid",
425
+ "nodev",
426
+ "noexec",
427
+ "relatime"
428
+ ]
429
+ },
430
+ "proc": {
431
+ "mount": "/proc",
432
+ "fs_type": "proc",
433
+ "mount_options": [
434
+ "rw",
435
+ "nosuid",
436
+ "nodev",
437
+ "noexec",
438
+ "relatime"
439
+ ]
440
+ },
441
+ "devpts": {
442
+ "mount": "/dev/pts",
443
+ "fs_type": "devpts",
444
+ "mount_options": [
445
+ "rw",
446
+ "nosuid",
447
+ "noexec",
448
+ "relatime",
449
+ "gid=5",
450
+ "mode=620",
451
+ "ptmxmode=000"
452
+ ]
453
+ },
454
+ "rpc_pipefs": {
455
+ "mount": "/var/lib/nfs/rpc_pipefs",
456
+ "fs_type": "rpc_pipefs",
457
+ "mount_options": [
458
+ "rw",
459
+ "relatime"
460
+ ]
461
+ },
462
+ "/dev/mapper/debian--7-swap_1": {
463
+ "fs_type": "swap",
464
+ "uuid": "c69227b8-f026-4401-af49-78dc866a11ae"
465
+ },
466
+ "/dev/sda5": {
467
+ "fs_type": "LVM2_member",
468
+ "uuid": "jIz0GG-xh9z-TfQS-ivki-YPem-VvMe-5o1cEK"
469
+ }
470
+ },
471
+ "languages": {
472
+ "ruby": {
473
+ "bin_dir": "/usr/local/bin",
474
+ "gem_bin": "/usr/local/bin/gem",
475
+ "gems_dir": "/usr/local/gems",
476
+ "ruby_bin": "/usr/local/bin/ruby"
477
+ }
478
+ },
479
+ "chef_packages": {
480
+ "chef": {
481
+ "version": "11.4.4",
482
+ "chef_root": "/usr/local/gems/chef-11.4.4/lib"
483
+ },
484
+ "ohai": {
485
+ "version": "6.16.0",
486
+ "ohai_root": "/usr/local/gems/ohai-6.16.0/lib/ohai"
487
+ }
488
+ },
489
+ "counters": {
490
+ "network": {
491
+ "interfaces": {
492
+ "eth0": {
493
+ "rx": {
494
+ "bytes": "0",
495
+ "packets": "0",
496
+ "errors": "0",
497
+ "drop": 0,
498
+ "overrun": 0,
499
+ "frame": 0,
500
+ "compressed": 0,
501
+ "multicast": 0
502
+ },
503
+ "tx": {
504
+ "bytes": "342",
505
+ "packets": "0",
506
+ "errors": "0",
507
+ "drop": 0,
508
+ "overrun": 0,
509
+ "collisions": "0",
510
+ "carrier": 0,
511
+ "compressed": 0
512
+ }
513
+ }
514
+ }
515
+ }
516
+ },
517
+ "current_user": "fauxhai",
518
+ "domain": "local",
519
+ "etc": {
520
+ "passwd": {
521
+ "fauxhai": {
522
+ "dir": "/home/fauxhai",
523
+ "gid": 0,
524
+ "uid": 0,
525
+ "shell": "/bin/bash",
526
+ "gecos": "Fauxhai"
527
+ }
528
+ },
529
+ "group": {
530
+ "fauxhai": {
531
+ "gid": 0,
532
+ "members": [
533
+ "fauxhai"
534
+ ]
535
+ }
536
+ }
537
+ },
538
+ "hostname": "Fauxhai",
539
+ "fqdn": "fauxhai.local",
540
+ "ipaddress": "10.0.0.2",
541
+ "keys": {
542
+ "ssh": {
543
+ "host_dsa_public": "ssh-dss AAAAB3NzaC1kc3MAAACBAJFo9BLAw4WKEs5hgipk5m423FzBsDXCZSMcC9ca/om/1VYzMqImixGe3uICDzNFUWxFoLJTQAOccyzo6MXZiQqwWJDLFi5qOSr6w2XcMyE+zd4wOyMoDiVM5fizmG8K3FzrqvGjwBcHcBdOQnavSijoj38DN25J9zhrid5BY4WlAAAAFQDxXrCyG52XCzn3FV4ej38wJBkomQAAAIBovGPJ4mP2P6BK8lHl0PPbktwQbWlpJ13oz6REJFDVcUi7vV26bX/BjQX+ohzZQzljdz1SpUbPc/8nuA4darYkVh91eBi307EN8IdxRHj2eBgp/ZG4yshIebG3WHrwJD/xUjjZ1MRfyDT1ermVi4LvjjPgWDxLZnPpMaR6S1nzgQAAAIEAj0Vd6DCWslvlsZ8+N53HWsqPi3gnx35JoLPz9Z2epkKIKqmEHav+93G3hdfztVa4I4t3phoPniQchYryF5+RNg8hqxKzjNtrIqUYCeuf2NJrksNsH7OZygPHZpqt4kTuwAGZxjxEGfAI0y8DhkU2ntp2LnzRnWH106BQBCmcXwo= fauxhai.local",
544
+ "host_rsa_public": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtLCeqtqr/HbnORckw1ukdLhpfGoOPFi5/esKEokzTqq1gsgQ2V8emmyjfq1i6XXfRtSBxkdlHv/GWdP5wBTuE2G85MzBkVSQPvmwQN8lX/JMPEEtKXkeOo0o92/PiSmvY4eRsdF0mw40Uvg7jtE3f3fxj497kzh5fKtkrHnF4x9gXCbVdr3FqXJfggR5IJwAxToerbK7x/uRS+7YuZI9Pip3tt14nv9ezwXcuGb/tvjWOZINiFl8izVIFKi7sxfTX09p4NgamxRS7TD2Yd0jT8nEoF9UZTsgXcJ1kDSx7N7NxFfNfP6rCdOGRRz4gUhXtsUjG/XkxPeCwZ7A9VnOD fauxhai.local"
545
+ }
546
+ },
547
+ "macaddress": "11:11:11:11:11:11",
548
+ "network": {
549
+ "default_gateway": "10.0.0.1",
550
+ "default_interface": "eth0",
551
+ "eth0": {
552
+ "addresses": {
553
+ "10.0.0.2": {
554
+ "broadcast": "10.0.0.255",
555
+ "family": "inet",
556
+ "netmask": "255.255.255.0",
557
+ "prefixlen": "23",
558
+ "scope": "Global"
559
+ }
560
+ },
561
+ "arp": {
562
+ "10.0.0.1": "fe:ff:ff:ff:ff:ff"
563
+ },
564
+ "encapsulation": "Ethernet",
565
+ "flags": [
566
+ "BROADCAST",
567
+ "MULTICAST",
568
+ "UP",
569
+ "LOWER_UP"
570
+ ],
571
+ "mtu": "1500",
572
+ "number": "0",
573
+ "routes": {
574
+ "10.0.0.0/255": {
575
+ "scope": "link",
576
+ "src": "10.0.0.2"
577
+ }
578
+ },
579
+ "state": "up",
580
+ "type": "eth"
581
+ }
582
+ },
583
+ "uptime": "30 days 15 hours 07 minutes 30 seconds",
584
+ "uptime_seconds": 2646450
585
+ }