summaryrefslogtreecommitdiffstats
path: root/src/k8splugin/api
AgeCommit message (Collapse)AuthorFilesLines
2021-10-04Further fixes for config delete operationLukasz Rajewski2-2/+20
The issue was related with insufficient handlijg of different versions of config vs their delete operation handled by the plugin. Issue-ID: MULTICLOUD-1332 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: I90d896720fa89ebd66cb3290cdd9401272f5e3fd
2021-09-28Fix for config resources delete with instance deleteLukasz Rajewski3-5/+30
Issue-ID: MULTICLOUD-1332 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: I08a3d623d6f12777d88a168af0cb804c63104887
2021-08-11Support pre/post install/delete hooks  hthieu2-2/+9
Update instance create and delete handler to support pre/post install/delete hooks.  Add hook.go: to execute and delete hook (base on delete policy).  Implement watchUntilReady in generic plugin to wait for readiness of hook rss. Add hook_sorter.go: to sort hook based on weight. User can define timeout for each type of hooks in overwrite-values. Variable name is k8s-rb-instance-pre-install-timeout (default 60s), k8s-rb-instance-post-install-timeout (default 600s), k8s-rb-instance-pre-delete-timeout (default 60s) and k8s-rb-instance-post-delete-timeout (600s). This is timeout for each hook of a hook event (not a total time). Add recovery capability to continue the execution of instantiation (create or delete) when the plugin stop unexpectedly. For now, this is disabled because we have data-race issue during test. Will enable when we find the solution. Add basic test for hooks (in hook_test.go) Add test for hook in instance_test For instance get request, we can request for full data by adding query param to the request: full=true. Issue-ID: MULTICLOUD-1347 Signed-off-by: hthieu <huu_trung.thieu@nokia-bell-labs.com> Change-Id: If2b4a90831b9bfce1af8b926e4062a7d706bee08
2021-08-02Merge "Add suport for query api on root level"Lukasz Rajewski9-42/+124
2021-08-02Add suport for query api on root levelLukasz Rajewski9-42/+124
Add suport for query api on root level. Instance query handler and root query handler merged. Issue-ID: MULTICLOUD-1379 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: I1dc95c7aca0e734edf5794e7c36143dc12070f2b
2021-08-02Config List handler added to Config APILukasz Rajewski2-0/+22
Config List handler added to Config API Issue-ID: MULTICLOUD-1332 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: I63355dd6b05e70398cfc89744efa332926286c40
2021-07-23Change rb-definition-version identifierLukasz Rajewski1-1/+1
rb-definition-version identifier was changed to vf-omdule-model-customization-uuid to enable vf-module model update scenarios Issue-ID: MULTICLOUD-1377 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: I2877d9c282abcdbad14f4120e5e67f8c5e5d3e59
2021-04-02Merge "Fix Healthcheck API"Ritu Sood1-1/+66
2021-03-31Fix Healthcheck APIKonrad Bańka1-1/+66
Fix several issues related to Healthcheck creation. Updated GET/DELETE methods to work properly. This commit leaves few FIXME/TODOs that will be handled within Helm3 Rebase commit Issue-ID: MULTICLOUD-1308 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: I5da50363bb240fdc85d3624f43cb0526786da542
2021-03-11Correct Day2 Config Template creation responseKonrad Bańka1-2/+7
Modified day2 config template handler to return metadata of created configuration template on its creation. Issue-ID: MULTICLOUD-1311 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: I139486a41c7dbd67d414a07776e9a5d711d9887b
2021-03-09Correct Query API endpoint registrationKonrad Bańka2-1/+271
Apart from corrections, corrected handling of name-only query requests as well as provided bunch of UTs. Issue-ID: MULTICLOUD-1307 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: Ida3d3e434525f323bd8c40ddc7ffd58df9c5e831
2021-02-25Provide Healthcheck API MVP0.8.0Konrad Bańka7-22/+102
Implements basic functionality of running starting Healthcheck. Results can be inspected so-far without dedicated API, by using, for example, Query API. Issue-ID: MULTICLOUD-1233 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: Ia4d96d936d573173d7d8f41e6c39d059bf5f8b1f
2021-02-25Merge "Provide Query API for CNF Instances"Ritu Sood2-0/+51
2021-02-24Provide Query API for CNF InstancesKonrad Bańka2-0/+52
Query API doesn't directly use Status API code, in order to allow for querying derived resources that might not be typically returned by Status API like replicasets for deployment. Issue-ID: MULTICLOUD-1305 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: If15adce23845880f3e6771cc8eab78a78ab13517
2021-02-23Move Day2 Config Values API to new endpointKonrad Bańka2-30/+20
Issue-ID: MULTICLOUD-1280 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: Ibeb0920b4ce083f4294b83c887fc7c793a2c3df5
2020-09-30Fix Status API to actually provide instance statusKonrad Bańka1-85/+0
Provide information about instance resources and Pods inside status response. Issue-ID: MULTICLOUD-1177 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: Iee6fd56120d091dddfa6b6d0e4aa7eb36d40e888
2020-09-08Provide capability to specify release-name during instantiationKonrad Bańka1-0/+8
Allow release-name property to be provided during instantiation that, if provided, overrides release-name specified in profile. Additionally updated Makefile to allow easy compilation with different go version easily. Issue-ID: MULTICLOUD-1175 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: Id8db484369045cfb0bc99543a80317644fc838f9
2020-05-06Revert "Update brokerhandler API to conform with /v1/ path pattern"0.6.0Konrad Banka2-9/+8
This reverts commit 4ae60c1b50750587ab9d3960617a47d7db57b311. Reason for revert: Unable to reproduce bug, reverting fix implementation Issue-ID: MULTICLOUD-1053 Change-Id: Icc12260f9c122c6e5ac038d07a0e6cd56201e3ba Signed-off-by: Konrad Bańka <k.banka@samsung.com>
2020-04-16Update brokerhandler API to conform with /v1/ path patternKonrad Bańka2-8/+9
Issue-ID: MULTICLOUD-1053 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: I8f567bed2783e7257784cd4ce4c9f76207634e7a
2020-02-20Provide OverrideParameters capability for infra_workload APIKonrad Bańka2-86/+262
Provide parameters provided in sdnc, oof and user directives as override parameters for instantiate call. Issue-ID: MULTICLOUD-838 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: I69c6dab82ee233b2365a656bfaf1c7d64e375c98
2020-01-23Merge "Update profilehandler comments"Ritu Sood1-9/+9
2020-01-10Merge "Instantiate infra_workload based on vf-module-*-ids"Ritu Sood2-42/+21
2020-01-07Change missing profile HTTP response code to 404Konrad Bańka2-4/+20
Issue-ID: MULTICLOUD-967 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: I3d213f65ee37443a55b74255b475e27c0d93cf2c
2020-01-07Instantiate infra_workload based on vf-module-*-idsKonrad Bańka2-42/+21
Deprecate k8s-rb-definition-* parameters from sdnc_directives in favor of vf-module-*-id that are used by newer artifact broker. Issue-ID: MULTICLOUD-836 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: I26ae16bd53ced56ae11523584f900a102f6e0bb9
2019-11-26Switch instantiation parameters source from user to sdnc parametersKonrad Bańka2-13/+40
Issue-ID: MULTICLOUD-941 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: I3a6c67eb442023f64600b65f5af54a49117a8c51
2019-11-08Update logutils to support multiple fieldsKiran Kamineni1-20/+60
Added support for multiple fields and updated instancehandler and app/client.go to use the new functions Issue-ID: MULTICLOUD-577 Change-Id: I7cc04f67e72448aa121d10cfd80d66d544981933 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-10-29Update profilehandler commentsMarcus G K Williams1-9/+9
Issue-ID: MULTICLOUD-828 Signed-off-by: Marcus G K Williams <marcus.williams@intel.com> Change-Id: Ib7678c6829916cb7e29611d151f7d67c2a274faf
2019-10-25Implementing suggested changessanjaymekhale1-0/+18
Renamed package from logs to logutils Issue-ID: MULTICLOUD-577 Change-Id: I05e2acbfbb5dd79bd26df73e0ad64c2068b9f6e5 Signed-off-by: sanjaymekhale <sm00557598@techmahindra.com>
2019-10-15Add unit testsKiran Kamineni1-3/+97
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-10-15Add a status getter api endpointKiran Kamineni2-0/+21
Add a status endpoint to get status of instances. Status information will be added to the database asynchronously. Issue-ID: MULTICLOUD-675 Change-Id: Ia7d79a6f18f01bf24f2690caf74a48c2a082bd73 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-10-11Remove unused codeKiran Kamineni2-127/+0
Remove unused code. This is part of the old legacy code and will anyway have to be re-implemented whenever the update functionality gets added. Issue-ID: MULTICLOUD-666 Change-Id: I02a91a2b221da9d82433f8c2ee1dd014a81e4f4d Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-08-13Add query parameters support to instance APIKiran Kamineni4-22/+61
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 Yang3-1/+102
2019-07-23Merge "Add a list api for instances"Bin Yang3-2/+135
2019-07-18Add list api for profilesKiran Kamineni3-1/+126
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 Kamineni3-1/+102
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 Kamineni3-2/+135
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 Kamineni7-25/+176
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 Kamineni13-18/+18
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 Kamineni4-35/+245
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 Kamineni2-24/+36
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-16Support user_directives that are attributes listsKiran Kamineni2-14/+81
Support the attributes in user_directives attributes are lists of the following form: "attributes": [ { "attribute_value": "foo", "attribute_name": "bar" }, { "attribute_value": "value2", "attribute_name": "name2" } ] Issue-ID: ONAPARC-349 Change-Id: I576bc251d1566dc26696f12f826a09bacb7417a0 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
2019-05-16Merge "Move config to app and connect to instance"Bin Yang2-9/+10
2019-05-15Move config to app and connect to instanceKiran Kamineni2-9/+10
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 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-04-25Adding healthcheck for OOM testingKiran Kamineni3-0/+96
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-16Replace Kind with GroupVersionKindKiran Kamineni3-24/+113
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-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 Yang1-0/+9
2019-04-12Merge "Day 2 Configuration API's"Bin Yang6-13/+381