forked from cerc-io/stack-orchestrator
Fix remaining commands
This commit is contained in:
parent
b4b1ec3df8
commit
f04726f08d
@ -45,9 +45,7 @@ def command(ctx, include, exclude):
|
||||
local_stack = ctx.obj.local_stack
|
||||
|
||||
# See: https://stackoverflow.com/questions/25389095/python-get-path-of-root-project-structure
|
||||
from . import data
|
||||
container_build_dir = Path(__file__).absolute().parent.joinpath("data", "container-build")
|
||||
print(f"dir is: {container_build_dir}")
|
||||
|
||||
if local_stack:
|
||||
dev_root_path = os.getcwd()[0:os.getcwd().rindex("stack-orchestrator")]
|
||||
@ -62,6 +60,7 @@ def command(ctx, include, exclude):
|
||||
print('Dev root directory doesn\'t exist, creating')
|
||||
|
||||
# See: https://stackoverflow.com/a/20885799/1701505
|
||||
from . import data
|
||||
with importlib.resources.open_text(data, "container-image-list.txt") as container_list_file:
|
||||
containers = container_list_file.read().splitlines()
|
||||
|
||||
|
@ -40,9 +40,8 @@ def command(ctx, include, exclude, cluster, command, services):
|
||||
verbose = ctx.obj.verbose
|
||||
dry_run = ctx.obj.dry_run
|
||||
|
||||
# See: https://stackoverflow.com/a/20885799/1701505
|
||||
from . import data
|
||||
compose_dir = importlib.resources.path(data, "compose")
|
||||
# See: https://stackoverflow.com/questions/25389095/python-get-path-of-root-project-structure
|
||||
compose_dir = Path(__file__).absolute().parent.joinpath("data", "compose")
|
||||
|
||||
if cluster is None:
|
||||
# Create default unique, stable cluster name from confile file path
|
||||
@ -53,6 +52,7 @@ def command(ctx, include, exclude, cluster, command, services):
|
||||
if verbose:
|
||||
print(f"Using cluster name: {cluster}")
|
||||
|
||||
# See: https://stackoverflow.com/a/20885799/1701505
|
||||
from . import data
|
||||
with importlib.resources.open_text(data, "pod-list.txt") as pod_list_file:
|
||||
pods = pod_list_file.read().splitlines()
|
||||
|
Loading…
Reference in New Issue
Block a user