This PR includes the following changes:
- everything at the /dashboard/stats/vmpooler/numbers API endpoint has
been moved to /status, and stats-vmpooler-numbers.js is now looking to
/status for it's metrics
- added '.extra'-classed metrics to stats-vmpooler-numbers.js to pull
in daily clone totals, average clone time, etc.
- dashboard.css includes an @media query to display the extra metrics
if the dashboard's max-width exceeds 1500px
Add an endpoint that returns clone totals and average clone time for
the given time spans. The time spans are determined by the query
parameters "from" and "to", with the resulting range being inclusive of
both. If you want a single day, it should be both the "from" and the
"to" value.
This commit removes support for VMware 'resource pool' functionality
entirely, as VMware installations without the DRS feature enabled are
unable to configure or use resource pools.
Also, resource pools should have never been used for organization;
that's what folders are for.
This PR allows a single API request to return multiple VM objects. It
supports the following formats:
- POST <json> /vm/
eg. 'curl -d '{"debian-7-i386":"3","debian-7-x86_64":"1"}' --url vmpooler/vm
- POST /vm/<pool>+<pool>+<pool>...
eg. 'curl -d --url vmpooler/vm/debian-7-i386+debian-7-i386+debian-7-i386+debian-7-x86_64
Both commands listed above will return a JSON hash of 3 debian-7-i386 VMs and
1 debian-7-x86_64 VM:
{
"ok": true,
"debian-7-i386": {
"hostname": [
"v49pwwk5yzg6oad",
"ylghlgote5uso54",
"wt0c4xovvulo7ge"
]
},
"debian-7-x86_64": {
"hostname": "v3dkrulttp360fm"
}
}
Using redis keys to store clone timestamps will allow for a global TTL
for VMs in the 'pending' pool; failed clones should be cleaned up and
retried after a set period of time (eg. 15m).
Previous, the propertyCollector method was used to find VMs within
vCenter. This method was ineffecient, as it would retrieve a list of
the entire vCenter inventory and then parse for the specified VM. This
has been replaced with a fetch via searchIndex.FindByDnsName, which
returns only the requested VM object.