Skip to content

Commit

Permalink
Pass 'pool' arg to other commands
Browse files Browse the repository at this point in the history
  • Loading branch information
bsquizz committed May 25, 2022
1 parent f01f656 commit 7608461
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions bonfire/bonfire.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ def _cmd_process(
print(json.dumps(processed_templates, indent=2))


def _get_namespace(requested_ns_name, name, requester, duration, timeout, local):
def _get_namespace(requested_ns_name, name, requester, duration, pool, timeout, local):
reserved_new_ns = False

if not has_ns_operator():
Expand Down Expand Up @@ -914,7 +914,7 @@ def _get_namespace(requested_ns_name, name, requester, duration, timeout, local)
requester = requester if requester else _get_requester()
if check_for_existing_reservation(requester):
_warn_of_existing(requester)
ns = reserve_namespace(name, requester, duration, timeout, local)
ns = reserve_namespace(name, requester, duration, pool, timeout, local)
reserved_new_ns = True

return ns.name, reserved_new_ns
Expand Down Expand Up @@ -976,12 +976,13 @@ def _cmd_config_deploy(
secrets_dir,
local,
frontends,
pool,
):
"""Process app templates and deploy them to a cluster"""
if not has_clowder():
_error("cluster does not have clowder operator installed")

ns, reserved_new_ns = _get_namespace(namespace, name, requester, duration, timeout, local)
ns, reserved_new_ns = _get_namespace(namespace, name, requester, duration, pool, timeout, local)

if import_secrets:
import_secrets_from_dir(secrets_dir)
Expand Down Expand Up @@ -1101,12 +1102,13 @@ def _cmd_deploy_clowdenv(
requester,
duration,
local,
pool,
):
"""Process ClowdEnv template and deploy to a cluster"""
if not has_clowder():
_error("cluster does not have clowder operator installed")

namespace, _ = _get_namespace(namespace, name, requester, duration, timeout, local)
namespace, _ = _get_namespace(namespace, name, requester, duration, pool, timeout, local)

if import_secrets:
import_secrets_from_dir(secrets_dir)
Expand Down Expand Up @@ -1194,12 +1196,13 @@ def _cmd_deploy_iqe_cji(
duration,
local,
selenium,
pool,
):
"""Process IQE CJI template, apply it, and wait for it to start running."""
if not has_clowder():
_error("cluster does not have clowder operator installed")

namespace, _ = _get_namespace(namespace, name, requester, duration, timeout, local)
namespace, _ = _get_namespace(namespace, name, requester, duration, pool, timeout, local)

cji_config = process_iqe_cji(
clowd_app_name,
Expand Down

0 comments on commit 7608461

Please sign in to comment.