Sha256: 40666206ac3f666e5d18cc1d20678697f83e8da696c8519de7c06fa0cc51fb94

Contents?: true

Size: 1.07 KB

Versions: 16

Compression:

Stored size: 1.07 KB

Contents

# require all commands
Dir.glob(File.dirname(File.absolute_path(__FILE__)) + '/cloud66_agent/commands/*', &method(:require))

class Cloud66Agent
	def self.configure(server_uid)
		raise ArgumentError.new if server_uid.nil?
		Cloud66::Commands::Configure.perform(server_uid)
	end

	def self.pulse
		Cloud66::Commands::Pulse.perform
	end

	def self.vitals
		Cloud66::Commands::Vitals.perform
	end

	def self.address
		Cloud66::Commands::Address.perform
	end

	def self.job_start(job_uid)
		raise ArgumentError.new if job_uid.nil?
		Cloud66::Commands::JobStart.perform(job_uid)
	end

	def self.job_end(job_uid, run_uid, run_status, run_time, results_file)
		raise ArgumentError.new if run_status.nil? || job_uid.nil? || run_uid.nil? || run_time.nil? || results_file.nil?
		Cloud66::Commands::JobEnd.perform(job_uid, run_uid, run_status, run_time, results_file)
	end

	def self.fail2ban(is_banned, ip_address, attack, port)
		raise ArgumentError.new if is_banned.nil? || ip_address.nil? || attack.nil? || port.nil?
		Cloud66::Commands::Fail2ban.perform(is_banned, ip_address, attack, port)
	end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
cloud66_agent-1.1.1 lib/cloud66_agent.rb
cloud66_agent-1.1.1.beta1 lib/cloud66_agent.rb
cloud66_agent-1.1.0 lib/cloud66_agent.rb
cloud66_agent-1.1.0.beta4 lib/cloud66_agent.rb
cloud66_agent-1.1.0.beta3 lib/cloud66_agent.rb
cloud66_agent-1.1.0.beta2 lib/cloud66_agent.rb
cloud66_agent-1.1.0.beta1 lib/cloud66_agent.rb
cloud66_agent-1.0.12 lib/cloud66_agent.rb
cloud66_agent-1.0.12.pre1 lib/cloud66_agent.rb
cloud66_agent-1.0.11 lib/cloud66_agent.rb
cloud66_agent-1.0.10 lib/cloud66_agent.rb
cloud66_agent-1.0.9 lib/cloud66_agent.rb
cloud66_agent-1.0.8 lib/cloud66_agent.rb
cloud66_agent-1.0.8.pre1 lib/cloud66_agent.rb
cloud66_agent-1.0.7.pre1 lib/cloud66_agent.rb
cloud66_agent-1.0.7 lib/cloud66_agent.rb