mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-22 13:33:52 +03:00
dca50b2bb9
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) |
||
---|---|---|
.. | ||
nlohmann | ||
ruby/gems/packethost |