Skip to content

Commit

Permalink
Use SERVICE_TEMPLATE_ID for USER_TEMPLATE.FLAVOURS (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
dann1 committed Feb 15, 2024
1 parent 8838bb7 commit 1514294
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion share/api.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: "3.0.0"
info:
version: "1.3.0"
version: "1.3.1"
title: "Provisioning Engine REST API"
description: Provides FaaS capabilities by leveraging features from OpenNebula. Allows to manage Serverless Runtime instances based on a group of Functions defined on request.

Expand Down
2 changes: 1 addition & 1 deletion src/server/runtime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def self.to_service(client, specification)
merge_template = {
'roles' => []
}
user_template = Function.map_user_template(specification) + "FLAVOURS=\"#{tuple}\""
user_template = Function.map_user_template(specification) + "FLAVOURS=\"#{service_template['ID']}\""

ProvisionEngine::Function::FUNCTIONS.each do |role|
next unless specification[role] && !specification[role]['FLAVOUR'].empty?
Expand Down
2 changes: 1 addition & 1 deletion src/server/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
require 'runtime'
require 'function'

VERSION = '1.3.0'
VERSION = '1.3.1'

############################################################################
# API configuration
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def verify_sr_spec(specification, runtime)
end

# Verify VM.USER_TEMPLATE
expect(vm["#{UT}FLAVOURS"]).to eq(ProvisionEngine::ServerlessRuntime.tuple(specification))
expect(vm["#{UT}FLAVOURS"].to_i >=0).to be(true)

if specification.key?('SCHEDULING')
specification['SCHEDULING'].each do |k, v|
Expand Down

0 comments on commit 1514294

Please sign in to comment.