You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "jmsperu (via GitHub)" <gi...@apache.org> on 2026/06/20 09:30:04 UTC

Re: [PR] NAS backup: compression, encryption, bandwidth throttle, integrity check [cloudstack]

jmsperu commented on PR #12898:
URL: https://github.com/apache/cloudstack/pull/12898#issuecomment-4757166622

   @DaanHoogland Thanks for the review — addressed both points in `0effda26e4`:
   
   **Method extraction** — pulled the inline enhancement logic into dedicated methods:
   - `LibvirtTakeBackupCommandWrapper`: extracted `appendEnhancementFlags()` + `writePassphraseFile()` (so `execute()` is a clean dispatch instead of a ~40-line inline block)
   - `NASBackupProvider`: extracted `applyBackupEnhancementDetails()`
   
   (The shell side was already factored — `encrypt_backup()` / `verify_backup()` are standalone functions in `nasbackup.sh`.)
   
   **Testing** — added `LibvirtTakeBackupCommandWrapperTest` (5 cases: compression/bandwidth/integrity flag mapping, bandwidth=0 skip, encryption writes the 0600 passphrase file + `-e` flag, and fail-fast when encryption is enabled without a passphrase). The existing `NASBackupProviderTest` (14 cases, covering the details map) stays green — confirming the refactor is behavior-preserving.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org