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.
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.
This commit cleans up the Auth class so that it no longer system exits
if an error occurs. Instead it will return nil if it could not properly
make the request, and it's on the consumer of the class to handle
error cases.
This commit adds a new feature to vmfloaty. It grabs a single vm from
the pooler based on the os template provided and then attempts to ssh
into it from the host machine.
This commit updates floaty to use a new endpoint to modify vms. Now you
can use the modify command to extend the disk space of a given vm. The
downside is this new endpoint only exists at /api/v1 on the pooler, and
the way Faraday works required an update to removing a leading slash for
each request endpoint. Users should update their URL in the floaty dot
file to include a /api/v1 at the end of the pooler url
This commit updates the list command to add a flag --active. It will
list all active vms based on the given token as well as what template
they are and how long they've been running for. As a result, this also
updates how the delete --all command formats running vms.
This commit adds a way for a user to delete all vms that were obtained
by a specific token. It will ask the user if they are sure before
deleting everything.
Prior to this commit, the pooler class was expecting a comma separated
string of hosts to delete. This commit updates that to expect hostnames
to be an array instead.
If a user does not specify a number of vms with the get command (i.e.
does not include an = sign after the os), the get command will assume
the user just wants 1 vm.
This commit changes the get command to have users request vms by
specifying the hosts they want and then the number of hosts rather than
having to say each one separated by a comma.