Sha256: 29abb3a278f386c5e8df4b99ae57e8956583fa28e5d185229298c84beb73801a
Contents?: true
Size: 650 Bytes
Versions: 21
Compression:
Stored size: 650 Bytes
Contents
module OpenStack module Metering class Connection attr_accessor :connection def initialize(connection) @connection = connection OpenStack::Authentication.init(@connection) end # Returns true if the authentication was successful and returns false otherwise. # # cs.authok? # => true def authok? @connection.authok end def query_samples(data = {}) response = @connection.req('POST', "/query/samples", {data: JSON.generate(data)}) OpenStack::Exception.raise_exception(response) unless response.code.match(/^20.$/) JSON.parse(response.body) end end end end
Version data entries
21 entries across 21 versions & 1 rubygems