Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

PCEI R4 API Document is located at this link.

PCEI Release 5 APIs

North Bound Interface APIs for:

...

Code Block
languagejava
# 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"
			}
		}]
	}
  }
}

Service Instance creation and App deployment onto target Kubernetes clusters API


Code Block
languagejava
{
  "actionIdentifiers": {
	"mode": "sync",
	"blueprintName": "composite-app-deploy-processor",
	"blueprintVersion": "1.0.0",
	"actionName": "simple-composite-app-deploy-workflow"
  },
  "commonHeader": {
    "subRequestId": "143748f9-3cd5-4910-81c9-a4601ff2dc58",
    "requestId": "e5eb1f1e-3386-435d-b290-d49d8af8da4c",
	"originatorId": "SDNC_DG"
  },
  "payload": {
	"simple-composite-app-deploy-workflow-request": {
	  "composite-app-deploy-input-params": {
		"composite-application-parameters": {
		  "service-instance-name": "USER_INPUT_TARGET_CLUSTER_NAME",
		  "service-instance-description": "USER_INPUT_TARGET_CLUSTER_DESCRIPTION",
		  "service-instance-version": "USER_INPUT_TARGET_CLUSTER_VERSION",
		  "composite-app": "USER_INPUT_COMPOSITE_APP_NAME",
		  "composite-app-version": "USER_INPUT_COMPOSITE_APP_VERSION",
		  "composite-profile": "USER_INPUT_COMPOSITE_PROFILE"
		},
		"application-data-parameters": [{
		  "app-metadata-parameters": {
			"app-name": "USER_INPUT_APP_NAME"
		  },
		  "target-cluster-provider-parameters": [{
			"cluster-provider-name": "USER_INPUT_PROVIDER_NAME",
			"clusters": [{
			  "name": "USER_INPUT_CLUSTER_NAME"
			}]
		  }]
		}],
		"application-override-parameters": [{
			"app-name": "USER_INPUT_APP_NAME",
			"values": {
				"USER_INPUT_VARIABLE_NAME": "USER_INPUT_VARIABLE_VALUE"
			}
		}]
	    },
		"amcop-middle-end-properties": {
			"deploy-intent-group-api-url": "USER_INPUT_AMCOP_APP_API_URL",
			"amcop-middle-end-username": "",
			"amcop-middle-end-password": ""
		},
	    "amcop-service-project-name": "USER_INPUT_AMCOP_SERVICE_PROJECT_NAME"
	}
  }
}

PCEI R5 API Postman Collection

https://gitlab.com/akraino-pcei-onap-cds/equinix-pcei-poc/-/tree/main/postman-collections