Orchestrator Function: Copy REST Operations from one REST Host to another REST Host

by Simon Sparks · 5 August 2013

To use this function add it to the class library file named OrchestratorService.ts

GitHub Repository: https://github.com/SimonSparksUK/Orchestrator

Filename: OrchestratorService.ts

Description: Orchestrator Function to Copy REST Operations from one REST Host to another REST Host

Function: RESTHostCopyOperations

publicRESTHostCopyOperations(objRESTHostSource:RESTHost,objRESTHostDestination:RESTHost):void{
letarrRESTOperationName:string[]=objRESTHostSource.getOperations();

arrRESTOperationName.forEach((strRESTOperationName:string):void=>{
letobjRESTOperation:RESTOperation=objRESTHostSource.getOperation(strRESTOperationName);

this.objLogger.info(strRESTOperationName);

objRESTHostDestination.addOperation(objRESTOperation);

RESTHostManager.updateHost(objRESTHostDestination);
});
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like