Skip to content

Latest commit

 

History

History
76 lines (58 loc) · 1.99 KB

File metadata and controls

76 lines (58 loc) · 1.99 KB

  1. summary Speccy for the structure of system information data
  2. labels Concept

Table of Contents

Introduction

Tools like Facter, Ohai and friends are designed for collect information about nodes (computers, machines, hosts, network stations). Such info as operating system type, version, architecture, memory size, CPU/GPU abilities etc. The information they collect is programmatically accessible, but there is no guarantee that the structure is the same and JSON received from Ohai can be fed to program that worked with Facter.

This is an attempt to define nested tree structure for describing nodes.

Details

Version 1.1 of the speccy.

Flags

These are used for convenience in different 'if' checks. For example:

Accessing the flags that are not set should not raise exceptions.

Key/Values

Serialization to JSON

Tales

01. I want to know if my OS is 64-bit
os.architecture == '64-bit'

02. I want to get all USB drives in system
usb = [drives[drive]]

More info

  * http://www.linuxintro.org/wiki/Hwinfo
  * http://stackoverflow.com/questions/13814428/python-linux-dmidecode-how-to-obtain-hw-info-by-parsing