/* * Copyright 2018 Brigham Young University * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ import { BindContext, DeployContext, PreDeployContext, ServiceConfig, ServiceContext, UnBindContext, UnDeployContext, UnPreDeployContext } from 'handel-extension-api'; import * as winston from 'winston'; export async function preDeployNotRequired(serviceContext: ServiceContext): Promise { winston.debug(`${serviceContext.serviceType} - PreDeploy is not required for this service, skipping it`); return new PreDeployContext(serviceContext); } export async function bindNotRequired(ownServiceContext: ServiceContext, dependentOfServiceContext: ServiceContext): Promise { winston.debug(`${ownServiceContext.serviceType} - Bind is not required for this service, skipping it`); return new BindContext(ownServiceContext, dependentOfServiceContext); } export async function deployNotRequired(ownServiceContext: ServiceContext): Promise { winston.debug(`${ownServiceContext.serviceType} - Deploy is not required for this service, skipping it`); return new DeployContext(ownServiceContext); } export async function unPreDeployNotRequired(ownServiceContext: ServiceContext): Promise { winston.debug(`${ownServiceContext.serviceType} - UnPreDeploy is not required for this service`); return new UnPreDeployContext(ownServiceContext); } export async function unBindNotRequired(ownServiceContext: ServiceContext, dependentOfServiceContext: ServiceContext): Promise { winston.debug(`${ownServiceContext.serviceType} - UnBind is not required for this service`); return new UnBindContext(ownServiceContext, dependentOfServiceContext); } export async function unDeployNotRequired(ownServiceContext: ServiceContext): Promise { winston.debug(`${ownServiceContext.serviceType} - UnDeploy is not required for this service`); return new UnDeployContext(ownServiceContext); }