Commit graph

547 commits

Author SHA1 Message Date
Brian Cain
8b8ac88578 (maint) Use correct exit code in token delete 2016-09-24 11:19:44 -07:00
Brian Cain
579320e988 (#33) Raise TokenError if no token provided 2016-09-24 11:15:44 -07:00
Brian Cain
8da1deaf6b (#33) Handle Auth class errors
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.
2016-09-24 11:11:14 -07:00
Brian Cain
05e9d5a0cc (#32) Handle vmpooler responses when token is invalid
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.
2016-09-24 10:22:48 -07:00
Brian Cain
86e1792775 Cleanup readme, add example projects 2016-09-17 16:20:28 -07:00
Brian Cain
1d0fc42c80 (#31) Improve how users can provide arguments to commands
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.
2016-09-17 16:07:21 -07:00
Brian Cain
b07139b64c (#29) Don't system exit in Auth class
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.
2016-09-15 08:47:38 -07:00
Brian Cain
59eb5678ed Bump to version 0.6.0 2016-08-26 10:09:42 -07:00
Brian Cain
9a1d4a15d6 (#27) Handle URLs that do not have HTTP or HTTPS
Prior to this commit, if a user provided a url without HTTP or HTTPS
Faraday would fail to make a connection to the pooler since it doesn't
seem to handle urls without that. This commit adds a simple check to see
what kind of URI the user gave us, and if its missing that protocol add
it to the beginning of the URL before making a request.
2016-08-26 10:08:38 -07:00
Brian Cain
93e842a2aa (#28) Add new ssh command to vmfloaty
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.
2016-08-26 10:01:08 -07:00
Brian Cain
64a88106a0 Format hosts if --notoken is used 2016-08-15 11:46:19 -07:00
Brian Cain
9612d72453 Add travis badge 2016-07-29 14:18:15 -07:00
Brian Cain
04acc14bf5 Remove require from gemspec 2016-07-29 14:15:16 -07:00
Brian Cain
1e51a6d1c5 Update README.md 2016-07-29 14:12:15 -07:00
Brian Cain
9b86a972e9 Update readme with library example 2016-07-16 16:57:43 -07:00
Brian Cain
1331a48bb2 Change back how version is set 2016-07-09 20:06:30 -07:00
Brian Cain
53868b9532 Change useragent for faraday 2016-07-09 20:03:08 -07:00
Brian Cain
5f6cd1df1d (#25) Remove printing from delete method in pooler api 2016-07-09 19:53:12 -07:00
Brian Cain
a6c5f1dceb (#24) Improve 'get' output
This commit updates how hosts are formated when shown to the user. It
applies a domain to each hostname instead of being a different key.
2016-07-02 11:41:02 -07:00
Brian Cain
06206456c7 Bump to version 0.3.1 2016-06-04 17:25:49 -07:00
Brian Cain
b9781e51ba Merge pull request #23 from justinstoller/show-tags
Show tag values in `list --active`
2016-06-04 17:25:10 -07:00
Justin Stoller
1dd8230017 (maint) Include tags in host pretty printing when available 2016-06-03 10:45:34 -07:00
Justin Stoller
8111005c81 (maint) Pin webmock to 1.21.0 2016-06-03 10:45:34 -07:00
Brian Cain
155aa0e13e Merge pull request #21 from briancain/update-for-disk-space
(#19) Update vmfloaty to expect /api/v1 in URL for disk endpoint
2016-05-03 15:00:33 -07:00
Brian Cain
2e24a455a3 (#19) Update vmfloaty to expect /api/v1 in URL for disk endpoint
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
2016-05-03 14:57:00 -07:00
Brian Cain
56924fa811 Make query request before printing all vm information 2015-11-21 13:43:30 -08:00
Brian Cain
19255bb3ba Merge pull request #18 from briancain/add-force-to-delete-all
(#17) Add a force option for delete --all
2015-11-21 12:44:50 -08:00
Brian Cain
0cb635a6c7 Update to 0.2.18 2015-11-21 12:44:32 -08:00
Brian Cain
d4d6010eda Make force flag single dash 2015-11-21 12:43:32 -08:00
Brian Cain
8a3ad76b81 (#17) Add a force option for delete --all 2015-11-21 12:26:09 -08:00
Brian Cain
af11d88c07 Merge pull request #16 from briancain/add-list-active-vms-flag
(#12) List active vms for a given token
2015-11-16 09:39:45 -08:00
Brian Cain
e3218a0fc9 Bump to version 0.2.17 2015-11-16 09:39:25 -08:00
Brian Cain
53f3c7db03 Fixup how vms are printed on list command 2015-11-16 09:24:45 -08:00
Brian Cain
6447a5f217 (#12) List active vms for a given token
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.
2015-11-16 09:19:51 -08:00
Brian Cain
2a5e5ba9bb Bump to version 0.2.16 2015-11-16 09:17:48 -08:00
Brian Cain
c8076625db Merge pull request #15 from briancain/clean-library-methods
Cleanup vmfloaty library and command processor
2015-11-16 09:17:17 -08:00
Brian Cain
3b92f12ee9 Print obtained token during get command if no token exists 2015-11-16 09:04:52 -08:00
Brian Cain
e8094fb91d Use correct variable for formatting hosts 2015-11-16 08:59:25 -08:00
Brian Cain
a0b0016bcd Add spec test for formatting hashes 2015-11-15 14:35:25 -08:00
Brian Cain
f15df69eef Fix missing end 2015-11-15 14:35:16 -08:00
Brian Cain
c6cf86669a Cleanup vmfloaty library and command line functions 2015-11-15 14:24:24 -08:00
Brian Cain
c1689da3c4 (#13) Raise exception when required params are missing
Instead of doing a system exit and printing to stderr, raise an
exception if parameters are missing when attempting to make an http
connection.
2015-11-15 13:33:21 -08:00
Brian Cain
3394a14ea0 (#14) Remove printing in auth library 2015-11-15 13:27:07 -08:00
Brian Cain
544d9d35b8 Bump to version 0.2.15 2015-11-13 11:54:16 -08:00
Brian Cain
a0ba604006 (#11) Provide a way to delete all vms acquired by token
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.
2015-11-13 11:52:01 -08:00
Brian Cain
bc4cff5363 (maint) Have pooler delete class take array
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.
2015-11-10 11:42:56 -08:00
Brian Cain
fa92da5c05 (maint) Update token status to not require password 2015-11-05 13:28:37 -08:00
Brian Cain
2beb36f53e Update readme.md with rubygems badge version 2015-10-25 10:08:58 -07:00
Brian Cain
b62cffa2cd (spec) Add format spec test 2015-10-21 22:21:13 -07:00
Brian Cain
ac12ea69c1 (spec) Add auth class spec tests 2015-10-21 22:08:48 -07:00