Skip to content

Commit

Permalink
Warn in case of empty DaaS
Browse files Browse the repository at this point in the history
  • Loading branch information
dann1 committed Mar 21, 2024
1 parent d9055c2 commit 689c542
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 53 deletions.
10 changes: 4 additions & 6 deletions src/server/runtime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,8 @@ def update_sr(specification)

vm_id = @body[function]['VM_ID']
if vm_id.nil?
rc = 500
error = "No VM_ID found for function #{function}"
return ProvisionEngine::Error.new(rc, error)
$logger.warning "No VM_ID found for function #{function}"
next
end

vm = ProvisionEngine::Function.new_with_id(vm_id, @cclient.client_oned)
Expand Down Expand Up @@ -634,9 +633,8 @@ def functions

vm_id = @body[function]['VM_ID']
if vm_id.nil?
rc = 500
error = "No VM_ID found for function #{function}"
return ProvisionEngine::Error.new(rc, error)
$logger.warning "No VM_ID found for function #{function}"
next
end

vm = ProvisionEngine::Function.new_with_id(vm_id, @cclient.client_oned)
Expand Down
2 changes: 2 additions & 0 deletions tests/init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@
require 'log'
require 'logger'

$logger = ProvisionEngine::Logger.new(conf_engine[:log], 'purge')
client = ProvisionEngine::CloudClient.new(conf_engine, auth)

response = client.service_pool_get
expect(response[0]).to eq(200)

Expand Down
47 changes: 0 additions & 47 deletions tests/testenv.sh

This file was deleted.

0 comments on commit 689c542

Please sign in to comment.