Commit graph

58 commits

Author SHA1 Message Date
Samuel Beaulieu
4b7cbbf0e5 fix abs spec tests 2020-09-15 11:21:58 -05:00
Austin Blatt
4755343df2 Print all non-success output to STDERR 2020-08-10 16:20:25 -07:00
kirby@puppetlabs.com
05a133fc72 Add support for ondemand provisioning to vmfloaty
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.
2020-08-04 11:24:11 -07:00
a6f53c0310
Add Dependabot and Coveralls
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.
2020-07-07 10:17:10 -04:00
Brian Cain
5dbe19e10b
Merge branch 'master' into qeng-7604_add_jobid_to_delete 2020-01-28 13:40:53 -08:00
Mikker Gimenez-Peterson
ac14629eb3 SSH Command respects ABS now and tests should fail if the API changes again 2020-01-27 15:29:00 -08:00
Brandon High
51a7eb809e
(QENG-7604) Add support for Job IDs to ABS delete
This commit adds support for passing in a JobID when deleting with ABS.
2020-01-27 14:17:06 -08:00
Mikker Gimenez-Peterson
dc3bfecd28 Adding spec test to ensure that all the interfaces are the same, while doing so, fix the broken interfaces for delete on vmpooler and nonstandard pooler(they were passed 5 by service.rb but expected 4) 2020-01-14 09:45:28 -08:00
Mikker Gimenez-Peterson
2c456f1157 ABS will sometimes return null values in the /status/queue endpoint 2019-12-16 16:13:33 -08:00
Mikker Gimenez-Peterson
d963e357d3 Adding delete and get active requests 2019-12-04 11:37:17 -08:00
Mikker Gimenez-Peterson
7e27542670 Adding delete and get active requests 2019-11-04 11:41:49 -08:00
Mikker Gimenez-Peterson
a77ea84092 Rebasing fixed tests 2019-10-31 14:25:47 -07:00
Mikker Gimenez-Peterson
de7d0fdeab Adding command to list pools out of ABS 2019-10-31 11:33:07 -07:00
Brandon High
c140e7af48
Update Faraday to 0.15, remove unnecessary headers 2019-10-22 13:28:14 -07:00
Tim Sharpe
c78ad33104 (rubocop) Fix Layout/LeadingCommentSpace 2019-02-03 13:12:33 +11:00
Tim Sharpe
7d9545f202 (rubocop) Fix Layout/IndentHeredoc 2019-02-03 13:11:07 +11:00
Tim Sharpe
851009b1f6 (rubocop) Fix Layout/AlignHash & Layout/IndentHash 2019-02-03 13:08:00 +11:00
Tim Sharpe
f2ab052fa4 (rubocop) Fix Layout/ExtraSpacing 2019-02-03 12:49:03 +11:00
Tim Sharpe
9afae18ee2 (rubocop) Fix Layout/SpaceAfterComma 2019-02-03 12:48:04 +11:00
Tim Sharpe
edaa3e5645 (rubocop) Fix Layout/EmptyLinesAroundBlockBody 2019-02-03 12:41:22 +11:00
Tim Sharpe
b2ac1ddf2f (rubocop) Fix Layout/MultilineMethodCallIndentation 2019-02-03 12:39:47 +11:00
Tim Sharpe
6f40397136 (rubocop) Fix Layout/DotPosition 2019-02-03 12:36:47 +11:00
Tim Sharpe
fd753ba188 (rubocop) Fix Layout/SpaceBeforeBlockBraces 2019-02-03 12:34:24 +11:00
Tim Sharpe
b8971c040a (rubocop) Fix Layout/SpaceInsideLiteralHashBraces 2019-02-03 12:32:05 +11:00
Tim Sharpe
b16e3fc792 (rubocop) Fix Layout/SpaceAroundOperators 2019-02-03 12:26:38 +11:00
Tim Sharpe
58f64b2843 (rubocop) Fix Style/TrailingCommaInHashLiteral 2019-02-03 12:22:41 +11:00
Tim Sharpe
095ac9e75e (rubocop) Fix Style/WordArray 2019-02-03 12:22:41 +11:00
Tim Sharpe
cdb9b0ca3d (rubocop) Fix Style/NestedParenthesizedCalls 2019-02-03 12:22:41 +11:00
Tim Sharpe
d95c6946b8 (rubocop) Fix Style/BracesAroundHashParameters 2019-02-03 12:22:41 +11:00
Tim Sharpe
fcf7154a8b (rubocop) Style/HashSyntax to use hash_rockets for consistency 2019-02-03 12:22:41 +11:00
Tim Sharpe
e0cbf89b8f (rubocop) Fix Style/FrozenStringLiteralComment 2019-02-03 12:22:41 +11:00
Tim Sharpe
1272343cdd (rubocop) Fix Style/StringLiterals 2019-02-03 10:42:28 +11:00
Nick Lewis
50eeb8f265 Add --json option for floaty get
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"
  ]
}
```
2018-01-02 10:23:54 -08:00
Casey Williams
ca5b0f5e8b Integrate nonstandard pooler service into vmfloaty 2017-10-12 12:53:04 -07:00
Casey Williams
e78bcc6216 Allow configuration of multiple services 2017-09-25 15:23:10 -07:00
Ryan McKern
ee0c73dfda Add a little formatting to Rspec 2017-03-01 14:02:58 -08:00
Brian Cain
a6ff0515d3 Raise TokenError if none provided to Pooler.delete 2016-11-14 09:49:23 -08:00
Brian Cain
b51a549fe5 (#34) Raise TokenError on operations that require tokens
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.
2016-10-07 18:10:52 -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
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
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
Justin Stoller
1dd8230017 (maint) Include tags in host pretty printing when available 2016-06-03 10:45:34 -07:00
Brian Cain
a0b0016bcd Add spec test for formatting hashes 2015-11-15 14:35:25 -08:00
Brian Cain
c6cf86669a Cleanup vmfloaty library and command line functions 2015-11-15 14:24:24 -08:00
Brian Cain
3394a14ea0 (#14) Remove printing in auth library 2015-11-15 13:27:07 -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