Sha256: ca3bc46db02be4a1dfa24e12dde76aa64f3ad6918895e1ae4e5443b59970ecd2
Contents?: true
Size: 925 Bytes
Versions: 9
Compression:
Stored size: 925 Bytes
Contents
#!/usr/bin/env ruby $:.unshift(File.dirname(__FILE__) + "/../../lib") $:.unshift(File.dirname(__FILE__) + "/../../examples") require "poolparty" require "simple" $:.unshift("#{File.dirname(__FILE__)}/../../lib/proto/gen-rb") require "thrift" require "command_interface" require "poolparty_constants" require "poolparty_types" port = ARGV.pop || 11223 transport = Thrift::BufferedTransport.new(Thrift::Socket.new('localhost', port)) protocol = Thrift::BinaryProtocol.new(transport) client = CloudThrift::CommandInterface::Client.new(protocol) transport.open() cld = CloudThrift::CloudQuery.new cld.name = 'monitored_app' resp = client.run_command(cld, "name", []) puts resp.response resp = client.run_command(cld, "maximum_instances", []) puts resp.response resp = client.run_command(cld, "run_monitor", ["cpu", "0.91"]) p resp.response resp = client.run_command(cld, "run_monitor", ["cpu", "0.01"]) p resp.response
Version data entries
9 entries across 9 versions & 3 rubygems