Platform contexts
A platform context describes the configuration of a platform associated to a host. Settings may be associated to a platform context, in particular for template rendering.
Representation
The following elements are defined as part of a platform context representation:
- platform: The name of the platform. This field is read-only.
- organization: The organization of associated host. This field is read-only.
- environment: The environment of associated host. This field is read-only.
- host: The associated host. This field is read-only.
- versionStamp: The version number of the platform at association time. This field is read-only.
- settings: The list of settings defined for this platform. This field is read-only.
Example
{
"platform": "Hyp3",
"organization": "Guardis Test",
"environment": "Test Environment",
"host": "test-host-on-Hyp3",
"versionStamp": 1,
"settings": [
{
"key": "vm_nvirtcpus",
"value": "1",
"version": 0
},
{
"key": "vm_capacity",
"value": "2048",
"version": 0
},
{
"key": "vm_memory",
"value": "512",
"version": 0
}
]
}
Methods
Entity
/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/platform
- GET: returns the platform context of the host.
- POST: sets the platform context.
Other
File rendering
/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/platform/files/{file_name}
- GET: renders a platform’s file in the context of a host.
One-time URL
/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/platform/files/{file_name}/link?short=[true|false]
- GET: provides a one-time URL to rendered platform’s file; short parameters enables to generate shorter (therefore, more “human-handeable”) one-time URLs.