aboutsummaryrefslogtreecommitdiffstats
path: root/src/k8splugin/api/defhandler_test.go
AgeCommit message (Collapse)AuthorFilesLines
2019-07-18Add a listallhandler to definitions apiKiran Kamineni1-0/+80
GET calls to the v1/rb/definition will return all definitions and their versions Issue-ID: MULTICLOUD-715 Change-Id: Ia0951ac83283830e475bf727e7d5ced7aab3add2 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-06-26Move connectionhandler.go into api packageKiran Kamineni1-6/+7
Move connectionhandler.go into api package This brings it inline with the other API handlers Issue-ID: MULTICLOUD-666 Change-Id: Ia3b832159f537c6d8d8ecc93b56bc9b085649f7e Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-06-24Change the import paths for go get accessKiran Kamineni1-1/+1
This allows other projects to do a go get and use this repo. go get github.com/multicloud-k8s/src/k8splugin will do the job. import github.com/multicloud-k8s/src/k8splugin will import the root package Issue-ID: MULTICLOUD-666 Change-Id: I2f41c88c5a7fb3305b78cce8a83a0e102baa444c Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-11Day 2 Configuration API'srsood1-5/+5
This patch adds Configuration API's https://wiki.onap.org/display/DW/MultiCloud+K8s-Plugin-service+API%27s Change-Id: I52ebfc5aa980ec8af4a31569d569216e9a2a760c Issue-ID: MULTICLOUD-464 Signed-off-by: rsood <ritu.sood@intel.com>
2019-04-04Use consistent naming for Name and VersionKiran Kamineni1-18/+18
Definition Name and Definition Version are now using the consistent naming similar to the Profile and instance structure. Name becomes RBName Version becomes RBVersion Issue-ID: MULTICLOUD-350 Change-Id: Ifc329d4979a06cb017c6f9d916c227c696b664e0 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-04Use common code for executeRequestKiran Kamineni1-15/+5
Use the common executeRequest function instead of multiple copies of the same lines for test requests Issue-ID: MULTICLOUD-557 Change-Id: Icde498b55592333af265fc348f3a286a59b9b61c Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-03Add url path tests to definition handlerKiran Kamineni1-33/+38
Url path parameters are not tested in the current unit tests. This is fixed with the use of the same router that is used by the main program. Issue-ID: MULTICLOUD-547 Change-Id: Ie162150fb1ecf22766011339e68e03f1067779a0 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-03-26Update definition and profile to latest specKiran Kamineni1-43/+53
Bringing all the definition and profile code upto the latest spec. Integrated the end to end instance code changes that were made. P9: Added updated plugin.sh with updated uri paths based on spec Issue-ID: MULTICLOUD-291 Change-Id: Id6e3c6bc2cd02cfb7005e203ccf03e0793b97e95 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-03-22Use httptest instead of http in unit testsKiran Kamineni1-56/+31
Use httptest instead of http in unit tests similar to: https://golang.org/pkg/net/http/httptest/#example_ResponseRecorder Update empty body checking to account for change Issue-ID: MULTICLOUD-545 Change-Id: Ib9775078c2c9ae2878b714363b569d8d79bd7698 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-03-11Detect chart nameKiran Kamineni1-10/+0
ChartName should not be mandatory field If not provided it will be detected by inspection of the tar.gz archive. Issue-ID: MULTICLOUD-525 Change-Id: Idaf9672f2cbbb882d78b1987467472ce73c651da Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-01-25Use a standard Go project layoutVictor Morales1-1/+1
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-1/+24
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-18Fix sorting with right index valueKiran Kamineni1-2/+2
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-17Minor refactoring of definition unit testsKiran Kamineni1-5/+17
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>
2018-11-21Add upload backend implementationKiran Kamineni1-0/+65
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 Kamineni1-0/+336
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>