(#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

@ -6,7 +6,7 @@ class Auth
def self.get_token(verbose, url, user, password)
conn = Http.get_conn_with_auth(verbose, url, user, password)
resp = conn.post "/token"
resp = conn.post "token"
res_body = JSON.parse(resp.body)
if res_body["ok"]
@ -26,7 +26,7 @@ class Auth
conn = Http.get_conn_with_auth(verbose, url, user, password)
response = conn.delete "/token/#{token}"
response = conn.delete "token/#{token}"
res_body = JSON.parse(response.body)
if res_body["ok"]
return res_body
@ -45,7 +45,7 @@ class Auth
conn = Http.get_conn(verbose, url)
response = conn.get "/token/#{token}"
response = conn.get "token/#{token}"
res_body = JSON.parse(response.body)
if res_body["ok"]