MachineLoadLevelsResource


Create a machine load rule


The rule entity should include a link to the machine that the rule will apply to.

POST https://example.com/api/admin/rules/machineLoadLevel

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_ALLOCATION]

Content-Type : machineloadrule Accept : machineloadrule

Error Codes

  • DC-0 - The requested datacenter does not exist
  • RULE-5 - Expected one link with the rel attribute with possible values (datacenter/rack/machine/cluster)
  • RULE-7 - Duplicated rule for the same set of infrastructure elements. Please check and remove existent rules first.

Example

List machine load level rules


List load level rules for machines and clusters.

GET https://example.com/api/admin/rules/machineLoadLevel

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS]

Parameter Type Default Value Description
idDatacenter Integer If present, filter by datacenter identifier

Accept : machineloadrules

Example

Delete a machine load level rule


Delete a machine load level rule.

DELETE https://example.com/api/admin/rules/machineLoadLevel/{loadLevel}

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_ALLOCATION]

Example

Get a machine load rule


Get a machine load level rule that can apply in a datacenter to a cluster, all racks, all servers, or a specific server.

GET https://example.com/api/admin/rules/machineLoadLevel/{loadLevel}

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS]

Accept : machineloadrule

Error Codes

  • RULE-3 - The requested load level rule does not exist

Example