# You can refer to the below EMCO REST API link to get more details about the JSON payload
# https://wiki.onap.org/display/DW/V2+API+Specification
# Note:- You should update the attribute values for USER_INPUT_XXX parameters
# USER_INPUT_AMCOP_APP_API_URL : here update the amcop installed machine ip with portno(30480).
# ex : http://<amcop server ip>>:30480/middleend
# USER_INPUT_CDS_PY_EXEC_POD_IP : Use below command to get the CDS pyexecutor IP
# kubectl get pods -n onap -o wide | grep dev-cds-py-executor | awk '{print $6}'
# USER_INPUT_GIT_URL - helm chart git repo url ex. "https://gitlab.com/api/v4"
# USER_INPUT_GIT_PROJECT_ID - project id ex."26902714"
# USER_INPUT_GIT_BRANCH - git branch name ex. "main"
# USER_INPUT_GIT_ARCHIVE_FILE_NAME - any tar file name ex. "helm-charts-poc.tar.gz"
# USER_INPUT_GIT_ACCESS_TOKEN - refer main readme to generate the git access token.
# USER_INPUT_PROJECT_NAME - Enter the existing amcop project name.
# USER_INPUT_SERVICE_NAME - Enter the service name ex:"PCEI-AZURE-IOT-SVC"
$ vi request-payload.json
{
"commonHeader": {
"originatorId": "System",
"requestId": "12345678",
"subRequestId": "1234-122346"
},
"actionIdentifiers": {
"mode": "sync",
"blueprintName": "helm-chart-processor",
"blueprintVersion": "9.0.1",
"actionName": "helm-chart-prepare"
},
"payload": {
"helm-chart-prepare-request": {
"cds-py-exec-pod-ip": "USER_INPUT_CDS_PY_EXEC_POD_IP",
"git-url": "USER_INPUT_GIT_URL",
"git-access-token": "USER_INPUT_GIT_ACCESS_TOKEN",
"git-project-id": "USER_INPUT_GIT_PROJECT_ID",
"git-branch-name": "USER_INPUT_GIT_BRANCH",
"git-download-folder": "/opt/app/onap/python/test001",
"git-archive-file-name": "USER_INPUT_GIT_ARCHIVE_FILE_NAME",
"amcop-middle-end-properties": {
"create-composit-app-api-url": "USER_INPUT_AMCOP_APP_API_URL",
"amcop-middle-end-username": "",
"amcop-middle-end-password": ""
},
"amcop-service-information": {
"project-name": "USER_INPUT_PROJECT_NAME",
"service-name": "USER_INPUT_SERVICE_NAME",
"service-description": "USER_INPUT_SERVICE_DESCRIPTION"
},
"helm-charts-info": [{
"helm-chart-folder": "USER_INPUT_HELM_CHART_FOLDER",
"helm-chart-file-name": "USER_INPUT_HELM_CHART_FILE_NAME",
"helm-values-yaml-override-properties": {
"resources.samll.limits.cpu": "USER_INPUT_RESOURCES_SMALL_LIMITES_CPU",
"service.type": "USER_INPUT_SERVICE_TYPE",
"service.internalPort": "USER_INPUT_SERVICE_INTERNALPORT"
}
}]
}
}
}
|