1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-08 21:17:43 +03:00
one/share
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
..
augeas M #-: Let oned.aug parse space leading comment (#1209) 2021-05-13 15:45:27 +02:00
context M #-: Bump year 2023 2023-01-09 12:23:19 +01:00
doc M #-: Update Backup Job xml schema 2023-08-08 09:42:05 +02:00
etc F OpenNebula/one#6212: add DISK_TYPE to TM_MAD_CONF for lvm tms (#2684) 2023-07-26 16:43:59 +02:00
examples B #-: Fencing template in cmdline instead of stdin (#1409) 2021-08-23 11:32:58 +02:00
hooks F #6099: Implement non-shared vm skipping for ft/host_error.rb (#2583) 2023-04-21 10:45:52 +02:00
install_gems M #⨪: Do not abort install gems if unkown platform 2023-06-28 12:27:50 +02:00
instance_types B #5340 instance_types scripts now work properly (#442) 2017-09-05 14:29:23 +02:00
linters B #6297: Fix local characters for onedb (#2699) 2023-08-29 11:41:05 +02:00
man F #6063: Backup Jobs for OpenNebula 2023-07-03 18:15:52 +02:00
misc L #-: Linting for new rubocop version 2023-02-10 11:12:19 +01:00
onegate B #6172: Enabled manpages creation for onegate (#2649) 2023-06-23 15:38:07 +02:00
oneprovision B #-: Add missing rbd-nbd on ceph client (lxc) (#2556) 2023-03-16 10:43:18 +01:00
onetoken B #5236: oneuser token-create does not work without ONE_AUTH 2017-07-12 18:16:53 +02:00
pkgs B #6241: Modified fireedge service file (#2651) 2023-06-26 18:05:48 +02:00
router B OpenNebula/one#6246: Autocorrect only deprecated methods (#2654) 2023-06-27 18:16:02 +02:00
rubygems OpenNebula/one#6245: Include HostSyncManager as a gem dependency (#2647) 2023-06-22 12:44:39 +02:00
schemas/libvirt F #3953: Add RAW validator for KVM 2020-05-18 02:23:29 +02:00
scons B OpenNebula/one#6246: Autocorrect only deprecated methods (#2654) 2023-06-27 18:16:02 +02:00
scripts M #-: Bump year 2023 2023-01-09 12:23:19 +01:00
shell F #6063: Backup Jobs for OpenNebula 2023-07-03 18:15:52 +02:00
smoke_tests F #6063: Backup Jobs for OpenNebula 2023-07-03 18:15:52 +02:00
ssh M #-: Bump year 2023 2023-01-09 12:23:19 +01:00
start-scripts M #-: Bump year 2023 2023-01-09 12:23:19 +01:00
sudoers L #-: Change percentage for brackets 2023-02-07 13:28:47 +01:00
vendor F #6275: External scheduler API 2023-08-29 17:11:01 +02:00
websockify F #1012: update websockify to latest version (#2809) 2019-01-18 15:48:10 +01:00