Beispiele

POST /api/hosts/facts
{
  "name": "brslc022.brs.infineon.com",
  "facts": {
    "is_virtual": "true",
    "processorcount": "2",
    "serialnumber": "VMware-56 4d 15 06 72 86 a9 d3-8a 09 fc 27 5a cf 00 45",
    "kernel": "Linux",
    "virtual": "vmware",
    "_timestamp": "2010-02-16 12:52:38.163833 +01:00",
    "network_eth0": "172.29.205.0",
    "operatingsystemrelease": "4",
    "uniqueid": "1dac16cd",
    "hardwaremodel": "i686",
    "rubysitedir": "/usr/lib/site_ruby/1.8",
    "platform": "Linux_2.6_i386_all",
    "uptime_seconds": "3756",
    "lsbrelease": ":core-3.0-ia32:core-3.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch",
    "memorysize": "1.45 GB",
    "gi": "4",
    "netmask_eth0": "255.255.255.128",
    "ipaddress": "172.29.205.22",
    "physicalprocessorcount": "0",
    "swapfree": "1.95 GB",
    "vmware": "virtual",
    "netmask": "255.255.255.128",
    "clientversion": "0.24.8",
    "fqdn": "brslc022.brs.infineon.com",
    "timezone": "GMT",
    "ps": "ps -ef",
    "kernelrelease": "2.6.9-89.0.16.ELsmp",
    "hardwareisa": "i686",
    "domain": "brs.infineon.com",
    "type": "Other",
    "kernelversion": "2.6.9",
    "id": "root",
    "lsbdistdescription": "Red Hat Enterprise Linux AS release 4 (Nahant Update 8)",
    "uptime_hours": "1",
    "lsbdistrelease": "4",
    "macaddress_eth0": "00:0C:29:CF:00:45",
    "manufacturer": "VMware, Inc.",
    "memoryfree": "1.39 GB",
    "selinux": "false",
    "gateway_if": "eth0",
    "lsbdistcodename": "NahantUpdate8",
    "sshrsakey": "AAAAB3NzaC1yc2EAAAABIwAAAIEAyj0XAKzx4WlNE8Vzj0ABBEHxqHr2H4AZZnabnQkYTOfz5kObXL+BvYqPONg2EqeUYCTNaFtQQPpJ4H+TM+GCJDNvFEKJTRd+cFoOuramf9LunWN/+ETreQ5V8KhKvdYTNw5blPBKiQz/XxSxcm7beo5QiBVr/lOM0u8YhGTLawk=",
    "uptime_days": "0",
    "interfaces": "eth0",
    "hostname": "brslc022",
    "graphcard": "VMware",
    "uptime": "1:02 hours",
    "processor0": "Intel(R) Xeon(R) CPU           X5460  @ 3.16GHz",
    "puppetversion": "0.24.8",
    "productname": "VMware Virtual Platform",
    "architecture": "i386",
    "gateway": "172.29.205.1",
    "rubyversion": "1.8.1",
    "environment": "brs_test",
    "path": "/usr/bin:/sbin:/bin:/usr/sbin:/opt/csw/bin",
    "swapsize": "1.95 GB",
    "ipaddress_eth0": "172.29.205.22",
    "facterversion": "1.5.7",
    "kernelmajversion": "2.6",
    "operatingsystem": "RedHat",
    "macaddress": "00:0C:29:CF:00:45",
    "processor1": "Intel(R) Xeon(R) CPU           X5460  @ 3.16GHz",
    "lsbmajdistrelease": "4",
    "sshdsakey": "AAAAB3NzaC1kc3MAAACBAIUasO2eEvlRHfcO8wMPfbo98YfgVsJj0qhUDSSoSa6xmYI8QWBDMoxf1h8INiDfrNQ5e4VreLQjt4/2Ex7OXoeB7C9Cg18/TlfZU+RTNMdsL85W5hQrrKoBm+ksMnxidkDC66ROq+pmxBTGDwwxg3ugF8eZnVSzCZ1FE605AsStAAAAFQCrr3s1cLQFRc6oZJAx3EZDxDraCQAAAIBqIqIvY7KtRsI+8y8E5MSZXpRRZxf0zqbraDxASwzImUr6ysEmpJsHbHyi6UePnF55tG/iZNM4bSNg/3qExK8So040byV71qN4HNT48nIh3cCS0z8oKLqvlCRJ+dOY1QMkE8ZLfOyF4A6ZOTuE8TTsGpvUIR0HyXkpoiIR9XcgzgAAAIA4nkedBQi+VA01NvWx27GGz5P3TTQ36yDODZdLmXoepQM1rPfKWvPFFd5MxgJumSU5BKhYUiQTOImcRlQcY5DA3dGbog1dOAKlWyeJn4WRHbYr+VNgR/HwBzHLMW4TXLt38ThmPv9TiLS1RvTdHuDm2oRTadNZOrmQz619kZejmw==",
    "lsbdistid": "RedHatEnterpriseAS"
  },
  "host": {
    "name": "brslc022.brs.infineon.com"
  }
}
201
{
  "id": 15,
  "name": "brslc022.brs.infineon.com",
  "last_compile": "2010-02-16T11:52:38.163Z",
  "last_report": null,
  "updated_at": "2019-09-11T14:39:25.635Z",
  "created_at": "2019-09-11T14:39:25.251Z",
  "root_pass": null,
  "architecture_id": 578327779,
  "operatingsystem_id": 1073012865,
  "environment_id": 687036940,
  "ptable_id": null,
  "medium_id": null,
  "build": false,
  "comment": null,
  "disk": null,
  "installed_at": null,
  "model_id": 980190964,
  "hostgroup_id": null,
  "owner_id": null,
  "owner_type": null,
  "enabled": true,
  "puppet_ca_proxy_id": null,
  "managed": false,
  "use_image": null,
  "image_file": "",
  "uuid": null,
  "compute_resource_id": null,
  "puppet_proxy_id": null,
  "certname": "brslc022.brs.infineon.com",
  "image_id": null,
  "organization_id": 447626456,
  "location_id": 447626455,
  "otp": null,
  "realm_id": null,
  "compute_profile_id": null,
  "provision_method": "build",
  "grub_pass": "",
  "global_status": 0,
  "lookup_value_matcher": "fqdn=brslc022.brs.infineon.com",
  "pxe_loader": null,
  "initiated_at": null,
  "build_errors": null,
  "reported_data_attributes": {
    "id": 1,
    "host_id": 15,
    "boot_time": "2019-09-11T13:36:49.000Z",
    "created_at": "2019-09-11T14:39:25.583Z",
    "updated_at": "2019-09-11T14:39:25.583Z"
  }
}

Parameter

Parametername Beschreibung
location_id
optional

Scope nach Standorten

Validations:

  • Must be a Integer

organization_id
optional

Scope nach Organisationen

Validations:

  • Must be a Integer

name
verpflichtend

Hostname des Hosts

Validations:

  • Must be a String

facts
verpflichtend

Hash, der die Fakten für den Host enthält

Validations:

  • Must be a Hash

certname
optional

optional: Certname des Hosts

Validations:

  • Must be a String

type
optional

optional: der STI-Typ des zu erstellenden Hosts

Validations:

  • Must be a String