summaryrefslogtreecommitdiffstats
path: root/src/k8splugin/internal/app/instance_test.go
AgeCommit message (Collapse)AuthorFilesLines
2019-10-15Add unit testsKiran Kamineni1-0/+122
Add unit tests for the handler as well as backend status function Issue-ID: MULTICLOUD-675 Change-Id: I4c73e2c18f243702f3e791fec48d4bc5023cafd5 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-08-13Add query parameters support to instance APIKiran Kamineni1-100/+48
Add support for query parameters to find instances with rb-name, rb-version, profile-name as query parameters eg: curl IP:PORT/v1/instance?rb-name=test&rb-version=v1 Issue-ID: MULTICLOUD-662 Change-Id: If68c87885c8b8dd097cbb3860e8c7320310a6ef7 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-07-18Make profile db tags specificKiran Kamineni1-2/+2
Tags used in profile such as metadata are too generic. Instead we are using specific ones with the type prefixed. Issue-ID: MULTICLOUD-730 Change-Id: I2f189d35bc202f4a71e0a92ca5b7188ebfd1cef2 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-07-18Make definition tags specificKiran Kamineni1-2/+2
Tags used in db such as metadata are too generic. Instead we are using specific ones with the type prefixed. Issue-ID: MULTICLOUD-730 Change-Id: Ice76cf743f0782a3d7e76747cde1f0e0b116b14e Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-06-24Change the import paths for go get accessKiran Kamineni1-5/+5
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-05-23Update broker responses to match spec and SOKiran Kamineni1-5/+17
The broker responses need to match the spec and what SO expects as responses. CREATE_COMPLETE instead of CREATED in both POST and GET DELETE now returns a response body GET by name is now supported Name is an alias for vf_module_id which is expected to be provided as an attribute in sdnc_directives in the original POST request Issue-ID: MULTICLOUD-645 Change-Id: Ifeca755a07298d0a858cbe9e80f9ce654d6d21b8 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-05-22Minor change to instance responseKiran Kamineni1-76/+98
Minor change to instance response. Now it includes the full request parameters in the response. Issue-ID: MULTICLOUD-649 Change-Id: Ia4a7e479f842dd580bcfb13aa91dc0b0a456cf25 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-05-15Add find method in instanceKiran Kamineni1-0/+390
Add a find method to get instances based on rbname, version and profile. If only rbname is provided, all instances based on that resource bundle are returned. If only rbname and version are provided, all instances based on that combination are returned. When all three parameters are provided, a single instance that matches them is returned. Issue-ID: MULTICLOUD-613 Change-Id: If63e844c77829211b807ce6cd7c11dad247751fc Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-05-02Create kubeconfig files in kubeconfig dirKiran Kamineni1-4/+29
The connectivity api should allow the creation of kubeconfig files in the kubeconfig dir. Issue-ID: MULTICLOUD-292 Change-Id: I5ecc92622648c6c90b71ffad433a132e191cf4b3 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-19Move configuration into config filesKiran Kamineni1-9/+5
Move k8splugin configuration into config files instead of using environment variables. Issue-ID: MULTICLOUD-579 Change-Id: I7b76d5a14d24f002a8db484097a31fb5e908b6f8 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-16Replace Kind with GroupVersionKindKiran Kamineni1-44/+124
Kind is not unique to track resources in Kubernetes GroupVersionKind is unique. We are just using that to track our data. It is abstracted behind a couple of new types for templates and resources. This change makes a lot of the old kind based operations redundant and simplified. Issue-ID: MULTICLOUD-573 Change-Id: I8f4ded2ba6a0821a8fbd679dc99ce3a44d805524 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-04Use consistent naming for Name and VersionKiran Kamineni1-1/+1
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-03Refactor instance codeKiran Kamineni1-0/+323
Issue-ID: MULTICLOUD-350 Change-Id: I2574d94e4ebada1e138913b2a03549dd90906d7b Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>