Skip to content

Commit

Permalink
B OpenNebula#3175 Updated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dann1 committed Apr 5, 2019
1 parent 7c85bc4 commit eb67491
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/vmm_mad/remotes/lib/lxd/container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def update(wait: true, timeout: '')
wait?(@client.put("#{CONTAINERS}/#{name}", @lxc), wait, timeout)
end

# Returns the container current state
# Returns the container live state
def monitor
@client.get("#{CONTAINERS}/#{name}/state")
end
Expand Down Expand Up @@ -209,8 +209,7 @@ def check_stop
2.times do
# This call may return an operation output instead of a
# container data in case of timeout. The call breaks
# the container attributes. It needs to be read again
container = Container.get(vm_name, xml, client)
# the container info. It needs to be read again

break if %w[Running Stopped].include? container.status
end
Expand Down
5 changes: 2 additions & 3 deletions src/vmm_mad/remotes/lxd/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ container = Container.new_from_xml(xml, client)

# ------------------------------------------------------------------------------
# Create Container in LXD
# - Already exists: gets container metadata from LXD and set OpenNebula
# configurations to update existing container.
# - Not exists. Creates new container in LXD.
# - Already exists: Raise error if container is detected running
# - Doesn't exist. Creates new container in LXD.
# ------------------------------------------------------------------------------
if Container.exist?(container.name, client)
OpenNebula.log_info('Overriding container')
Expand Down
2 changes: 1 addition & 1 deletion src/vmm_mad/remotes/lxd/shutdown
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ client = LXDClient.new
container = Container.get(vm_name, xml, client)

# ------------------------------------------------------------------------------
# Stop the container & unmap devices if not a wild container
# Stop vnc connection and container & unmap devices if not a wild container
# ------------------------------------------------------------------------------
container.vnc('stop')
container.check_stop
Expand Down

0 comments on commit eb67491

Please sign in to comment.