Allow named disposables in OpenInVM config#314
Conversation
cbd2d3c to
f8a4eed
Compare
|
@ben-grande |
| @staticmethod | ||
| def _dvm_template_filter(vm: qubesadmin.vm.QubesVM): | ||
| return getattr(vm, "template_for_dispvms", False) | ||
| def _dispvm_target_filter(vm: qubesadmin.vm.QubesVM): |
There was a problem hiding this comment.
A dvm is not the same as a dispvm. Maybe use _permanent_dispvm_and_dispvm_template_filter?
| if getattr(vm, "template_for_dispvms", False): | ||
| return True | ||
|
|
||
| auto_cleanup = str(getattr(vm, "auto_cleanup", False)).lower() == "true" |
There was a problem hiding this comment.
The value can be compared as bool, no need to convert to str. Why was it compared as str?
| rule = RuleDispVM( | ||
| Rule.from_line( | ||
| None, | ||
| "Service\t*\ttest-blue\t@dispvm\tallow\ttarget=@dispvm", |
There was a problem hiding this comment.
I know that make_rule is using tabs and f-string with vars, but here it is str and the \t makes it hard to read. Use of \t is unnecessary.
|
|
||
| assert not rule_row.target_widget.model.is_vm_available( | ||
| test_qapp.domains["test-disp"] | ||
| ) |
|
There is a new tab called "Disposables", at |
f8a4eed to
cc49496
Compare
|
@ben-grande |
8633f57 to
b2d2a1a
Compare
b2d2a1a to
638f161
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #314 +/- ##
==========================================
+ Coverage 92.72% 92.75% +0.03%
==========================================
Files 66 66
Lines 13618 13664 +46
==========================================
+ Hits 12627 12674 +47
+ Misses 991 990 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Skimmed through. Looks correct. Marta will review as she is responsible for this repo. |
Fixes QubesOS/qubes-issues#9709.
What changed
DispVMwithauto_cleanupdisabled) in addition to disposable templates.Validation
python -m py_compile qubes_config\global_config\rule_list_widgets.py qubes_config\tests\test_rule_list_widgets.pygit diff --checkpython -m black ...andpython -m pytest ...could not be run in this Windows checkout because the active Python environment does not haveblackorpytestinstalled.