aboutsummaryrefslogtreecommitdiffstats
path: root/src/k8splugin/api/instancehandler.go
AgeCommit message (Collapse)AuthorFilesLines
2022-03-02Implementation of status notification mechanism0.10.0Lukasz Rajewski1-1/+1
- Subscription CRUD endpoints - Subscription notifu executor - Cleanup of subscriptions on instance delete - Sending notification to the specified callback Issue-ID: MULTICLOUD-1445 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: I5b867a348e916f6c2c471bcc5326c831d832f45e
2022-02-25Upgrade handler implementationLukasz Rajewski1-1/+55
Implementation of the upgrade handler for the instance. As a result, exsting instance is modified, resources upated and lefovers removed from the cluster. Issue-ID: MULTICLOUD-1444 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: I4122ee12d9332eaeb5ee016446b3da2bbe94bd2d
2022-02-23ConfigAPI and Query API improvementsLukasz Rajewski1-4/+4
- Config Template create from the definition content - Missing CRUD Config handlers added - Improved Rollback and Config delete - Query API name filtering improved Issue-ID: MULTICLOUD-1437 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: Iec8ec6d03746085f294d9318a252f1ae45d3b9c8
2021-08-11Support pre/post install/delete hooks  hthieu1-2/+8
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-02Add suport for query api on root levelLukasz Rajewski1-6/+4
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-02-24Provide Query API for CNF InstancesKonrad Bańka1-0/+46
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
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-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 a status getter api endpointKiran Kamineni1-0/+20
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 Kamineni1-69/+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 Kamineni1-2/+8
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-18Add a list api for instancesKiran Kamineni1-0/+18
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-24Change the import paths for go get accessKiran Kamineni1-1/+1
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-04-03Refactor instance codeKiran Kamineni1-0/+191
Issue-ID: MULTICLOUD-350 Change-Id: I2574d94e4ebada1e138913b2a03549dd90906d7b Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>