Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename --collection-path/TDP_COLLECTION_PATH to --collection/TDP_COLLECTIONS #493

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ poetry install

Export the following environment variables:

- `TDP_COLLECTION_PATH`: path(s) to the collection(s). [`tdp-collection`](https://github.com/TOSIT-IO/tdp-collection) is mandatory. Other collections can be added, separated by a colon `:` (such as [`tdp-collection-extras`](https://github.com/TOSIT-IO/tdp-collection-extras), [`tdp-observability`](https://github.com/TOSIT-IO/tdp-observability)).
- `TDP_COLLECTIONS`: path(s) to the collection(s). [`tdp-collection`](https://github.com/TOSIT-IO/tdp-collection) is mandatory. Other collections can be added, separated by a colon `:` (such as [`tdp-collection-extras`](https://github.com/TOSIT-IO/tdp-collection-extras), [`tdp-observability`](https://github.com/TOSIT-IO/tdp-observability)).
- `TDP_RUN_DIRECTORY`: path to the working directory of TDP deployment (where `ansible.cfg`, `inventory.ini` and `topology.ini` are located).
- `TDP_DATABASE_DSN`: DSN of the database to use.
- `TDP_VARS`: path to the folder containing the variables.
Expand Down
6 changes: 3 additions & 3 deletions docs/source/developer/cli/developer_quick_start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ Developer Quick Start (sqlite backend)
.. code-block:: shell

# this folder is local repo of tdp-collection
user@yourmachine:export TDP_COLLECTION_PATH=~/tdp-collection
user@yourmachine:export TDP_COLLECTIONS=~/tdp-collection
# this folder is working directory of tdp deployment in which you put ansible.cfg, inventory.ini and topology.ini.
user@yourmachine:export TDP_RUN_DIRECTORY=~/working-dir
# this folder is to store sqlite db file
user@yourmachine:export TDP_DATABASE_DSN=sqlite:////data/sqlite-data/tdp.db
# this folder is to store tdp service configuration, please find default values at $TDP_COLLECTION_PATH/tdp_vars_defaults
# you must NOT set TDP_VARS to $TDP_COLLECTION_PATH/tdp_vars_defaults
# this folder is to store tdp service configuration, please find default values at $TDP_COLLECTIONS/tdp_vars_defaults
# you must NOT set TDP_VARS to $TDP_COLLECTIONS/tdp_vars_defaults
# the path must contain the string `tdp_vars`
user@yourmachine:export TDP_VARS=~/tdp_vars

Expand Down
2 changes: 1 addition & 1 deletion tdp/cli/commands/plan/test_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

def test_tdp_plan_dag(collection_path: Path, database_dsn_path: str, vars: Path):
base_args = [
"--collection-path",
"--collection",
collection_path,
"--database-dsn",
database_dsn_path,
Expand Down
2 changes: 1 addition & 1 deletion tdp/cli/commands/plan/test_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

def test_tdp_plan_run(collection_path: Path, database_dsn_path: str, vars: Path):
base_args = [
"--collection-path",
"--collection",
collection_path,
"--database-dsn",
database_dsn_path,
Expand Down
2 changes: 1 addition & 1 deletion tdp/cli/commands/plan/test_reconfigure.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_tdp_plan_reconfigure(
collection_path: Path, database_dsn_path: str, vars: Path
):
base_args = [
"--collection-path",
"--collection",
collection_path,
"--database-dsn",
database_dsn_path,
Expand Down
2 changes: 1 addition & 1 deletion tdp/cli/commands/plan/test_resume.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def test_tdp_plan_resume_nothing_to_resume(
collection_path: Path, database_dsn_path: str, vars: Path
):
base_args = [
"--collection-path",
"--collection",
collection_path,
"--database-dsn",
database_dsn_path,
Expand Down
2 changes: 1 addition & 1 deletion tdp/cli/commands/status/test_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

def test_tdp_status_edit(collection_path: Path, database_dsn_path: str, vars: Path):
base_args = [
"--collection-path",
"--collection",
collection_path,
"--database-dsn",
database_dsn_path,
Expand Down
2 changes: 1 addition & 1 deletion tdp/cli/commands/status/test_generate_stales.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

def test_tdp_status_edit(collection_path: Path, database_dsn_path: str, vars: Path):
base_args = [
"--collection-path",
"--collection",
collection_path,
"--database-dsn",
database_dsn_path,
Expand Down
2 changes: 1 addition & 1 deletion tdp/cli/commands/status/test_show.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

def test_tdp_status_edit(collection_path: Path, database_dsn_path: str, vars: Path):
base_args = [
"--collection-path",
"--collection",
collection_path,
"--database-dsn",
database_dsn_path,
Expand Down
2 changes: 1 addition & 1 deletion tdp/cli/commands/test_default_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

def test_tdp_default_diff(collection_path: Path, vars: Path):
args = [
"--collection-path",
"--collection",
collection_path,
"--vars",
vars,
Expand Down
2 changes: 1 addition & 1 deletion tdp/cli/commands/test_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def test_tdp_deploy_mock(
collection_path: Path, database_dsn_path: str, vars: Path, tmp_path: Path
):
base_args = [
"--collection-path",
"--collection",
collection_path,
"--database-dsn",
database_dsn_path,
Expand Down
4 changes: 2 additions & 2 deletions tdp/cli/commands/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

def test_tdp_init(collection_path: Path, database_dsn: str, vars: Path):
args = [
"--collection-path",
"--collection",
collection_path,
"--database-dsn",
database_dsn,
Expand All @@ -26,7 +26,7 @@ def test_tdp_init(collection_path: Path, database_dsn: str, vars: Path):
def test_tdp_init_db_is_created(collection_path: Path, vars: Path, tmp_path: Path):
db_path = tmp_path / "sqlite.db"
args = [
"--collection-path",
"--collection",
collection_path,
"--database-dsn",
"sqlite:///" + str(db_path),
Expand Down
2 changes: 1 addition & 1 deletion tdp/cli/commands/test_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


def test_tdp_nodes(collection_path: Path):
args = ["--collection-path", collection_path]
args = ["--collection", collection_path]
runner = CliRunner()
result = runner.invoke(ops, args)
assert result.exit_code == 0, result.output
2 changes: 1 addition & 1 deletion tdp/cli/commands/test_playbooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


def test_tdp_playbooks(collection_path: Path, tmp_path: Path):
args = ["--collection-path", collection_path, "--output-dir", tmp_path]
args = ["--collection", collection_path, "--output-dir", tmp_path]
runner = CliRunner()
result = runner.invoke(playbooks, args)
assert result.exit_code == 0, result.output
2 changes: 1 addition & 1 deletion tdp/cli/commands/test_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


def test_tdp_validate(collection_path: Path, vars: Path):
args = ["--collection-path", collection_path, "--vars", vars]
args = ["--collection", collection_path, "--vars", vars]
runner = CliRunner()
result = runner.invoke(validate, args)
assert result.exit_code == 0, result.output
4 changes: 2 additions & 2 deletions tdp/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ def check_services_cleanliness(cluster_variables: ClusterVariables) -> None:

def collections(func: FC) -> FC:
return click.option(
"--collection-path",
"--collection",
"collections",
envvar="TDP_COLLECTION_PATH",
envvar="TDP_COLLECTIONS",
required=True,
callback=_collections_from_paths,
help=f"List of paths separated by your os' path separator ({os.pathsep})",
Expand Down
Loading