vdsm
vdsm copied to clipboard
Add destination parameter to CopyDataExternalEndpoint
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 inCopyDataDivEndpoint
, so that both classes have a similar, consistent API - Add tests to improve coverage for
CopyDataExternalEndpoint
, similar to those forCopyDataDivEndpoint
- (Optional?) Add an (abstract?) base class for both
CopyDataDivEndpoint
andCopyDataExternalEndpoint
to integrate common functionality, avoid code repetition and enforce a similar API
@bennyz what do you think?
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