I think there is no API for pure dynamic reservation but there are indeed
API for reservations including both static and dynamic reservations.

You can query the endpoint /state or /slaves on master to check the
reservations status. You may want to file a JIRA ticket if only want to get
dynamic reservations.

An example output of slaves endpoint.
$ curl "http://192.168.0.107:5050/slaves"; 2>/dev/null| jq .
{
  "slaves": [
    {
      "active": true,
      "attributes": {},
      "hostname": "xxxxxxxxx",
      "id": "faf93a46-2355-47b5-9b3c-cdf619c25109-S0",
      "offered_resources": {
        "cpus": 0,
        "disk": 0,
        "mem": 0
      },
      "pid": "slave(1)@192.168.0.107:5051",
      "registered_time": 1449843036.07872,
      "reserved_resources": {  <<<<<<<<<<<<<<<
        "oo1": {
          "cpus": 3,
          "disk": 0,
          "mem": 1000
        }
      },
      "resources": {
        "cpus": 11,
        "disk": 470816,
        "mem": 4000,
        "ports": "[31000-32000]"
      },
      "unreserved_resources": {
        "cpus": 8,
        "disk": 470816,
        "mem": 3000,
        "ports": "[31000-32000]"
      },
      "used_resources": {
        "cpus": 0,
        "disk": 0,
        "mem": 0
      },
      "version": "0.27.0"
    }
  ]
}

Thanks,

Guangya


On Fri, Dec 11, 2015 at 8:30 PM, John Omernik <[email protected]> wrote:

> Is there an API endpoint that allows an operator to see the current
> dynamic reservations?  I keep track of what's there etc.
>
> John
>
>

Reply via email to