vdsm icon indicating copy to clipboard operation
vdsm copied to clipboard

Add destination parameter to CopyDataExternalEndpoint

Open aesteve-rh opened this issue 2 years ago • 2 comments

Description

copy_data, CopyDataExternalEndpoint does not receive writable nor dest parameters as CopyDataDivEndpoint does. Destination parameter helps to distinguish when a volume is a source or a destination, thus opening the possibility to add some sanity checks (e.g., if source and destination have the same id).

Also, CopyDataExternalEndpoint have no coverage at all in the sdm_copy_data_test or any other test.

Actions

  • Add dest parameter and some sanity checks as in CopyDataDivEndpoint, so that both classes have a similar, consistent API
  • Add tests to improve coverage for CopyDataExternalEndpoint, similar to those for CopyDataDivEndpoint
  • (Optional?) Add an (abstract?) base class for both CopyDataDivEndpoint and CopyDataExternalEndpoint to integrate common functionality, avoid code repetition and enforce a similar API

aesteve-rh avatar Apr 26 '22 09:04 aesteve-rh

@bennyz what do you think?

nirs avatar Apr 26 '22 12:04 nirs

Sounds good,

Regarding tests @nirs we discussed creating a functional test for CopyDataExternalEndpoint as it depends on xleases, maybe it's easier to start with this?

Also, CopyDataDivEndpoint have no coverage at all in the sdm_copy_data_test or any other test.

I suppose you mean CopyDataExternalEndpoint

bennyz avatar Apr 26 '22 16:04 bennyz