An instance represents a physical or virtual machine described by a host.
The following elements are defined as part of an instance representation:
{
"organization" : "Guardis Test",
"environment" : "Test Environment",
"host" : "test-host-on-Hyp3",
"state":"RUNNING",
"properties": [
{
"key" : "amqp.user_queue",
"value" : "host.EE9380B0B07211E18D8A5BD37F000001"
},
{
"key" : "libvirt.uuid",
"value" : "97c6b5be-bc74-4a4c-5a64-a594c00c88a8"
},
{
"key" : "mac",
"value" : "00:50:56:2C:92:E1"
},
{
"key" : "libvirt.hostUuid",
"value" : "EE9380B0B07211E18D8A5BD37F000001"
}
],
"synapseState" : "Down"
}
/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/instance
/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/instance/properties
POST: creates host’s instance, but without provisioning host. This may be useful when migrating hosts between different ComodIT servers. This method takes as input a list of properties, for example:
[
{
"key" : "amqp.user_queue",
"value" : "host.EE9380B0B07211E18D8A5BD37F000001"
},
{
"key" : "libvirt.uuid",
"value" : "97c6b5be-bc74-4a4c-5a64-a594c00c88a8"
},
{
"key" : "mac",
"value" : "00:50:56:2C:92:E1"
},
{
"key" : "libvirt.hostUuid",
"value" : "EE9380B0B07211E18D8A5BD37F000001"
}
]
/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/instance/vnc
GET: returns VNC access information, for example:
{
"token" : "+++eQcne1oQKAiG6h4lo9oeW+hsLN51HqEKeU3v0p+K5JqKLY3n1L/8kpIVEKUvW47k",
"hostname" : "hyp3-devel.angleur.guardis.be",
"port" : "5911"
}
/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/instance/_start
/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/instance/_pause
/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/instance/_resume
/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/instance/_shutdown
/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/instance/_reboot
/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/instance/_off
2016 © ComodIT. All Rights Reserved. Privacy Policy | Terms of Service