Project

General

Profile

Actions

Feature #848

closed

add classes the host object

Added by Corey Osman about 13 years ago. Updated almost 7 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

This is similar to #827. However in this sense I would like to see the following as its easier to get all this data at once rather than make two api calls. Essential I am building a host object with all the attributes below.

So I would like to call : http://puppet/hosts/cobbler.logicminds.corp and get the following plus the classes obtained from the puppetclasss api call.

Below is obtained from http://puppet/hosts/cobbler.logicminds.corp

{"host":{"subnet_id":null,"serial":null,"puppetproxy_id":null,"name":"cobbler.logicminds.corp","managed":null,"last_report":"2011-04-11T01:38:00Z",
"comment":"","architecture_id":1,"created_at":"2011-03-14T03:47:34Z","sp_mac":"","puppetmaster_name":null,
"updated_at":"2011-04-16T03:18:41Z","sp_name":"","mac":"00:0c:29:57:b5:f3","installed_at":null,"domain_id":1,"root_pass":"!*!*!*!*!",
"owner_id":1,"medium_id":null,"id":3,"hostgroup_id":1,"enabled":true,"build":false,"ptable_id":null,"sp_subnet_id":null,
"puppet_status":4098,"last_freshcheck":null,"ip":"172.16.220.134","environment_id":1,"source_file_id":null,"model_id":1,"environment":{"environment":{"name":"production","id":1}},"sp_ip":"","disk":null,"owner_type":"User","operatingsystem_id":1,"last_compile":"2011-03-13T20:27:28Z"}}

This is the portion I added that is obtained from http://puppet/hosts/cobbler.logicminds.corp/puppetclasses

{"puppet":[{"puppetclass":{"name":"puppet","id":13}}],"newops_default":[{"puppetclass":{"name":"newops_default","id":7}}],"helloworld":[{"puppetclass":{"name":"helloworld","id":1}}],"baseapps":[{"puppetclass":{"name":"baseapps","id":4}}],"oraclebase":[{"puppetclass":{"name":"oraclebase","id":10}}]}

This would be the new output from the hosts/fqdn call:

{"host":{"subnet_id":null,"serial":null,"puppetproxy_id":null,"name":"cobbler.logicminds.corp","managed":null,"last_report":"2011-04-11T01:38:00Z",
"comment":"","architecture_id":1,"created_at":"2011-03-14T03:47:34Z","sp_mac":"","puppetmaster_name":null,
"updated_at":"2011-04-16T03:18:41Z","sp_name":"","mac":"00:0c:29:57:b5:f3","installed_at":null,"domain_id":1,
"root_pass":"!*!*!*!*!","owner_id":1,"medium_id":null,"id":3,"hostgroup_id":1,"enabled":true,"build":false,"ptable_id":null,
"sp_subnet_id":null,"puppet_status":4098,"last_freshcheck":null,"ip":"172.16.220.134","environment_id":1,"source_file_id":null,
"model_id":1,"environment":{"environment":{"name":"production","id":1}},"sp_ip":"","disk":null,"owner_type":"User","operatingsystem_id":1,"last_compile":"2011-03-13T20:27:28Z"}}
{"puppet":[{"puppetclass":{"name":"puppet","id":13}}],"newops_default":[{"puppetclass":{"name":"newops_default","id":7}}],"helloworld":[{"puppetclass":{"name":"helloworld","id":1}}],"baseapps":[{"puppetclass":{"name":"baseapps","id":4}}],"oraclebase":[{"puppetclass":{"name":"oraclebase","id":10}}]}
Actions #1

Updated by Ohad Levy about 13 years ago

  • Status changed from New to Feedback

the problem i see is here, is that there are a lot of data that can be associated with a host.
to name a few
facts
reports,
operating systems
puppet classes
host groups
parameters
audits
subnets
users
...

so keeping each resource separate imho makes more sense

Actions #3

Updated by Anonymous almost 7 years ago

  • Description updated (diff)

no reaction, closing.

Actions

Also available in: Atom PDF