summaryrefslogtreecommitdiffstats
path: root/src/k8splugin/plugins
AgeCommit message (Collapse)AuthorFilesLines
2019-09-05Remove ovn4nfvk8s network pluginKonrad Bańka5-636/+0
As ovn4nfv networks are now handled on k8s side by created CRD, this plugin is no longer necessary. Removed all references to ovn Issue-ID: MULTICLOUD-733 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: I7ad6c6d9b3b4fd8f249796f437e69c7df4e701cc
2019-08-07Add custom label to track created resourcesKiran Kamineni4-1/+34
Create a custom label on created resources Also, create it on pods where pods are being created. This will help us later for filtering and querying pods and resources. Issue-ID: MULTICLOUD-675 Change-Id: I4b4fce7b67f9f27559d99dcca94a9191b96cb7c6 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-08-05Merge "Add static compile time check to plugins"Bin Yang4-1/+14
2019-08-05Merge changes I46d47e64,I14d8eb6bBin Yang2-9/+20
* changes: Add test case for loading vFW Helm chart Correct cni retrieval process from resource name
2019-08-05Merge "Minor improvement to log statements"Bin Yang1-7/+1
2019-08-01Correct cni retrieval process from resource nameKonrad Bańka2-9/+20
Due to some minor issues, network resource name wasn't being parsed properly, thus failing removing ovn networks when deleting VNF instance. Issue-ID: MULTICLOUD-708 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: I14d8eb6b82d0ee74b266272fd8a842b45e6c2b40
2019-07-31Add static compile time check to pluginsKiran Kamineni4-2/+15
Add a static compile time check to plugins to make sure that any interface implementation mismatch is caught at compile time rather than runtime. Issue-ID: MULTICLOUD-666 Change-Id: I7f57774ad9384edb874cf64534f521014aea422f Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-07-22Minor improvement to log statementsKiran Kamineni1-7/+1
Removing some log statements that are cluttering the output. Added a log statement to print errors during instantiation. Issue-ID: MULTICLOUD-666 Change-Id: I76ad59c9cb36b5cb999573afec18e6f1adbed4ad Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-07-22Adapt network plugin to interface restrictionsKonrad Bańka1-5/+5
Network plugin was not fully compliant with interface it should implement due to type of one function argument. Relevant functions have been adapted to utilize proper types. Issue-ID: MULTICLOUD-708 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: Ic619ad476dba5e6582759290e18edceaa98c332f
2019-06-24Change the import paths for go get accessKiran Kamineni9-20/+20
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-06-06Plugin code refactoringKiran Kamineni7-184/+321
The plugin code has been refactored to implement a common interface. This will allow us to do plugin validation at loadtime of the plugin instead of at runtime. This also makes the code calling the plugins cleaner and easier to read. Issue-ID: MULTICLOUD-557 Change-Id: Ice2bcc9b850d7c0e1707dcc42132c63dd77472a7 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-05-24Remove env variableKiran Kamineni1-20/+20
Remove ENV variable. Somehow I missed removing this variable when we moved to configuration files. Issue-ID: MULTICLOUD-653 Change-Id: Ibf2238791dfcb1e66c7b9cca7b6d25e3d30bb0e4 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 Sood5-44/+22
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-04-25Use the unstructured type for decodeKiran Kamineni1-9/+3
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-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-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 Kamineni1-16/+12
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-10Add support for generic pluginKiran Kamineni1-0/+109
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-03Refactor instance codeKiran Kamineni4-9/+2
Issue-ID: MULTICLOUD-350 Change-Id: I2574d94e4ebada1e138913b2a03549dd90906d7b Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-04-01Remove build tagsKiran Kamineni5-10/+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-01-25Use a standard Go project layoutVictor Morales8-44/+47
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
2018-12-05Add Network and OVN4NFV PluginsRitu Sood7-2/+640
This patch includes support for Network Objects through a new plugin. It also add the first sub-module plugin for OVN4NFVK8s support. Change-Id: Ia23c42d50f75a5206e1b6a04052c34e940518428 Signed-off-by: Ritu Sood <ritu.sood@intel.com> Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-ID: MULTICLOUD-303
2018-09-29Merge "Improve Services UTs"Victor Morales1-33/+104
2018-09-29Merge "Improve Namespaces UTs"Victor Morales2-31/+67
2018-09-26Improve Services UTsVictor Morales1-33/+104
The current implementation of Unit Tests for Services wasn't validating sucessful cases properly. This change fix that gap and increase the coverage number. Change-Id: Ib5daa607f38e490ced471a129a5fa71b2d4eb133 Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-ID: MULTICLOUD-301
2018-09-26Improve Deployments UTsVictor Morales1-34/+105
The current implementation of Unit Tests for Deployments wasn't validating sucessful cases properly. This change fix that gap and increase the coverage number. Change-Id: I9b891d700c152c9b57d6b5858867a7439ac83f3f Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-ID: MULTICLOUD-301
2018-09-25Improve Namespaces UTsVictor Morales2-31/+67
The current implementation of Unit Tests for Namespaces wasn't validating sucessful cases properly. This change fix that gap and increase the coverage number. Change-Id: Iddc0aca3b52ea8ffebca7dccfc94d4d99e052b06 Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-ID: MULTICLOUD-301
2018-09-18Add UTs to pluginsVictor Morales6-117/+683
Deployment, service and namespace are plugins which offers CRUD operations to manage their resources. They haven't implemented Unit Tests which makes fragile to change/refactor the source code. This change adds their corresponding Unit Tests and defines a standard interface. Change-Id: I1e1eb40f1a18ba33c74069a117462c8df17767ac Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-ID: MULTICLOUD-301
2018-08-24Seed code for k8s multicloud pluginShashank Kumar Shankar3-0/+335
This patch provides the initial seed code for the multicloud Kubernetes plugin and also provides the plugin feature to add new Kubernetes kinds. Change-Id: Ie5ee414656665070cde2834c4855ac2ebc179a9a Issue-ID: MULTICLOUD-301 Signed-off-by: Shashank Kumar Shankar <shashank.kumar.shankar@intel.com> Signed-off-by: Victor Morales <victor.morales@intel.com>