refactor(bottles): move 'list active' onto DockerBottlePlatform
test / run tests/run_tests.py (pull_request) Successful in 14s
test / run tests/run_tests.py (pull_request) Successful in 14s
Add list_active() abstract method on BottlePlatform; DockerBottlePlatform implements it with the existing docker ps logic. cli/list.py no longer calls docker directly — it just dispatches the active branch to the platform.
This commit is contained in:
@@ -122,6 +122,11 @@ class BottlePlatform(ABC):
|
||||
def cleanup(self, plan: BottleCleanupPlan) -> None:
|
||||
"""Remove everything described by the cleanup plan."""
|
||||
|
||||
@abstractmethod
|
||||
def list_active(self) -> None:
|
||||
"""Print every currently-running bottle on this platform to
|
||||
stderr (name + status)."""
|
||||
|
||||
|
||||
# Import concrete platform classes AFTER the base types are defined, so
|
||||
# each platform module can pull BottleSpec / BottlePlan / BottlePlatform
|
||||
|
||||
Reference in New Issue
Block a user