Class: Specinfra::Command::Linux::Base::LxcContainer
- Inherits:
-
Base::LxcContainer
- Object
- Base
- Base::LxcContainer
- Specinfra::Command::Linux::Base::LxcContainer
- Defined in:
- lib/specinfra/command/linux/base/lxc_container.rb
Class Method Summary collapse
Methods inherited from Base
Class Method Details
.check_exists(container) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/specinfra/command/linux/base/lxc_container.rb', line 3 def check_exists(container) [ "lxc-ls -1 | grep -w #{escape(container)}", "virsh -c lxc:/// list --all --name | grep -w '^#{escape(container)}$'" ].join(' || ') end |
.check_is_running(container) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/specinfra/command/linux/base/lxc_container.rb', line 10 def check_is_running(container) [ "lxc-info -n #{escape(container)} -s | grep -w RUNNING", "virsh -c lxc:/// list --all --name --state-running | grep -w '^#{escape(container)}$'" ].join(' || ') end |