require 'db/mongo/models/stack_template/stack_template_factory' require_relative "request_handler" module Devops module API2_0 module Handler class StackTemplate < RequestHandler def stack_templates Devops::Db.connector.stack_templates end def stack_templates_for_provider provider Devops::Db.connector.stack_templates(provider) end def create_stack_template body template_model = Model::StackTemplateFactory.create(body['provider'], body) Devops::Db.connector.stack_template_insert(template_model) template_model end def get_stack_template id Devops::Db.connector.stack_template(id) end def delete_stack_template id Devops::Db.connector.stack_template_delete id end end end end end