Module: Gogetit
- Extended by:
- Util
- Defined in:
- lib/executionhooks.rb,
lib/maas.rb,
lib/util.rb,
lib/gogetit.rb,
lib/gogetit/cli.rb,
lib/multilogger.rb,
lib/providers/lxd.rb,
lib/gogetit/version.rb,
lib/providers/libvirt.rb
Overview
Defined Under Namespace
Modules: ExecutionHooks, Util Classes: CLI, GogetLXD, GogetLibvirt, GogetMAAS, MultiLogger
Constant Summary collapse
- VERSION =
"0.1.16"
Class Attribute Summary collapse
-
.config ⇒ Object
readonly
Returns the value of attribute config.
-
.libvirt ⇒ Object
readonly
Returns the value of attribute libvirt.
-
.logger ⇒ Object
readonly
Returns the value of attribute logger.
-
.lxd ⇒ Object
readonly
Returns the value of attribute lxd.
-
.maas ⇒ Object
readonly
Returns the value of attribute maas.
Class Method Summary collapse
Methods included from Util
get_gateway, ping_available?, recognize_env, ssh_available?, symbolize_keys
Class Attribute Details
.config ⇒ Object (readonly)
Returns the value of attribute config.
15 16 17 |
# File 'lib/gogetit.rb', line 15 def config @config end |
.libvirt ⇒ Object (readonly)
Returns the value of attribute libvirt.
15 16 17 |
# File 'lib/gogetit.rb', line 15 def libvirt @libvirt end |
.logger ⇒ Object (readonly)
Returns the value of attribute logger.
15 16 17 |
# File 'lib/gogetit.rb', line 15 def logger @logger end |
.lxd ⇒ Object (readonly)
Returns the value of attribute lxd.
15 16 17 |
# File 'lib/gogetit.rb', line 15 def lxd @lxd end |
.maas ⇒ Object (readonly)
Returns the value of attribute maas.
15 16 17 |
# File 'lib/gogetit.rb', line 15 def maas @maas end |
Class Method Details
.get_provider_of(name) ⇒ Object
91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/gogetit.rb', line 91 def self.get_provider_of(name) if lxd.container_exists?(name) logger.info("Calling <#{__method__.to_s}>, It is a LXD container.") return 'lxd' elsif libvirt.domain_exists?(name) logger.info("Calling <#{__method__.to_s}>, It is a KVM domain.") return 'libvirt' else puts "#{name} is not found" return nil end end |