[Pkg-puppet-devel] [facter] 85/352: (fact-79) Document builtin facts in a json schema

Stig Sandbeck Mathisen ssm at debian.org
Sun Apr 6 22:21:34 UTC 2014


This is an automated email from the git hooks/post-receive script.

ssm pushed a commit to branch master
in repository facter.

commit 58901c0101e8c8d7f1ec80bcb9356e61d7cadee3
Author: Kylo Ginsberg <kylo at puppetlabs.com>
Date:   Tue Dec 10 16:40:21 2013 -0800

    (fact-79) Document builtin facts in a json schema
    
    Prior to this commit there wasn't validatable documentation
    for the types of built-in facts.  This schema matches against
    the type of built-in facts (at least on the platforms I tested:
    osx, precise, fedora18).
    
    This initial schema only uses primitive types (string, integer,
    boolean) but could be enhanced with enumerations (e.g. for kernel,
    which only assumes a limited set of values) or tighter regexes
    (e.g. for network addresses that follow a fixed pattern).
---
 schema/facter.json | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 125 insertions(+)

diff --git a/schema/facter.json b/schema/facter.json
new file mode 100644
index 0000000..34ad276
--- /dev/null
+++ b/schema/facter.json
@@ -0,0 +1,125 @@
+{
+    "$schema":     "http://json-schema.org/draft-04/schema#",
+    "title":       "Facter built-in facts",
+    "description": "All the built-in facts for facter cross-platform",
+    "type":        "object",
+    "patternProperties": {
+        "^blockdevice_[A-Za-z0-9]+_size$" : { "type": "integer" },
+        "^blockdevice_[A-Za-z0-9]+_vendor$" : { "type": "string" },
+        "^blockdevice_[A-Za-z0-9]+_model$" : { "type": "string" },
+        "^mtu_[A-Za-z0-9]+$" : { "type": "string" },
+        "^netmask_[A-Za-z0-9]+$" : { "type": "string" },
+        "^network_[A-Za-z0-9]+$" : { "type": "string" },
+        "^ipaddress_[A-Za-z0-9]+$" : { "type": "string" },
+        "^macaddress_[A-Za-z0-9]+$" : { "type": "string" },
+        "^processor[0-9]+" : { "type": "string" }
+    },
+    "properties": {
+        "architecture" : { "type": "string" },
+        "activeprocessorcount" : { "type": "string" },
+        "augeasversion" : { "type": "string" },
+        "bios_release_date" : { "type": "string" },
+        "bios_vendor" : { "type": "string" },
+        "bios_version" : { "type": "string" },
+        "blockdevices" : { "type": "string" },
+        "boardmanufacturer" : { "type": "string" },
+        "boardproductname" : { "type": "string" },
+        "boardserialnumber" : { "type": "string" },
+        "domain" : { "type": "string" },
+        "facterversion" : { "type": "string" },
+        "filesystems" : { "type": "string" },
+        "fqdn" : { "type": "string" },
+        "gid" : { "type": "string" },
+        "hardwareisa" : { "type": "string" },
+        "hardwaremodel" : { "type": "string" },
+        "hostname" : { "type": "string" },
+        "id" : { "type": "string" },
+        "interfaces" : { "type": "string" },
+        "ipaddress" : { "type": "string" },
+        "is_virtual" : { "type": "string" },
+        "kernel" : { "type": "string" },
+        "kernelmajversion" : { "type": "string" },
+        "kernelrelease" : { "type": "string" },
+        "kernelversion" : { "type": "string" },
+        "lsbdistcodename" : { "type": "string" },
+        "lsbdistdescription" : { "type": "string" },
+        "lsbdistid" : { "type": "string" },
+        "lsbdistrelease" : { "type": "string" },
+        "lsbmajdistrelease" : { "type": "string" },
+        "macaddress" : { "type": "string" },
+        "macosx_buildversion" : { "type": "string" },
+        "macosx_productname" : { "type": "string" },
+        "macosx_productversion" : { "type": "string" },
+        "macosx_productversion_major" : { "type": "string" },
+        "macosx_productversion_minor" : { "type": "string" },
+        "manufacturer" : { "type": "string" },
+        "memoryfree" : { "type": "string" },
+        "memoryfree_mb" : { "type": "string" },
+        "memorysize" : { "type": "string" },
+        "memorysize_mb" : { "type": "string" },
+        "memorytotal" : { "type": "string" },
+        "netmask" : { "type": "string" },
+        "operatingsystem" : { "type": "string" },
+        "operatingsystemmajrelease" : { "type": "string" },
+        "operatingsystemrelease" : { "type": "string" },
+        "osfamily" : { "type": "string" },
+        "path" : { "type": "string" },
+        "physicalprocessorcount" : { "type": "integer" },
+        "processorcount" : { "type": "string" },
+        "productname" : { "type": "string" },
+        "ps" : { "type": "string" },
+        "rubysitedir" : { "type": "string" },
+        "rubyversion" : { "type": "string" },
+        "selinux" : { "type": "string" },
+        "selinux_config_mode" : { "type": "string" },
+        "selinux_config_policy" : { "type": "string" },
+        "selinux_current_mode" : { "type": "string" },
+        "selinux_enforced" : { "type": "string" },
+        "selinux_mode" : { "type": "string" },
+        "selinux_policyversion" : { "type": "string" },
+        "serialnumber" : { "type": "string" },
+        "sp_boot_mode" : { "type": "string" },
+        "sp_boot_rom_version" : { "type": "string" },
+        "sp_boot_volume" : { "type": "string" },
+        "sp_cpu_type" : { "type": "string" },
+        "sp_current_processor_speed" : { "type": "string" },
+        "sp_kernel_version" : { "type": "string" },
+        "sp_l2_cache_core" : { "type": "string" },
+        "sp_l3_cache" : { "type": "string" },
+        "sp_local_host_name" : { "type": "string" },
+        "sp_machine_model" : { "type": "string" },
+        "sp_machine_name" : { "type": "string" },
+        "sp_mmm_entry" : { "type": "string" },
+        "sp_number_processors" : { "type": "string" },
+        "sp_os_version" : { "type": "string" },
+        "sp_packages" : { "type": "string" },
+        "sp_physical_memory" : { "type": "string" },
+        "sp_platform_uuid" : { "type": "string" },
+        "sp_secure_vm" : { "type": "string" },
+        "sp_serial_number" : { "type": "string" },
+        "sp_smc_version_system" : { "type": "string" },
+        "sp_uptime" : { "type": "string" },
+        "sp_user_name" : { "type": "string" },
+        "sshdsakey" : { "type": "string" },
+        "sshecdsakey" : { "type": "string" },
+        "sshfp_dsa" : { "type": "string" },
+        "sshfp_ecdsa" : { "type": "string" },
+        "sshfp_rsa" : { "type": "string" },
+        "sshrsakey" : { "type": "string" },
+        "swapencrypted" : { "type": "boolean" },
+        "swapfree" : { "type": "string" },
+        "swapfree_mb" : { "type": "string" },
+        "swapsize" : { "type": "string" },
+        "swapsize_mb" : { "type": "string" },
+        "timezone" : { "type": "string" },
+        "totalprocessorcount" : { "type": "string" },
+        "type" : { "type": "string" },
+        "uniqueid" : { "type": "string" },
+        "uptime" : { "type": "string" },
+        "uptime_days" : { "type": "integer" },
+        "uptime_hours" : { "type": "integer" },
+        "uptime_seconds" : { "type": "integer" },
+        "uuid" : { "type": "string" },
+        "virtual" : { "type": "string" }
+    }
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git



More information about the Pkg-puppet-devel mailing list