summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2021-10-15Expose Update HandlersLukasz Rajewski10-26/+227
Expose Update Handlers for Definition, Profile and Config Tmpl Issue-ID: MULTICLOUD-1410 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: Ibe6fe05458f2af28f3e1ca14a54492a4bae19362
2021-10-12Fixed Query api filtering of resources for InstanceLukasz Rajewski5-14/+55
Issue-ID: MULTICLOUD-1409 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: Id91d121fab264ccbe0096c99bcc29c18e7ee3b2b
2021-10-05Fixed issue with order of deleted resources0.9.1Lukasz Rajewski5-13/+65
For delete operation order of resources is reverse to the order used for creation Issue-ID: MULTICLOUD-1398 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: I3f34c6000222e82c34f59042e99d2c37a343dfa5
2021-10-04Fixed installation of CRD resourcesLukasz Rajewski8-42/+117
Issue-ID: MULTICLOUD-1397 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: Id8e653f1b5c61278ee2d64da409ac5b0685b36b8
2021-10-04Further fixes for config delete operationLukasz Rajewski12-167/+430
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 Rajewski9-47/+160
Issue-ID: MULTICLOUD-1332 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: I08a3d623d6f12777d88a168af0cb804c63104887
2021-09-02Fix issue with initial error hidingLukasz Rajewski1-35/+34
Issue-ID: MULTICLOUD-1347 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: I0ae4dd0c67e33fb78d4767d2b339467d19e7105f
2021-08-17Fix Status API resolutionMichal Chabiera1-18/+20
Fix Status API resolution Issue-ID: MULTICLOUD-1372 Signed-off-by: Michal Chabiera <michal.chabiera@orange.com> Change-Id: I4cc2c95dfe0e8be718e2083fcc328b1e2951f27d
2021-08-11Support pre/post install/delete hooks  hthieu16-27/+1857
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-09Fixed issue of leftovers after instace create failureLukasz Rajewski2-3/+8
Fixed issue of leftovers after instace create failure Issue-ID: MULTICLOUD-1269 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: I69b4a170d72a482f29fd79ecdfc949f55c70a61a
2021-08-06Optimized status discovery0.9.0Lukasz Rajewski1-10/+7
Optimized status discovery Issue-ID: MULTICLOUD-1372 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: I854bc88676f4bc3b5f35e8a303d94603ce61a91d
2021-08-06Fixed issue in Status handlerLukasz Rajewski1-7/+12
Fixed issue in Status handler when reading status of not ready resource Issue-ID: MULTICLOUD-1372 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: I3739bb30a7ab28f6bb4b6648c522bddee37db96b
2021-08-05Update status check endpoint hthieu22-17/+1595
  Update status check endpoint to use helm (3.5) official implementation of resource status check. Move utils to new module and update import. Issue-ID: MULTICLOUD-1372 Signed-off-by: hthieu <huu_trung.thieu@nokia-bell-labs.com> Change-Id: I57a827d09466f5f554c89c2fa5533696285f9c37
2021-08-02Merge "Add suport for query api on root level"Lukasz Rajewski13-84/+247
2021-08-02Add suport for query api on root levelLukasz Rajewski13-84/+247
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 Rajewski7-7/+132
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-29Fix of release name for configLukasz Rajewski2-7/+16
Fix of release name for config. It is taken now from the instance first, and then from the profile. Issue-ID: MULTICLOUD-1379 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: I3bd41a1e51abf6326de1eda42361782bea3147b2
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-05-05DeletePropagationPolicy changed to backgroundLukasz Rajewski3-3/+3
The policy is changed to Background operation which is default for helm application. Later on dedicated parametr will be added to the profile to let it be changed for particular helm chart. Issue-ID: MULTICLOUD-1338 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: I29978bc39fe6e1d10b0278fe10736ff1b7cc2006
2021-04-20Merge "Migrate to use Helm v3 libraries"Lukasz Rajewski16-685/+1558
2021-04-12Migrate to use Helm v3 librariesRitu Sood16-685/+1558
Moving to Helm v3. Updated unit tests. Reworked Healthcheck Execution to align with v3 design. Helm v3 requires newer version for K8s libraries. Moved to use version 0.19.4. Issue-ID: MULTICLOUD-1295 Signed-off-by: Ritu Sood <ritu.sood@intel.com> Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: I091b75d69841dde56ad2c294cca2d5a0291ffa8f
2021-04-02Merge "Fix Healthcheck API"Ritu Sood6-47/+330
2021-03-31Fix Healthcheck APIKonrad Bańka6-47/+330
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-11Merge "Correct Day2 Config Template creation response"Ritu Sood1-2/+7
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-11Remove Hooks field from InstanceResponse http resp jsonKonrad Bańka1-1/+1
Addition of hooks in instantiation response needs to be handled by other parties or else it may break connectivity. Because currently Hooks field doesn't provide any relevant public data, this change makes it hidden. Issue-ID: MULTICLOUD-1311 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: I4ca522cf8c6409ddf71fe06de0b905cfdf219a2f
2021-03-09Correct Query API endpoint registrationKonrad Bańka3-2/+276
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ńka20-60/+468
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 Sood4-1/+148
2021-02-24Provide Query API for CNF InstancesKonrad Bańka4-2/+150
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ńka6-132/+211
Issue-ID: MULTICLOUD-1280 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: Ibeb0920b4ce083f4294b83c887fc7c793a2c3df5
2021-01-13Provide simple v3 chart mock testKonrad Bańka4-0/+55
Issue-ID: MULTICLOUD-1267 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: Ib05167a6e0e2c69268bcd85c0ae3fa30fdd78e39
2020-12-16Rollback helm library to version not failing v3 chartsKonrad Bańka2-485/+129
This change reverts fef2f1a959341d2abaea6dadaecccc4952c284c9 commit that updated helm library to a version, that no longer allowed helm v3 charts by explicitly failing when parsing them. Proper support of helm v3 is still not implemented in k8splugin, but at least it shouldn't fail on v3 packages that don't implement v3-specific features. Also apart from revert, go.mod/sum have been also tidied. Issue-ID: MULTICLOUD-1267 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: I992004d30802134039f0a6aca2d07a42db9c2459
2020-11-27MULTICLOUD-1257 updated gui flowvikaskumar64-1853/+8310
Issue-ID: MULTICLOUD-1257 Change-Id: I5c1432c037952abeed6066cb067192076031f9cd Signed-off-by: vikaskumar <vkumar@aarnanetworks.com>
2020-11-18Improve early-detection of empty templateKonrad Bańka7-13/+104
Previous empty template detection pattern matched only against templates resolved to empty-or-whitespace-only files. This change makes it handle other case of empty yaml correctly, namely, yaml containing comments only. Issue-ID: MULTICLOUD-1252 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: I9132e167ec607c8a4a4ca5584141ed043c6ddd4f
2020-10-16Merge "Restore commented unit test TestDeleteLogicalCloud"Eric Multanen5-39/+48
2020-10-16Merge "delete should return 404 error for invalid name"Eric Multanen1-1/+6
2020-10-10Restore commented unit test TestDeleteLogicalCloudIgor D.C5-39/+48
Restore the previously commented-out unit test TestDeleteLogicalCloud. That test was disabled due to a failure introduced by interacting with AppContext for the first time in module/logicalcloud.go and it not being ready to do so. This commit restores it and modifies code so dependent mocks can plug in correctly. This was done in order to keep testing the code that was previously being tested, not so much to add additional coverage. Although it would be a significant undertaking, the different types and interfaces in pkg/module should be redesigned to achieve better decoupling and thus make unit testing more straightforward. Issue-ID: MULTICLOUD-1143 Change-Id: I1e6b7bb9111fc6883f0c9cee887329a9e0b27fbd Signed-off-by: Igor D.C <igor.duarte.cardoso@intel.com>
2020-10-08Fix mispelled key name in kubeconfigIgor D.C1-1/+1
Fixes the mispelled "currentcontext" with the right key name "current-context" which was introduced as a regression with or before the latest version of the kubeconfig code (probably a bad search/replace). This 1-character long bug was preventing the generated kubeconfigs from being correctly interpreted by kubectl. Thus, kubectl couldn't set any context of the kubeconfig as the current context. Observable output before this fix: $ kubectl get pods The connection to the server localhost:8080 was refused - did you specify the right host or port? Issue-ID: MULTICLOUD-1143 Change-Id: I617d1e20b7be2567729b84d3746b22e4ceaf8b9d Signed-off-by: Igor D.C <igor.duarte.cardoso@intel.com>
2020-10-08Reduce duplication around DeleteCompositeApp callsIgor D.C1-124/+36
DCM's apply function had a lot of error handling code that cleans up the AppContext if something goes wrong while adding to AppContext. Most of that handling was using multiline duplicate code with the only change being in the log/error strings. This commit attempts to reuse all that error handling code and make it easier to follow main code. Issue-ID: MULTICLOUD-1143 Change-Id: I3a35387b1ed46279c1b973dbd852352276ff5cc8 Signed-off-by: Igor D.C <igor.duarte.cardoso@intel.com>
2020-10-05Merge "Remove unused mongo db methods from emco code"Ritu Sood4-634/+0
2020-10-05Merge "Ovnaction and vfw updates for deploy api change"Ritu Sood18-455/+320
2020-10-05Merge "Modify GenericPlacement APIs to include DepIntGrp"Ritu Sood12-88/+204
2020-10-02Ovnaction and vfw updates for deploy api changeEric Multanen18-455/+320
Update the ovnaction controller APIs to support the api change of including the deployment intent group in the URL. Also fixup: - vfw and other test cases to support the change - updates to emcoctl tool and examples Issue-ID: MULTICLOUD-1218 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: Icadacb5ec6d7c238bb3bf8a44a39c30692ecebee
2020-10-02Modify GenericPlacement APIs to include DepIntGrpRajamohan Raj12-88/+204
Modify the genericPlacementIntent API such that deploymentIntentGroup becomes a mandatory parameter. Issue-ID: MULTICLOUD-1218 Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com> Change-Id: I33d2eeac5b60228e9c08921c9347b1b6aa3f8d28
2020-10-02DCM E2E testing fixesIgor D.C3-5/+8
A set of small fixes after discovery during DCM's end-to-end testing: - properly detect that a cert hasn't been issued yet (don't crash) - in Monitor, don't pass namespace when querying for CSRs - fixed incorrect /kubeconfig file encoding from yaml to json Issue-ID: MULTICLOUD-1143 Change-Id: Ie813e377070b0751f0bfdabac8da50e3288090de Signed-off-by: Igor D.C <igor.duarte.cardoso@intel.com>
2020-10-02Merge "Set name of resources correctly in appcontext"Ritu Sood1-36/+38
2020-10-02Merge "Reimplement Terminate to be compatible with Status"Ritu Sood4-63/+133
2020-10-02Remove unused mongo db methods from emco codeEric Multanen4-634/+0
Remove the set of unused (legacy from v1) mongo db methods so that they are not used in the emco code base. Issue-ID: MULTICLOUD-1227 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com> Change-Id: Ibe94892e5b1d0f33192be7ea3db5c55b3f8cbf60
2020-10-02Set name of resources correctly in appcontextIgor D.C1-36/+38
Previously the DCM K8s resources in appcontext were in the format: <logical cloud name>+<resource type> Now they are in the correct format: <resource name>+<ResourceType> Issue-ID: MULTICLOUD-1143 Change-Id: I271c70587244921cc2ffb7ad571ad8eb162cb10f Signed-off-by: Igor D.C <igor.duarte.cardoso@intel.com>