Need to update steps parameters inside template programatically
search cancel

Need to update steps parameters inside template programatically

book

Article ID: 234571

calendar_today

Updated On:

Products

CA Release Automation - Release Operations Center (Nolio)

Issue/Introduction

Use Case: We have a deployment template which is common and duplicated across various applications with only difference of parameter values changing for Release Parameters of Share component.

I need to update some parameters programmatically inside step parameters of templates i.e. with a goal to modify the value located in the following path:


Example "Release Parameter" at path

/exportData/template/steps/step name="Init"/server-type/parameters/parameter name="_Shared_Component - Init Release/Others/Artifact_Retrieval_Group - File_Server"

 

Environment

Release : 6.6

Component : CA Release Automation Administration

Cause

  • The deployment template are blue-prints which are nothing but a template mapping various processes into various stages like pre-plan, deployment, rollback etc.
  • The release parameters in questions are not that of deployment template but coming from each process mapped to respective stages in deployment template.
  • As per current design, updating of Release parameters in the deployment template is via UI, as it's one time activity and hence no API exposes this features as of now.
  • However, the creation of deployment template, adding steps etc. are available via API but not updating release parameters (directly) which are the values used by system and when an executable entity i.e. deployment is created from deployment template via deployment plan. 
    • Document for reference: REST API Technical Documentation
    • Swagger Documentation (Installed with product): http://NAC-SERVER:NAC-PORT/datamanagement/apis/public.html#/
createTemplate -  POST /api/{versionId}/applications/{appId}/categories/{categoryId}/templatesdeleteTemplate -  DELETE /api/{versionId}/applications/{appId}/categories/{categoryId}/templates/{templateId}updateTemplate - PUT /api/{versionId}/applications/{appId}/categories/{categoryId}/templates/{templateId}getTemplateSteps - POST /api/{versionId}/applications/{appId}/categories/{categoryId}/templates/{templateId}/get-stepsattachTemplateStep -  POST /api/{versionId}/applications/{appId}/categories/{categoryId}/templates/{templateId}/stepsdetachTemplateStep -  DELETE /api/{versionId}/applications/{appId}/categories/{categoryId}/templates/{templateId}/steps/{stepId}updateTemplateSteps -  PUT /api/{versionId}/applications/{appId}/categories/{categoryId}/templates/{templateId}/steps/{stepId}/update-dependencies
  • The way currently exposed is to use load-manifest API which will change the Release Parameter values of a deployment while creating deployment from deployment plans.
loadManifestToDeploymentPlan - POST /api/{versionId}/load-manifest

Resolution

Use the ROC UI to create the deployment template manually and update parameters values. The parameter values changes is possible via load-manifest that is only for deployment plans and not deployment templates.