Sha256: 2c2a1e8db6f23231e471dc0c884bc9fd9e722d0af35067d3e93ff9d724b67340
Contents?: true
Size: 596 Bytes
Versions: 12
Compression:
Stored size: 596 Bytes
Contents
class CommandQueryHandler def self.run_query(on_cloud, command, args, opts={}) port = opts[:port] || 11223 host = opts[:host] || "localhost" transport = Thrift::BufferedTransport.new(Thrift::Socket.new(host, port)) protocol = Thrift::BinaryProtocol.new(transport) client = CloudThrift::CommandInterface::Client.new(protocol) transport.open() cld = CloudThrift::CloudQuery.new cld.name = on_cloud.name ddputs("Running command: #{command} on #{cld.name} at #{host}:#{port}") resp = client.run_command(cld, command, args) resp.response end end
Version data entries
12 entries across 12 versions & 3 rubygems