aboutsummaryrefslogtreecommitdiffstats
path: root/src/dcm/api
AgeCommit message (Collapse)AuthorFilesLines
2020-10-01Subtle refactoring in a few functionsIgor D.C6-93/+178
In DCM. Essentially refactored two different areas: - rename apply/terminate functions in module to clarify what they do - split gets from getAlls in API code of the 5 DCM resource types And cleaned up here and there. Issue-ID: MULTICLOUD-1143 Change-Id: I9b72c77ba34a1febd5df4a339e87968ddc4a7891 Signed-off-by: Igor D.C <igor.duarte.cardoso@intel.com>
2020-09-30Merge "Implement Kubeconfig endpoint in DCM"Ritu Sood2-11/+45
2020-09-29Use project name provided by API in DCMIgor D.C1-4/+14
DCM apply/terminate code was still using a hardcoded "test-project" string for the project name that logical clouds should associate to. This simple patch makes DCM use the project name provided by the API. It also checks that the project exists before creating a Logical Cloud. Issue-ID: MULTICLOUD-1143 Change-Id: I05c8a2309ed07a7c96da30bf2461c43abaccc9d5 Signed-off-by: Igor D.C <igor.duarte.cardoso@intel.com>
2020-09-29Implement Kubeconfig endpoint in DCMIgor D.C2-11/+45
The /kubeconfig API path allows a client to retrieve a kubeconfig file for a specified cluster reference of a logical cloud. - includes CA cert, address, user private key and signed cert. This commit includes the "lazy-loading" implementation of certificate retrieval per cluster from Rsync (which happens when clients call). The certificate is read from the cluster status in appcontext. Thus, Monitor and Rsync need to be configured and running. Issue-ID: MULTICLOUD-1143 Change-Id: Ie94cd128e14c8a944861eced2bdc886d95fab6ed Signed-off-by: Igor D.C <igor.duarte.cardoso@intel.com>
2020-09-26Add a couple of sanity checks in DCMIgor D.C1-0/+7
When applying, check whether logical cloud is already applied. When deleting logical cloud, check if it exists. Issue-ID: MULTICLOUD-1143 Change-Id: I6aa11d8921db76e3d9e9632f915b55fe7ab8efab Signed-off-by: Igor D.C <igor.duarte.cardoso@intel.com>
2020-09-25Implement Terminate operation in DCMIgor D.C2-0/+52
Also makes minor changes to non-terminate code as a side-effect of supporting the new Terminate operation (such as including tagContext in the LogicalCloudClient implementation of LogicalCloudManager interface). These changes are/will also be leveraged by other operations. Issue-ID: MULTICLOUD-1143 Change-Id: Idbd2ec9f6cf0e5584a0f51cf4c16144db56d9fa0 Signed-off-by: Igor D.C <igor.duarte.cardoso@intel.com>
2020-09-25Enhance error handling and HTTP codes in DCMIgor D.C5-5/+57
This improves error handling between DCM and the database resources and adds/corrects a lot more HTTP return codes in the API, respectively. Issue-ID: MULTICLOUD-1143 Change-Id: I3abc8025660e042f4c946f8bbfd280e1eb4c9583 Signed-off-by: Igor D.C <igor.duarte.cardoso@intel.com>
2020-08-05DCM - fix code formatting via vscode (II)Igor D.C4-472/+472
Part two of fixing code format/syntax with Visual Studio Code. Furthermore, also switched line endings from CRLF to LF (all test files seemed to be ending this way, unlike the other Go files). Issue-ID: MULTICLOUD-1143 Signed-off-by: Igor D.C <igor.duarte.cardoso@intel.com> Change-Id: Iaae868c780a42ea82ca1208e3cbdc3ec6ffd1f97
2020-07-28DCM - fix code formatting via vscodeIgor D.C2-279/+277
Visual Studio Code automatic code formatting was performed on the 4 modified DCM files. Issue-ID: MULTICLOUD-1143 Signed-off-by: Igor D.C <igor.duarte.cardoso@intel.com> Change-Id: I24d2b44181b5c0737df7cb4541f9eede0950211a
2020-04-20Implement Apply API for DCMItohan2-13/+46
This implents the Apply API. When the apply API is called, this reads from mongodb and creates resources in ETCD Issue-ID: MULTICLOUD-996 Signed-off-by: Itohan Ukponmwan <itohan.ukponmwan@intel.com> Change-Id: I5b9c8b44673e66296d1339b5b3f4afc5f4cae9cc
2020-04-10Add Distributed Cloud Managerenyinna12346-0/+965
This handles RESTful API CRUD operations for logical clouds, CLuster, User Permissions, Quota, and Key Value pairs. See: https://wiki.onap.org/x/tAiVB Issue-ID: MULTICLOUD-996 Signed-off-by: Enyinna Ochulor <enyinna.ochulor@intel.com> Change-Id: I654a304cd682f762c02cfd92b4483d1edea63fca