mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-27 05:48:41 -05:00
(#1) Update vmfloaty to use new vmpooler api
This commit also uses commander for arg parsing. This commit is a WIP.
This commit is contained in:
parent
fcb43ac379
commit
296f9abb1d
11 changed files with 266 additions and 145 deletions
20
lib/vmfloaty/auth.rb
Normal file
20
lib/vmfloaty/auth.rb
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
require 'faraday'
|
||||
require 'vmfloaty/http'
|
||||
|
||||
class Auth
|
||||
def self.get_token(user, url, password)
|
||||
conn = Http.get_conn(url)
|
||||
|
||||
#resp = conn.post do |req|
|
||||
# req.url '/v1/token'
|
||||
# req.headers['Content-Type'] = 'application/json'
|
||||
# req.user = user
|
||||
# end
|
||||
# if ok: true, return token
|
||||
puts 'Got token'
|
||||
end
|
||||
|
||||
def self.delete_token(user, token)
|
||||
conn = Http.get_conn(url)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue