Class: OcpClient
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #delete(location) ⇒ Object
- #get(location) ⇒ Object
-
#initialize ⇒ OcpClient
constructor
A new instance of OcpClient.
- #post(location, body) ⇒ Object
- #put(location, body) ⇒ Object
- #setup(ocpconfig) ⇒ Object
Constructor Details
#initialize ⇒ OcpClient
Returns a new instance of OcpClient.
32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/client/OcpClient.rb', line 32 def initialize @method = nil @url = nil @token = nil @noverifyssl = false @pretty = false @clientcert = nil @clientkey = nil @clientca = nil @clientcafile = nil @debug = nil end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
30 31 32 |
# File 'lib/client/OcpClient.rb', line 30 def url @url end |
Instance Method Details
#delete(location) ⇒ Object
71 72 73 |
# File 'lib/client/OcpClient.rb', line 71 def delete(location) return call(location,nil,:delete) end |
#get(location) ⇒ Object
59 60 61 |
# File 'lib/client/OcpClient.rb', line 59 def get(location) return call(location,nil,:get) end |
#post(location, body) ⇒ Object
63 64 65 |
# File 'lib/client/OcpClient.rb', line 63 def post(location, body) return call(location,body,:post) end |
#put(location, body) ⇒ Object
67 68 69 |
# File 'lib/client/OcpClient.rb', line 67 def put(location, body) return call(location,body,:put) end |
#setup(ocpconfig) ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/client/OcpClient.rb', line 45 def setup(ocpconfig) @noverifyssl = ocpconfig.noverifyssl @url = ocpconfig.master @pretty = ocpconfig.pretty @debug = ocpconfig.debug @token = ocpconfig.token @clientcert = ocpconfig.clientcert @clientkey = ocpconfig.clientkey @clientca = ocpconfig.clientca @clientcafile = ocpconfig.clientcafile return nil end |