Class: LxcSsh::Container
- Inherits:
-
Object
- Object
- LxcSsh::Container
- Defined in:
- lib/lxc_ssh/container.rb
Instance Attribute Summary collapse
-
#cpu_shares ⇒ Object
Returns the value of attribute cpu_shares.
-
#cpu_usage ⇒ Object
Returns the value of attribute cpu_usage.
-
#ip ⇒ Object
Returns the value of attribute ip.
-
#memory_limit ⇒ Object
Returns the value of attribute memory_limit.
-
#memory_usage ⇒ Object
Returns the value of attribute memory_usage.
-
#name ⇒ Object
Returns the value of attribute name.
-
#pid ⇒ Object
Returns the value of attribute pid.
-
#state ⇒ Object
Returns the value of attribute state.
Instance Method Summary collapse
-
#frozen? ⇒ Boolean
Checks if the container is frozen.
-
#running? ⇒ Boolean
Checks if the container is running.
-
#stopped? ⇒ Boolean
Checks if the container is stopped.
Instance Attribute Details
#cpu_shares ⇒ Object
Returns the value of attribute cpu_shares.
4 5 6 |
# File 'lib/lxc_ssh/container.rb', line 4 def cpu_shares @cpu_shares end |
#cpu_usage ⇒ Object
Returns the value of attribute cpu_usage.
4 5 6 |
# File 'lib/lxc_ssh/container.rb', line 4 def cpu_usage @cpu_usage end |
#ip ⇒ Object
Returns the value of attribute ip.
4 5 6 |
# File 'lib/lxc_ssh/container.rb', line 4 def ip @ip end |
#memory_limit ⇒ Object
Returns the value of attribute memory_limit.
4 5 6 |
# File 'lib/lxc_ssh/container.rb', line 4 def memory_limit @memory_limit end |
#memory_usage ⇒ Object
Returns the value of attribute memory_usage.
4 5 6 |
# File 'lib/lxc_ssh/container.rb', line 4 def memory_usage @memory_usage end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/lxc_ssh/container.rb', line 4 def name @name end |
#pid ⇒ Object
Returns the value of attribute pid.
4 5 6 |
# File 'lib/lxc_ssh/container.rb', line 4 def pid @pid end |
#state ⇒ Object
Returns the value of attribute state.
4 5 6 |
# File 'lib/lxc_ssh/container.rb', line 4 def state @state end |
Instance Method Details
#frozen? ⇒ Boolean
Checks if the container is frozen
23 24 25 |
# File 'lib/lxc_ssh/container.rb', line 23 def frozen? @state == 'FROZEN' end |
#running? ⇒ Boolean
Checks if the container is running
16 17 18 |
# File 'lib/lxc_ssh/container.rb', line 16 def running? @state == 'RUNNING' end |
#stopped? ⇒ Boolean
Checks if the container is stopped
30 31 32 |
# File 'lib/lxc_ssh/container.rb', line 30 def stopped? !running? && !frozen? end |