aboutsummaryrefslogtreecommitdiffstats
path: root/src/k8splugin/rb
AgeCommit message (Collapse)AuthorFilesLines
2019-01-25Use a standard Go project layoutVictor Morales6-1326/+0
This project wasn't following some Standard Go Project Layout guidelines(https://github.com/golang-standards/project-layout). This change pretends to organize the source code and following those guidelines. Change-Id: I61085ac20f28069cede013f83034bed06892d87c Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-ID: MULTICLOUD-301
2019-01-25Add another parameter to the definitionKiran Kamineni1-0/+1
Add a ChartName parameter to definition This is need to explicitly specify the chart name to be used within the tar file. Issue-ID: MULTICLOUD-291 Change-Id: I3d6e20607b74e54801622a6c27d5674777548ee1 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-01-23Add support for tags in the mockdbKiran Kamineni2-76/+100
Add support for tags in mockdb. Needed for supporting unit tests where a method does multiple db calls using same uuid but different tags. Eg: Download methods Issue-ID: MULTICLOUD-455 Change-Id: I4eff8eeb00eac630205e4e186981a53a573b61fa Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-01-22Merge "Fix sorting with right index value"Victor Morales2-4/+4
2019-01-18Fix sorting with right index valueKiran Kamineni2-4/+4
Fix the less function used in sort.Slice with the right index. I am using the same index which obviously will not work. Issue-ID: MULTICLOUD-439 Change-Id: Ibb78c03d67cf59e3941acc786796d0cc69b4f0aa Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-01-18Delete content when a definition is deletedKiran Kamineni1-0/+6
When a definition is deleted, delete the content too. Not deleting the content would leave blobs of data that is not connected to any metadata in the mongo database. Issue-ID: MULTICLOUD-393 Change-Id: Ifae55bab0affc22b06b1069a27cd90af6f7d5d98 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-01-18Merge "Add resource bundle profile api"Victor Morales4-5/+606
2019-01-17Add resource bundle profile apiKiran Kamineni4-5/+606
Add CRUD api for uploading profiles for specific definition resource bundles. - Adding unit tests Issue-ID: ONAPARC-348 Change-Id: Ic43724b4e2c035e7989c827612f1b2800fc49a69 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-01-17Minor refactoring of definition unit testsKiran Kamineni1-6/+18
The definition unit tests needed some small changes to ensure consistency between the source and the tests. P3: Sort both the slices before running DeepEqual Issue-ID: MULTICLOUD-440 Change-Id: If797322e44321a580cb1441bd5c60b812799f844 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-01-16Fix order of db create callKiran Kamineni1-1/+1
definition upload code call db create in wrong order This patch fixes that. Issue-ID: MULTICLOUD-438 Change-Id: I7c60308c89b35583bb739cf98e8106f1c738a143 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2018-12-14Migrating from consul to mongodb for backendKiran Kamineni2-66/+46
Migrating to mongodb from consul. The main reason being the value size limitation of 512kb in consul. See https://jira.onap.org/browse/MULTICLOUD-426 for details. This requires a little bit of hierarchy management and data management. We are no longer converting structs to json encoded strings. The underlying db supports structs without any modifications. Also, since Mongo has the concept of collections, each submodule can use its own collection for storage as needed. Definition uses a collection called rbdef right now. P10: Enabling unit tests for mongo.go. This requires the usage of aliased functions. P11: Expanded unit tests for all functions in mongo.go P12: Refactored parameter validation. Removed TestHealthCheck as we are not mocking any of the db commands right now Checking return value of read with an expected value P13: Adding back consul support. Fixing functional test Full consul implementation check and modifications is being tracked by MULTICLOUD-427 P15: Fix ReadAll unit test and corresponding code ReadAll now returns error when no objects are found Issue-ID: MULTICLOUD-426 Change-Id: I42d239b324025fc4ef4e561790aceeff794001ef Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2018-11-21Add upload backend implementationKiran Kamineni4-2/+307
Upload is a seperate API where it takes a binary stream and stores it. The api supports tar.gz file format only. P2: Check if ID is valid before trying upload Add test with an invalid ID Issue-ID: MULTICLOUD-393 Change-Id: Id636a95823a046e1795d3be72d0214e953a8c5fc Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2018-11-19Reconcile names in code and Jira itemsKiran Kamineni2-0/+397
k8splugin manages deployment of resource bundles and these are not restricted to vnfs. This names' change is to reflect that functionality. P2: using rb instead of resource bundle Issue-ID: MULTICLOUD-410 Change-Id: I09e0b92a8fc13562e1c6bb17dc8bc13de97264d7 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>