B #3389: Add pre_boot status (#3446)

This commit is contained in:
Daniel Clavijo Coca authored and Ruben S. Montero committed 2019-06-21 09:26:39 +02:00
1 parent cf04a8836a
commit 610cf051d7
2 files changed
+11 -1

No files matched your search

+9 -1
View File
@@ -129,6 +129,8 @@ class Container
# Create a container without a base image
def create(wait: true, timeout: '')
@lxc['source'] = { 'type' => 'none' }
@lxc['config']['user.one_status'] = '0'
wait?(@client.post(CONTAINERS, @lxc), wait, timeout)
@lxc = @client.get("#{CONTAINERS}/#{name}")['metadata']
@@ -204,7 +206,13 @@ class Container
#---------------------------------------------------------------------------
def start(options = {})
OpenNebula.log '--- Starting container ---'
change_state(__method__, options)
operation = change_state(__method__, options)
@lxc['config'].delete('user.one_status')
update
operation
end
def stop(options = { :timeout => 120 })
+2
View File
@@ -121,6 +121,8 @@ module LXD
state = 'p'
when 'stopped'
state = 'd'
state = '-' if container.config['user.one_status'] == '0'
when 'failure'
state = 'e'
else