From: agrawalgaurav Date: Wed, 13 May 2020 19:03:01 +0000 (+0530) Subject: Test artifacts for applcm. X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=664268ae8b85b111c433e85965e4b054950285f9;p=ealt-edge.git Test artifacts for applcm. Change-Id: I9840ac5fc6f91bfc0b4ce6abbc790a158f6b2d49 --- diff --git a/mecm/mepm/applcm/go.mod b/mecm/mepm/applcm/go.mod deleted file mode 100644 index 11de177..0000000 --- a/mecm/mepm/applcm/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module applcm - -go 1.14 diff --git a/mecm/mepm/applcm/resources/Build-Run.sh b/mecm/mepm/applcm/resources/Build-Run.sh new file mode 100644 index 0000000..b569901 --- /dev/null +++ b/mecm/mepm/applcm/resources/Build-Run.sh @@ -0,0 +1,9 @@ +AppLcm broker compile and build docker image +/applcm/broker/docker-build.sh + + +helmplugin compile and build docker image +/applcm/k8shelm/docker-build.sh + +Run docker images: +run docker-compose file diff --git a/mecm/mepm/applcm/resources/MEPM.postman_collection.json b/mecm/mepm/applcm/resources/MEPM.postman_collection.json new file mode 100644 index 0000000..d61f8fa --- /dev/null +++ b/mecm/mepm/applcm/resources/MEPM.postman_collection.json @@ -0,0 +1,1706 @@ +{ + "info": { + "_postman_id": "74738ee4-546f-4424-b29a-870cf0f98349", + "name": "MEPM", + "description": "The ETSI MEC ISG MEC016 UE Application Interface API described using OpenAPI\n\nContact Support:\n Email: cti_support@etsi.org", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "item": [ + { + "name": "Intefaces", + "item": [ + { + "name": "Mm3 Interface", + "item": [ + { + "name": "UploadAppPackage", + "request": { + "auth": { + "type": "oauth2" + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "multipart/form-data" + }, + { + "key": "", + "value": "multipart/form-data", + "type": "text", + "disabled": true + } + ], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "type": "file", + "src": "/home/root1/akriano-mepm/face_reconigition_app.csar" + } + ], + "options": { + "raw": {} + } + }, + "url": { + "raw": "{{baseUrl}}/ealtedge/mepm/app_pkgm/v1/app_packages", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "ealtedge", + "mepm", + "app_pkgm", + "v1", + "app_packages" + ] + }, + "description": "The PUT method is used to update the callback reference of the existing application context. Upon successful operation, the target resource is updated with new callback reference." + }, + "response": [ + { + "name": "No Content.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "No Content", + "code": 204, + "_postman_previewlanguage": "text", + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "cookie": [], + "body": "" + }, + { + "name": "Unauthorized. It is used when the client did not submit the appropriate credentials.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Unauthorized", + "code": 401, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "Forbidden. The operation is not allowed given the current status of the resource. ", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Forbidden", + "code": 403, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + } + ] + }, + { + "name": "QueryAppPkg user->MEPM", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "auth": { + "type": "oauth2" + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "multipart/form-data" + }, + { + "key": "", + "type": "text", + "value": "multipart/form-data", + "disabled": true + } + ], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "type": "file", + "src": "/home/root1/akriano-mepm/face_reconigition_app.csar" + } + ], + "options": { + "raw": {} + } + }, + "url": { + "raw": "{{baseUrl}}/ealtedge/mepm/app_pkgm/v1/app_packages/b1bb0ce7-ebca-4fa7-95ed-4840d70a1177", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "ealtedge", + "mepm", + "app_pkgm", + "v1", + "app_packages", + "b1bb0ce7-ebca-4fa7-95ed-4840d70a1177" + ] + }, + "description": "The PUT method is used to update the callback reference of the existing application context. Upon successful operation, the target resource is updated with new callback reference." + }, + "response": [ + { + "name": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "No Content.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "No Content", + "code": 204, + "_postman_previewlanguage": "text", + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "cookie": [], + "body": "" + }, + { + "name": "Unauthorized. It is used when the client did not submit the appropriate credentials.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Unauthorized", + "code": 401, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "Forbidden. The operation is not allowed given the current status of the resource. ", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Forbidden", + "code": 403, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + } + ] + }, + { + "name": "DeleteAppPackage user->MEPM", + "request": { + "auth": { + "type": "oauth2" + }, + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "multipart/form-data" + }, + { + "key": "", + "type": "text", + "value": "multipart/form-data", + "disabled": true + } + ], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "type": "file", + "src": "/home/root1/akriano-mepm/face_reconigition_app.csar" + } + ], + "options": { + "raw": {} + } + }, + "url": { + "raw": "{{baseUrl}}/ealtedge/mepm/app_pkgm/v1/app_packages/b1bb0ce7-ebca-4fa7-95ed-4840d70a1177", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "ealtedge", + "mepm", + "app_pkgm", + "v1", + "app_packages", + "b1bb0ce7-ebca-4fa7-95ed-4840d70a1177" + ] + }, + "description": "The PUT method is used to update the callback reference of the existing application context. Upon successful operation, the target resource is updated with new callback reference." + }, + "response": [ + { + "name": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "No Content.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "No Content", + "code": 204, + "_postman_previewlanguage": "text", + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "cookie": [], + "body": "" + }, + { + "name": "Unauthorized. It is used when the client did not submit the appropriate credentials.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Unauthorized", + "code": 401, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "Forbidden. The operation is not allowed given the current status of the resource. ", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Forbidden", + "code": 403, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + } + ] + }, + { + "name": "CreateAppinstance MEO->MEPM", + "request": { + "auth": { + "type": "oauth2" + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"appDId\": \"b1bb0ce7-ebca-4fa7-95ed-4840d70a1177\",\n \"appInstancename\": \"abc\",\n \"appInstanceDescriptor\": \"ID1\"\n}", + "options": { + "raw": {} + } + }, + "url": { + "raw": "{{baseUrl}}/ealtedge/mepm/app_lcm/v1/app_instances", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "ealtedge", + "mepm", + "app_lcm", + "v1", + "app_instances" + ] + }, + "description": "The PUT method is used to update the callback reference of the existing application context. Upon successful operation, the target resource is updated with new callback reference." + }, + "response": [ + { + "name": "Unauthorized. It is used when the client did not submit the appropriate credentials.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Unauthorized", + "code": 401, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "Forbidden. The operation is not allowed given the current status of the resource. ", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Forbidden", + "code": 403, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "No Content.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "No Content", + "code": 204, + "_postman_previewlanguage": "text", + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "InstantiateAppInstance MEO->MEPM", + "request": { + "auth": { + "type": "oauth2" + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"selectedMECHostInfo\": {\n \"hostName\": \"bangalore.com\",\n \"hostId\": \"127.0.0.1\"\n }\n}", + "options": { + "raw": {} + } + }, + "url": { + "raw": "{{baseUrl}}/ealtedge/mepm/app_lcm/v1/app_instances/3aa4b795-92a7-11ea-a837-0242ac160004/instantiate", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "ealtedge", + "mepm", + "app_lcm", + "v1", + "app_instances", + "3aa4b795-92a7-11ea-a837-0242ac160004", + "instantiate" + ] + }, + "description": "The PUT method is used to update the callback reference of the existing application context. Upon successful operation, the target resource is updated with new callback reference." + }, + "response": [ + { + "name": "Unauthorized. It is used when the client did not submit the appropriate credentials.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Unauthorized", + "code": 401, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "Forbidden. The operation is not allowed given the current status of the resource. ", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Forbidden", + "code": 403, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "No Content.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "No Content", + "code": 204, + "_postman_previewlanguage": "text", + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "cookie": [], + "body": "" + }, + { + "name": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + } + ] + }, + { + "name": "QueryAppInstanceInfo MEO->MEPM", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "auth": { + "type": "oauth2" + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": {} + } + }, + "url": { + "raw": "{{baseUrl}}/ealtedge/mepm/app_lcm/v1/app_instances/f74d49a0-9223-11ea-a242-68f7281fe142", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "ealtedge", + "mepm", + "app_lcm", + "v1", + "app_instances", + "f74d49a0-9223-11ea-a242-68f7281fe142" + ] + }, + "description": "The PUT method is used to update the callback reference of the existing application context. Upon successful operation, the target resource is updated with new callback reference." + }, + "response": [ + { + "name": "Unauthorized. It is used when the client did not submit the appropriate credentials.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Unauthorized", + "code": 401, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "No Content.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "No Content", + "code": 204, + "_postman_previewlanguage": "text", + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "cookie": [], + "body": "" + }, + { + "name": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "Forbidden. The operation is not allowed given the current status of the resource. ", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Forbidden", + "code": 403, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + } + ] + }, + { + "name": "TerminateAppIns MEO->MEPM", + "request": { + "auth": { + "type": "oauth2" + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": {} + } + }, + "url": { + "raw": "{{baseUrl}}/ealtedge/mepm/app_lcm/v1/app_instances/f74d49a0-9223-11ea-a242-68f7281fe142/terminate", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "ealtedge", + "mepm", + "app_lcm", + "v1", + "app_instances", + "f74d49a0-9223-11ea-a242-68f7281fe142", + "terminate" + ] + }, + "description": "The PUT method is used to update the callback reference of the existing application context. Upon successful operation, the target resource is updated with new callback reference." + }, + "response": [ + { + "name": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "Forbidden. The operation is not allowed given the current status of the resource. ", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Forbidden", + "code": 403, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "Unauthorized. It is used when the client did not submit the appropriate credentials.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Unauthorized", + "code": 401, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "No Content.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "No Content", + "code": 204, + "_postman_previewlanguage": "text", + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "cookie": [], + "body": "" + }, + { + "name": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + } + ] + }, + { + "name": "DeleteAppInstanceIdentifier MEO->MEPM", + "request": { + "auth": { + "type": "oauth2" + }, + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": {} + } + }, + "url": { + "raw": "{{baseUrl}}/ealtedge/mepm/app_lcm/v1/app_instances/{{ID}}", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "ealtedge", + "mepm", + "app_lcm", + "v1", + "app_instances", + "{{ID}}" + ] + }, + "description": "The PUT method is used to update the callback reference of the existing application context. Upon successful operation, the target resource is updated with new callback reference." + }, + "response": [ + { + "name": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "No Content.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "No Content", + "code": 204, + "_postman_previewlanguage": "text", + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "cookie": [], + "body": "" + }, + { + "name": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Not Found", + "code": 404, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "Forbidden. The operation is not allowed given the current status of the resource. ", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Forbidden", + "code": 403, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + }, + { + "name": "Unauthorized. It is used when the client did not submit the appropriate credentials.", + "originalRequest": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/app_contexts/:contextId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "app_contexts", + ":contextId" + ], + "variable": [ + { + "key": "contextId" + } + ] + } + }, + "status": "Unauthorized", + "code": 401, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/problem+json" + } + ], + "cookie": [], + "body": "{\n \"type\": \"\",\n \"title\": \"\",\n \"status\": \"\",\n \"detail\": \"\",\n \"instance\": \"\"\n}" + } + ] + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + } + ], + "protocolProfileBehavior": {} + } + ], + "variable": [ + { + "id": "baseUrl", + "key": "baseUrl", + "value": "http://127.0.0.1:8081/mx2/v2", + "type": "string" + } + ], + "protocolProfileBehavior": {} +} \ No newline at end of file diff --git a/mecm/mepm/applcm/resources/README.md b/mecm/mepm/applcm/resources/README.md new file mode 100644 index 0000000..cde1404 --- /dev/null +++ b/mecm/mepm/applcm/resources/README.md @@ -0,0 +1,2 @@ +This folder contains test artifacts to try out applcm in local machine +Note: For production k8s based deployment will be used, this folder is just for local testing. \ No newline at end of file diff --git a/mecm/mepm/applcm/resources/akriano-mepm.postman_environment.json b/mecm/mepm/applcm/resources/akriano-mepm.postman_environment.json new file mode 100644 index 0000000..94bd4bd --- /dev/null +++ b/mecm/mepm/applcm/resources/akriano-mepm.postman_environment.json @@ -0,0 +1,14 @@ +{ + "id": "133f53c6-e57a-4541-a3d2-48647d6c2d92", + "name": "akriano-mepm", + "values": [ + { + "key": "baseUrl", + "value": "https://172.60.2.21:30233", + "enabled": true + } + ], + "_postman_variable_scope": "environment", + "_postman_exported_at": "2020-05-10T16:58:23.211Z", + "_postman_exported_using": "Postman/7.16.1" +} \ No newline at end of file diff --git a/mecm/mepm/applcm/resources/docker-compose.yaml b/mecm/mepm/applcm/resources/docker-compose.yaml new file mode 100644 index 0000000..300bef3 --- /dev/null +++ b/mecm/mepm/applcm/resources/docker-compose.yaml @@ -0,0 +1,85 @@ +# yamllint disable +version: '3.3' + +networks: + bridge: + external: true + +services: + db: + network_mode: bridge + image: mysql:5.7 + environment: + MYSQL_DATABASE: 'db' + # So you don't have to use root, but you can if you like + MYSQL_USER: 'root' + # You can use whatever password you like + MYSQL_PASSWORD: 'password' + # Password for root access + MYSQL_ROOT_PASSWORD: 'password' + ports: + # : < MySQL Port running inside container> + - '3306:3306' + expose: + # Opens port 3306 on the container + - '3306' + # Where our data will be persisted + volumes: + - my-db:/var/lib/mysql + - /var/lib/mysql + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" + ################################################################################# + applcm-brk: + network_mode: bridge + image: ealtedge/applcm-broker:latest + depends_on: + - db + - helm-plugin + links: + - db:dbhost + - helm-plugin:helm.plugin + restart: always + container_name: applcm-brk + environment: + MYSQL_DATABASE: 'db' + # So you don't have to use root, but you can if you like + MYSQL_USER: 'root' + # You can use whatever password you like + MYSQL_PASSWORD: 'password' + # Password for root access + MYSQL_ROOT_PASSWORD: 'password' + HELM_PLUGIN_PORT: '50051' + KUBERNETES_PLUGIN_PORT: '50052' + ports: + # : < Applcm Broker Port running inside container> + - '28081:8081' + expose: + # Opens port 8081 on the container + - '8081' + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" + ################################################################################# + helm-plugin: + network_mode: bridge + image: ealtedge/helmplugin:latest + restart: always + container_name: helmplugin + ports: + # : < Applcm helm plugin Port running inside container> + - '50051:50051' + expose: + # Opens port 50051 on the container + - '8089' + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" +# yamllint enable diff --git a/mecm/mepm/applcm/resources/local-setup b/mecm/mepm/applcm/resources/local-setup new file mode 100644 index 0000000..bc32338 --- /dev/null +++ b/mecm/mepm/applcm/resources/local-setup @@ -0,0 +1,28 @@ + +MIKI kube install: +curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \ +&& chmod +x minikube +sudo mkdir -p /usr/local/bin/ +sudo install minikube /usr/local/bin/ +minikube start + +sudo minikube start --driver=docker + +Kubectl install: +curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl +chmod +x ./kubectl +sudo mv ./kubectl /usr/local/bin/kubectl + + +copy from local envi to helmplugin docker to the same location in docker +/home/root1/.minikube/profiles/minikube/client.crt +/home/root1/.minikube/profiles/minikube/client.key +/home/root1/.minikube/ca.crt + +Copy kubeconfig: +.kube/config to /go/release/kubeconfig/{hostIp} + + + + + diff --git a/mecm/mepm/applcm/resources/sample_app.csar b/mecm/mepm/applcm/resources/sample_app.csar new file mode 100644 index 0000000..4472b8d Binary files /dev/null and b/mecm/mepm/applcm/resources/sample_app.csar differ