PR here: https://github.com/Normation/rudder/pull/466
here si an exemple of a full inventory:
url -X GET 'http://localhost:8042/api/4/nodes/0697d6d0-31ba-4f92-affc-54c677c44708?prettify=true&include=full' -k -H "X-API-Token: rHMfUJTMAMFsmSgIxJ6NbdHTWN1zw6nm"
{
"action":"nodeDetails",
"id":"0697d6d0-31ba-4f92-affc-54c677c44708",
"result":"success",
"data":{
"nodes":[{
"lastInventoryDate":"2014-03-11 11:01",
"architectureDescription":"x86_64-linux-thread-multi",
"description":"",
"OS":{
"type":"Linux",
"name":"Debian",
"version":"6.0.7",
"servicePack":"N/A",
"kernelVersion":"2.6.32-5-amd64"
},
"id":"0697d6d0-31ba-4f92-affc-54c677c44708",
"status":"pending",
"environmentVariables":{
"PATH":"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin::/var/lib/gems/1.8/bin",
"BOOT_IMAGE":"/boot/vmlinuz-2.6.32-5-amd64",
"init":"/sbin/init",
"LC_ALL":"C",
"DEBIAN_FRONTEND":"noninteractive",
"LANG":"C",
"TERM":"linux",
"INIT_VERSION":"sysvinit-2.88",
"rootmnt":"/root",
"VERBOSE":"no",
"runlevel":"2",
"SHLVL":"1",
"LINES":"25",
"previous":"N",
"PWD":"/var/rudder",
"SHELL":"/bin/sh",
"HOME":"/",
"RUNLEVEL":"2",
"_":"/var/rudder/cfengine-community/bin/cf-execd",
"PREVLEVEL":"N",
"CONSOLE":"/dev/console"
},
"machine":{
"type":"Virtual",
"provider":"vbox",
"id":"0830F9AB-9C40-4C38-A963-4B562129FF18"
},
"ipAdresses":["127.0.0.1","10.0.2.15","192.168.42.82"],
"managementTechnologyDetails":{
"CFEngineKeys":["MIIBCAKCAQEAz9BbxKwtx4ux8cICDXZA43dqoL6qq3w1DeTSWxSv8OTEQYNbi4jsyYlWspMDRREGyzVyPngu72436ubAQIaIXFOdDWXUKmeu3xJ/roWkmWWRYTcmYprX8h/TyVeqHVIamcUaY2uOwcZ9IjoTHuu1X13aEEHt5HWoOOJi3lDzk8IoVJDbBT+oieaZiqtVOGyN/OZ0zEdZYKIgSFPCmfswH4Mm1k62G/Kt4WmJa+LdDLd2kWcSa6GT1zB3Hd0epDTT1URJEaIWN/pmQFCaghgH8Tr8cSi94Ly3zOYc4JlLYgkKGGCsY94uWh7ddq4YLgQ1Hb3HnKhXYywjHHEVXEYY1QIBIw=="],
"CFEngineUser":"root"
},
"ram":"244 MB",
"networkInterfaces":[{
"name":"eth1",
"ipAdresses":["192.168.42.82"],
"MACAdress":"08:00:27:a8:1f:bf",
"status":"Up"
},{
"name":"lo",
"ipAdresses":["127.0.0.1"],
"MACAdress":"00:00:00:00:00:00",
"status":"Up"
},{
"name":"eth0",
"ipAdresses":["10.0.2.15"],
"MACAdress":"08:00:27:63:5e:f5",
"status":"Up"
}],
"managementTechnology":[{
"name":"CFEngine Community",
"version":"N/A"
}],
"hostname":"node2.rudder.local",
"policyServerId":"root"
}]
}
I have a question:
- If a data is missing (ie here: Service Pack of OS) should we display "N/A" or should we skip that data ?