summaryrefslogtreecommitdiffstats
path: root/src/k8splugin/api/profilehandler_test.go
AgeCommit message (Collapse)AuthorFilesLines
2019-07-18Add list api for profilesKiran Kamineni1-0/+101
Add a list api for profiles for a specific definition and version. GET /v1/rb/definition/name/version/profile will list all the profiles. Issue-ID: MULTICLOUD-730 Change-Id: If1b8e6910c276a0f7139ab13340721c6ec8a49e8 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-06-26Move connectionhandler.go into api packageKiran Kamineni1-5/+6
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-4/+4
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 common code for executeRequestKiran Kamineni1-12/+4
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 profile handlerKiran Kamineni1-49/+45
Improve the profile tests by testing the url path parameters as well. Issue-ID: MULTICLOUD-547 Change-Id: Ib31a42cc6c3622d17ddc37eb0506ca991d2334c0 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-03-29Make profile key explicitKiran Kamineni1-4/+4
Using profilename instead of name in the db key protects it from getting overwritten by anything else that might use name as a key. Using explicit key names makes sure that we don't have to add bson structure tags in the code. Issue-ID: MULTICLOUD-558 Change-Id: I9bd6f757496af22d8662b0d114f0ef7d33a5784a Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-03-26Update definition and profile to latest specKiran Kamineni1-117/+29
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-53/+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-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-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-17Add resource bundle profile apiKiran Kamineni1-0/+422
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>