refactor(backend): fold BottleProvisioner back into BottleBackend
test / run tests/run_tests.py (pull_request) Successful in 14s
test / run tests/run_tests.py (pull_request) Successful in 14s
BottleProvisioner had no independent identity — no state, only one
caller, never selected, never crossed a method boundary as data. It
was a method dressed up as a class. Reverting that turn:
- BottleBackend gains an abstract provision(plan, target).
- DockerBottleBackend.provision absorbs the body that lived on
DockerBottleProvisioner.
- backend/docker/provisioner.py deleted.
- BottleProvisioner ABC removed from backend/__init__.py.
- launch now calls self.provision(plan, container) directly.
Net: -1 file, -1 class, -1 ABC. Same behavior; tests pass.
This commit is contained in:
@@ -7,7 +7,6 @@ The bulk of the implementation lives in sibling modules:
|
||||
- bottle_plan: DockerBottlePlan
|
||||
- bottle_cleanup_plan: DockerBottleCleanupPlan
|
||||
- bottle: DockerBottle handle
|
||||
- provisioner: DockerBottleProvisioner
|
||||
- backend: DockerBottleBackend
|
||||
|
||||
This file only re-exports the public names so
|
||||
@@ -21,12 +20,10 @@ from .backend import DockerBottleBackend
|
||||
from .bottle import DockerBottle
|
||||
from .bottle_cleanup_plan import DockerBottleCleanupPlan
|
||||
from .bottle_plan import DockerBottlePlan
|
||||
from .provisioner import DockerBottleProvisioner
|
||||
|
||||
__all__ = [
|
||||
"DockerBottle",
|
||||
"DockerBottleBackend",
|
||||
"DockerBottleCleanupPlan",
|
||||
"DockerBottlePlan",
|
||||
"DockerBottleProvisioner",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user