Module: CloudstackNagios::Helper
- Included in:
- Base
- Defined in:
- lib/cloudstack-nagios/helper.rb
Instance Method Summary collapse
Instance Method Details
#cs_routers ⇒ Object
14 15 16 17 |
# File 'lib/cloudstack-nagios/helper.rb', line 14 def cs_routers routers = client.list_routers(status: 'Running') routers += client.list_routers(projectid: -1, status: 'Running') end |
#load_template(template_path) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/cloudstack-nagios/helper.rb', line 3 def load_template(template_path) if File.file?(template_path) templ = Erubis::Eruby.new(File.read template_path) templ.filename = template_path return templ else say "Error: template not found #{template_path}" exit 1 end end |