Skip to content

Conversation

@lhaagsma
Copy link
Contributor

@lhaagsma lhaagsma commented May 1, 2025

Added a new command line flag "--list-children" that from acquire's main function only returns a human readable list of child targets and exits.

Aims to close #239

Example output on Proxmox:

Listing children on Target: pve
- Found child #0: type=proxmox, path=/etc/pve/qemu-server/101.conf
- Found child #1: type=proxmox, path=/etc/pve/qemu-server/102.conf
- Found child #2: type=proxmox, path=/etc/pve/qemu-server/103.conf
- Found child #3: type=proxmox, path=/etc/pve/qemu-server/100.conf
- Found child #4: type=proxmox, path=/etc/pve/qemu-server/104.conf
Acquire finished successful

Acquire can be started with --child <#index> or . For Proxmox the VM name is not obvious as numbers are used. Will create a separate issue to parse these as part of the specific dissect loaders.

Copy link
Member

@Schamper Schamper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would also be a nice addition to target-query, just saying 😉.

@lhaagsma lhaagsma marked this pull request as draft July 11, 2025 15:53
@lhaagsma
Copy link
Contributor Author

lhaagsma commented Aug 25, 2025

Reworked this PR to use the logic added in target.

from dissect.target.tools.utils import _OverrideRequiredAction, list_children

By importing these two functions it works the same.

Alternatively the _OverrideRequiredAction could be copied from target/tools/utils.py to acquire/utils.py. But this feels like duplicating code.

Depends on: fox-it/dissect.target#1133 to be merged.

@lhaagsma lhaagsma marked this pull request as ready for review August 25, 2025 12:11
@lhaagsma
Copy link
Contributor Author

Seeing as fox-it/dissect.target#1133 is now merged, could this be reviewed as well? Pretty much the same code, making the new child support features available from Acquire.

@codecov
Copy link

codecov bot commented Oct 13, 2025

Codecov Report

❌ Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.90%. Comparing base (08e89c8) to head (cfc12eb).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
acquire/utils.py 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #240      +/-   ##
==========================================
+ Coverage   44.86%   44.90%   +0.03%     
==========================================
  Files          26       26              
  Lines        3535     3541       +6     
==========================================
+ Hits         1586     1590       +4     
- Misses       1949     1951       +2     
Flag Coverage Δ
unittests 44.90% <71.42%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Schamper Schamper merged commit 7dbd015 into fox-it:main Oct 13, 2025
18 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

List a targets sub-targets/children with Acquire (Improvement/Ease of use)

2 participants