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).
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
This commit adds support for provisioning instances on demand with
vmpooler. Additionally, this change adds a capability to detect on
demand pools available in ABS. Without this change vmfloaty does not
support provisioning instances via the vmpooler ondemand endpoints.
This adds Dependabot to keep things updated and Coveralls so we can see
how code coverage changes over time. Coveralls / SimpleCov are
configured so that both the SimpleCov html report and the Coveralls
report are generated. This facilitates easily seeing coverage locally in
addtion to via CI.
This option will return structured output from `floaty get`, which is
easier to parse in some cases.
Example output:
```json
{
"centos-7-x86_64": [
"hpfhhf5aqxowfd8.delivery.puppetlabs.net",
"k65euywltpz9fz0.delivery.puppetlabs.net"
],
"centos-6-x86_64": [
"oahunrurl7xis05.delivery.puppetlabs.net"
]
}
```
Prior to this commit, the Pooler class would raise an exception if the
token provided was nil and it attempted to make a request with Faraday.
This fixes that by catching when nil tokens are provided and instead
raising a TokenError to be caught by the consumer.
This commit updates the Auth class to properly raise an error when
something goes wrong. It also updates the vmpooler command class to
handle when those errors get raised.
This commit adds an errors class to handle when pooler tokens are
invalid. The retrieve method in Pooler will raise an AuthError if it
gets an HTTP 401 from the vmpooler.
Prior this commit, some commands did not accept some options as an
argument and instead only worked through a flag. This commit updates
that behavior to allow users to specify some options through arguments,
while leaving the ability to continue to specify those options through
flags. Command line arguments take precedence over flags. It also fixes
an issue where if a snapshot sha was nil, it would submit a request to
take a snapshot to vmpooler.