(#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
This commit is contained in:
Brian Cain 2016-05-03 14:50:39 -07:00
parent 56924fa811
commit 2e24a455a3
7 changed files with 52 additions and 24 deletions

View file

@ -47,7 +47,7 @@ gem install vmfloaty
Grabbing a token for authenticated pooler requests:
```
floaty token get --user me --url https://vmpooler.mycompany.net
floaty token get --user me --url https://vmpooler.mycompany.net/api/v1
```
This command will then ask you to log in. If successful, it will return a token that you can save either in a dotfile or use with other cli commands.
@ -55,7 +55,7 @@ This command will then ask you to log in. If successful, it will return a token
Grabbing vms:
```
floaty get centos-7-x86_64=2 debian-7-x86_64=1 windows-10=3 --token mytokenstring --url https://vmpooler.mycompany.net
floaty get centos-7-x86_64=2 debian-7-x86_64=1 windows-10=3 --token mytokenstring --url https://vmpooler.mycompany.net/api/v1
```
### vmfloaty dotfile
@ -64,7 +64,7 @@ If you do not wish to continuely specify various config options with the cli, yo
```yaml
#file at /Users/me/.vmfloaty.yml
url: 'http://vmpooler.mycompany.net'
url: 'http://vmpooler.mycompany.net/api/v1'
user: 'brian'
token: 'tokenstring'
```
@ -143,7 +143,7 @@ end
if __FILE__ == $0
verbose = true
url = 'https://vmpooler.mycompany.net'
url = 'https://vmpooler.mycompany.net/api/v1'
token = aquire_token(verbose, url)
os = ARGV[0]