Sha256: 2eae72e3ea182099c4d658035e500de2e88ae49ebf73bbc494b9950c16d03dce

Contents?: true

Size: 458 Bytes

Versions: 2

Compression:

Stored size: 458 Bytes

Contents

module CloudstackNagios
  module Helper
    def load_template(template_path)
      if File.file?(template_path)
        templ = File.read(template_path)
        return Erubis::Eruby.new(templ)
      else
        say "Error: template not found #{template_path}"
        exit 1
      end
    end

    def cs_routers
      routers = client.list_routers(status: 'Running')
      routers += client.list_routers(projectid: -1, status: 'Running')
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cloudstack-nagios-0.3.1 lib/cloudstack-nagios/helper.rb
cloudstack-nagios-0.3.0 lib/cloudstack-nagios/helper.rb