Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SERVICE_TEMPLATE_ID for USER_TEMPLATE.FLAVOURS #41

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading