summaryrefslogtreecommitdiffstats
path: root/src/k8splugin/internal/rb
AgeCommit message (Collapse)AuthorFilesLines
2019-07-23Merge "Add a listallhandler to definitions api"Bin Yang1-1/+4
2019-07-18Add list api for profilesKiran Kamineni2-1/+137
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-07-18Add a listallhandler to definitions apiKiran Kamineni1-1/+4
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-07-18Make profile db tags specificKiran Kamineni2-11/+11
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 Kamineni3-17/+17
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-07-11Create dir before extracting archiveKiran Kamineni1-0/+7
Some archives don't include a directory entry. Eg: tgz archives generated by helm package. This bug fix checks that a directory exists before an extracted file is created there. Issue-ID: MULTICLOUD-705 Change-Id: If6720948d470b83786901574f5d8d3227835a047 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-06-24Change the import paths for go get accessKiran Kamineni5-6/+6
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-15Move config to app and connect to instanceKiran Kamineni3-1134/+0
Move config instantiation to app and connect it to the instance to allow updates and so on. Issue-ID: MULTICLOUD-464 Change-Id: Ic994ef78a6e0d2db5e695e33b7b8a302c74c10da Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-16Replace Kind with GroupVersionKindKiran Kamineni2-31/+31
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-11Day 2 Configuration API'srsood4-0/+1391
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 Kamineni3-37/+38
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-02Merge "Make profile key explicit"Victor Morales2-33/+33
2019-04-01Remove build tagsKiran Kamineni3-6/+0
Remove build tags as this is causing issues where mock plugins need to be loaded into files that do unit testing as well. Full integration testing is being done in the CSIT. Issue-ID: MULTICLOUD-559 Change-Id: Icd147dac80d16a6fb8f33048c76d4083158cecd2 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-03-29Make profile key explicitKiran Kamineni2-33/+33
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 Kamineni4-377/+389
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-25Add support for composite keysKiran Kamineni2-12/+36
Composite keys help us store objects which are unique for a given set of pre-existing objects. Eg: Many profiles can exist for a definition and its key will have a definition name as a part of the composite key. P2: Use a predefined interface for keys instead of generic interfaceP{} P3: Add check for empty strings in stringer interface P5: Add appropriate keys in other packages. Issue-ID: MULTICLOUD-531 Change-Id: I314b1fbd718489ae8a45f0f38915c08ca32f9f43 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-03-19Bring in all the other helper codeKiran Kamineni2-0/+215
Bring in all the helper functions added for end to end integration. This allows the api level upload of helm charts, profiles and also instantiation of said helm charts. P3: Plugin index is based on lowercase kind name whereas the map contains the correct case for kind. Convert to lower case before loading the plugin. Changes after rebasing on the new folder structure. Rebasing over the new folder structure P8: Add unit tests for Resolve function Fix the integration tests for createvnf I had to add a huge blob of base64 encoded data based on the profile and sample helm chart to test the flow. P12: Update the integration test with the rb_profile_id parameter Issue-ID: MULTICLOUD-291 Change-Id: If04c41cb185074989ab6c96557958140c43e456d Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-03-12Merge "Add support for parsing profile yaml files"Victor Morales3-3/+253
2019-03-11Add support for parsing profile yaml filesKiran Kamineni3-3/+253
Add code to parse profile configuration yaml The parsing function is global and returns a client which can then be used to get or apply specific parts of the configuration on top of an extracted helm chart. P14: Add unit test that covers both ProcessProfileYaml and CopyConfigurationOverrides P15: Adding mock_charts and mock_profiles We expect to reuse these files for other unit tests Issue-ID: ONAPARC-348 Change-Id: I4504d0b158fdfef476b8c2a461d33306926545d7 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-03-11Detect chart nameKiran Kamineni2-4/+128
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-28Add support for downloading contentKiran Kamineni6-2/+400
Add support for downloading content for creating the merged helm charts. This api will be used mainly by the profile api to create a converged chart which will then be created by the instantiation code P2: Add unit tests for archive.go Add download method for profile.go Update comments for download method P3: Add unit test for empty files P4: Add unit tests for Download functions P5: Rebase against new folder structure Issue-ID: MULTICLOUD-291 Change-Id: I9779eaf95366f527f0360eaddea663722c13b196 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-01-25Use a standard Go project layoutVictor Morales6-0/+1326
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