- If ABS queries returns a body for 200 or 202, floaty will print it
this is useful in the new version of ABS, since it shows the progress
for ondemand requests (AWS or vmpooler)
- removed the queue_place and querying the queue for a 'get' request
this queue_place number was misleading since it was just a redis index
and did not represent well where the request was in the queue
- Also added a flag option --continue to be used when the cli was
interrupted for example with ctrl-c
Before this change there was a non zero chance that two requests could be received
at the same millisecond and have the same jobid. Added the username as a prefix
to the job id
Before this change the code would try to check if an object was ABS
by using is_a? which is only for instances of a class. It also compared
with ABS.class which returns the Class class.
Now fixed by comparing the object to the static class
ABS now returns the ABS job_id on the first line, then every
vmpooler hostname indented. It queries them from vmpooler to
get the metadata like lifetime etc
Adds an option to the `floaty list` subcommand so that, when listing
active hosts, floaty will output just the hostnames, without any
additional information or formatting. Hostnames will be separated by a
newline.
This functionality is primarily intended for consuming by tooling (such
as the tab completion scripts).
Previously this option had no effect on the output. This commit makes
the option effective and also refactors the tests for this method to
cover this case.
Before this change ABS sometiimes returned a string of JSON with escaped
quotes, that had to be parsed again
With this change, floaty should accept both the legacy and the new
full JSON responses.
This change creates the `floaty service` command with two valid
arguemnts: types and examples
- `floaty service types` prints out a list of valid types for use in a
service definition in ~/.vmfloaty.yml
- `floaty service examples` prints out example configuration files for
both a single service and multiple services.
Before this change, the fallback vmpooler for ABS had to be named
'vmpooler' and it only supported one. With this new code, users can
set a key within an 'abs' service type called vmpooler_fallback that
points to any other service configured in the ~/.vmfloaty.yml config
file. If not set, the appropriate error message is returned, with
an example configuration.
Added the various use cases for the config to the unit tests
the service is set to ABS. Since ABS does not implement all the services, it
fallsback on vmpooler when needed (example increasing the lifetime value)
- Validating JSON can be parsed before parsing, as it used to throw uncaught errors
- self.list_active is returning hosts for both nspooler and vmpooler but was returning
job_ids for abs. Now standardized the returned values for use in the "modify" cli,
and created a separate list_active_job_ids for the cases where a job_id list is expected
- added a way to change the service in place for methods that do not make sense
for ABS, and instead fallback on using vmpooler in those cases:
1. summary
2. modify
3. snapshot
4. revert
5. disk
For those methods in the class itself, raising a NoMethodError, in case it is used directly
- query now returns the queue info. For information on VMs, users should use --service vmpooler
- pretty_print_hosts (used in list, and delete scenarios) will now print the job_id
ABS information and indent each VM within and print it's metadata. Useful for
knowing the running time and extending it.
- added a new utility method to get the config for the vmpooler service, used for the fallback
- added a passthrough for the vmpooler token to use when running ABS. This enables
vmpooler to track the VMs used by each token (user). Also aligns the list between
both ABS and vmpooler. Fixes the bit-bar issue where the VMs do not appear when created
via ABS
Prior to this commit, when using --service=abs and --json the job_id
value is not included in the JSON blob, which makes it difficult for
calling code to grab both the job_id and the hosts without text
processing the log messages printed to standard error.
Previously the CLI would emit a warning about missing configuration
file, but a configuration file does not appear to be a requirement, at
least based on the documentation and the fact that everything can be
specified directly on the command line.
This commit simply removes the warning.
Users will no longer get a warning when doing things like `floaty
--version`, `floaty help`, and any other subcommand.