aboutsummaryrefslogtreecommitdiffstats
path: root/src/k8splugin/api/api.go
AgeCommit message (Collapse)AuthorFilesLines
2019-08-13Add query parameters support to instance APIKiran Kamineni1-0/+6
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-23Merge "Add a listallhandler to definitions api"Bin Yang1-0/+1
2019-07-23Merge "Add a list api for instances"Bin Yang1-0/+1
2019-07-18Add list api for profilesKiran Kamineni1-0/+1
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-0/+1
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-18Add a list api for instancesKiran Kamineni1-0/+1
curl -X GET /v1/instance returns all the instances created. It returns abbreviated instances for improved readability. For details on what resources were created for each instance, use the ID with GET. Issue-ID: MULTICLOUD-715 Change-Id: I05afe0fd2c254acbca4329289c81545f95c9fac5 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-06-26Move connectionhandler.go into api packageKiran Kamineni1-5/+8
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-3/+3
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-0/+1
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-16Merge "Move config to app and connect to instance"Bin Yang1-2/+2
2019-05-15Move config to app and connect to instanceKiran Kamineni1-2/+2
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-15Remove extra v1 from broker pathKiran Kamineni1-5/+4
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-04-25Adding healthcheck for OOM testingKiran Kamineni1-0/+3
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-12Merge "Add Connectivity Info API"Bin Yang1-0/+9
2019-04-12Merge "Day 2 Configuration API's"Bin Yang1-1/+25
2019-04-11Add Connectivity Info APIrsood1-0/+9
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-11Add support for so integrationKiran Kamineni1-0/+7
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-11Day 2 Configuration API'srsood1-1/+25
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-03Refactor instance codeKiran Kamineni1-11/+17
Issue-ID: MULTICLOUD-350 Change-Id: I2574d94e4ebada1e138913b2a03549dd90906d7b Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-03-26Update definition and profile to latest specKiran Kamineni1-12/+10
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-20NewRouter supports custom backend clientsKiran Kamineni1-14/+21
NewRouter needs to support custom clients This is needed where the backend clients are mocked and we need url path parameters to be available in our unit tests. Using the same router code allows us to do this. Issue-ID: MULTICLOUD-547 Change-Id: Id51b6f0a9afe4965efaf2611fc642bccb9ac1d39 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-01-25Move api.go functionsVictor Morales1-77/+0
CheckEnvVariables, CheckDatabaseConnection, LoadPlugins and CheckInitialSettings functions are utility functions which are not related with the API. These functions need to be moved to utils.go file. Change-Id: Ie6dfbafe8909962fba31534916a7e0f07ded116b Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-ID: MULTICLOUD-301
2019-01-25Use a standard Go project layoutVictor Morales1-3/+3
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-17Add resource bundle profile apiKiran Kamineni1-0/+10
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>
2018-12-19Merge "Add Network and OVN4NFV Plugins"Victor Morales1-2/+2
2018-12-05Add Network and OVN4NFV PluginsRitu Sood1-2/+2
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-11-21Add upload backend implementationKiran Kamineni1-1/+1
Upload is a seperate API where it takes a binary stream and stores it. The api supports tar.gz file format only. P2: Check if ID is valid before trying upload Add test with an invalid ID Issue-ID: MULTICLOUD-393 Change-Id: Id636a95823a046e1795d3be72d0214e953a8c5fc Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2018-11-19Reconcile names in code and Jira itemsKiran Kamineni1-8/+8
k8splugin manages deployment of resource bundles and these are not restricted to vnfs. This names' change is to reflect that functionality. P2: using rb instead of resource bundle Issue-ID: MULTICLOUD-410 Change-Id: I09e0b92a8fc13562e1c6bb17dc8bc13de97264d7 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2018-11-13Create UTs to cover DB callsVictor Morales1-6/+1
This change pretends to increase the code coverage creating Unit Tests for the interactions with the Databases. Change-Id: I3b78ebe8ddb131e3c06bcee0065ad5eabeed5677 Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-ID: MULTICLOUD-301
2018-11-08Add vnf definition APIs3.0.0-ONAPcasablancaKiran Kamineni1-0/+9
Adding APIs for POST, GET, LIST (implemented via GET) and DELETE commands on /v1/vnfd base for creating, getting, listing and deleting VNF Definitions. P2: Added unit tests for vnfdhandler.go P3: Add unit tests for serialize and deserialize P4: Integrating review comments P5: Added customizable mocking for vnfdhandler_test P6: Added customizablt mocking for vnfd_test Note that this will soon need to be updated once the db changes go through in patch 71090 Issue-ID: MULTICLOUD-393 Change-Id: Id509bed370ab3bdc572c6ead22324c1ee3dbf82d Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com> Signed-off-by: Victor Morales <victor.morales@intel.com>
2018-08-31Make PLUGINS_DIR to be required than optionalShashank Kumar Shankar1-5/+2
This patch makes sure PLUGINS_DIR is not optional since its better explicitly pass the plugins directory. Change-Id: I08da5cf1563527d8b713fa106aa05b37a26c95cb Issue-ID: MULTICLOUD-301 Signed-off-by: Shashank Kumar Shankar <shashank.kumar.shankar@intel.com>
2018-08-24Seed code for k8s multicloud pluginShashank Kumar Shankar1-0/+120
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>