1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-22 13:33:52 +03:00
one/share/vendor
Ruben S. Montero dca50b2bb9
F #6275: External scheduler API
The connection to an external scheduler module is configured in sched.conf:

EXTERNAL_SCHEDULER = [
   SERVER  = "http://localhost:4567",
   PROXY   = "",
   TIMEOUT = 10
]

The API post on '/' the list of VMs, their pre-selected list of
candidate hosts based on REQUIREMENTS along with the VM information
(CAPACITY, TEMPLATE and USER_TEMPLATE).

Example:
{
  "VMS": [
    {
      "CAPACITY": {
        "CPU": 1.5,
        "DISK_SIZE": 1024,
        "MEMORY": 131072
      },
      "HOST_IDS": [
        3,
        4,
        5
      ],
      "ID": 32,
      "STATE": "PENDING",
      "TEMPLATE": {
        "AUTOMATIC_DS_REQUIREMENTS": "(\"CLUSTERS/ID\" @> 0)",
        "AUTOMATIC_NIC_REQUIREMENTS": "(\"CLUSTERS/ID\" @> 0)",
        "AUTOMATIC_REQUIREMENTS": "(CLUSTER_ID = 0) & !(PUBLIC_CLOUD = YES) & !(PIN_POLICY = PINNED)",
        "CPU": "1.5",
        "MEMORY": "128",
        ...
      },
      "USER_TEMPLATE": {}
    },
    {
      "CAPACITY": {
        "CPU": 1.5,
        "DISK_SIZE": 1024,
        "MEMORY": 131072
      },
      "HOST_IDS": [
        3,
        4,
        5
      ],
      "ID": 33,
      "STATE": "PENDING",
      "TEMPLATE": {
       ...
      },
      "USER_TEMPLATE": {}
    }
  ]
}

The scheduler needs to respond to this post action with a simple list of
the allocation for each VM:

{
  "VMS": [
    {
      "ID": 32,
      "HOST_ID": 2
    },
    {
      "ID": 33,
      "HOST_ID": 0
    }
  ]
}

This commits vendorize Vendorize nlohmann-json (MIT license)
2023-08-29 17:11:01 +02:00
..
nlohmann F #6275: External scheduler API 2023-08-29 17:11:01 +02:00
ruby/gems/packethost M #-: fix gem dependencies error in provision (#1754) 2022-02-07 13:23:25 +01:00