Sha256: 4a3a3304bcdf383500866e3e7a82dffee460f9baec2c2d9642068f6dacca6613

Contents?: true

Size: 421 Bytes

Versions: 3

Compression:

Stored size: 421 Bytes

Contents

module CloudstackNagios
  module Helper
    def load_template(name)
      templ = File.read(File.join(File.dirname(__FILE__), "templates", name))
      Erubis::Eruby.new(templ)
    end

    def routers
    	routers = client.list_routers
    	projects = client.list_projects
    	projects.each do |project|
      	routers = routers + client.list_routers({projectid: project['id']})
    	end
    	routers
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cloudstack-nagios-0.1.3 lib/cloudstack-nagios/helper.rb
cloudstack-nagios-0.1.1 lib/cloudstack-nagios/helper.rb
cloudstack-nagios-0.1.0 lib/cloudstack-nagios/helper.rb