In GUI to create an host with Foreman we must pass to network interface his
name. Which field it rappresente for Foreman Api?
It is correct this example??
"{"host": {" +
""name": "" + host.getName() + "","+ //'host_api'
""hostgroup_id": 1,"+
""environment_id": " + environmentid + ","+
""architecture_id": 1,"+
""mac": "","+
""compute_resource_id": " + host.getComputeResourceId() + ","+ //7
""build": 0,"+ // What is this field??
""enabled": " + host.getIsEnabled() + ","+ //0 //What is this field??
""managed": 0,"+ //What is this field??
""compute_attributes": {"+
""cpus": " + host.getCpu() + ","+ //1
""cluster": ""+ host.getCluster() + "","+ //'Provisioning'
""start": " + host.getIsStarted() + ","+ //0
""path": "" + host.getPathDataCenter() + "","+ //'' //What is this
field??
""interfaces_attributes": {"+
""new_interfaces": {"+
""_delete": "","+
""network": "nic1""+ //is this??
"},"+
""0": {"+
""_delete": "","+
""network": "" + host.getNetwork() + """+ //virtualmachine
"}"+
"},"+
""volumes_attributes": {"+
""new_volumes": {"+
""name": "Hard disk","+
""size_gb": " + host.getHardDiskVolume() + ","+ //8
""_delete": "","+
""datastore": "" + host.getDatastore() + """+ //'provisioning1' //are
the same??
"},"+
""0": {"+
""name": "Hard disk","+
""size_gb": " + host.getHardDiskSize() + ","+ //8
""_delete": "","+
""datastore": "" + host.getDatastore() + """+ //provisioning1 //are the
same??
"}"+
"},"+
""memory_mb": " + host.getRam() +""+ //256
"}"+
"}"+
"}";
I don't know what are the following fields: build, enabled, managed, path,
network (is it the name?), datastore.
The field "provisioningTemplate" where is??
Thanks in advance for your support.