mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 05:28:40 -05:00
Add correct headers for token requests
This commit is contained in:
parent
3e7b2b54fe
commit
16dd780cb9
1 changed files with 3 additions and 0 deletions
|
|
@ -36,6 +36,7 @@ class Pooler
|
|||
def self.modify(verbose, url, hostname, token, lifetime, tags)
|
||||
modify_body = {'lifetime'=>lifetime, 'tags'=>tags}
|
||||
conn = Http.get_conn_with_token(verbose, url, token)
|
||||
conn.headers['X-AUTH-TOKEN']
|
||||
|
||||
response = conn.put do |req|
|
||||
req.url "/vm/#{hostname}"
|
||||
|
|
@ -84,6 +85,7 @@ class Pooler
|
|||
|
||||
def self.snapshot(verbose, url, hostname, token)
|
||||
conn = Http.get_conn_with_token(verbose, url, token)
|
||||
conn.headers['X-AUTH-TOKEN']
|
||||
|
||||
response = conn.post "/vm/#{hostname}/snapshot"
|
||||
res_body = JSON.parse(response.body)
|
||||
|
|
@ -92,6 +94,7 @@ class Pooler
|
|||
|
||||
def self.revert(verbose, url, hostname, token, snapshot_sha)
|
||||
conn = Http.get_conn_with_token(verbose, url, token)
|
||||
conn.headers['X-AUTH-TOKEN']
|
||||
|
||||
response = conn.post "/vm/#{hostname}/snapshot/#{snapshot}"
|
||||
res_body = JSON.parse(response.body)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue