aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2019-05-16Merge "Move config to app and connect to instance"Bin Yang5-21/+60
2019-05-16Merge "Add find method in instance"Bin Yang2-0/+433
2019-05-16Merge "Variable used before intialization"Bin Yang1-3/+3
2019-05-16Merge "Change format of the network file"Bin Yang6-55/+27
2019-05-15Move config to app and connect to instanceKiran Kamineni5-21/+60
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-05-15Add find method in instanceKiran Kamineni2-0/+433
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-15Remove extra v1 from broker pathKiran Kamineni2-8/+7
Remove extra v1 from path as it is added in the MSB api anyway. Issue-ID: MULTICLOUD-630 Change-Id: Ib7adbf2315e0a3b1fe8170096d877df8f1b64683 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-05-14Variable used before intializationRitu Sood1-3/+3
Initialize variable before using Change-Id: Id908b27d6e17692de4ad3a60e84cd00b496133b9 Signed-off-by: Ritu Sood <ritu.sood@intel.com> Issue-ID: MULTICLOUD-304
2019-05-14Change format of the network fileRitu Sood6-55/+27
Format of network file is different between KUD and Plugin. Change the format to match the format in KUD Change-Id: I360741b23e91e60d790a50a7eeb213576b0508b3 Signed-off-by: Ritu Sood <ritu.sood@intel.com> Issue-ID: MULTICLOUD-304
2019-05-06Make service port configurable0.1.0Kiran Kamineni2-1/+4
Service port should be configurable. This patch removes the hardcoded value. The default value is 9015 Issue-ID: MULTICLOUD-609 Change-Id: Iae05f42bd06ecd061ec68a3a7c4a4a87f33b22fa Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-05-02Create kubeconfig files in kubeconfig dirKiran Kamineni6-21/+150
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-05-01Merge cloudregionid and connectionnameKiran Kamineni2-15/+8
Merge cloudregionid and connectionname to form cloudregion Issue-ID: MULTICLOUD-292 Change-Id: If775ec5841636de37e1c10bc6d093c16a36c28dc Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-26Merge "Use the unstructured type for decode"Bin Yang2-10/+4
2019-04-25Adding healthcheck for OOM testingKiran Kamineni4-0/+100
Add a heathcheck endpoint for OOM testing Issue-ID: ONAPARC-363 Change-Id: Id5f77478d331fedb19ac162389d95852e10c5022 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-25Use the unstructured type for decodeKiran Kamineni2-10/+4
Use the unstructured type in the into field. This allows us to remove the convert part of the code and also allows decoding for CRDs. Issue-ID: MULTICLOUD-585 Change-Id: I27ecdba7127ce63137dfbcd1c0a6938343b4e759 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-25Updated go.sum created from 1.12.4Kiran Kamineni1-71/+7
Updated go.sum generated from build based on 1.12.4 Issue-ID: MULTICLOUD-587 Change-Id: I92474c20cc58f2b3e7d0085ed57548c19aa896d8 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-23Remove deployment pluginKiran Kamineni2-381/+0
The deployment plugin does not support managing resources based on the old v1beta1 resource path. This is supported by the generic plugin. We will re-enable this plugin if there is a need for special actions for deployments. Issue-ID: MULTICLOUD-583 Change-Id: I20515fe1a4aadaf575f0cc798000d03d1bca0663 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-19Move configuration into config filesKiran Kamineni10-43/+197
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-17Support non-namespaced objects in generic pluginKiran Kamineni1-3/+20
Generic plugin is not generic enough right now. It was assuming that objects are namespaced. This patch supports both types based on the Scope field in the mapping. Issue-ID: MULTICLOUD-557 Change-Id: I3ac512243d183b26cbf0aea2962dcd2a6492c887 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-16Replace Kind with GroupVersionKindKiran Kamineni13-261/+509
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-16Rename plugin reference interfaceKiran Kamineni1-7/+8
Rename the plugin interface to something more relevant. KubernetesResource will be used to describe resources for creation. Issue-ID: MULTICLOUD-557 Change-Id: I2fff5363b897b968e95b26257d8f26509fb567fd Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-15Fix build errorKiran Kamineni1-3/+3
Build is broken because of some changes that were merged without being rebased on dependent patches. Issue-ID: MULTICLOUD-350 Change-Id: If8bd455103dea3191fedb39ea525efaafb145953 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-12Merge "Add Connectivity Info API"Bin Yang3-0/+256
2019-04-12Merge "Day 2 Configuration API's"Bin Yang16-14/+1966
2019-04-11Add Connectivity Info APIrsood3-0/+256
API to add connectivity information for Cloud Regions to K8s Plugin https://wiki.onap.org/display/DW/MultiCloud+K8s-Plugin-service+API%27s Change-Id: I0a9166df9b076a7fdacf0b2f9e51a9cdebe4b621 Signed-off-by: rsood <ritu.sood@intel.com> Issue-ID: MULTICLOUD-292 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-11Merge "Add support for so integration"Bin Yang3-0/+395
2019-04-11Add support for so integrationKiran Kamineni3-0/+395
Add support for the multicloud-api that is called by SO for instantiation. Issue-ID: MULTICLOUD-350 Change-Id: Icf9137dae9796ac256c3319b49af6c30b275a4a9 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-11Merge "Add option to start https listener"Bin Yang6-1/+214
2019-04-10Add option to start https listenerKiran Kamineni6-2/+215
Added support for tls connection for k8splugin. It will load the certificates from its current folder. Any installer needs to just put these files in the same folder as the executable and it will pick them up and start in https mode. Issue-ID: MULTICLOUD-570 Change-Id: I505135daa3933b76023c941e7bee54be65fa791f Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-11Day 2 Configuration API'srsood16-14/+1966
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-10Add support for generic pluginKiran Kamineni4-5/+239
Add support for generic kinds We are currently using a known map to find the group version resource for a kind. Issue-ID: MULTICLOUD-350 Change-Id: I5a64f73760b73cf92b9a3fab8c22ad54e0a5f84f Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-10Export kubernetesClientKiran Kamineni3-12/+12
Export kubernetesClient. There are situations where this will need to be accessed in the plugins and we need the definition to be exported for that. Issue-ID: MULTICLOUD-350 Change-Id: I9eee03ea77e390effd33ed96cbbc25dc4cd09cdd Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-04Use consistent naming for Name and VersionKiran Kamineni6-58/+59
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 Kamineni2-27/+9
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-04Merge "Add url path tests to definition handler"Bin Yang1-33/+38
2019-04-04Merge "Add url path tests to profile handler"Bin Yang1-49/+45
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-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-04-03Refactor instance codeKiran Kamineni16-1412/+1157
Issue-ID: MULTICLOUD-350 Change-Id: I2574d94e4ebada1e138913b2a03549dd90906d7b Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-02Merge "Make profile key explicit"Victor Morales7-44/+44
2019-04-01Remove build tagsKiran Kamineni18-46/+5
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 Kamineni7-44/+44
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-29Fix merge issueKiran Kamineni1-2/+2
The TestUpdate method was updated properly with the merge on to master. This fixes that issue. Issue-ID: MULTICLOUD-553 Change-Id: I97c95b628fade37304590de59bb4bb6faaeb4450 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-03-29Merge "Add update method to db interface"Bin Yang5-1/+132
2019-03-27Add update method to db interfaceKiran Kamineni5-1/+132
Add update interface to the db. This will allow us to support PUT http methods in the future. Issue-ID: MULTICLOUD-553 Change-Id: I7263d42e893734eadbdaf78022005d6004601772 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-03-26Update definition and profile to latest specKiran Kamineni19-660/+830
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-26Merge "Fix namespace creation"Bin Yang1-4/+1
2019-03-25Fix namespace creationRitu Sood1-4/+1
Namespace is being created by k8splugin if it doesn't exist. This is done before other resources are created in kubernetes. This patch removes check that failed if namespace didn't exist Change-Id: I8c5b2409ad1cf77d5f529f601870fcf87e8e8760 Signed-off-by: Ritu Sood <ritu.sood@intel.com> Issue-ID: MULTICLOUD-462
2019-03-25Add support for composite keysKiran Kamineni9-158/+236
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-22Use httptest instead of http in unit testsKiran Kamineni6-152/+105
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>