From 16cb176b6a7d4b8ec11967b9b4b6d630795f80c1 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Tue, 24 Jun 2025 10:09:19 -0400 Subject: [PATCH 01/17] Enable semantic versioning for Hatch Signed-off-by: Webster Mudge --- pyproject.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6f63d4e..7cba4d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,6 +15,8 @@ dependencies = [] [tool.hatch.version] path = "galaxy.yml" pattern = "version:\\s+(?P[\\d\\.]+)" +scheme = "semver" +validate-bump = true [tool.hatch.envs.default] python = "3.12" @@ -53,5 +55,8 @@ filterwarnings = [ ] [build-system] -requires = ["hatchling"] +requires = [ + "hatchling", + "hatch-semver", +] build-backend = "hatchling.build" From 581b9ccdfb62dc28d160b30d85f94a2eb1172ef7 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Tue, 24 Jun 2025 10:10:01 -0400 Subject: [PATCH 02/17] Add docs environment in Hatch Signed-off-by: Webster Mudge --- pyproject.toml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 7cba4d6..aa86b9a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,6 +45,29 @@ extra-dependencies = [ [tool.hatch.envs.lint.scripts] run = "pre-commit run -a" +[tool.hatch.envs.docs] +python = "3.12" +detached = true +extra-dependencies = [ + # "antsibull-docs >= 2.0.0, < 3.0.0", + "ansible-pygments", + "sphinx", + "sphinx-ansible-theme >= 0.9.0", + "antsibull-docs @ git+https://github.com/cloudera-labs/antsibull-docs@cldr-docsite#egg=antsibull-docs", + "antsichaut", +] + +[tool.hatch.envs.docs.scripts] +lint = "antsibull-docs lint-collection-docs --plugin-docs --validate-collection-refs=all --skip-rstcheck ." +build = "docsbuild/build.sh" +changelog = [ + # Read the version in galaxy.yml via hatch itself (normalizes release candidates, etc.) + # Use 'hatch version' to manage the version, i.e. 'hatch version major,rc' + "antsibull-changelog release --version $(hatch version)", + "antsichaut --since_version=latest", + "antsibull-changelog generate", +] + [tool.pytest.ini_options] testpaths = [ "tests", From 58dcb9a5e3c57d02c73c58916194d06acf7f18d9 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Tue, 24 Jun 2025 10:20:38 -0400 Subject: [PATCH 03/17] Enable changelog publishing in docs build chain Signed-off-by: Webster Mudge --- docs/docsite/config.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/docsite/config.yml b/docs/docsite/config.yml index 8f42cd5..72d4a14 100644 --- a/docs/docsite/config.yml +++ b/docs/docsite/config.yml @@ -1,6 +1,6 @@ --- -# Copyright 2023 Cloudera, Inc. All Rights Reserved. +# Copyright 2025 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,3 +16,10 @@ # The following `.. envvar::` directives are defined in the extra docsite docs: envvar_directives: [] + +# Changelog configuration (added in antsibull-docs 2.10.0) +changelog: + # Whether to write the changelog (taken from changelogs/changelog.yaml, see the + # antsibull-changelog documentation for more information) and link to it from the + # collection's index page. + write_changelog: true From c727bf13c8216bd8b8021dac1f1915342ad49bcc Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Tue, 24 Jun 2025 14:57:17 -0400 Subject: [PATCH 04/17] Add ansible-core to docs environment in Hatch Signed-off-by: Webster Mudge --- pyproject.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index aa86b9a..a0b8665 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ validate-bump = true [tool.hatch.envs.default] python = "3.12" -skip-install = true +detached = true dependencies = [ "pre-commit", "coverage[toml]", @@ -37,7 +37,7 @@ dependencies = [ [tool.hatch.envs.lint] python = "3.12" -skip-install = true +detached = true extra-dependencies = [ "ansible-lint", ] @@ -49,6 +49,7 @@ run = "pre-commit run -a" python = "3.12" detached = true extra-dependencies = [ + "ansible-core<2.17", # For RHEL 8 support # "antsibull-docs >= 2.0.0, < 3.0.0", "ansible-pygments", "sphinx", From e52625820e5f804049e36ab61281ea498f49772e Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Tue, 24 Jun 2025 14:57:47 -0400 Subject: [PATCH 05/17] Add changelog configuration Signed-off-by: Webster Mudge --- changelogs/config.yaml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 changelogs/config.yaml diff --git a/changelogs/config.yaml b/changelogs/config.yaml new file mode 100644 index 0000000..413d07b --- /dev/null +++ b/changelogs/config.yaml @@ -0,0 +1,37 @@ +add_plugin_period: true +changelog_nice_yaml: false +changelog_sort: alphanumerical +changes_file: changelog.yaml +changes_format: combined +ignore_other_fragment_extensions: true +keep_fragments: false +mention_ancestor: true +new_plugins_after_name: removed_features +notesdir: fragments +output: +- file: CHANGELOG.rst + format: rst +prelude_section_name: release_summary +prelude_section_title: Release Summary +sanitize_changelog: true +sections: +- - major_changes + - Major Changes +- - minor_changes + - Minor Changes +- - breaking_changes + - Breaking Changes / Porting Guide +- - deprecated_features + - Deprecated Features +- - removed_features + - Removed Features (previously deprecated) +- - security_fixes + - Security Fixes +- - bugfixes + - Bugfixes +- - known_issues + - Known Issues +title: Cloudera.Cloud +trivial_section_name: trivial +use_fqcn: true +vcs: auto From bc6eef9e84c9d171766168012c261e47933f29dd Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Tue, 24 Jun 2025 16:02:22 -0400 Subject: [PATCH 06/17] Add version_added details Signed-off-by: Webster Mudge --- plugins/lookup/datahub_definition.py | 1 + plugins/lookup/datahub_instance.py | 1 + plugins/lookup/datahub_service.py | 1 + plugins/lookup/datahub_template.py | 1 + plugins/lookup/datalake_instance.py | 1 + plugins/lookup/datalake_runtime.py | 1 + plugins/lookup/datalake_service.py | 1 + plugins/lookup/env_freeipa_domain.py | 1 + plugins/lookup/env_freeipa_hosts.py | 1 + plugins/modules/account_auth.py | 1 + plugins/modules/account_auth_info.py | 1 + plugins/modules/account_cred_info.py | 1 + plugins/modules/datahub_cluster.py | 1 + plugins/modules/datahub_cluster_info.py | 1 + plugins/modules/datahub_cluster_recipe.py | 1 + plugins/modules/datahub_cluster_repair.py | 1 + plugins/modules/datahub_definition_info.py | 1 + plugins/modules/datahub_template_info.py | 1 + plugins/modules/datalake.py | 1 + plugins/modules/datalake_backup.py | 1 + plugins/modules/datalake_backup_info.py | 1 + plugins/modules/datalake_info.py | 1 + plugins/modules/datalake_runtime_info.py | 1 + plugins/modules/de.py | 1 + plugins/modules/de_info.py | 1 + plugins/modules/de_virtual_cluster.py | 1 + plugins/modules/de_virtual_cluster_info.py | 1 + plugins/modules/df_customflow.py | 1 + plugins/modules/df_customflow_info.py | 1 + plugins/modules/df_customflow_version.py | 1 + plugins/modules/df_deployment.py | 1 + plugins/modules/df_deployment_info.py | 1 + plugins/modules/df_readyflow.py | 1 + plugins/modules/df_readyflow_info.py | 1 + plugins/modules/df_service.py | 1 + plugins/modules/df_service_info.py | 1 + plugins/modules/dw_cluster.py | 1 + plugins/modules/dw_cluster_info.py | 1 + plugins/modules/dw_data_visualization.py | 1 + plugins/modules/dw_data_visualization_info.py | 1 + plugins/modules/dw_database_catalog.py | 1 + plugins/modules/dw_database_catalog_info.py | 1 + plugins/modules/dw_virtual_warehouse.py | 1 + plugins/modules/dw_virtual_warehouse_info.py | 1 + plugins/modules/env.py | 1 + plugins/modules/env_auth.py | 1 + plugins/modules/env_auth_info.py | 1 + plugins/modules/env_automated_user_sync_info.py | 1 + plugins/modules/env_cred.py | 1 + plugins/modules/env_cred_info.py | 1 + plugins/modules/env_idbroker.py | 1 + plugins/modules/env_idbroker_info.py | 1 + plugins/modules/env_info.py | 1 + plugins/modules/env_proxy.py | 1 + plugins/modules/env_proxy_info.py | 1 + plugins/modules/env_telemetry.py | 1 + plugins/modules/env_user_sync.py | 1 + plugins/modules/env_user_sync_info.py | 1 + plugins/modules/freeipa_info.py | 1 + plugins/modules/iam_group.py | 1 + plugins/modules/iam_group_info.py | 1 + plugins/modules/iam_resource_role_info.py | 1 + plugins/modules/iam_role_info.py | 1 + plugins/modules/iam_user_info.py | 1 + plugins/modules/ml.py | 1 + plugins/modules/ml_info.py | 1 + plugins/modules/ml_workspace_access.py | 1 + plugins/modules/opdb.py | 1 + plugins/modules/opdb_info.py | 1 + plugins/modules/recipe.py | 1 + plugins/modules/recipe_info.py | 1 + 71 files changed, 71 insertions(+) diff --git a/plugins/lookup/datahub_definition.py b/plugins/lookup/datahub_definition.py index 5d9e80f..f5fe5c5 100644 --- a/plugins/lookup/datahub_definition.py +++ b/plugins/lookup/datahub_definition.py @@ -25,6 +25,7 @@ description: - Allows you to retrieve the Datahub definition matching the Datalake CDH cloud platform and Runtime for one or more CDP Public Cloud Environments. - If an Environment is not found or is ambigious, the lookup will return an error. + version_added: "2.0.0" options: _terms: description: diff --git a/plugins/lookup/datahub_instance.py b/plugins/lookup/datahub_instance.py index e96848c..a0335b1 100644 --- a/plugins/lookup/datahub_instance.py +++ b/plugins/lookup/datahub_instance.py @@ -26,6 +26,7 @@ - Allows you to retrieve the instances by one or more instance groups for a CDP Public Cloud Datahub. - If the Datahub is not found or is ambigious, the lookup will return an error. - If the instance group is not found, the lookup will return the C(default) value. + version_added: "2.0.0" options: _terms: description: diff --git a/plugins/lookup/datahub_service.py b/plugins/lookup/datahub_service.py index d000c53..c51ae9d 100644 --- a/plugins/lookup/datahub_service.py +++ b/plugins/lookup/datahub_service.py @@ -27,6 +27,7 @@ - If no service name (or optionally Knox service name) is found on the specified Datahub, the lookup returns the value of I(default). - Otherwise, the lookup entry will be an empty list. - If the Datahub is not found or is ambigious, the lookup will return an error. + version_added: "2.0.0" options: _terms: description: diff --git a/plugins/lookup/datahub_template.py b/plugins/lookup/datahub_template.py index fd02fb7..8d6f93f 100644 --- a/plugins/lookup/datahub_template.py +++ b/plugins/lookup/datahub_template.py @@ -25,6 +25,7 @@ description: - Allows you to retrieve the Datahub templates matching the Datalake CDH Runtime for one or more CDP Public Cloud Environments. - If an Environment is not found or is ambigious, the lookup will return an error. + version_added: "2.0.0" options: _terms: description: diff --git a/plugins/lookup/datalake_instance.py b/plugins/lookup/datalake_instance.py index c7a8ba5..278403b 100644 --- a/plugins/lookup/datalake_instance.py +++ b/plugins/lookup/datalake_instance.py @@ -26,6 +26,7 @@ - Allows you to retrieve the instances by one or more instance groups for a CDP Public Cloud Environment. - If the Environment or its Datalake is not found or is ambigious, the lookup will return an error. - If the instance group is not found, the lookup will return the C(default) value. + version_added: "2.0.0" options: _terms: description: diff --git a/plugins/lookup/datalake_runtime.py b/plugins/lookup/datalake_runtime.py index 8d4ce30..dae40ab 100644 --- a/plugins/lookup/datalake_runtime.py +++ b/plugins/lookup/datalake_runtime.py @@ -25,6 +25,7 @@ description: - Allows you to retrieve the Datalake CDH Runtime for one or more CDP Public Cloud Environments. - If an Environment is not found or is ambigious, the lookup will return an error. + version_added: "2.0.0" options: _terms: description: diff --git a/plugins/lookup/datalake_service.py b/plugins/lookup/datalake_service.py index b5deb5b..b860b42 100644 --- a/plugins/lookup/datalake_service.py +++ b/plugins/lookup/datalake_service.py @@ -27,6 +27,7 @@ - If no service name (or optionally Knox service name) is found on the specified Datalake, the lookup returns the value of I(default). - Otherwise, the lookup entry will be an empty list. - If the Datalake is not found or is ambigious, the lookup will return an error. + version_added: "2.0.0" options: _terms: description: diff --git a/plugins/lookup/env_freeipa_domain.py b/plugins/lookup/env_freeipa_domain.py index 89fbe9d..750739d 100644 --- a/plugins/lookup/env_freeipa_domain.py +++ b/plugins/lookup/env_freeipa_domain.py @@ -26,6 +26,7 @@ - Allows you to retrieve information about FreeIPA Domain for a given CDP Public Cloud Environment. - You can use these details to update client DNS, e.g. set up entries in /etc/resolv.conf - If the Environment is not found or is ambigious, the lookup will return an error. + version_added: "2.0.0" options: _terms: description: diff --git a/plugins/lookup/env_freeipa_hosts.py b/plugins/lookup/env_freeipa_hosts.py index e07fbdc..aa2ceab 100644 --- a/plugins/lookup/env_freeipa_hosts.py +++ b/plugins/lookup/env_freeipa_hosts.py @@ -25,6 +25,7 @@ description: - Allows you to retrieve information about FreeIPA hosts for a given CDP Public Cloud Environment. - If the Environment is not found or is ambigious, the lookup will return an error. + version_added: "2.0.0" options: _terms: description: diff --git a/plugins/modules/account_auth.py b/plugins/modules/account_auth.py index b3e2d4d..492c74b 100644 --- a/plugins/modules/account_auth.py +++ b/plugins/modules/account_auth.py @@ -24,6 +24,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/account_auth_info.py b/plugins/modules/account_auth_info.py index b07d297..9665cd1 100644 --- a/plugins/modules/account_auth_info.py +++ b/plugins/modules/account_auth_info.py @@ -24,6 +24,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/account_cred_info.py b/plugins/modules/account_cred_info.py index ea7eb16..2d00748 100644 --- a/plugins/modules/account_cred_info.py +++ b/plugins/modules/account_cred_info.py @@ -24,6 +24,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/datahub_cluster.py b/plugins/modules/datahub_cluster.py index 6587bb6..1623c1f 100644 --- a/plugins/modules/datahub_cluster.py +++ b/plugins/modules/datahub_cluster.py @@ -24,6 +24,7 @@ - "Webster Mudge (@wmudge)" - "Daniel Chaffelson (@chaffelson)" - "Chris Perro (@cmperro)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/datahub_cluster_info.py b/plugins/modules/datahub_cluster_info.py index 61324fc..9bf5d91 100644 --- a/plugins/modules/datahub_cluster_info.py +++ b/plugins/modules/datahub_cluster_info.py @@ -23,6 +23,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/datahub_cluster_recipe.py b/plugins/modules/datahub_cluster_recipe.py index e5b5ddb..e7cbc57 100644 --- a/plugins/modules/datahub_cluster_recipe.py +++ b/plugins/modules/datahub_cluster_recipe.py @@ -24,6 +24,7 @@ - See the L(Cloudera documentation on recipes,https://docs.cloudera.com/data-hub/cloud/recipes/topics/mc-creating-custom-scripts-recipes.html) for details. author: - "Webster Mudge (@wmudge)" +version_added: "2.1.0" requirements: - cdpy options: diff --git a/plugins/modules/datahub_cluster_repair.py b/plugins/modules/datahub_cluster_repair.py index 49ab4a9..35bbedb 100644 --- a/plugins/modules/datahub_cluster_repair.py +++ b/plugins/modules/datahub_cluster_repair.py @@ -22,6 +22,7 @@ - Execute a repair (remove and/or replace) on one or more instances or instance groups within a CDP Datahub. author: - "Webster Mudge (@wmudge)" +version_added: "2.1.0" requirements: - cdpy options: diff --git a/plugins/modules/datahub_definition_info.py b/plugins/modules/datahub_definition_info.py index 88d8459..6831aaf 100644 --- a/plugins/modules/datahub_definition_info.py +++ b/plugins/modules/datahub_definition_info.py @@ -24,6 +24,7 @@ - "Chris Perro (@cmperro)" - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.3.0" requirements: - cdpy options: diff --git a/plugins/modules/datahub_template_info.py b/plugins/modules/datahub_template_info.py index c3a08ad..7256203 100644 --- a/plugins/modules/datahub_template_info.py +++ b/plugins/modules/datahub_template_info.py @@ -23,6 +23,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/datalake.py b/plugins/modules/datalake.py index 65807e3..a7d5586 100644 --- a/plugins/modules/datalake.py +++ b/plugins/modules/datalake.py @@ -24,6 +24,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/datalake_backup.py b/plugins/modules/datalake_backup.py index db89d5b..62ba180 100644 --- a/plugins/modules/datalake_backup.py +++ b/plugins/modules/datalake_backup.py @@ -23,6 +23,7 @@ - Optionally wait for the backup to complete author: - "Jim Enright (@jimright)" +version_added: "3.0.0" options: datalake_name: description: diff --git a/plugins/modules/datalake_backup_info.py b/plugins/modules/datalake_backup_info.py index ad99dbe..761f9ac 100644 --- a/plugins/modules/datalake_backup_info.py +++ b/plugins/modules/datalake_backup_info.py @@ -23,6 +23,7 @@ - Optionally filter by backup name or backup id author: - "Jim Enright (@jimright)" +version_added: "3.0.0" options: datalake_name: description: diff --git a/plugins/modules/datalake_info.py b/plugins/modules/datalake_info.py index 113e98d..a2e2171 100644 --- a/plugins/modules/datalake_info.py +++ b/plugins/modules/datalake_info.py @@ -23,6 +23,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/datalake_runtime_info.py b/plugins/modules/datalake_runtime_info.py index 885d0f2..1ef4d18 100644 --- a/plugins/modules/datalake_runtime_info.py +++ b/plugins/modules/datalake_runtime_info.py @@ -22,6 +22,7 @@ - Gather information about CDP Datalake Runtimes author: - "Webster Mudge (@wmudge)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/de.py b/plugins/modules/de.py index 5bcb95a..75695e1 100644 --- a/plugins/modules/de.py +++ b/plugins/modules/de.py @@ -23,6 +23,7 @@ author: - "Curtis Howard (@curtishoward)" - "Alan Silva (@acsjumpi)" +version_added: "1.5.0" requirements: - cdpy options: diff --git a/plugins/modules/de_info.py b/plugins/modules/de_info.py index ca63949..f26ac01 100644 --- a/plugins/modules/de_info.py +++ b/plugins/modules/de_info.py @@ -23,6 +23,7 @@ author: - "Curtis Howard (@curtishoward)" - "Alan Silva (@acsjumpi)" +version_added: "1.5.0" requirements: - cdpy options: diff --git a/plugins/modules/de_virtual_cluster.py b/plugins/modules/de_virtual_cluster.py index 0ca66ec..c801ef9 100644 --- a/plugins/modules/de_virtual_cluster.py +++ b/plugins/modules/de_virtual_cluster.py @@ -22,6 +22,7 @@ - Create or delete CDP Data Engineering Virtual Clusters author: - "Curtis Howard (@curtishoward)" +version_added: "1.5.0" requirements: - cdpy options: diff --git a/plugins/modules/de_virtual_cluster_info.py b/plugins/modules/de_virtual_cluster_info.py index e504e8b..22d96a9 100644 --- a/plugins/modules/de_virtual_cluster_info.py +++ b/plugins/modules/de_virtual_cluster_info.py @@ -22,6 +22,7 @@ - Gather information about CDP DE virtual clusters author: - "Curtis Howard (@curtishoward)" +version_added: "1.5.0" requirements: - cdpy options: diff --git a/plugins/modules/df_customflow.py b/plugins/modules/df_customflow.py index 9aea5bf..3004505 100644 --- a/plugins/modules/df_customflow.py +++ b/plugins/modules/df_customflow.py @@ -22,6 +22,7 @@ - Import or Delete CustomFlows into the DataFlow Catalog author: - "Andre Araujo (@asdaraujo)" +version_added: "2.0.0" requirements: - cdpy options: diff --git a/plugins/modules/df_customflow_info.py b/plugins/modules/df_customflow_info.py index 77ae99d..a922c94 100644 --- a/plugins/modules/df_customflow_info.py +++ b/plugins/modules/df_customflow_info.py @@ -22,6 +22,7 @@ - Gather information about CDP DataFlow CustomFlow Definitions author: - "Dan Chaffelson (@chaffelson)" +version_added: "1.6.0" requirements: - cdpy options: diff --git a/plugins/modules/df_customflow_version.py b/plugins/modules/df_customflow_version.py index 9f19e3e..fed3a05 100644 --- a/plugins/modules/df_customflow_version.py +++ b/plugins/modules/df_customflow_version.py @@ -22,6 +22,7 @@ - Import CustomFlow versions into the DataFlow Catalog author: - "Andre Araujo (@asdaraujo)" +version_added: "2.0.0" requirements: - cdpy options: diff --git a/plugins/modules/df_deployment.py b/plugins/modules/df_deployment.py index 55af589..2dbb1ba 100644 --- a/plugins/modules/df_deployment.py +++ b/plugins/modules/df_deployment.py @@ -23,6 +23,7 @@ - Enable or Disable CDP DataFlow Deployments author: - "Dan Chaffelson (@chaffelson)" +version_added: "1.6.0" requirements: - cdpy options: diff --git a/plugins/modules/df_deployment_info.py b/plugins/modules/df_deployment_info.py index 4a6f785..c353664 100644 --- a/plugins/modules/df_deployment_info.py +++ b/plugins/modules/df_deployment_info.py @@ -22,6 +22,7 @@ - Gather information about CDP DataFlow Deployments author: - "Dan Chaffelson (@chaffelson)" +version_added: "1.6.0" requirements: - cdpy options: diff --git a/plugins/modules/df_readyflow.py b/plugins/modules/df_readyflow.py index 8cb7bbf..cee648b 100644 --- a/plugins/modules/df_readyflow.py +++ b/plugins/modules/df_readyflow.py @@ -22,6 +22,7 @@ - Import or Delete ReadyFlows from your CDP Tenant author: - "Dan Chaffelson (@chaffelson)" +version_added: "1.6.0" requirements: - cdpy options: diff --git a/plugins/modules/df_readyflow_info.py b/plugins/modules/df_readyflow_info.py index b7e9f28..2ed44ac 100644 --- a/plugins/modules/df_readyflow_info.py +++ b/plugins/modules/df_readyflow_info.py @@ -22,6 +22,7 @@ - Gather information about CDP DataFlow ReadyFlow Definitions author: - "Dan Chaffelson (@chaffelson)" +version_added: "1.6.0" requirements: - cdpy options: diff --git a/plugins/modules/df_service.py b/plugins/modules/df_service.py index 2d4f7c1..c8bdd2e 100644 --- a/plugins/modules/df_service.py +++ b/plugins/modules/df_service.py @@ -22,6 +22,7 @@ - Enable or Disable CDP DataFlow Services author: - "Dan Chaffelson (@chaffelson)" +version_added: "1.2.0" requirements: - cdpy - jmespath diff --git a/plugins/modules/df_service_info.py b/plugins/modules/df_service_info.py index 0b53413..88212bc 100644 --- a/plugins/modules/df_service_info.py +++ b/plugins/modules/df_service_info.py @@ -23,6 +23,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.2.0" requirements: - cdpy options: diff --git a/plugins/modules/dw_cluster.py b/plugins/modules/dw_cluster.py index b3932d8..ad03e04 100644 --- a/plugins/modules/dw_cluster.py +++ b/plugins/modules/dw_cluster.py @@ -24,6 +24,7 @@ - "Dan Chaffelson (@chaffelson)" - "Saravanan Raju (@raju-saravanan)" - "Webster Mudge (@wmudge)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/dw_cluster_info.py b/plugins/modules/dw_cluster_info.py index eefcd1e..054e725 100644 --- a/plugins/modules/dw_cluster_info.py +++ b/plugins/modules/dw_cluster_info.py @@ -23,6 +23,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/dw_data_visualization.py b/plugins/modules/dw_data_visualization.py index f69826a..845236d 100644 --- a/plugins/modules/dw_data_visualization.py +++ b/plugins/modules/dw_data_visualization.py @@ -25,6 +25,7 @@ - "Saravanan Raju (@raju-saravanan)" - "Webster Mudge (@wmudge)" - "Ronald Suplina (@rsuplina)" +version_added: "2.0.0" requirements: - cdpy options: diff --git a/plugins/modules/dw_data_visualization_info.py b/plugins/modules/dw_data_visualization_info.py index 553e675..5b966f4 100644 --- a/plugins/modules/dw_data_visualization_info.py +++ b/plugins/modules/dw_data_visualization_info.py @@ -24,6 +24,7 @@ - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" - "Ronald Suplina (@rsuplina)" +version_added: "2.0.0" requirements: - cdpy options: diff --git a/plugins/modules/dw_database_catalog.py b/plugins/modules/dw_database_catalog.py index 2d4f2fc..0863c3d 100644 --- a/plugins/modules/dw_database_catalog.py +++ b/plugins/modules/dw_database_catalog.py @@ -24,6 +24,7 @@ - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" - "Saravanan Raju (@raju-saravanan)" +version_added: "1.5.0" requirements: - cdpy options: diff --git a/plugins/modules/dw_database_catalog_info.py b/plugins/modules/dw_database_catalog_info.py index 23c160c..fb0c7a3 100644 --- a/plugins/modules/dw_database_catalog_info.py +++ b/plugins/modules/dw_database_catalog_info.py @@ -24,6 +24,7 @@ - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" - "Saravanan Raju (@raju-saravanan)" +version_added: "1.5.0" requirements: - cdpy options: diff --git a/plugins/modules/dw_virtual_warehouse.py b/plugins/modules/dw_virtual_warehouse.py index 4325407..3639366 100644 --- a/plugins/modules/dw_virtual_warehouse.py +++ b/plugins/modules/dw_virtual_warehouse.py @@ -24,6 +24,7 @@ - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" - "Saravanan Raju (@raju-saravanan)" +version_added: "1.5.0" requirements: - cdpy options: diff --git a/plugins/modules/dw_virtual_warehouse_info.py b/plugins/modules/dw_virtual_warehouse_info.py index 35ec374..d56bdb8 100644 --- a/plugins/modules/dw_virtual_warehouse_info.py +++ b/plugins/modules/dw_virtual_warehouse_info.py @@ -24,6 +24,7 @@ - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" - "Saravanan Raju (@raju-saravanan)" +version_added: "1.5.0" requirements: - cdpy options: diff --git a/plugins/modules/env.py b/plugins/modules/env.py index 7bfe049..22e8403 100644 --- a/plugins/modules/env.py +++ b/plugins/modules/env.py @@ -24,6 +24,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/env_auth.py b/plugins/modules/env_auth.py index 3fe5102..692ee0e 100644 --- a/plugins/modules/env_auth.py +++ b/plugins/modules/env_auth.py @@ -24,6 +24,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/env_auth_info.py b/plugins/modules/env_auth_info.py index 5183e6e..69ef484 100644 --- a/plugins/modules/env_auth_info.py +++ b/plugins/modules/env_auth_info.py @@ -25,6 +25,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/env_automated_user_sync_info.py b/plugins/modules/env_automated_user_sync_info.py index aa40eef..9a857e2 100644 --- a/plugins/modules/env_automated_user_sync_info.py +++ b/plugins/modules/env_automated_user_sync_info.py @@ -24,6 +24,7 @@ - The module support check_mode. author: - "Webster Mudge (@wmudge)" +version_added: "1.7.0" requirements: - cdpy options: diff --git a/plugins/modules/env_cred.py b/plugins/modules/env_cred.py index 1663487..745d355 100644 --- a/plugins/modules/env_cred.py +++ b/plugins/modules/env_cred.py @@ -24,6 +24,7 @@ author: - "Webster Mudge (@wmudge)" - "Daniel Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/env_cred_info.py b/plugins/modules/env_cred_info.py index aa64e44..987ebc8 100644 --- a/plugins/modules/env_cred_info.py +++ b/plugins/modules/env_cred_info.py @@ -24,6 +24,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/env_idbroker.py b/plugins/modules/env_idbroker.py index a3adb0a..9531ff7 100644 --- a/plugins/modules/env_idbroker.py +++ b/plugins/modules/env_idbroker.py @@ -24,6 +24,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/env_idbroker_info.py b/plugins/modules/env_idbroker_info.py index f0a7df9..d96255c 100644 --- a/plugins/modules/env_idbroker_info.py +++ b/plugins/modules/env_idbroker_info.py @@ -24,6 +24,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/env_info.py b/plugins/modules/env_info.py index 5ae9ed3..f889027 100644 --- a/plugins/modules/env_info.py +++ b/plugins/modules/env_info.py @@ -24,6 +24,7 @@ - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" - "Christian Leroy (cleroy@cloudera.com)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/env_proxy.py b/plugins/modules/env_proxy.py index d811789..8d98ede 100644 --- a/plugins/modules/env_proxy.py +++ b/plugins/modules/env_proxy.py @@ -23,6 +23,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/env_proxy_info.py b/plugins/modules/env_proxy_info.py index e71a235..f413eb6 100644 --- a/plugins/modules/env_proxy_info.py +++ b/plugins/modules/env_proxy_info.py @@ -23,6 +23,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/env_telemetry.py b/plugins/modules/env_telemetry.py index 06c74f1..2231303 100644 --- a/plugins/modules/env_telemetry.py +++ b/plugins/modules/env_telemetry.py @@ -23,6 +23,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/env_user_sync.py b/plugins/modules/env_user_sync.py index 53f47e3..60a808c 100644 --- a/plugins/modules/env_user_sync.py +++ b/plugins/modules/env_user_sync.py @@ -24,6 +24,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/env_user_sync_info.py b/plugins/modules/env_user_sync_info.py index c267c47..357406f 100644 --- a/plugins/modules/env_user_sync_info.py +++ b/plugins/modules/env_user_sync_info.py @@ -24,6 +24,7 @@ author: - "Webster Mudge (@wmudge)" - "Daniel Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/freeipa_info.py b/plugins/modules/freeipa_info.py index f08f36f..c608dfc 100644 --- a/plugins/modules/freeipa_info.py +++ b/plugins/modules/freeipa_info.py @@ -23,6 +23,7 @@ author: - "Webster Mudge (@wmudge)" - "Jim Enright (@jenright)" +version_added: "1.1.0" requirements: - cdpy options: diff --git a/plugins/modules/iam_group.py b/plugins/modules/iam_group.py index 3a33c32..bb65b0f 100644 --- a/plugins/modules/iam_group.py +++ b/plugins/modules/iam_group.py @@ -25,6 +25,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/iam_group_info.py b/plugins/modules/iam_group_info.py index 455a22d..867094e 100644 --- a/plugins/modules/iam_group_info.py +++ b/plugins/modules/iam_group_info.py @@ -23,6 +23,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" options: name: description: diff --git a/plugins/modules/iam_resource_role_info.py b/plugins/modules/iam_resource_role_info.py index 98ac36c..afa0e5a 100644 --- a/plugins/modules/iam_resource_role_info.py +++ b/plugins/modules/iam_resource_role_info.py @@ -23,6 +23,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" options: name: description: diff --git a/plugins/modules/iam_role_info.py b/plugins/modules/iam_role_info.py index ac76a07..d23bb93 100644 --- a/plugins/modules/iam_role_info.py +++ b/plugins/modules/iam_role_info.py @@ -22,6 +22,7 @@ - Gathers information about CDP Public IAM role or roles author: - "Ronald Suplina (@rsuplina)" +version_added: "3.0.0" options: name: description: diff --git a/plugins/modules/iam_user_info.py b/plugins/modules/iam_user_info.py index c72bd99..660cf8d 100644 --- a/plugins/modules/iam_user_info.py +++ b/plugins/modules/iam_user_info.py @@ -24,6 +24,7 @@ - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" - "Ronald Suplina (@rsuplina)" +version_added: "1.0.0" options: name: description: diff --git a/plugins/modules/ml.py b/plugins/modules/ml.py index 2939b84..9777bb5 100644 --- a/plugins/modules/ml.py +++ b/plugins/modules/ml.py @@ -23,6 +23,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/ml_info.py b/plugins/modules/ml_info.py index bfdacf0..e5937de 100644 --- a/plugins/modules/ml_info.py +++ b/plugins/modules/ml_info.py @@ -23,6 +23,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/ml_workspace_access.py b/plugins/modules/ml_workspace_access.py index e836dc9..31baa4d 100644 --- a/plugins/modules/ml_workspace_access.py +++ b/plugins/modules/ml_workspace_access.py @@ -22,6 +22,7 @@ - Grant and revoke user access to CDP Machine Learning Workspaces author: - "Webster Mudge (@wmudge)" +version_added: "1.1.0" requirements: - cdpy options: diff --git a/plugins/modules/opdb.py b/plugins/modules/opdb.py index 6107f64..a267645 100644 --- a/plugins/modules/opdb.py +++ b/plugins/modules/opdb.py @@ -22,6 +22,7 @@ - Create or destroy CDP OpDB Databases author: - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/opdb_info.py b/plugins/modules/opdb_info.py index 9d43b87..cc13f33 100644 --- a/plugins/modules/opdb_info.py +++ b/plugins/modules/opdb_info.py @@ -23,6 +23,7 @@ author: - "Webster Mudge (@wmudge)" - "Dan Chaffelson (@chaffelson)" +version_added: "1.0.0" requirements: - cdpy options: diff --git a/plugins/modules/recipe.py b/plugins/modules/recipe.py index 92be9d0..6c21d74 100644 --- a/plugins/modules/recipe.py +++ b/plugins/modules/recipe.py @@ -24,6 +24,7 @@ - See the L(Cloudera documentation on recipes,https://docs.cloudera.com/data-hub/cloud/recipes/topics/mc-creating-custom-scripts-recipes.html) for details. author: - "Webster Mudge (@wmudge)" +version_added: "2.1.0" requirements: - cdpy options: diff --git a/plugins/modules/recipe_info.py b/plugins/modules/recipe_info.py index f982712..18fecf0 100644 --- a/plugins/modules/recipe_info.py +++ b/plugins/modules/recipe_info.py @@ -24,6 +24,7 @@ - See the L(Cloudera documentation on recipes,https://docs.cloudera.com/data-hub/cloud/recipes/topics/mc-creating-custom-scripts-recipes.html) for details. author: - "Webster Mudge (@wmudge)" +version_added: "2.1.0" requirements: - cdpy options: From 50e0cdef912379b2559df6fa959a1795e39c6b13 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Tue, 24 Jun 2025 16:02:59 -0400 Subject: [PATCH 07/17] Update CHANGELOG with previous release details Signed-off-by: Webster Mudge --- CHANGELOG.rst | 401 +++++++++++++++++++++++++++++++++ changelogs/.plugin-cache.yaml | 367 ++++++++++++++++++++++++++++++ changelogs/changelog.yaml | 409 ++++++++++++++++++++++++++++++++++ 3 files changed, 1177 insertions(+) create mode 100644 CHANGELOG.rst create mode 100644 changelogs/.plugin-cache.yaml create mode 100644 changelogs/changelog.yaml diff --git a/CHANGELOG.rst b/CHANGELOG.rst new file mode 100644 index 0000000..e71db59 --- /dev/null +++ b/CHANGELOG.rst @@ -0,0 +1,401 @@ +============================ +Cloudera.Cloud Release Notes +============================ + +.. contents:: Topics + +v2.5.1 +====== + +Minor Changes +------------- + +- Increment actions to remove deprecation notices and use main branch for docs construction workflow + +v2.5.0 +====== + +Minor Changes +------------- + +- Add extra top-level parameters for CDW create cluster module (https://github.com/cloudera-labs/cloudera.cloud/pull/155) +- Add pre-commit hooks and workflow (https://github.com/cloudera-labs/cloudera.cloud/pull/157) + +Bugfixes +-------- + +- Update default value of use_ssd argument in CDE module (https://github.com/cloudera-labs/cloudera.cloud/pull/156) +- Update module example typo (https://github.com/cloudera-labs/cloudera.cloud/pull/154) + +v2.4.0 +====== + +Minor Changes +------------- + +- Add Ansible Galaxy imports (https://github.com/cloudera-labs/cloudera.cloud/pull/147) +- Add analytics to API documents (https://github.com/cloudera-labs/cloudera.cloud/pull/143) +- Add autoscaling and impala_ha parameters to cdw vw module (https://github.com/cloudera-labs/cloudera.cloud/pull/145) +- Add extra Azure parameters to cloudera.cloud.dw_cluster (https://github.com/cloudera-labs/cloudera.cloud/pull/140) +- Add module defaults groups (https://github.com/cloudera-labs/cloudera.cloud/pull/144) +- Add template and image parameters to dw data viz module (https://github.com/cloudera-labs/cloudera.cloud/pull/146) +- Update to version 2.4.0 (https://github.com/cloudera-labs/cloudera.cloud/pull/148) + +v2.3.1 +====== + +Bugfixes +-------- + +- Add enterprise to datalake scale parameter (https://github.com/cloudera-labs/cloudera.cloud/pull/141) + +v2.3.0 +====== + +Minor Changes +------------- + +- Add cdp_region parameters fo CDP Endpoint region (https://github.com/cloudera-labs/cloudera.cloud/pull/136) + +v2.2.0 +====== + +Minor Changes +------------- + +- Add private_cluster parameters (https://github.com/cloudera-labs/cloudera.cloud/pull/133) + +Bugfixes +-------- + +- Update AWS subnet parameter names for CDW cluster creation (https://github.com/cloudera-labs/cloudera.cloud/pull/132) + +v2.1.1 +====== + +Bugfixes +-------- + +- Fix malformed return value in API docs (https://github.com/cloudera-labs/cloudera.cloud/pull/130) + +v2.1.0 +====== + +Minor Changes +------------- + +- Add CDP recipe and Data Hub repair modules (https://github.com/cloudera-labs/cloudera.cloud/pull/127) +- Update collection version to 2.1.0 (https://github.com/cloudera-labs/cloudera.cloud/pull/128) + +Bugfixes +-------- + +- Update env_idbroker return value to 'idbroker' from 'mappings' (https://github.com/cloudera-labs/cloudera.cloud/pull/92) + +New Modules +----------- + +- cloudera.cloud.datahub_cluster_recipe - Manage CDP Datahub recipes on an instance group. +- cloudera.cloud.datahub_cluster_repair - Repair CDP Datahub instances or instance groups. +- cloudera.cloud.recipe - Manage a CDP recipe. +- cloudera.cloud.recipe_info - Gather information about CDP recipes. + +v2.0.1 +====== + +Minor Changes +------------- + +- Report warning when discovering subnets from filter (https://github.com/cloudera-labs/cloudera.cloud/pull/114) + +Bugfixes +-------- + +- Ignore errors when deleting Data Hub (https://github.com/cloudera-labs/cloudera.cloud/pull/115) +- Update import for cdp_service in datalake_service lookup plugin (https://github.com/cloudera-labs/cloudera.cloud/pull/122) +- Update pip requirements to update to latest 2.12.* (https://github.com/cloudera-labs/cloudera.cloud/pull/124) + +v2.0.0 +====== + +Minor Changes +------------- + +- Add Datalake service lookup (https://github.com/cloudera-labs/cloudera.cloud/pull/97) +- Add FreeIPA lookup plugins (https://github.com/cloudera-labs/cloudera.cloud/pull/100) +- Add GCP region zones parameter (https://github.com/cloudera-labs/cloudera.cloud/pull/101) +- Add backup storage options to env module (https://github.com/cloudera-labs/cloudera.cloud/pull/95) +- Add datahub_service lookup plugin (https://github.com/cloudera-labs/cloudera.cloud/pull/96) +- Add integration targets for CDP Environment and general teardown (https://github.com/cloudera-labs/cloudera.cloud/pull/91) +- Add integration test for cross-account credentials (https://github.com/cloudera-labs/cloudera.cloud/pull/90) +- Add loadbalancer_ips parameter to 'de' module (https://github.com/cloudera-labs/cloudera.cloud/pull/108) +- Add lookup plugins for DL and DH (https://github.com/cloudera-labs/cloudera.cloud/pull/98) +- Add multi-az support for AWS environment and datalake (https://github.com/cloudera-labs/cloudera.cloud/pull/89) +- Add noProxyHosts parameter to cloudera.cloud.env_proxy (https://github.com/cloudera-labs/cloudera.cloud/pull/105) +- Add recipes parameter to cloudera.cloud.datalake (https://github.com/cloudera-labs/cloudera.cloud/pull/107) +- Added modules for custom flows and a fix fixes for deployments. (https://github.com/cloudera-labs/cloudera.cloud/pull/62) +- Configure documentation toolchain with antsibull-docs (https://github.com/cloudera-labs/cloudera.cloud/pull/109) +- Remove PVC Base feature branch (https://github.com/cloudera-labs/cloudera.cloud/pull/110) +- Subnet filters for the DF service (https://github.com/cloudera-labs/cloudera.cloud/pull/64) +- Update payload to use clusterDefinition and clusterTemplate parameters (https://github.com/cloudera-labs/cloudera.cloud/pull/94) +- Update release/v2.0.0 (#117) (https://github.com/cloudera-labs/cloudera.cloud/pull/119) +- Update release/v2.0.0 (https://github.com/cloudera-labs/cloudera.cloud/pull/117) + +Bugfixes +-------- + +- Add Documentation for Data Visualization (https://github.com/cloudera-labs/cloudera.cloud/pull/106) +- Fix documentation on datahub name length (https://github.com/cloudera-labs/cloudera.cloud/pull/79) +- Update creation parameters to reflect cloud provider specifics (https://github.com/cloudera-labs/cloudera.cloud/pull/102) +- Update multiAz parameter docs (https://github.com/cloudera-labs/cloudera.cloud/pull/93) + +New Plugins +----------- + +Lookup +~~~~~~ + +- cloudera.cloud.datahub_definition - Get a Datahub definition for a CDP Public Cloud Environment. +- cloudera.cloud.datahub_instance - Get the instances for a CDP Public Cloud Datahub. +- cloudera.cloud.datahub_service - Get the URL for a CDP Public Cloud Datahub service. +- cloudera.cloud.datahub_template - Get a Datahub template for a CDP Public Cloud Environment. +- cloudera.cloud.datalake_instance - Get the instances for a CDP Public Cloud Datalake. +- cloudera.cloud.datalake_runtime - Get the Datalake Runtime for CDP Public Cloud Environments. +- cloudera.cloud.datalake_service - Get the URL for a CDP Public Cloud Datalake service. +- cloudera.cloud.env_freeipa_domain - Get information about the FreeIPA domain and DNS server IP address(es) for the selected CDP Public Cloud Environment. +- cloudera.cloud.env_freeipa_hosts - Get information about FreeIPA hosts for selected Environment. + +New Modules +----------- + +- cloudera.cloud.df_customflow - Import or Delete CustomFlows into the DataFlow Catalog. +- cloudera.cloud.df_customflow_version - Import CustomFlow versions into the DataFlow Catalog. +- cloudera.cloud.dw_data_visualization - Create or Delete CDP Data Visualization Instance. +- cloudera.cloud.dw_data_visualization_info - Gather information about CDP Data Visualization Instances. + +v1.7.4 +====== + +Bugfixes +-------- + +- Update bindep installation and execution (https://github.com/cloudera-labs/cloudera.cloud/pull/88) + +v1.7.3 +====== + +Minor Changes +------------- + +- Update to support ansible-builder (https://github.com/cloudera-labs/cloudera.cloud/pull/87) + +v1.7.2 +====== + +Minor Changes +------------- + +- Add workflows for PR validation tasks and labeling (https://github.com/cloudera-labs/cloudera.cloud/pull/84) +- Start an environment without starting the datahubs within it (https://github.com/cloudera-labs/cloudera.cloud/pull/76) +- Update collection version to 2.0.0-alpha1 (https://github.com/cloudera-labs/cloudera.cloud/pull/70) +- Update to support ansible-builder (https://github.com/cloudera-labs/cloudera.cloud/pull/85) + +Bugfixes +-------- + +- Fix for CDW Virtual Warehouse race condition (https://github.com/cloudera-labs/cloudera.cloud/pull/75) +- Increment collection to 1.7.2 (https://github.com/cloudera-labs/cloudera.cloud/pull/86) + +v1.7.1 +====== + +Bugfixes +-------- + +- Remove 'enableRangerRaz' from DL payload for GCP (https://github.com/cloudera-labs/cloudera.cloud/pull/69) + +v1.7.0 +====== + +Minor Changes +------------- + +- Add initial testing components (https://github.com/cloudera-labs/cloudera.cloud/pull/65) +- Add support for stopped and started states to datahub cluster (https://github.com/cloudera-labs/cloudera.cloud/pull/57) +- Multi-AZ Datahub support (https://github.com/cloudera-labs/cloudera.cloud/pull/68) +- RAZ Support - PR 49 Redo (https://github.com/cloudera-labs/cloudera.cloud/pull/55) +- Update to handle automated user synchronization (https://github.com/cloudera-labs/cloudera.cloud/pull/53) + +Bugfixes +-------- + +- Fix freeipa parameter for env module (https://github.com/cloudera-labs/cloudera.cloud/pull/61) +- Update DBC restart process (https://github.com/cloudera-labs/cloudera.cloud/pull/66) + +New Modules +----------- + +- cloudera.cloud.env_automated_user_sync_info - Get the status of the automated CDP Users and Groups synchronization service. + +v1.6.0 +====== + +Minor Changes +------------- + +- Enable cascade and force parameters for environment deletion (https://github.com/cloudera-labs/cloudera.cloud/pull/52) +- Support for DataFlow Deployments (https://github.com/cloudera-labs/cloudera.cloud/pull/45) + +New Modules +----------- + +- cloudera.cloud.df_customflow_info - Gather information about CDP DataFlow CustomFlow Definitions. +- cloudera.cloud.df_deployment - Enable or Disable CDP DataFlow Deployments. +- cloudera.cloud.df_deployment_info - Gather information about CDP DataFlow Deployments. +- cloudera.cloud.df_readyflow - Import or Delete ReadyFlows from your CDP Tenant. +- cloudera.cloud.df_readyflow_info - Gather information about CDP DataFlow ReadyFlow Definitions. + +v1.5.1 +====== + +Bugfixes +-------- + +- Hotfix env_cred_info (https://github.com/cloudera-labs/cloudera.cloud/pull/47) + +v1.5.0 +====== + +Minor Changes +------------- + +- Add 'id' as an alias to 'catalog_id' (https://github.com/cloudera-labs/cloudera.cloud/pull/33) +- Add and update CDW modules (https://github.com/cloudera-labs/cloudera.cloud/pull/29) +- Add configurable user agent for CDPCLI interface (https://github.com/cloudera-labs/cloudera.cloud/pull/38) +- Add support for CDE (https://github.com/cloudera-labs/cloudera.cloud/pull/39) +- Add support for CDE (part 2 - virtual clusters) (https://github.com/cloudera-labs/cloudera.cloud/pull/40) +- Azure AuthZ/Single Resource Group Work - CLOUD (https://github.com/cloudera-labs/cloudera.cloud/pull/43) +- Move DFX Beta implementation to GA process (https://github.com/cloudera-labs/cloudera.cloud/pull/31) + +Bugfixes +-------- + +- Fix agent_header parameter (https://github.com/cloudera-labs/cloudera.cloud/pull/42) +- Fix module name in API docs (https://github.com/cloudera-labs/cloudera.cloud/pull/44) + +New Modules +----------- + +- cloudera.cloud.de - Enable and Disable CDP Data Engineering Services. +- cloudera.cloud.de_info - Gather information about CDP DE Workspaces. +- cloudera.cloud.de_virtual_cluster - Create or delete CDP Data Engineering Virtual Clusters. +- cloudera.cloud.de_virtual_cluster_info - Gather information about CDP DE virtual clusters. +- cloudera.cloud.dw_database_catalog - Create, manage, and destroy CDP Data Warehouse Database Catalogs. +- cloudera.cloud.dw_database_catalog_info - Gather information about CDP Data Warehouse Database Catalogs. +- cloudera.cloud.dw_virtual_warehouse - Create, manage, and destroy CDP Data Warehouse Virtual Warehouses. +- cloudera.cloud.dw_virtual_warehouse_info - Gather information about CDP Data Warehouse Virtual Warehouses. + +v1.4.0 +====== + +Minor Changes +------------- + +- Add support for endpointaccessgateway for AWS (https://github.com/cloudera-labs/cloudera.cloud/pull/15) +- Changes for DF-beta inclusion (https://github.com/cloudera-labs/cloudera.cloud/pull/17) +- Improve Azure deployment stability (https://github.com/cloudera-labs/cloudera.cloud/pull/24) +- Improve DF Integration (https://github.com/cloudera-labs/cloudera.cloud/pull/20) +- Improve teardown functionality and support purge mode (https://github.com/cloudera-labs/cloudera.cloud/pull/18) +- Update env module to support FreeIPA Instance Count (https://github.com/cloudera-labs/cloudera.cloud/pull/30) + +Removed Features (previously deprecated) +---------------------------------------- + +- Ciao dynamo (https://github.com/cloudera-labs/cloudera.cloud/pull/23) +- Remove DF dependency until GA (https://github.com/cloudera-labs/cloudera.cloud/pull/25) + +Bugfixes +-------- + +- Df module incorrectly refers to deprecated value self.env (https://github.com/cloudera-labs/cloudera.cloud/pull/16) + +v1.3.0 +====== + +Minor Changes +------------- + +- Add 'content' flag for including template content. (https://github.com/cloudera-labs/cloudera.cloud/pull/13) +- Add new definition info module for datahubs and update datahub_cluste… (https://github.com/cloudera-labs/cloudera.cloud/pull/12) + +New Modules +----------- + +- cloudera.cloud.datahub_definition_info - Gather information about CDP Datahub Cluster Definitions. + +v1.2.0 +====== + +Minor Changes +------------- + +- Add support for DFX Tech Preview (https://github.com/cloudera-labs/cloudera.cloud/pull/11) + +Bugfixes +-------- + +- Fix missing DF docs references (https://github.com/cloudera-labs/cloudera.cloud/pull/14) + +New Modules +----------- + +- cloudera.cloud.df_service - Enable or Disable CDP DataFlow Services. +- cloudera.cloud.df_service_info - Gather information about CDP DataFlow Services. + +v1.1.0 +====== + +New Modules +----------- + +- cloudera.cloud.freeipa_info - Gather information about FreeIPA. +- cloudera.cloud.ml_workspace_access - Grant and revoke user access to CDP Machine Learning Workspaces. + +v1.0.0 +====== + +New Modules +----------- + +- cloudera.cloud.account_auth - Gather and set authentication details for a CDP Account. +- cloudera.cloud.account_auth_info - Gather information about CDP Account authentication settings. +- cloudera.cloud.account_cred_info - Gather information about Account prerequisites for CDP Credentials. +- cloudera.cloud.datahub_cluster - Manage CDP Datahubs. +- cloudera.cloud.datahub_cluster_info - Gather information about CDP Datahubs. +- cloudera.cloud.datahub_template_info - Gather information about CDP Datahub Cluster Templates. +- cloudera.cloud.datalake - Manage CDP Datalakes. +- cloudera.cloud.datalake_info - Gather information about CDP Datalakes. +- cloudera.cloud.datalake_runtime_info - Gather information about CDP Datalake Runtimes. +- cloudera.cloud.dw_cluster - Create or Delete CDP Data Warehouse Clusters. +- cloudera.cloud.dw_cluster_info - Gather information about CDP Data Warehouse Clusters. +- cloudera.cloud.env - Manage CDP Environments. +- cloudera.cloud.env_auth - Set authentication details for the current CDP user. +- cloudera.cloud.env_auth_info - Gather information about CDP environment authentication details. +- cloudera.cloud.env_cred - Create, update, and destroy CDP credentials. +- cloudera.cloud.env_cred_info - Gather information about CDP Credentials. +- cloudera.cloud.env_idbroker - Update ID Broker for CDP Environments. +- cloudera.cloud.env_idbroker_info - Gather information about CDP ID Broker. +- cloudera.cloud.env_info - Gather information about CDP Environments. +- cloudera.cloud.env_proxy - Create, update, or destroy CDP Environment Proxies. +- cloudera.cloud.env_proxy_info - Gather information about CDP Environment Proxies. +- cloudera.cloud.env_telemetry - Set CDP environment telemetry. +- cloudera.cloud.env_user_sync - Sync CDP Users and Groups to Environments. +- cloudera.cloud.env_user_sync_info - Get the status of a CDP Users and Groups sync. +- cloudera.cloud.iam_group - Create, update, or destroy CDP IAM Groups. +- cloudera.cloud.iam_group_info - Gather information about CDP Public IAM groups. +- cloudera.cloud.iam_resource_role_info - Gather information about CDP Public IAM resource roles. +- cloudera.cloud.iam_user_info - Gather information about CDP Public IAM users. +- cloudera.cloud.ml - Create or Destroy CDP Machine Learning Workspaces. +- cloudera.cloud.ml_info - Gather information about CDP ML Workspaces. +- cloudera.cloud.opdb - Create or destroy CDP OpDB Databases. +- cloudera.cloud.opdb_info - Gather information about CDP OpDB Databases. diff --git a/changelogs/.plugin-cache.yaml b/changelogs/.plugin-cache.yaml new file mode 100644 index 0000000..2c7d9e5 --- /dev/null +++ b/changelogs/.plugin-cache.yaml @@ -0,0 +1,367 @@ +objects: + role: {} +plugins: + become: {} + cache: {} + callback: {} + cliconf: {} + connection: {} + filter: {} + httpapi: {} + inventory: {} + lookup: + datahub_definition: + description: Get a Datahub definition for a CDP Public Cloud Environment + name: datahub_definition + version_added: 2.0.0 + datahub_instance: + description: Get the instances for a CDP Public Cloud Datahub + name: datahub_instance + version_added: 2.0.0 + datahub_service: + description: Get the URL for a CDP Public Cloud Datahub service + name: datahub_service + version_added: 2.0.0 + datahub_template: + description: Get a Datahub template for a CDP Public Cloud Environment + name: datahub_template + version_added: 2.0.0 + datalake_instance: + description: Get the instances for a CDP Public Cloud Datalake + name: datalake_instance + version_added: 2.0.0 + datalake_runtime: + description: Get the Datalake Runtime for CDP Public Cloud Environments + name: datalake_runtime + version_added: 2.0.0 + datalake_service: + description: Get the URL for a CDP Public Cloud Datalake service + name: datalake_service + version_added: 2.0.0 + env_freeipa_domain: + description: Get information about the FreeIPA domain and DNS server IP address(es) + for the selected CDP Public Cloud Environment + name: env_freeipa_domain + version_added: 2.0.0 + env_freeipa_hosts: + description: Get information about FreeIPA hosts for selected Environment + name: env_freeipa_hosts + version_added: 2.0.0 + module: + account_auth: + description: Gather and set authentication details for a CDP Account + name: account_auth + namespace: '' + version_added: 1.0.0 + account_auth_info: + description: Gather information about CDP Account authentication settings + name: account_auth_info + namespace: '' + version_added: 1.0.0 + account_cred_info: + description: Gather information about Account prerequisites for CDP Credentials + name: account_cred_info + namespace: '' + version_added: 1.0.0 + datahub_cluster: + description: Manage CDP Datahubs + name: datahub_cluster + namespace: '' + version_added: 1.0.0 + datahub_cluster_info: + description: Gather information about CDP Datahubs + name: datahub_cluster_info + namespace: '' + version_added: 1.0.0 + datahub_cluster_recipe: + description: Manage CDP Datahub recipes on an instance group + name: datahub_cluster_recipe + namespace: '' + version_added: 2.1.0 + datahub_cluster_repair: + description: Repair CDP Datahub instances or instance groups + name: datahub_cluster_repair + namespace: '' + version_added: 2.1.0 + datahub_definition_info: + description: Gather information about CDP Datahub Cluster Definitions + name: datahub_definition_info + namespace: '' + version_added: 1.3.0 + datahub_template_info: + description: Gather information about CDP Datahub Cluster Templates + name: datahub_template_info + namespace: '' + version_added: 1.0.0 + datalake: + description: Manage CDP Datalakes + name: datalake + namespace: '' + version_added: 1.0.0 + datalake_backup: + description: Create a backup of a datalake + name: datalake_backup + namespace: '' + version_added: 3.0.0 + datalake_backup_info: + description: Gather information about a Datalake backup + name: datalake_backup_info + namespace: '' + version_added: 3.0.0 + datalake_info: + description: Gather information about CDP Datalakes + name: datalake_info + namespace: '' + version_added: 1.0.0 + datalake_runtime_info: + description: Gather information about CDP Datalake Runtimes + name: datalake_runtime_info + namespace: '' + version_added: 1.0.0 + de: + description: Enable and Disable CDP Data Engineering Services + name: de + namespace: '' + version_added: 1.5.0 + de_info: + description: Gather information about CDP DE Workspaces + name: de_info + namespace: '' + version_added: 1.5.0 + de_virtual_cluster: + description: Create or delete CDP Data Engineering Virtual Clusters + name: de_virtual_cluster + namespace: '' + version_added: 1.5.0 + de_virtual_cluster_info: + description: Gather information about CDP DE virtual clusters + name: de_virtual_cluster_info + namespace: '' + version_added: 1.5.0 + df_customflow: + description: Import or Delete CustomFlows into the DataFlow Catalog + name: df_customflow + namespace: '' + version_added: 2.0.0 + df_customflow_info: + description: Gather information about CDP DataFlow CustomFlow Definitions + name: df_customflow_info + namespace: '' + version_added: 1.6.0 + df_customflow_version: + description: Import CustomFlow versions into the DataFlow Catalog + name: df_customflow_version + namespace: '' + version_added: 2.0.0 + df_deployment: + description: Enable or Disable CDP DataFlow Deployments + name: df_deployment + namespace: '' + version_added: 1.6.0 + df_deployment_info: + description: Gather information about CDP DataFlow Deployments + name: df_deployment_info + namespace: '' + version_added: 1.6.0 + df_readyflow: + description: Import or Delete ReadyFlows from your CDP Tenant + name: df_readyflow + namespace: '' + version_added: 1.6.0 + df_readyflow_info: + description: Gather information about CDP DataFlow ReadyFlow Definitions + name: df_readyflow_info + namespace: '' + version_added: 1.6.0 + df_service: + description: Enable or Disable CDP DataFlow Services + name: df_service + namespace: '' + version_added: 1.2.0 + df_service_info: + description: Gather information about CDP DataFlow Services + name: df_service_info + namespace: '' + version_added: 1.2.0 + dw_cluster: + description: Create or Delete CDP Data Warehouse Clusters + name: dw_cluster + namespace: '' + version_added: 1.0.0 + dw_cluster_info: + description: Gather information about CDP Data Warehouse Clusters + name: dw_cluster_info + namespace: '' + version_added: 1.0.0 + dw_data_visualization: + description: Create or Delete CDP Data Visualization Instance + name: dw_data_visualization + namespace: '' + version_added: 2.0.0 + dw_data_visualization_info: + description: Gather information about CDP Data Visualization Instances + name: dw_data_visualization_info + namespace: '' + version_added: 2.0.0 + dw_database_catalog: + description: Create, manage, and destroy CDP Data Warehouse Database Catalogs + name: dw_database_catalog + namespace: '' + version_added: 1.5.0 + dw_database_catalog_info: + description: Gather information about CDP Data Warehouse Database Catalogs + name: dw_database_catalog_info + namespace: '' + version_added: 1.5.0 + dw_virtual_warehouse: + description: Create, manage, and destroy CDP Data Warehouse Virtual Warehouses + name: dw_virtual_warehouse + namespace: '' + version_added: 1.5.0 + dw_virtual_warehouse_info: + description: Gather information about CDP Data Warehouse Virtual Warehouses + name: dw_virtual_warehouse_info + namespace: '' + version_added: 1.5.0 + env: + description: Manage CDP Environments + name: env + namespace: '' + version_added: 1.0.0 + env_auth: + description: Set authentication details for the current CDP user + name: env_auth + namespace: '' + version_added: 1.0.0 + env_auth_info: + description: Gather information about CDP environment authentication details + name: env_auth_info + namespace: '' + version_added: 1.0.0 + env_automated_user_sync_info: + description: Get the status of the automated CDP Users and Groups synchronization + service + name: env_automated_user_sync_info + namespace: '' + version_added: 1.7.0 + env_cred: + description: Create, update, and destroy CDP credentials + name: env_cred + namespace: '' + version_added: 1.0.0 + env_cred_info: + description: Gather information about CDP Credentials + name: env_cred_info + namespace: '' + version_added: 1.0.0 + env_idbroker: + description: Update ID Broker for CDP Environments + name: env_idbroker + namespace: '' + version_added: 1.0.0 + env_idbroker_info: + description: Gather information about CDP ID Broker + name: env_idbroker_info + namespace: '' + version_added: 1.0.0 + env_info: + description: Gather information about CDP Environments + name: env_info + namespace: '' + version_added: 1.0.0 + env_proxy: + description: Create, update, or destroy CDP Environment Proxies + name: env_proxy + namespace: '' + version_added: 1.0.0 + env_proxy_info: + description: Gather information about CDP Environment Proxies + name: env_proxy_info + namespace: '' + version_added: 1.0.0 + env_telemetry: + description: Set CDP environment telemetry + name: env_telemetry + namespace: '' + version_added: 1.0.0 + env_user_sync: + description: Sync CDP Users and Groups to Environments + name: env_user_sync + namespace: '' + version_added: 1.0.0 + env_user_sync_info: + description: Get the status of a CDP Users and Groups sync + name: env_user_sync_info + namespace: '' + version_added: 1.0.0 + freeipa_info: + description: Gather information about FreeIPA + name: freeipa_info + namespace: '' + version_added: 1.1.0 + iam_group: + description: Create, update, or destroy CDP IAM Groups + name: iam_group + namespace: '' + version_added: 1.0.0 + iam_group_info: + description: Gather information about CDP Public IAM groups + name: iam_group_info + namespace: '' + version_added: 1.0.0 + iam_resource_role_info: + description: Gather information about CDP Public IAM resource roles + name: iam_resource_role_info + namespace: '' + version_added: 1.0.0 + iam_role_info: + description: Gather information about CDP Public IAM roles + name: iam_role_info + namespace: '' + version_added: 3.0.0 + iam_user_info: + description: Gather information about CDP Public IAM users + name: iam_user_info + namespace: '' + version_added: 1.0.0 + ml: + description: Create or Destroy CDP Machine Learning Workspaces + name: ml + namespace: '' + version_added: 1.0.0 + ml_info: + description: Gather information about CDP ML Workspaces + name: ml_info + namespace: '' + version_added: 1.0.0 + ml_workspace_access: + description: Grant and revoke user access to CDP Machine Learning Workspaces + name: ml_workspace_access + namespace: '' + version_added: 1.1.0 + opdb: + description: Create or destroy CDP OpDB Databases + name: opdb + namespace: '' + version_added: 1.0.0 + opdb_info: + description: Gather information about CDP OpDB Databases + name: opdb_info + namespace: '' + version_added: 1.0.0 + recipe: + description: Manage a CDP recipe + name: recipe + namespace: '' + version_added: 2.1.0 + recipe_info: + description: Gather information about CDP recipes + name: recipe_info + namespace: '' + version_added: 2.1.0 + netconf: {} + shell: {} + strategy: {} + test: {} + vars: {} +version: 2.5.1 diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml new file mode 100644 index 0000000..be56774 --- /dev/null +++ b/changelogs/changelog.yaml @@ -0,0 +1,409 @@ +ancestor: null +releases: + 1.0.0: + modules: + - description: Gather and set authentication details for a CDP Account. + name: account_auth + namespace: '' + - description: Gather information about CDP Account authentication settings. + name: account_auth_info + namespace: '' + - description: Gather information about Account prerequisites for CDP Credentials. + name: account_cred_info + namespace: '' + - description: Manage CDP Datahubs. + name: datahub_cluster + namespace: '' + - description: Gather information about CDP Datahubs. + name: datahub_cluster_info + namespace: '' + - description: Gather information about CDP Datahub Cluster Templates. + name: datahub_template_info + namespace: '' + - description: Manage CDP Datalakes. + name: datalake + namespace: '' + - description: Gather information about CDP Datalakes. + name: datalake_info + namespace: '' + - description: Gather information about CDP Datalake Runtimes. + name: datalake_runtime_info + namespace: '' + - description: Create or Delete CDP Data Warehouse Clusters. + name: dw_cluster + namespace: '' + - description: Gather information about CDP Data Warehouse Clusters. + name: dw_cluster_info + namespace: '' + - description: Manage CDP Environments. + name: env + namespace: '' + - description: Set authentication details for the current CDP user. + name: env_auth + namespace: '' + - description: Gather information about CDP environment authentication details. + name: env_auth_info + namespace: '' + - description: Create, update, and destroy CDP credentials. + name: env_cred + namespace: '' + - description: Gather information about CDP Credentials. + name: env_cred_info + namespace: '' + - description: Update ID Broker for CDP Environments. + name: env_idbroker + namespace: '' + - description: Gather information about CDP ID Broker. + name: env_idbroker_info + namespace: '' + - description: Gather information about CDP Environments. + name: env_info + namespace: '' + - description: Create, update, or destroy CDP Environment Proxies. + name: env_proxy + namespace: '' + - description: Gather information about CDP Environment Proxies. + name: env_proxy_info + namespace: '' + - description: Set CDP environment telemetry. + name: env_telemetry + namespace: '' + - description: Sync CDP Users and Groups to Environments. + name: env_user_sync + namespace: '' + - description: Get the status of a CDP Users and Groups sync. + name: env_user_sync_info + namespace: '' + - description: Create, update, or destroy CDP IAM Groups. + name: iam_group + namespace: '' + - description: Gather information about CDP Public IAM groups. + name: iam_group_info + namespace: '' + - description: Gather information about CDP Public IAM resource roles. + name: iam_resource_role_info + namespace: '' + - description: Gather information about CDP Public IAM users. + name: iam_user_info + namespace: '' + - description: Create or Destroy CDP Machine Learning Workspaces. + name: ml + namespace: '' + - description: Gather information about CDP ML Workspaces. + name: ml_info + namespace: '' + - description: Create or destroy CDP OpDB Databases. + name: opdb + namespace: '' + - description: Gather information about CDP OpDB Databases. + name: opdb_info + namespace: '' + release_date: '2021-05-03' + 1.1.0: + modules: + - description: Gather information about FreeIPA. + name: freeipa_info + namespace: '' + - description: Grant and revoke user access to CDP Machine Learning Workspaces. + name: ml_workspace_access + namespace: '' + release_date: '2021-05-26' + 1.2.0: + changes: + bugfixes: + - Fix missing DF docs references (https://github.com/cloudera-labs/cloudera.cloud/pull/14) + minor_changes: + - Add support for DFX Tech Preview (https://github.com/cloudera-labs/cloudera.cloud/pull/11) + modules: + - description: Enable or Disable CDP DataFlow Services. + name: df_service + namespace: '' + - description: Gather information about CDP DataFlow Services. + name: df_service_info + namespace: '' + release_date: '2021-06-10' + 1.3.0: + changes: + minor_changes: + - Add 'content' flag for including template content. (https://github.com/cloudera-labs/cloudera.cloud/pull/13) + - "Add new definition info module for datahubs and update datahub_cluste\u2026 + (https://github.com/cloudera-labs/cloudera.cloud/pull/12)" + modules: + - description: Gather information about CDP Datahub Cluster Definitions. + name: datahub_definition_info + namespace: '' + release_date: '2021-06-15' + 1.4.0: + changes: + bugfixes: + - Df module incorrectly refers to deprecated value self.env (https://github.com/cloudera-labs/cloudera.cloud/pull/16) + minor_changes: + - Add support for endpointaccessgateway for AWS (https://github.com/cloudera-labs/cloudera.cloud/pull/15) + - Changes for DF-beta inclusion (https://github.com/cloudera-labs/cloudera.cloud/pull/17) + - Improve Azure deployment stability (https://github.com/cloudera-labs/cloudera.cloud/pull/24) + - Improve DF Integration (https://github.com/cloudera-labs/cloudera.cloud/pull/20) + - Improve teardown functionality and support purge mode (https://github.com/cloudera-labs/cloudera.cloud/pull/18) + - Update env module to support FreeIPA Instance Count (https://github.com/cloudera-labs/cloudera.cloud/pull/30) + removed_features: + - Ciao dynamo (https://github.com/cloudera-labs/cloudera.cloud/pull/23) + - Remove DF dependency until GA (https://github.com/cloudera-labs/cloudera.cloud/pull/25) + release_date: '2021-09-10' + 1.5.0: + changes: + bugfixes: + - Fix agent_header parameter (https://github.com/cloudera-labs/cloudera.cloud/pull/42) + - Fix module name in API docs (https://github.com/cloudera-labs/cloudera.cloud/pull/44) + minor_changes: + - Add 'id' as an alias to 'catalog_id' (https://github.com/cloudera-labs/cloudera.cloud/pull/33) + - Add and update CDW modules (https://github.com/cloudera-labs/cloudera.cloud/pull/29) + - Add configurable user agent for CDPCLI interface (https://github.com/cloudera-labs/cloudera.cloud/pull/38) + - Add support for CDE (https://github.com/cloudera-labs/cloudera.cloud/pull/39) + - Add support for CDE (part 2 - virtual clusters) (https://github.com/cloudera-labs/cloudera.cloud/pull/40) + - Azure AuthZ/Single Resource Group Work - CLOUD (https://github.com/cloudera-labs/cloudera.cloud/pull/43) + - Move DFX Beta implementation to GA process (https://github.com/cloudera-labs/cloudera.cloud/pull/31) + modules: + - description: Enable and Disable CDP Data Engineering Services. + name: de + namespace: '' + - description: Gather information about CDP DE Workspaces. + name: de_info + namespace: '' + - description: Create or delete CDP Data Engineering Virtual Clusters. + name: de_virtual_cluster + namespace: '' + - description: Gather information about CDP DE virtual clusters. + name: de_virtual_cluster_info + namespace: '' + - description: Create, manage, and destroy CDP Data Warehouse Database Catalogs. + name: dw_database_catalog + namespace: '' + - description: Gather information about CDP Data Warehouse Database Catalogs. + name: dw_database_catalog_info + namespace: '' + - description: Create, manage, and destroy CDP Data Warehouse Virtual Warehouses. + name: dw_virtual_warehouse + namespace: '' + - description: Gather information about CDP Data Warehouse Virtual Warehouses. + name: dw_virtual_warehouse_info + namespace: '' + release_date: '2021-11-29' + 1.5.1: + changes: + bugfixes: + - Hotfix env_cred_info (https://github.com/cloudera-labs/cloudera.cloud/pull/47) + release_date: '2022-01-25' + 1.6.0: + changes: + minor_changes: + - Enable cascade and force parameters for environment deletion (https://github.com/cloudera-labs/cloudera.cloud/pull/52) + - Support for DataFlow Deployments (https://github.com/cloudera-labs/cloudera.cloud/pull/45) + modules: + - description: Gather information about CDP DataFlow CustomFlow Definitions. + name: df_customflow_info + namespace: '' + - description: Enable or Disable CDP DataFlow Deployments. + name: df_deployment + namespace: '' + - description: Gather information about CDP DataFlow Deployments. + name: df_deployment_info + namespace: '' + - description: Import or Delete ReadyFlows from your CDP Tenant. + name: df_readyflow + namespace: '' + - description: Gather information about CDP DataFlow ReadyFlow Definitions. + name: df_readyflow_info + namespace: '' + release_date: '2022-04-07' + 1.7.0: + changes: + bugfixes: + - Fix freeipa parameter for env module (https://github.com/cloudera-labs/cloudera.cloud/pull/61) + - Update DBC restart process (https://github.com/cloudera-labs/cloudera.cloud/pull/66) + minor_changes: + - Add initial testing components (https://github.com/cloudera-labs/cloudera.cloud/pull/65) + - Add support for stopped and started states to datahub cluster (https://github.com/cloudera-labs/cloudera.cloud/pull/57) + - Multi-AZ Datahub support (https://github.com/cloudera-labs/cloudera.cloud/pull/68) + - RAZ Support - PR 49 Redo (https://github.com/cloudera-labs/cloudera.cloud/pull/55) + - Update to handle automated user synchronization (https://github.com/cloudera-labs/cloudera.cloud/pull/53) + modules: + - description: Get the status of the automated CDP Users and Groups synchronization + service. + name: env_automated_user_sync_info + namespace: '' + release_date: '2022-08-02' + 1.7.1: + changes: + bugfixes: + - Remove 'enableRangerRaz' from DL payload for GCP (https://github.com/cloudera-labs/cloudera.cloud/pull/69) + release_date: '2022-08-04' + 1.7.2: + changes: + bugfixes: + - Fix for CDW Virtual Warehouse race condition (https://github.com/cloudera-labs/cloudera.cloud/pull/75) + - Increment collection to 1.7.2 (https://github.com/cloudera-labs/cloudera.cloud/pull/86) + minor_changes: + - Add workflows for PR validation tasks and labeling (https://github.com/cloudera-labs/cloudera.cloud/pull/84) + - Start an environment without starting the datahubs within it (https://github.com/cloudera-labs/cloudera.cloud/pull/76) + - Update collection version to 2.0.0-alpha1 (https://github.com/cloudera-labs/cloudera.cloud/pull/70) + - Update to support ansible-builder (https://github.com/cloudera-labs/cloudera.cloud/pull/85) + release_date: '2023-02-01' + 1.7.3: + changes: + minor_changes: + - Update to support ansible-builder (https://github.com/cloudera-labs/cloudera.cloud/pull/87) + release_date: '2023-02-01' + 1.7.4: + changes: + bugfixes: + - Update bindep installation and execution (https://github.com/cloudera-labs/cloudera.cloud/pull/88) + release_date: '2023-02-03' + 2.0.0: + changes: + bugfixes: + - Add Documentation for Data Visualization (https://github.com/cloudera-labs/cloudera.cloud/pull/106) + - Fix documentation on datahub name length (https://github.com/cloudera-labs/cloudera.cloud/pull/79) + - Update creation parameters to reflect cloud provider specifics (https://github.com/cloudera-labs/cloudera.cloud/pull/102) + - Update multiAz parameter docs (https://github.com/cloudera-labs/cloudera.cloud/pull/93) + minor_changes: + - Add Datalake service lookup (https://github.com/cloudera-labs/cloudera.cloud/pull/97) + - Add FreeIPA lookup plugins (https://github.com/cloudera-labs/cloudera.cloud/pull/100) + - Add GCP region zones parameter (https://github.com/cloudera-labs/cloudera.cloud/pull/101) + - Add backup storage options to env module (https://github.com/cloudera-labs/cloudera.cloud/pull/95) + - Add datahub_service lookup plugin (https://github.com/cloudera-labs/cloudera.cloud/pull/96) + - Add integration targets for CDP Environment and general teardown (https://github.com/cloudera-labs/cloudera.cloud/pull/91) + - Add integration test for cross-account credentials (https://github.com/cloudera-labs/cloudera.cloud/pull/90) + - Add loadbalancer_ips parameter to 'de' module (https://github.com/cloudera-labs/cloudera.cloud/pull/108) + - Add lookup plugins for DL and DH (https://github.com/cloudera-labs/cloudera.cloud/pull/98) + - Add multi-az support for AWS environment and datalake (https://github.com/cloudera-labs/cloudera.cloud/pull/89) + - Add noProxyHosts parameter to cloudera.cloud.env_proxy (https://github.com/cloudera-labs/cloudera.cloud/pull/105) + - Add recipes parameter to cloudera.cloud.datalake (https://github.com/cloudera-labs/cloudera.cloud/pull/107) + - Added modules for custom flows and a fix fixes for deployments. (https://github.com/cloudera-labs/cloudera.cloud/pull/62) + - Configure documentation toolchain with antsibull-docs (https://github.com/cloudera-labs/cloudera.cloud/pull/109) + - Remove PVC Base feature branch (https://github.com/cloudera-labs/cloudera.cloud/pull/110) + - Subnet filters for the DF service (https://github.com/cloudera-labs/cloudera.cloud/pull/64) + - Update payload to use clusterDefinition and clusterTemplate parameters (https://github.com/cloudera-labs/cloudera.cloud/pull/94) + - Update release/v2.0.0 (#117) (https://github.com/cloudera-labs/cloudera.cloud/pull/119) + - Update release/v2.0.0 (https://github.com/cloudera-labs/cloudera.cloud/pull/117) + modules: + - description: Import or Delete CustomFlows into the DataFlow Catalog. + name: df_customflow + namespace: '' + - description: Import CustomFlow versions into the DataFlow Catalog. + name: df_customflow_version + namespace: '' + - description: Create or Delete CDP Data Visualization Instance. + name: dw_data_visualization + namespace: '' + - description: Gather information about CDP Data Visualization Instances. + name: dw_data_visualization_info + namespace: '' + plugins: + lookup: + - description: Get a Datahub definition for a CDP Public Cloud Environment. + name: datahub_definition + namespace: null + - description: Get the instances for a CDP Public Cloud Datahub. + name: datahub_instance + namespace: null + - description: Get the URL for a CDP Public Cloud Datahub service. + name: datahub_service + namespace: null + - description: Get a Datahub template for a CDP Public Cloud Environment. + name: datahub_template + namespace: null + - description: Get the instances for a CDP Public Cloud Datalake. + name: datalake_instance + namespace: null + - description: Get the Datalake Runtime for CDP Public Cloud Environments. + name: datalake_runtime + namespace: null + - description: Get the URL for a CDP Public Cloud Datalake service. + name: datalake_service + namespace: null + - description: Get information about the FreeIPA domain and DNS server IP address(es) + for the selected CDP Public Cloud Environment. + name: env_freeipa_domain + namespace: null + - description: Get information about FreeIPA hosts for selected Environment. + name: env_freeipa_hosts + namespace: null + release_date: '2023-09-28' + 2.0.1: + changes: + bugfixes: + - Ignore errors when deleting Data Hub (https://github.com/cloudera-labs/cloudera.cloud/pull/115) + - Update import for cdp_service in datalake_service lookup plugin (https://github.com/cloudera-labs/cloudera.cloud/pull/122) + - Update pip requirements to update to latest 2.12.* (https://github.com/cloudera-labs/cloudera.cloud/pull/124) + minor_changes: + - Report warning when discovering subnets from filter (https://github.com/cloudera-labs/cloudera.cloud/pull/114) + release_date: '2023-10-05' + 2.1.0: + changes: + bugfixes: + - Update env_idbroker return value to 'idbroker' from 'mappings' (https://github.com/cloudera-labs/cloudera.cloud/pull/92) + minor_changes: + - Add CDP recipe and Data Hub repair modules (https://github.com/cloudera-labs/cloudera.cloud/pull/127) + - Update collection version to 2.1.0 (https://github.com/cloudera-labs/cloudera.cloud/pull/128) + modules: + - description: Manage CDP Datahub recipes on an instance group. + name: datahub_cluster_recipe + namespace: '' + - description: Repair CDP Datahub instances or instance groups. + name: datahub_cluster_repair + namespace: '' + - description: Manage a CDP recipe. + name: recipe + namespace: '' + - description: Gather information about CDP recipes. + name: recipe_info + namespace: '' + release_date: '2023-11-02' + 2.1.1: + changes: + bugfixes: + - Fix malformed return value in API docs (https://github.com/cloudera-labs/cloudera.cloud/pull/130) + release_date: '2023-11-02' + 2.2.0: + changes: + bugfixes: + - Update AWS subnet parameter names for CDW cluster creation (https://github.com/cloudera-labs/cloudera.cloud/pull/132) + minor_changes: + - Add private_cluster parameters (https://github.com/cloudera-labs/cloudera.cloud/pull/133) + release_date: '2023-11-20' + 2.3.0: + changes: + minor_changes: + - Add cdp_region parameters fo CDP Endpoint region (https://github.com/cloudera-labs/cloudera.cloud/pull/136) + release_date: '2023-12-21' + 2.3.1: + changes: + bugfixes: + - Add enterprise to datalake scale parameter (https://github.com/cloudera-labs/cloudera.cloud/pull/141) + release_date: '2024-04-08' + 2.4.0: + changes: + minor_changes: + - Add Ansible Galaxy imports (https://github.com/cloudera-labs/cloudera.cloud/pull/147) + - Add analytics to API documents (https://github.com/cloudera-labs/cloudera.cloud/pull/143) + - Add autoscaling and impala_ha parameters to cdw vw module (https://github.com/cloudera-labs/cloudera.cloud/pull/145) + - Add extra Azure parameters to cloudera.cloud.dw_cluster (https://github.com/cloudera-labs/cloudera.cloud/pull/140) + - Add module defaults groups (https://github.com/cloudera-labs/cloudera.cloud/pull/144) + - Add template and image parameters to dw data viz module (https://github.com/cloudera-labs/cloudera.cloud/pull/146) + - Update to version 2.4.0 (https://github.com/cloudera-labs/cloudera.cloud/pull/148) + release_date: '2024-05-21' + 2.5.0: + changes: + bugfixes: + - Update default value of use_ssd argument in CDE module (https://github.com/cloudera-labs/cloudera.cloud/pull/156) + - Update module example typo (https://github.com/cloudera-labs/cloudera.cloud/pull/154) + minor_changes: + - Add extra top-level parameters for CDW create cluster module (https://github.com/cloudera-labs/cloudera.cloud/pull/155) + - Add pre-commit hooks and workflow (https://github.com/cloudera-labs/cloudera.cloud/pull/157) + trivial: + - Documentation examples updates (https://github.com/cloudera-labs/cloudera.cloud/pull/152) + release_date: '2024-06-27' + 2.5.1: + changes: + minor_changes: + - Increment actions to remove deprecation notices and use main branch for docs construction workflow + release_date: '2024-06-27' From 19c34cc1329103506daaf65dfb50515afbbf2eec Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Tue, 24 Jun 2025 16:33:18 -0400 Subject: [PATCH 08/17] Update for ansible-lint violations Signed-off-by: Webster Mudge --- .ansible-lint-ignore | 1 + .github/workflows/label_pr.yml | 2 +- .github/workflows/pre-commit.yml | 8 +- .github/workflows/publish_docs.yml | 3 +- .github/workflows/publish_galaxy.yml | 1 - .github/workflows/reset_pr.yml | 6 +- .github/workflows/validate_pr.yml | 8 +- .github/workflows/validate_pr_docs.yml | 5 +- .pre-commit-config.yaml | 1 + changelogs/.plugin-cache.yaml | 131 ++-- changelogs/changelog.yaml | 638 +++++++++--------- changelogs/config.yaml | 37 +- docs/docsite/config.yml | 1 - docs/docsite/links.yml | 2 +- galaxy.yml | 49 +- meta/runtime.yml | 2 +- plugins/lookup/env_freeipa_domain.py | 2 - plugins/lookup/env_freeipa_hosts.py | 1 - plugins/modules/account_auth.py | 2 +- plugins/modules/datahub_cluster.py | 4 +- plugins/modules/datahub_cluster_repair.py | 4 +- plugins/modules/datahub_template_info.py | 2 +- plugins/modules/datalake.py | 20 +- plugins/modules/datalake_runtime_info.py | 3 +- plugins/modules/de.py | 4 +- plugins/modules/de_virtual_cluster.py | 2 +- plugins/modules/df_customflow_info.py | 2 +- plugins/modules/df_deployment.py | 3 +- plugins/modules/df_service.py | 9 +- plugins/modules/dw_cluster.py | 2 +- plugins/modules/dw_data_visualization.py | 2 +- plugins/modules/dw_data_visualization_info.py | 1 - plugins/modules/dw_virtual_warehouse.py | 28 +- plugins/modules/env.py | 6 +- plugins/modules/env_auth_info.py | 16 +- plugins/modules/env_cred.py | 2 +- plugins/modules/env_idbroker.py | 6 +- plugins/modules/env_info.py | 2 +- plugins/modules/env_telemetry.py | 4 +- plugins/modules/env_user_sync.py | 2 +- plugins/modules/iam_group.py | 4 +- plugins/modules/iam_user_info.py | 4 +- plugins/modules/ml.py | 8 +- plugins/modules/recipe_info.py | 2 +- tests/config.yml | 3 +- tests/integration/targets/cred/tasks/main.yml | 1 - .../targets/datalake_multi_az/tasks/main.yml | 1 - .../targets/datalake_single_az/tasks/main.yml | 1 - .../targets/environ_multi_az/tasks/main.yml | 1 - .../targets/environ_single_az/tasks/main.yml | 1 - .../targets/idbroker_multi_az/tasks/main.yml | 1 - .../targets/idbroker_single_az/tasks/main.yml | 1 - .../targets/setup_cred/tasks/main.yml | 1 - .../targets/setup_env_multi_az/tasks/main.yml | 1 - .../setup_env_single_az/tasks/main.yml | 1 - .../setup_idbroker_multi_az/tasks/main.yml | 1 - .../setup_idbroker_single_az/tasks/main.yml | 1 - .../targets/teardown_cred/tasks/main.yml | 1 - .../targets/teardown_dl/tasks/main.yml | 1 - .../targets/teardown_environ/tasks/main.yml | 5 +- .../targets/xaccount/tasks/main.yml | 1 - 61 files changed, 521 insertions(+), 544 deletions(-) create mode 100644 .ansible-lint-ignore diff --git a/.ansible-lint-ignore b/.ansible-lint-ignore new file mode 100644 index 0000000..6531ade --- /dev/null +++ b/.ansible-lint-ignore @@ -0,0 +1 @@ +# This file contains ignores rule violations for ansible-lint diff --git a/.github/workflows/label_pr.yml b/.github/workflows/label_pr.yml index dfcd25a..9ee76a5 100644 --- a/.github/workflows/label_pr.yml +++ b/.github/workflows/label_pr.yml @@ -55,7 +55,7 @@ jobs: let fs = require('fs'); fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/pr_number.zip`, Buffer.from(download.data)); - - name: 'Unzip artifact' + - name: "Unzip artifact" run: unzip pr_number.zip - name: Read the PR number diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 1b6688d..80058b5 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,11 +19,10 @@ on: pull_request: push: branches: [main, devel] - jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - - uses: pre-commit/action@v3.0.1 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/publish_docs.yml b/.github/workflows/publish_docs.yml index 604088b..b950f2b 100644 --- a/.github/workflows/publish_docs.yml +++ b/.github/workflows/publish_docs.yml @@ -19,10 +19,9 @@ name: Publish documentation on: push: branches: - - 'main' + - "main" workflow_dispatch: - jobs: build-ansible-docs: name: Build Ansible Docs diff --git a/.github/workflows/publish_galaxy.yml b/.github/workflows/publish_galaxy.yml index b61ebc9..3f39b8b 100644 --- a/.github/workflows/publish_galaxy.yml +++ b/.github/workflows/publish_galaxy.yml @@ -19,7 +19,6 @@ name: Publish to Ansible Galaxy on: release: types: [published] - jobs: galaxy_release: runs-on: ubuntu-latest diff --git a/.github/workflows/reset_pr.yml b/.github/workflows/reset_pr.yml index b3446f6..5f4797b 100644 --- a/.github/workflows/reset_pr.yml +++ b/.github/workflows/reset_pr.yml @@ -23,9 +23,9 @@ on: - synchronize - ready_for_review branches: - - 'release/**' - - 'devel' - - 'devel-pvc-base' + - "release/**" + - "devel" + - "devel-pvc-base" jobs: reset: diff --git a/.github/workflows/validate_pr.yml b/.github/workflows/validate_pr.yml index a6c4da8..711e08d 100644 --- a/.github/workflows/validate_pr.yml +++ b/.github/workflows/validate_pr.yml @@ -19,8 +19,8 @@ name: Validate Pull Request on: pull_request: branches: - - 'release/**' - - 'devel' + - "release/**" + - "devel" jobs: validate: @@ -32,8 +32,8 @@ jobs: - name: Setup Python and caching uses: actions/setup-python@v5 with: - python-version: '3.9' - cache: 'pip' + python-version: "3.9" + cache: "pip" - name: Set up Ansible collections run: | diff --git a/.github/workflows/validate_pr_docs.yml b/.github/workflows/validate_pr_docs.yml index 76dcb10..235fd64 100644 --- a/.github/workflows/validate_pr_docs.yml +++ b/.github/workflows/validate_pr_docs.yml @@ -19,11 +19,10 @@ name: Validate Pull Request documentation on: pull_request: branches: - - 'release/**' - - 'devel' + - "release/**" + - "devel" workflow_dispatch: - jobs: validate-docs: name: Validate Ansible Docs diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9cda92b..0916215 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/changelogs/.plugin-cache.yaml b/changelogs/.plugin-cache.yaml index 2c7d9e5..6ca66d3 100644 --- a/changelogs/.plugin-cache.yaml +++ b/changelogs/.plugin-cache.yaml @@ -1,3 +1,4 @@ +--- objects: role: {} plugins: @@ -39,8 +40,7 @@ plugins: name: datalake_service version_added: 2.0.0 env_freeipa_domain: - description: Get information about the FreeIPA domain and DNS server IP address(es) - for the selected CDP Public Cloud Environment + description: Get information about the FreeIPA domain and DNS server IP address(es) for the selected CDP Public Cloud Environment name: env_freeipa_domain version_added: 2.0.0 env_freeipa_hosts: @@ -51,313 +51,312 @@ plugins: account_auth: description: Gather and set authentication details for a CDP Account name: account_auth - namespace: '' + namespace: "" version_added: 1.0.0 account_auth_info: description: Gather information about CDP Account authentication settings name: account_auth_info - namespace: '' + namespace: "" version_added: 1.0.0 account_cred_info: description: Gather information about Account prerequisites for CDP Credentials name: account_cred_info - namespace: '' + namespace: "" version_added: 1.0.0 datahub_cluster: description: Manage CDP Datahubs name: datahub_cluster - namespace: '' + namespace: "" version_added: 1.0.0 datahub_cluster_info: description: Gather information about CDP Datahubs name: datahub_cluster_info - namespace: '' + namespace: "" version_added: 1.0.0 datahub_cluster_recipe: description: Manage CDP Datahub recipes on an instance group name: datahub_cluster_recipe - namespace: '' + namespace: "" version_added: 2.1.0 datahub_cluster_repair: description: Repair CDP Datahub instances or instance groups name: datahub_cluster_repair - namespace: '' + namespace: "" version_added: 2.1.0 datahub_definition_info: description: Gather information about CDP Datahub Cluster Definitions name: datahub_definition_info - namespace: '' + namespace: "" version_added: 1.3.0 datahub_template_info: description: Gather information about CDP Datahub Cluster Templates name: datahub_template_info - namespace: '' + namespace: "" version_added: 1.0.0 datalake: description: Manage CDP Datalakes name: datalake - namespace: '' + namespace: "" version_added: 1.0.0 datalake_backup: description: Create a backup of a datalake name: datalake_backup - namespace: '' + namespace: "" version_added: 3.0.0 datalake_backup_info: description: Gather information about a Datalake backup name: datalake_backup_info - namespace: '' + namespace: "" version_added: 3.0.0 datalake_info: description: Gather information about CDP Datalakes name: datalake_info - namespace: '' + namespace: "" version_added: 1.0.0 datalake_runtime_info: description: Gather information about CDP Datalake Runtimes name: datalake_runtime_info - namespace: '' + namespace: "" version_added: 1.0.0 de: description: Enable and Disable CDP Data Engineering Services name: de - namespace: '' + namespace: "" version_added: 1.5.0 de_info: description: Gather information about CDP DE Workspaces name: de_info - namespace: '' + namespace: "" version_added: 1.5.0 de_virtual_cluster: description: Create or delete CDP Data Engineering Virtual Clusters name: de_virtual_cluster - namespace: '' + namespace: "" version_added: 1.5.0 de_virtual_cluster_info: description: Gather information about CDP DE virtual clusters name: de_virtual_cluster_info - namespace: '' + namespace: "" version_added: 1.5.0 df_customflow: description: Import or Delete CustomFlows into the DataFlow Catalog name: df_customflow - namespace: '' + namespace: "" version_added: 2.0.0 df_customflow_info: description: Gather information about CDP DataFlow CustomFlow Definitions name: df_customflow_info - namespace: '' + namespace: "" version_added: 1.6.0 df_customflow_version: description: Import CustomFlow versions into the DataFlow Catalog name: df_customflow_version - namespace: '' + namespace: "" version_added: 2.0.0 df_deployment: description: Enable or Disable CDP DataFlow Deployments name: df_deployment - namespace: '' + namespace: "" version_added: 1.6.0 df_deployment_info: description: Gather information about CDP DataFlow Deployments name: df_deployment_info - namespace: '' + namespace: "" version_added: 1.6.0 df_readyflow: description: Import or Delete ReadyFlows from your CDP Tenant name: df_readyflow - namespace: '' + namespace: "" version_added: 1.6.0 df_readyflow_info: description: Gather information about CDP DataFlow ReadyFlow Definitions name: df_readyflow_info - namespace: '' + namespace: "" version_added: 1.6.0 df_service: description: Enable or Disable CDP DataFlow Services name: df_service - namespace: '' + namespace: "" version_added: 1.2.0 df_service_info: description: Gather information about CDP DataFlow Services name: df_service_info - namespace: '' + namespace: "" version_added: 1.2.0 dw_cluster: description: Create or Delete CDP Data Warehouse Clusters name: dw_cluster - namespace: '' + namespace: "" version_added: 1.0.0 dw_cluster_info: description: Gather information about CDP Data Warehouse Clusters name: dw_cluster_info - namespace: '' + namespace: "" version_added: 1.0.0 dw_data_visualization: description: Create or Delete CDP Data Visualization Instance name: dw_data_visualization - namespace: '' + namespace: "" version_added: 2.0.0 dw_data_visualization_info: description: Gather information about CDP Data Visualization Instances name: dw_data_visualization_info - namespace: '' + namespace: "" version_added: 2.0.0 dw_database_catalog: description: Create, manage, and destroy CDP Data Warehouse Database Catalogs name: dw_database_catalog - namespace: '' + namespace: "" version_added: 1.5.0 dw_database_catalog_info: description: Gather information about CDP Data Warehouse Database Catalogs name: dw_database_catalog_info - namespace: '' + namespace: "" version_added: 1.5.0 dw_virtual_warehouse: description: Create, manage, and destroy CDP Data Warehouse Virtual Warehouses name: dw_virtual_warehouse - namespace: '' + namespace: "" version_added: 1.5.0 dw_virtual_warehouse_info: description: Gather information about CDP Data Warehouse Virtual Warehouses name: dw_virtual_warehouse_info - namespace: '' + namespace: "" version_added: 1.5.0 env: description: Manage CDP Environments name: env - namespace: '' + namespace: "" version_added: 1.0.0 env_auth: description: Set authentication details for the current CDP user name: env_auth - namespace: '' + namespace: "" version_added: 1.0.0 env_auth_info: description: Gather information about CDP environment authentication details name: env_auth_info - namespace: '' + namespace: "" version_added: 1.0.0 env_automated_user_sync_info: - description: Get the status of the automated CDP Users and Groups synchronization - service + description: Get the status of the automated CDP Users and Groups synchronization service name: env_automated_user_sync_info - namespace: '' + namespace: "" version_added: 1.7.0 env_cred: description: Create, update, and destroy CDP credentials name: env_cred - namespace: '' + namespace: "" version_added: 1.0.0 env_cred_info: description: Gather information about CDP Credentials name: env_cred_info - namespace: '' + namespace: "" version_added: 1.0.0 env_idbroker: description: Update ID Broker for CDP Environments name: env_idbroker - namespace: '' + namespace: "" version_added: 1.0.0 env_idbroker_info: description: Gather information about CDP ID Broker name: env_idbroker_info - namespace: '' + namespace: "" version_added: 1.0.0 env_info: description: Gather information about CDP Environments name: env_info - namespace: '' + namespace: "" version_added: 1.0.0 env_proxy: description: Create, update, or destroy CDP Environment Proxies name: env_proxy - namespace: '' + namespace: "" version_added: 1.0.0 env_proxy_info: description: Gather information about CDP Environment Proxies name: env_proxy_info - namespace: '' + namespace: "" version_added: 1.0.0 env_telemetry: description: Set CDP environment telemetry name: env_telemetry - namespace: '' + namespace: "" version_added: 1.0.0 env_user_sync: description: Sync CDP Users and Groups to Environments name: env_user_sync - namespace: '' + namespace: "" version_added: 1.0.0 env_user_sync_info: description: Get the status of a CDP Users and Groups sync name: env_user_sync_info - namespace: '' + namespace: "" version_added: 1.0.0 freeipa_info: description: Gather information about FreeIPA name: freeipa_info - namespace: '' + namespace: "" version_added: 1.1.0 iam_group: description: Create, update, or destroy CDP IAM Groups name: iam_group - namespace: '' + namespace: "" version_added: 1.0.0 iam_group_info: description: Gather information about CDP Public IAM groups name: iam_group_info - namespace: '' + namespace: "" version_added: 1.0.0 iam_resource_role_info: description: Gather information about CDP Public IAM resource roles name: iam_resource_role_info - namespace: '' + namespace: "" version_added: 1.0.0 iam_role_info: description: Gather information about CDP Public IAM roles name: iam_role_info - namespace: '' + namespace: "" version_added: 3.0.0 iam_user_info: description: Gather information about CDP Public IAM users name: iam_user_info - namespace: '' + namespace: "" version_added: 1.0.0 ml: description: Create or Destroy CDP Machine Learning Workspaces name: ml - namespace: '' + namespace: "" version_added: 1.0.0 ml_info: description: Gather information about CDP ML Workspaces name: ml_info - namespace: '' + namespace: "" version_added: 1.0.0 ml_workspace_access: description: Grant and revoke user access to CDP Machine Learning Workspaces name: ml_workspace_access - namespace: '' + namespace: "" version_added: 1.1.0 opdb: description: Create or destroy CDP OpDB Databases name: opdb - namespace: '' + namespace: "" version_added: 1.0.0 opdb_info: description: Gather information about CDP OpDB Databases name: opdb_info - namespace: '' + namespace: "" version_added: 1.0.0 recipe: description: Manage a CDP recipe name: recipe - namespace: '' + namespace: "" version_added: 2.1.0 recipe_info: description: Gather information about CDP recipes name: recipe_info - namespace: '' + namespace: "" version_added: 2.1.0 netconf: {} shell: {} diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index be56774..1d49401 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -1,409 +1,407 @@ -ancestor: null +--- +ancestor: releases: 1.0.0: modules: - - description: Gather and set authentication details for a CDP Account. - name: account_auth - namespace: '' - - description: Gather information about CDP Account authentication settings. - name: account_auth_info - namespace: '' - - description: Gather information about Account prerequisites for CDP Credentials. - name: account_cred_info - namespace: '' - - description: Manage CDP Datahubs. - name: datahub_cluster - namespace: '' - - description: Gather information about CDP Datahubs. - name: datahub_cluster_info - namespace: '' - - description: Gather information about CDP Datahub Cluster Templates. - name: datahub_template_info - namespace: '' - - description: Manage CDP Datalakes. - name: datalake - namespace: '' - - description: Gather information about CDP Datalakes. - name: datalake_info - namespace: '' - - description: Gather information about CDP Datalake Runtimes. - name: datalake_runtime_info - namespace: '' - - description: Create or Delete CDP Data Warehouse Clusters. - name: dw_cluster - namespace: '' - - description: Gather information about CDP Data Warehouse Clusters. - name: dw_cluster_info - namespace: '' - - description: Manage CDP Environments. - name: env - namespace: '' - - description: Set authentication details for the current CDP user. - name: env_auth - namespace: '' - - description: Gather information about CDP environment authentication details. - name: env_auth_info - namespace: '' - - description: Create, update, and destroy CDP credentials. - name: env_cred - namespace: '' - - description: Gather information about CDP Credentials. - name: env_cred_info - namespace: '' - - description: Update ID Broker for CDP Environments. - name: env_idbroker - namespace: '' - - description: Gather information about CDP ID Broker. - name: env_idbroker_info - namespace: '' - - description: Gather information about CDP Environments. - name: env_info - namespace: '' - - description: Create, update, or destroy CDP Environment Proxies. - name: env_proxy - namespace: '' - - description: Gather information about CDP Environment Proxies. - name: env_proxy_info - namespace: '' - - description: Set CDP environment telemetry. - name: env_telemetry - namespace: '' - - description: Sync CDP Users and Groups to Environments. - name: env_user_sync - namespace: '' - - description: Get the status of a CDP Users and Groups sync. - name: env_user_sync_info - namespace: '' - - description: Create, update, or destroy CDP IAM Groups. - name: iam_group - namespace: '' - - description: Gather information about CDP Public IAM groups. - name: iam_group_info - namespace: '' - - description: Gather information about CDP Public IAM resource roles. - name: iam_resource_role_info - namespace: '' - - description: Gather information about CDP Public IAM users. - name: iam_user_info - namespace: '' - - description: Create or Destroy CDP Machine Learning Workspaces. - name: ml - namespace: '' - - description: Gather information about CDP ML Workspaces. - name: ml_info - namespace: '' - - description: Create or destroy CDP OpDB Databases. - name: opdb - namespace: '' - - description: Gather information about CDP OpDB Databases. - name: opdb_info - namespace: '' - release_date: '2021-05-03' + - description: Gather and set authentication details for a CDP Account. + name: account_auth + namespace: "" + - description: Gather information about CDP Account authentication settings. + name: account_auth_info + namespace: "" + - description: Gather information about Account prerequisites for CDP Credentials. + name: account_cred_info + namespace: "" + - description: Manage CDP Datahubs. + name: datahub_cluster + namespace: "" + - description: Gather information about CDP Datahubs. + name: datahub_cluster_info + namespace: "" + - description: Gather information about CDP Datahub Cluster Templates. + name: datahub_template_info + namespace: "" + - description: Manage CDP Datalakes. + name: datalake + namespace: "" + - description: Gather information about CDP Datalakes. + name: datalake_info + namespace: "" + - description: Gather information about CDP Datalake Runtimes. + name: datalake_runtime_info + namespace: "" + - description: Create or Delete CDP Data Warehouse Clusters. + name: dw_cluster + namespace: "" + - description: Gather information about CDP Data Warehouse Clusters. + name: dw_cluster_info + namespace: "" + - description: Manage CDP Environments. + name: env + namespace: "" + - description: Set authentication details for the current CDP user. + name: env_auth + namespace: "" + - description: Gather information about CDP environment authentication details. + name: env_auth_info + namespace: "" + - description: Create, update, and destroy CDP credentials. + name: env_cred + namespace: "" + - description: Gather information about CDP Credentials. + name: env_cred_info + namespace: "" + - description: Update ID Broker for CDP Environments. + name: env_idbroker + namespace: "" + - description: Gather information about CDP ID Broker. + name: env_idbroker_info + namespace: "" + - description: Gather information about CDP Environments. + name: env_info + namespace: "" + - description: Create, update, or destroy CDP Environment Proxies. + name: env_proxy + namespace: "" + - description: Gather information about CDP Environment Proxies. + name: env_proxy_info + namespace: "" + - description: Set CDP environment telemetry. + name: env_telemetry + namespace: "" + - description: Sync CDP Users and Groups to Environments. + name: env_user_sync + namespace: "" + - description: Get the status of a CDP Users and Groups sync. + name: env_user_sync_info + namespace: "" + - description: Create, update, or destroy CDP IAM Groups. + name: iam_group + namespace: "" + - description: Gather information about CDP Public IAM groups. + name: iam_group_info + namespace: "" + - description: Gather information about CDP Public IAM resource roles. + name: iam_resource_role_info + namespace: "" + - description: Gather information about CDP Public IAM users. + name: iam_user_info + namespace: "" + - description: Create or Destroy CDP Machine Learning Workspaces. + name: ml + namespace: "" + - description: Gather information about CDP ML Workspaces. + name: ml_info + namespace: "" + - description: Create or destroy CDP OpDB Databases. + name: opdb + namespace: "" + - description: Gather information about CDP OpDB Databases. + name: opdb_info + namespace: "" + release_date: "2021-05-03" 1.1.0: modules: - - description: Gather information about FreeIPA. - name: freeipa_info - namespace: '' - - description: Grant and revoke user access to CDP Machine Learning Workspaces. - name: ml_workspace_access - namespace: '' - release_date: '2021-05-26' + - description: Gather information about FreeIPA. + name: freeipa_info + namespace: "" + - description: Grant and revoke user access to CDP Machine Learning Workspaces. + name: ml_workspace_access + namespace: "" + release_date: "2021-05-26" 1.2.0: changes: bugfixes: - - Fix missing DF docs references (https://github.com/cloudera-labs/cloudera.cloud/pull/14) + - Fix missing DF docs references (https://github.com/cloudera-labs/cloudera.cloud/pull/14) minor_changes: - - Add support for DFX Tech Preview (https://github.com/cloudera-labs/cloudera.cloud/pull/11) + - Add support for DFX Tech Preview (https://github.com/cloudera-labs/cloudera.cloud/pull/11) modules: - - description: Enable or Disable CDP DataFlow Services. - name: df_service - namespace: '' - - description: Gather information about CDP DataFlow Services. - name: df_service_info - namespace: '' - release_date: '2021-06-10' + - description: Enable or Disable CDP DataFlow Services. + name: df_service + namespace: "" + - description: Gather information about CDP DataFlow Services. + name: df_service_info + namespace: "" + release_date: "2021-06-10" 1.3.0: changes: minor_changes: - - Add 'content' flag for including template content. (https://github.com/cloudera-labs/cloudera.cloud/pull/13) - - "Add new definition info module for datahubs and update datahub_cluste\u2026 - (https://github.com/cloudera-labs/cloudera.cloud/pull/12)" + - Add 'content' flag for including template content. (https://github.com/cloudera-labs/cloudera.cloud/pull/13) + - "Add new definition info module for datahubs and update datahub_cluste… (https://github.com/cloudera-labs/cloudera.cloud/pull/12)" modules: - - description: Gather information about CDP Datahub Cluster Definitions. - name: datahub_definition_info - namespace: '' - release_date: '2021-06-15' + - description: Gather information about CDP Datahub Cluster Definitions. + name: datahub_definition_info + namespace: "" + release_date: "2021-06-15" 1.4.0: changes: bugfixes: - - Df module incorrectly refers to deprecated value self.env (https://github.com/cloudera-labs/cloudera.cloud/pull/16) + - Df module incorrectly refers to deprecated value self.env (https://github.com/cloudera-labs/cloudera.cloud/pull/16) minor_changes: - - Add support for endpointaccessgateway for AWS (https://github.com/cloudera-labs/cloudera.cloud/pull/15) - - Changes for DF-beta inclusion (https://github.com/cloudera-labs/cloudera.cloud/pull/17) - - Improve Azure deployment stability (https://github.com/cloudera-labs/cloudera.cloud/pull/24) - - Improve DF Integration (https://github.com/cloudera-labs/cloudera.cloud/pull/20) - - Improve teardown functionality and support purge mode (https://github.com/cloudera-labs/cloudera.cloud/pull/18) - - Update env module to support FreeIPA Instance Count (https://github.com/cloudera-labs/cloudera.cloud/pull/30) + - Add support for endpointaccessgateway for AWS (https://github.com/cloudera-labs/cloudera.cloud/pull/15) + - Changes for DF-beta inclusion (https://github.com/cloudera-labs/cloudera.cloud/pull/17) + - Improve Azure deployment stability (https://github.com/cloudera-labs/cloudera.cloud/pull/24) + - Improve DF Integration (https://github.com/cloudera-labs/cloudera.cloud/pull/20) + - Improve teardown functionality and support purge mode (https://github.com/cloudera-labs/cloudera.cloud/pull/18) + - Update env module to support FreeIPA Instance Count (https://github.com/cloudera-labs/cloudera.cloud/pull/30) removed_features: - - Ciao dynamo (https://github.com/cloudera-labs/cloudera.cloud/pull/23) - - Remove DF dependency until GA (https://github.com/cloudera-labs/cloudera.cloud/pull/25) - release_date: '2021-09-10' + - Ciao dynamo (https://github.com/cloudera-labs/cloudera.cloud/pull/23) + - Remove DF dependency until GA (https://github.com/cloudera-labs/cloudera.cloud/pull/25) + release_date: "2021-09-10" 1.5.0: changes: bugfixes: - - Fix agent_header parameter (https://github.com/cloudera-labs/cloudera.cloud/pull/42) - - Fix module name in API docs (https://github.com/cloudera-labs/cloudera.cloud/pull/44) + - Fix agent_header parameter (https://github.com/cloudera-labs/cloudera.cloud/pull/42) + - Fix module name in API docs (https://github.com/cloudera-labs/cloudera.cloud/pull/44) minor_changes: - - Add 'id' as an alias to 'catalog_id' (https://github.com/cloudera-labs/cloudera.cloud/pull/33) - - Add and update CDW modules (https://github.com/cloudera-labs/cloudera.cloud/pull/29) - - Add configurable user agent for CDPCLI interface (https://github.com/cloudera-labs/cloudera.cloud/pull/38) - - Add support for CDE (https://github.com/cloudera-labs/cloudera.cloud/pull/39) - - Add support for CDE (part 2 - virtual clusters) (https://github.com/cloudera-labs/cloudera.cloud/pull/40) - - Azure AuthZ/Single Resource Group Work - CLOUD (https://github.com/cloudera-labs/cloudera.cloud/pull/43) - - Move DFX Beta implementation to GA process (https://github.com/cloudera-labs/cloudera.cloud/pull/31) + - Add 'id' as an alias to 'catalog_id' (https://github.com/cloudera-labs/cloudera.cloud/pull/33) + - Add and update CDW modules (https://github.com/cloudera-labs/cloudera.cloud/pull/29) + - Add configurable user agent for CDPCLI interface (https://github.com/cloudera-labs/cloudera.cloud/pull/38) + - Add support for CDE (https://github.com/cloudera-labs/cloudera.cloud/pull/39) + - Add support for CDE (part 2 - virtual clusters) (https://github.com/cloudera-labs/cloudera.cloud/pull/40) + - Azure AuthZ/Single Resource Group Work - CLOUD (https://github.com/cloudera-labs/cloudera.cloud/pull/43) + - Move DFX Beta implementation to GA process (https://github.com/cloudera-labs/cloudera.cloud/pull/31) modules: - - description: Enable and Disable CDP Data Engineering Services. - name: de - namespace: '' - - description: Gather information about CDP DE Workspaces. - name: de_info - namespace: '' - - description: Create or delete CDP Data Engineering Virtual Clusters. - name: de_virtual_cluster - namespace: '' - - description: Gather information about CDP DE virtual clusters. - name: de_virtual_cluster_info - namespace: '' - - description: Create, manage, and destroy CDP Data Warehouse Database Catalogs. - name: dw_database_catalog - namespace: '' - - description: Gather information about CDP Data Warehouse Database Catalogs. - name: dw_database_catalog_info - namespace: '' - - description: Create, manage, and destroy CDP Data Warehouse Virtual Warehouses. - name: dw_virtual_warehouse - namespace: '' - - description: Gather information about CDP Data Warehouse Virtual Warehouses. - name: dw_virtual_warehouse_info - namespace: '' - release_date: '2021-11-29' + - description: Enable and Disable CDP Data Engineering Services. + name: de + namespace: "" + - description: Gather information about CDP DE Workspaces. + name: de_info + namespace: "" + - description: Create or delete CDP Data Engineering Virtual Clusters. + name: de_virtual_cluster + namespace: "" + - description: Gather information about CDP DE virtual clusters. + name: de_virtual_cluster_info + namespace: "" + - description: Create, manage, and destroy CDP Data Warehouse Database Catalogs. + name: dw_database_catalog + namespace: "" + - description: Gather information about CDP Data Warehouse Database Catalogs. + name: dw_database_catalog_info + namespace: "" + - description: Create, manage, and destroy CDP Data Warehouse Virtual Warehouses. + name: dw_virtual_warehouse + namespace: "" + - description: Gather information about CDP Data Warehouse Virtual Warehouses. + name: dw_virtual_warehouse_info + namespace: "" + release_date: "2021-11-29" 1.5.1: changes: bugfixes: - - Hotfix env_cred_info (https://github.com/cloudera-labs/cloudera.cloud/pull/47) - release_date: '2022-01-25' + - Hotfix env_cred_info (https://github.com/cloudera-labs/cloudera.cloud/pull/47) + release_date: "2022-01-25" 1.6.0: changes: minor_changes: - - Enable cascade and force parameters for environment deletion (https://github.com/cloudera-labs/cloudera.cloud/pull/52) - - Support for DataFlow Deployments (https://github.com/cloudera-labs/cloudera.cloud/pull/45) + - Enable cascade and force parameters for environment deletion (https://github.com/cloudera-labs/cloudera.cloud/pull/52) + - Support for DataFlow Deployments (https://github.com/cloudera-labs/cloudera.cloud/pull/45) modules: - - description: Gather information about CDP DataFlow CustomFlow Definitions. - name: df_customflow_info - namespace: '' - - description: Enable or Disable CDP DataFlow Deployments. - name: df_deployment - namespace: '' - - description: Gather information about CDP DataFlow Deployments. - name: df_deployment_info - namespace: '' - - description: Import or Delete ReadyFlows from your CDP Tenant. - name: df_readyflow - namespace: '' - - description: Gather information about CDP DataFlow ReadyFlow Definitions. - name: df_readyflow_info - namespace: '' - release_date: '2022-04-07' + - description: Gather information about CDP DataFlow CustomFlow Definitions. + name: df_customflow_info + namespace: "" + - description: Enable or Disable CDP DataFlow Deployments. + name: df_deployment + namespace: "" + - description: Gather information about CDP DataFlow Deployments. + name: df_deployment_info + namespace: "" + - description: Import or Delete ReadyFlows from your CDP Tenant. + name: df_readyflow + namespace: "" + - description: Gather information about CDP DataFlow ReadyFlow Definitions. + name: df_readyflow_info + namespace: "" + release_date: "2022-04-07" 1.7.0: changes: bugfixes: - - Fix freeipa parameter for env module (https://github.com/cloudera-labs/cloudera.cloud/pull/61) - - Update DBC restart process (https://github.com/cloudera-labs/cloudera.cloud/pull/66) + - Fix freeipa parameter for env module (https://github.com/cloudera-labs/cloudera.cloud/pull/61) + - Update DBC restart process (https://github.com/cloudera-labs/cloudera.cloud/pull/66) minor_changes: - - Add initial testing components (https://github.com/cloudera-labs/cloudera.cloud/pull/65) - - Add support for stopped and started states to datahub cluster (https://github.com/cloudera-labs/cloudera.cloud/pull/57) - - Multi-AZ Datahub support (https://github.com/cloudera-labs/cloudera.cloud/pull/68) - - RAZ Support - PR 49 Redo (https://github.com/cloudera-labs/cloudera.cloud/pull/55) - - Update to handle automated user synchronization (https://github.com/cloudera-labs/cloudera.cloud/pull/53) + - Add initial testing components (https://github.com/cloudera-labs/cloudera.cloud/pull/65) + - Add support for stopped and started states to datahub cluster (https://github.com/cloudera-labs/cloudera.cloud/pull/57) + - Multi-AZ Datahub support (https://github.com/cloudera-labs/cloudera.cloud/pull/68) + - RAZ Support - PR 49 Redo (https://github.com/cloudera-labs/cloudera.cloud/pull/55) + - Update to handle automated user synchronization (https://github.com/cloudera-labs/cloudera.cloud/pull/53) modules: - - description: Get the status of the automated CDP Users and Groups synchronization - service. - name: env_automated_user_sync_info - namespace: '' - release_date: '2022-08-02' + - description: Get the status of the automated CDP Users and Groups synchronization service. + name: env_automated_user_sync_info + namespace: "" + release_date: "2022-08-02" 1.7.1: changes: bugfixes: - - Remove 'enableRangerRaz' from DL payload for GCP (https://github.com/cloudera-labs/cloudera.cloud/pull/69) - release_date: '2022-08-04' + - Remove 'enableRangerRaz' from DL payload for GCP (https://github.com/cloudera-labs/cloudera.cloud/pull/69) + release_date: "2022-08-04" 1.7.2: changes: bugfixes: - - Fix for CDW Virtual Warehouse race condition (https://github.com/cloudera-labs/cloudera.cloud/pull/75) - - Increment collection to 1.7.2 (https://github.com/cloudera-labs/cloudera.cloud/pull/86) + - Fix for CDW Virtual Warehouse race condition (https://github.com/cloudera-labs/cloudera.cloud/pull/75) + - Increment collection to 1.7.2 (https://github.com/cloudera-labs/cloudera.cloud/pull/86) minor_changes: - - Add workflows for PR validation tasks and labeling (https://github.com/cloudera-labs/cloudera.cloud/pull/84) - - Start an environment without starting the datahubs within it (https://github.com/cloudera-labs/cloudera.cloud/pull/76) - - Update collection version to 2.0.0-alpha1 (https://github.com/cloudera-labs/cloudera.cloud/pull/70) - - Update to support ansible-builder (https://github.com/cloudera-labs/cloudera.cloud/pull/85) - release_date: '2023-02-01' + - Add workflows for PR validation tasks and labeling (https://github.com/cloudera-labs/cloudera.cloud/pull/84) + - Start an environment without starting the datahubs within it (https://github.com/cloudera-labs/cloudera.cloud/pull/76) + - Update collection version to 2.0.0-alpha1 (https://github.com/cloudera-labs/cloudera.cloud/pull/70) + - Update to support ansible-builder (https://github.com/cloudera-labs/cloudera.cloud/pull/85) + release_date: "2023-02-01" 1.7.3: changes: minor_changes: - - Update to support ansible-builder (https://github.com/cloudera-labs/cloudera.cloud/pull/87) - release_date: '2023-02-01' + - Update to support ansible-builder (https://github.com/cloudera-labs/cloudera.cloud/pull/87) + release_date: "2023-02-01" 1.7.4: changes: bugfixes: - - Update bindep installation and execution (https://github.com/cloudera-labs/cloudera.cloud/pull/88) - release_date: '2023-02-03' + - Update bindep installation and execution (https://github.com/cloudera-labs/cloudera.cloud/pull/88) + release_date: "2023-02-03" 2.0.0: changes: bugfixes: - - Add Documentation for Data Visualization (https://github.com/cloudera-labs/cloudera.cloud/pull/106) - - Fix documentation on datahub name length (https://github.com/cloudera-labs/cloudera.cloud/pull/79) - - Update creation parameters to reflect cloud provider specifics (https://github.com/cloudera-labs/cloudera.cloud/pull/102) - - Update multiAz parameter docs (https://github.com/cloudera-labs/cloudera.cloud/pull/93) + - Add Documentation for Data Visualization (https://github.com/cloudera-labs/cloudera.cloud/pull/106) + - Fix documentation on datahub name length (https://github.com/cloudera-labs/cloudera.cloud/pull/79) + - Update creation parameters to reflect cloud provider specifics (https://github.com/cloudera-labs/cloudera.cloud/pull/102) + - Update multiAz parameter docs (https://github.com/cloudera-labs/cloudera.cloud/pull/93) minor_changes: - - Add Datalake service lookup (https://github.com/cloudera-labs/cloudera.cloud/pull/97) - - Add FreeIPA lookup plugins (https://github.com/cloudera-labs/cloudera.cloud/pull/100) - - Add GCP region zones parameter (https://github.com/cloudera-labs/cloudera.cloud/pull/101) - - Add backup storage options to env module (https://github.com/cloudera-labs/cloudera.cloud/pull/95) - - Add datahub_service lookup plugin (https://github.com/cloudera-labs/cloudera.cloud/pull/96) - - Add integration targets for CDP Environment and general teardown (https://github.com/cloudera-labs/cloudera.cloud/pull/91) - - Add integration test for cross-account credentials (https://github.com/cloudera-labs/cloudera.cloud/pull/90) - - Add loadbalancer_ips parameter to 'de' module (https://github.com/cloudera-labs/cloudera.cloud/pull/108) - - Add lookup plugins for DL and DH (https://github.com/cloudera-labs/cloudera.cloud/pull/98) - - Add multi-az support for AWS environment and datalake (https://github.com/cloudera-labs/cloudera.cloud/pull/89) - - Add noProxyHosts parameter to cloudera.cloud.env_proxy (https://github.com/cloudera-labs/cloudera.cloud/pull/105) - - Add recipes parameter to cloudera.cloud.datalake (https://github.com/cloudera-labs/cloudera.cloud/pull/107) - - Added modules for custom flows and a fix fixes for deployments. (https://github.com/cloudera-labs/cloudera.cloud/pull/62) - - Configure documentation toolchain with antsibull-docs (https://github.com/cloudera-labs/cloudera.cloud/pull/109) - - Remove PVC Base feature branch (https://github.com/cloudera-labs/cloudera.cloud/pull/110) - - Subnet filters for the DF service (https://github.com/cloudera-labs/cloudera.cloud/pull/64) - - Update payload to use clusterDefinition and clusterTemplate parameters (https://github.com/cloudera-labs/cloudera.cloud/pull/94) - - Update release/v2.0.0 (#117) (https://github.com/cloudera-labs/cloudera.cloud/pull/119) - - Update release/v2.0.0 (https://github.com/cloudera-labs/cloudera.cloud/pull/117) + - Add Datalake service lookup (https://github.com/cloudera-labs/cloudera.cloud/pull/97) + - Add FreeIPA lookup plugins (https://github.com/cloudera-labs/cloudera.cloud/pull/100) + - Add GCP region zones parameter (https://github.com/cloudera-labs/cloudera.cloud/pull/101) + - Add backup storage options to env module (https://github.com/cloudera-labs/cloudera.cloud/pull/95) + - Add datahub_service lookup plugin (https://github.com/cloudera-labs/cloudera.cloud/pull/96) + - Add integration targets for CDP Environment and general teardown (https://github.com/cloudera-labs/cloudera.cloud/pull/91) + - Add integration test for cross-account credentials (https://github.com/cloudera-labs/cloudera.cloud/pull/90) + - Add loadbalancer_ips parameter to 'de' module (https://github.com/cloudera-labs/cloudera.cloud/pull/108) + - Add lookup plugins for DL and DH (https://github.com/cloudera-labs/cloudera.cloud/pull/98) + - Add multi-az support for AWS environment and datalake (https://github.com/cloudera-labs/cloudera.cloud/pull/89) + - Add noProxyHosts parameter to cloudera.cloud.env_proxy (https://github.com/cloudera-labs/cloudera.cloud/pull/105) + - Add recipes parameter to cloudera.cloud.datalake (https://github.com/cloudera-labs/cloudera.cloud/pull/107) + - Added modules for custom flows and a fix fixes for deployments. (https://github.com/cloudera-labs/cloudera.cloud/pull/62) + - Configure documentation toolchain with antsibull-docs (https://github.com/cloudera-labs/cloudera.cloud/pull/109) + - Remove PVC Base feature branch (https://github.com/cloudera-labs/cloudera.cloud/pull/110) + - Subnet filters for the DF service (https://github.com/cloudera-labs/cloudera.cloud/pull/64) + - Update payload to use clusterDefinition and clusterTemplate parameters (https://github.com/cloudera-labs/cloudera.cloud/pull/94) + - Update release/v2.0.0 (#117) (https://github.com/cloudera-labs/cloudera.cloud/pull/119) + - Update release/v2.0.0 (https://github.com/cloudera-labs/cloudera.cloud/pull/117) modules: - - description: Import or Delete CustomFlows into the DataFlow Catalog. - name: df_customflow - namespace: '' - - description: Import CustomFlow versions into the DataFlow Catalog. - name: df_customflow_version - namespace: '' - - description: Create or Delete CDP Data Visualization Instance. - name: dw_data_visualization - namespace: '' - - description: Gather information about CDP Data Visualization Instances. - name: dw_data_visualization_info - namespace: '' + - description: Import or Delete CustomFlows into the DataFlow Catalog. + name: df_customflow + namespace: "" + - description: Import CustomFlow versions into the DataFlow Catalog. + name: df_customflow_version + namespace: "" + - description: Create or Delete CDP Data Visualization Instance. + name: dw_data_visualization + namespace: "" + - description: Gather information about CDP Data Visualization Instances. + name: dw_data_visualization_info + namespace: "" plugins: lookup: - - description: Get a Datahub definition for a CDP Public Cloud Environment. - name: datahub_definition - namespace: null - - description: Get the instances for a CDP Public Cloud Datahub. - name: datahub_instance - namespace: null - - description: Get the URL for a CDP Public Cloud Datahub service. - name: datahub_service - namespace: null - - description: Get a Datahub template for a CDP Public Cloud Environment. - name: datahub_template - namespace: null - - description: Get the instances for a CDP Public Cloud Datalake. - name: datalake_instance - namespace: null - - description: Get the Datalake Runtime for CDP Public Cloud Environments. - name: datalake_runtime - namespace: null - - description: Get the URL for a CDP Public Cloud Datalake service. - name: datalake_service - namespace: null - - description: Get information about the FreeIPA domain and DNS server IP address(es) - for the selected CDP Public Cloud Environment. - name: env_freeipa_domain - namespace: null - - description: Get information about FreeIPA hosts for selected Environment. - name: env_freeipa_hosts - namespace: null - release_date: '2023-09-28' + - description: Get a Datahub definition for a CDP Public Cloud Environment. + name: datahub_definition + namespace: + - description: Get the instances for a CDP Public Cloud Datahub. + name: datahub_instance + namespace: + - description: Get the URL for a CDP Public Cloud Datahub service. + name: datahub_service + namespace: + - description: Get a Datahub template for a CDP Public Cloud Environment. + name: datahub_template + namespace: + - description: Get the instances for a CDP Public Cloud Datalake. + name: datalake_instance + namespace: + - description: Get the Datalake Runtime for CDP Public Cloud Environments. + name: datalake_runtime + namespace: + - description: Get the URL for a CDP Public Cloud Datalake service. + name: datalake_service + namespace: + - description: Get information about the FreeIPA domain and DNS server IP address(es) for the selected CDP Public Cloud Environment. + name: env_freeipa_domain + namespace: + - description: Get information about FreeIPA hosts for selected Environment. + name: env_freeipa_hosts + namespace: + release_date: "2023-09-28" 2.0.1: changes: bugfixes: - - Ignore errors when deleting Data Hub (https://github.com/cloudera-labs/cloudera.cloud/pull/115) - - Update import for cdp_service in datalake_service lookup plugin (https://github.com/cloudera-labs/cloudera.cloud/pull/122) - - Update pip requirements to update to latest 2.12.* (https://github.com/cloudera-labs/cloudera.cloud/pull/124) + - Ignore errors when deleting Data Hub (https://github.com/cloudera-labs/cloudera.cloud/pull/115) + - Update import for cdp_service in datalake_service lookup plugin (https://github.com/cloudera-labs/cloudera.cloud/pull/122) + - Update pip requirements to update to latest 2.12.* (https://github.com/cloudera-labs/cloudera.cloud/pull/124) minor_changes: - - Report warning when discovering subnets from filter (https://github.com/cloudera-labs/cloudera.cloud/pull/114) - release_date: '2023-10-05' + - Report warning when discovering subnets from filter (https://github.com/cloudera-labs/cloudera.cloud/pull/114) + release_date: "2023-10-05" 2.1.0: changes: bugfixes: - - Update env_idbroker return value to 'idbroker' from 'mappings' (https://github.com/cloudera-labs/cloudera.cloud/pull/92) + - Update env_idbroker return value to 'idbroker' from 'mappings' (https://github.com/cloudera-labs/cloudera.cloud/pull/92) minor_changes: - - Add CDP recipe and Data Hub repair modules (https://github.com/cloudera-labs/cloudera.cloud/pull/127) - - Update collection version to 2.1.0 (https://github.com/cloudera-labs/cloudera.cloud/pull/128) + - Add CDP recipe and Data Hub repair modules (https://github.com/cloudera-labs/cloudera.cloud/pull/127) + - Update collection version to 2.1.0 (https://github.com/cloudera-labs/cloudera.cloud/pull/128) modules: - - description: Manage CDP Datahub recipes on an instance group. - name: datahub_cluster_recipe - namespace: '' - - description: Repair CDP Datahub instances or instance groups. - name: datahub_cluster_repair - namespace: '' - - description: Manage a CDP recipe. - name: recipe - namespace: '' - - description: Gather information about CDP recipes. - name: recipe_info - namespace: '' - release_date: '2023-11-02' + - description: Manage CDP Datahub recipes on an instance group. + name: datahub_cluster_recipe + namespace: "" + - description: Repair CDP Datahub instances or instance groups. + name: datahub_cluster_repair + namespace: "" + - description: Manage a CDP recipe. + name: recipe + namespace: "" + - description: Gather information about CDP recipes. + name: recipe_info + namespace: "" + release_date: "2023-11-02" 2.1.1: changes: bugfixes: - - Fix malformed return value in API docs (https://github.com/cloudera-labs/cloudera.cloud/pull/130) - release_date: '2023-11-02' + - Fix malformed return value in API docs (https://github.com/cloudera-labs/cloudera.cloud/pull/130) + release_date: "2023-11-02" 2.2.0: changes: bugfixes: - - Update AWS subnet parameter names for CDW cluster creation (https://github.com/cloudera-labs/cloudera.cloud/pull/132) + - Update AWS subnet parameter names for CDW cluster creation (https://github.com/cloudera-labs/cloudera.cloud/pull/132) minor_changes: - - Add private_cluster parameters (https://github.com/cloudera-labs/cloudera.cloud/pull/133) - release_date: '2023-11-20' + - Add private_cluster parameters (https://github.com/cloudera-labs/cloudera.cloud/pull/133) + release_date: "2023-11-20" 2.3.0: changes: minor_changes: - - Add cdp_region parameters fo CDP Endpoint region (https://github.com/cloudera-labs/cloudera.cloud/pull/136) - release_date: '2023-12-21' + - Add cdp_region parameters fo CDP Endpoint region (https://github.com/cloudera-labs/cloudera.cloud/pull/136) + release_date: "2023-12-21" 2.3.1: changes: bugfixes: - - Add enterprise to datalake scale parameter (https://github.com/cloudera-labs/cloudera.cloud/pull/141) - release_date: '2024-04-08' + - Add enterprise to datalake scale parameter (https://github.com/cloudera-labs/cloudera.cloud/pull/141) + release_date: "2024-04-08" 2.4.0: changes: minor_changes: - - Add Ansible Galaxy imports (https://github.com/cloudera-labs/cloudera.cloud/pull/147) - - Add analytics to API documents (https://github.com/cloudera-labs/cloudera.cloud/pull/143) - - Add autoscaling and impala_ha parameters to cdw vw module (https://github.com/cloudera-labs/cloudera.cloud/pull/145) - - Add extra Azure parameters to cloudera.cloud.dw_cluster (https://github.com/cloudera-labs/cloudera.cloud/pull/140) - - Add module defaults groups (https://github.com/cloudera-labs/cloudera.cloud/pull/144) - - Add template and image parameters to dw data viz module (https://github.com/cloudera-labs/cloudera.cloud/pull/146) - - Update to version 2.4.0 (https://github.com/cloudera-labs/cloudera.cloud/pull/148) - release_date: '2024-05-21' + - Add Ansible Galaxy imports (https://github.com/cloudera-labs/cloudera.cloud/pull/147) + - Add analytics to API documents (https://github.com/cloudera-labs/cloudera.cloud/pull/143) + - Add autoscaling and impala_ha parameters to cdw vw module (https://github.com/cloudera-labs/cloudera.cloud/pull/145) + - Add extra Azure parameters to cloudera.cloud.dw_cluster (https://github.com/cloudera-labs/cloudera.cloud/pull/140) + - Add module defaults groups (https://github.com/cloudera-labs/cloudera.cloud/pull/144) + - Add template and image parameters to dw data viz module (https://github.com/cloudera-labs/cloudera.cloud/pull/146) + - Update to version 2.4.0 (https://github.com/cloudera-labs/cloudera.cloud/pull/148) + release_date: "2024-05-21" 2.5.0: changes: bugfixes: - - Update default value of use_ssd argument in CDE module (https://github.com/cloudera-labs/cloudera.cloud/pull/156) - - Update module example typo (https://github.com/cloudera-labs/cloudera.cloud/pull/154) + - Update default value of use_ssd argument in CDE module (https://github.com/cloudera-labs/cloudera.cloud/pull/156) + - Update module example typo (https://github.com/cloudera-labs/cloudera.cloud/pull/154) minor_changes: - - Add extra top-level parameters for CDW create cluster module (https://github.com/cloudera-labs/cloudera.cloud/pull/155) - - Add pre-commit hooks and workflow (https://github.com/cloudera-labs/cloudera.cloud/pull/157) + - Add extra top-level parameters for CDW create cluster module (https://github.com/cloudera-labs/cloudera.cloud/pull/155) + - Add pre-commit hooks and workflow (https://github.com/cloudera-labs/cloudera.cloud/pull/157) trivial: - - Documentation examples updates (https://github.com/cloudera-labs/cloudera.cloud/pull/152) - release_date: '2024-06-27' + - Documentation examples updates (https://github.com/cloudera-labs/cloudera.cloud/pull/152) + release_date: "2024-06-27" 2.5.1: changes: minor_changes: - - Increment actions to remove deprecation notices and use main branch for docs construction workflow - release_date: '2024-06-27' + - Increment actions to remove deprecation notices and use main branch for docs construction workflow + release_date: "2024-06-27" diff --git a/changelogs/config.yaml b/changelogs/config.yaml index 413d07b..f50431b 100644 --- a/changelogs/config.yaml +++ b/changelogs/config.yaml @@ -1,3 +1,4 @@ +--- add_plugin_period: true changelog_nice_yaml: false changelog_sort: alphanumerical @@ -9,28 +10,28 @@ mention_ancestor: true new_plugins_after_name: removed_features notesdir: fragments output: -- file: CHANGELOG.rst - format: rst + - file: CHANGELOG.rst + format: rst prelude_section_name: release_summary prelude_section_title: Release Summary sanitize_changelog: true sections: -- - major_changes - - Major Changes -- - minor_changes - - Minor Changes -- - breaking_changes - - Breaking Changes / Porting Guide -- - deprecated_features - - Deprecated Features -- - removed_features - - Removed Features (previously deprecated) -- - security_fixes - - Security Fixes -- - bugfixes - - Bugfixes -- - known_issues - - Known Issues + - - major_changes + - Major Changes + - - minor_changes + - Minor Changes + - - breaking_changes + - Breaking Changes / Porting Guide + - - deprecated_features + - Deprecated Features + - - removed_features + - Removed Features (previously deprecated) + - - security_fixes + - Security Fixes + - - bugfixes + - Bugfixes + - - known_issues + - Known Issues title: Cloudera.Cloud trivial_section_name: trivial use_fqcn: true diff --git a/docs/docsite/config.yml b/docs/docsite/config.yml index 72d4a14..b6703c2 100644 --- a/docs/docsite/config.yml +++ b/docs/docsite/config.yml @@ -16,7 +16,6 @@ # The following `.. envvar::` directives are defined in the extra docsite docs: envvar_directives: [] - # Changelog configuration (added in antsibull-docs 2.10.0) changelog: # Whether to write the changelog (taken from changelogs/changelog.yaml, see the diff --git a/docs/docsite/links.yml b/docs/docsite/links.yml index 22006e5..f5344bd 100644 --- a/docs/docsite/links.yml +++ b/docs/docsite/links.yml @@ -17,7 +17,7 @@ edit_on_github: repository: cloudera-labs/cloudera.cloud branch: main - path_prefix: '' + path_prefix: "" extra_links: - description: Submit a bug report diff --git a/galaxy.yml b/galaxy.yml index a452b55..9ded00d 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -14,10 +14,10 @@ --- -namespace: cloudera -name: cloud -version: 2.5.1 -readme: README.md +namespace: cloudera +name: cloud +version: 2.5.1 +readme: README.md authors: - Jim Enright @jenright - Ronald Suplina @rsuplina @@ -28,26 +28,29 @@ description: > provided by the Cloudera on cloud and on premises platforms. license_file: LICENSE tags: -- cloudera -- cdp -- data_service -- data_hub + - cloudera + - cdp + - data_service + - data_hub + - cloud + - infrastructure + - security + - storage + - application + - database dependencies: {} - -repository: https://github.com/cloudera-labs/cloudera.cloud -homepage: https://github.com/cloudera-labs/cloudera.cloud -issues: https://github.com/cloudera-labs/cloudera.cloud/issues -documentation: https://cloudera-labs.github.io/cloudera.cloud +repository: https://github.com/cloudera-labs/cloudera.cloud +homepage: https://github.com/cloudera-labs/cloudera.cloud +issues: https://github.com/cloudera-labs/cloudera.cloud/issues +documentation: https://cloudera-labs.github.io/cloudera.cloud build_ignore: -- '.*' -- '*.log' -- '*.tar.gz' -- docs -- docsbuild -- tests -- pytest.ini -- builder - -... + - ".*" + - "*.log" + - "*.tar.gz" + - docs + - docsbuild + - tests + - pytest.ini + - builder diff --git a/meta/runtime.yml b/meta/runtime.yml index e239456..aa36368 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -14,7 +14,7 @@ --- -requires_ansible: ">=2.10" +requires_ansible: ">=2.15.0" action_groups: # TODO Convert to use 'extend_group' diff --git a/plugins/lookup/env_freeipa_domain.py b/plugins/lookup/env_freeipa_domain.py index 750739d..5719650 100644 --- a/plugins/lookup/env_freeipa_domain.py +++ b/plugins/lookup/env_freeipa_domain.py @@ -53,8 +53,6 @@ - name: Retrieve the FreeIPA domain and host IP addresses for a CDP Public Cloud Environment ansible.builtin.debug: msg: "{{ lookup('cloudera.cloud.env_freeipa_domain', 'example-env' , detailed=True ) }}" - - """ RETURN = """ diff --git a/plugins/lookup/env_freeipa_hosts.py b/plugins/lookup/env_freeipa_hosts.py index aa2ceab..55be997 100644 --- a/plugins/lookup/env_freeipa_hosts.py +++ b/plugins/lookup/env_freeipa_hosts.py @@ -56,7 +56,6 @@ - name: Retrieve more detailied information for the FreeIPA hosts for a single CDP Public Cloud Environment ansible.builtin.debug: msg: "{{ lookup('cloudera.cloud.env_freeipa_hosts', environment='example-env-aws', detailed=True) }}" - """ RETURN = """ diff --git a/plugins/modules/account_auth.py b/plugins/modules/account_auth.py index 492c74b..6784a5b 100644 --- a/plugins/modules/account_auth.py +++ b/plugins/modules/account_auth.py @@ -58,7 +58,7 @@ # Disable Cloudera SSO login for all non-admin users - cloudera.cloud.account_auth: - disable_sso: yes + disable_sso: true # Set the password expiration to 7 days - cloudera.cloud.account_auth: diff --git a/plugins/modules/datahub_cluster.py b/plugins/modules/datahub_cluster.py index 1623c1f..ec25ec7 100644 --- a/plugins/modules/datahub_cluster.py +++ b/plugins/modules/datahub_cluster.py @@ -248,7 +248,7 @@ volumeType: volume-type-for-cloud-provider tags: project: Arbitrary content - wait: no + wait: false - name: Create a datahub specifying only a definition name cloudera.cloud.datahub_cluster: @@ -257,7 +257,7 @@ definition: definition-name tags: project: Arbitrary content - wait: no + wait: false - name: Stop the datahub (and wait for status change) cloudera.cloud.datahub_cluster: diff --git a/plugins/modules/datahub_cluster_repair.py b/plugins/modules/datahub_cluster_repair.py index 35bbedb..e8f5d51 100644 --- a/plugins/modules/datahub_cluster_repair.py +++ b/plugins/modules/datahub_cluster_repair.py @@ -103,13 +103,13 @@ instances: - i-08fa9ff7694dca0a8 - i-0ea1b60d9a103ab36 - delete_volumes: yes + delete_volumes: true - name: Replace multiple instances sequentially (i.e. rollout) cloudera.cloud.datahub_cluster_repair: datahub: example-datahub instances: "{{ instance_id }}" - wait: yes # implied + wait: true # implied loop: "{{ query('cloudera.cloud.datahub_instance', 'core_broker', datahub='example-datahub', detailed=True) | flatten | map(attribute='id') | list }}" loop_control: loop_var: instance_id diff --git a/plugins/modules/datahub_template_info.py b/plugins/modules/datahub_template_info.py index 7256203..189e8ef 100644 --- a/plugins/modules/datahub_template_info.py +++ b/plugins/modules/datahub_template_info.py @@ -61,7 +61,7 @@ # Gather detailed information about a named Datahub, including the template contents in JSON - cloudera.cloud.datahub_template_info: name: example-template - return_content: yes + return_content: true """ RETURN = r""" diff --git a/plugins/modules/datalake.py b/plugins/modules/datalake.py index a7d5586..63e1c0e 100644 --- a/plugins/modules/datalake.py +++ b/plugins/modules/datalake.py @@ -202,28 +202,28 @@ EXAMPLES = r""" # Note: These examples do not set authentication details. -# Create a datalake in AWS -- cloudera.cloud.datalake: +- name: Create a datalake in AWS + cloudera.cloud.datalake: name: example-datalake state: present environment: an-aws-environment-name-or-crn - instance_profile: arn:aws:iam::1111104421142:instance-profile/example-role - storage: s3a://example-bucket/datalake/data + instance_profile: "arn:aws:iam::1111104421142:instance-profile/example-role" + storage: "s3a://example-bucket/datalake/data" tags: project: Arbitrary content -# Create a datalake in AWS, but don't wait for completion (see datalake_info for datalake status) -- cloudera.cloud.datalake: +- name: Create a datalake in AWS, but don't wait for completion (see datalake_info for datalake status) + cloudera.cloud.datalake: name: example-datalake state: present - wait: no + wait: false environment: an-aws-environment-name-or-crn - instance_profile: arn:aws:iam::1111104421142:instance-profile/example-role - storage: s3a://example-bucket/datalake/data + instance_profile: "arn:aws:iam::1111104421142:instance-profile/example-role" + storage: "s3a://example-bucket/datalake/data" tags: project: Arbitrary content -# Delete the datalake (and wait for status change) +- name: Delete the datalake (and wait for status change) cloudera.cloud.datalake: name: example-datalake state: absent diff --git a/plugins/modules/datalake_runtime_info.py b/plugins/modules/datalake_runtime_info.py index 1ef4d18..dc2646a 100644 --- a/plugins/modules/datalake_runtime_info.py +++ b/plugins/modules/datalake_runtime_info.py @@ -46,8 +46,7 @@ # List basic information about the default Datalake Runtime - cloudera.cloud.datalake_runtime_info: - default: yes - + default: true """ RETURN = r""" diff --git a/plugins/modules/de.py b/plugins/modules/de.py index 75695e1..76b68e1 100644 --- a/plugins/modules/de.py +++ b/plugins/modules/de.py @@ -193,14 +193,14 @@ env: cdp-environment-name instance_type: "m5.2xlarge" state: present - wait: yes + wait: true # Remove a DE service without waiting - cloudera.cloud.de: name: cde-cloudera-deploy-example+ env: cdp-environment-name state: absent - wait: no + wait: false """ RETURN = r""" diff --git a/plugins/modules/de_virtual_cluster.py b/plugins/modules/de_virtual_cluster.py index c801ef9..dc2daee 100644 --- a/plugins/modules/de_virtual_cluster.py +++ b/plugins/modules/de_virtual_cluster.py @@ -115,7 +115,7 @@ cluster_name: cde-service-name env: cdp-environment-name state: present - wait: True + wait: true delay: 30 timeout: 600 """ diff --git a/plugins/modules/df_customflow_info.py b/plugins/modules/df_customflow_info.py index a922c94..69b8a16 100644 --- a/plugins/modules/df_customflow_info.py +++ b/plugins/modules/df_customflow_info.py @@ -53,7 +53,7 @@ # Gather summary information about a specific DataFlow Flow Definition using a name - cloudera.cloud.df_customflow_info: name: my-flow-name - include_details: False + include_details: false """ RETURN = r""" diff --git a/plugins/modules/df_deployment.py b/plugins/modules/df_deployment.py index 2dbb1ba..81cbe9a 100644 --- a/plugins/modules/df_deployment.py +++ b/plugins/modules/df_deployment.py @@ -171,11 +171,10 @@ name: my-flow-name df_name: my-env-name state: absent - wait: yes + wait: true async: 3600 poll: 0 register: __my_teardown_request - """ RETURN = r""" diff --git a/plugins/modules/df_service.py b/plugins/modules/df_service.py index c8bdd2e..bf28441 100644 --- a/plugins/modules/df_service.py +++ b/plugins/modules/df_service.py @@ -176,23 +176,22 @@ name: my-service nodes_min: 3 nodes_max: 10 - public_loadbalancer: True + public_loadbalancer: true cluster_subnets_filter: "[?contains(subnetName, 'pvt')]" loadbalancer_subnets_filter: "[?contains(subnetName, 'pub')]" k8s_ip_ranges: ['192.168.0.1/24'] state: present - wait: yes + wait: true # Remove a Dataflow Service with Async wait - cloudera.cloud.df_service: name: my-service - persist: False + persist: false state: absent - wait: yes + wait: true async: 3600 poll: 0 register: __my_teardown_request - """ RETURN = r""" diff --git a/plugins/modules/dw_cluster.py b/plugins/modules/dw_cluster.py index ad03e04..cb496aa 100644 --- a/plugins/modules/dw_cluster.py +++ b/plugins/modules/dw_cluster.py @@ -210,7 +210,7 @@ env_crn: crn:cdp:environments... azure: subnet: my-subnet-name - enable_az: yes + enable_az: true managed_identity: my-aks-managed-identity # Request AWS Cluster Creation diff --git a/plugins/modules/dw_data_visualization.py b/plugins/modules/dw_data_visualization.py index 845236d..0d9347d 100644 --- a/plugins/modules/dw_data_visualization.py +++ b/plugins/modules/dw_data_visualization.py @@ -121,7 +121,7 @@ environment: example-env name: example-name config: - userGroups: "[ example_user_group ]" + userGroups: "[ example_user_group ]" adminGroups: "[ example_admin_group ]" state: present diff --git a/plugins/modules/dw_data_visualization_info.py b/plugins/modules/dw_data_visualization_info.py index 5b966f4..0ed43b9 100644 --- a/plugins/modules/dw_data_visualization_info.py +++ b/plugins/modules/dw_data_visualization_info.py @@ -76,7 +76,6 @@ - cloudera.cloud.dw_data_visualization_info: cluster_id: env-xyzabc data_visualization_name: example-name - """ RETURN = r""" diff --git a/plugins/modules/dw_virtual_warehouse.py b/plugins/modules/dw_virtual_warehouse.py index 3639366..48376eb 100644 --- a/plugins/modules/dw_virtual_warehouse.py +++ b/plugins/modules/dw_virtual_warehouse.py @@ -283,7 +283,7 @@ min_nodes: 3 max_nodes: 19 tags: - some_key: "some value" + some_key: "some value" enable_sso: true ldap_groups: ['group1', 'group2', 'group3'] @@ -294,21 +294,21 @@ type: "hive" tshirt_size: "xsmall" enable_sso: true - ldap_groups: ['group1','group2','group3'] + ldap_groups: ['group1', 'group2', 'group3'] common_configs: - configBlocks: - - id: das-ranger-policymgr - format: HADOOP_XML - content: - keyValues: - 'xasecure.policymgr.clientssl.truststore': '/path_to_ca_cert/cacerts' + configBlocks: + - id: das-ranger-policymgr + format: HADOOP_XML + content: + keyValues: + 'xasecure.policymgr.clientssl.truststore': '/path_to_ca_cert/cacerts' application_configs: - das-webapp: - configBlocks: - - id: hive-kerberos-config - format: TEXT - content: - text: "\n[libdefaults]\n\trenew_lifetime = 7d" + das-webapp: + configBlocks: + - id: hive-kerberos-config + format: TEXT + content: + text: "\n[libdefaults]\n\trenew_lifetime = 7d" # Delete a Virtual Warehouse - cloudera.cloud.dw_virtual_warehouse: diff --git a/plugins/modules/env.py b/plugins/modules/env.py index 22e8403..e4bcd85 100644 --- a/plugins/modules/env.py +++ b/plugins/modules/env.py @@ -331,7 +331,7 @@ - cloudera.cloud.env: name: example-environment state: present - wait: no + wait: false credential: example-credential cloud: aws region: us-east-1 @@ -342,7 +342,7 @@ inbound_cidr: 0.0.0.0/0 freeipa: instanceCountByGroup: 3 - multiAz: yes + multiAz: true tags: project: Arbitrary content @@ -362,7 +362,7 @@ state: started # Delete the environment (and wait for status change) - cloudera.cloud.env: +- cloudera.cloud.env: name: example-module state: absent diff --git a/plugins/modules/env_auth_info.py b/plugins/modules/env_auth_info.py index 69ef484..8629933 100644 --- a/plugins/modules/env_auth_info.py +++ b/plugins/modules/env_auth_info.py @@ -77,24 +77,24 @@ # Retrieve only the root certificate for a single environment - cloudera.cloud.env_auth_info: name: the-environment - root_certificate: yes - keytab: no + root_certificate: true + keytab: false # Retrieve the root certificate for multiple environments - cloudera.cloud.env_auth_info: name: - one-environment - two-environment - root_certificate: yes - keytab: no + root_certificate: true + keytab: false # Retrieve the keytab details for the current CDP user for selected environments - cloudera.cloud.env_auth_info: name: - one-environment - two-environment - keytab: yes - root_certificate: no + keytab: true + root_certificate: false # Retrieve the keytab details for the specified users for selected environments - cloudera.cloud.env_auth_info: @@ -104,8 +104,8 @@ user: - UserA - UserB - keytab: yes - root_certificate: no + keytab: true + root_certificate: false """ RETURN = r""" diff --git a/plugins/modules/env_cred.py b/plugins/modules/env_cred.py index 745d355..187f917 100644 --- a/plugins/modules/env_cred.py +++ b/plugins/modules/env_cred.py @@ -126,7 +126,7 @@ # Create a CDP Credential for AWS and log the output of the CDP SDK in the return values - cloudera.cloud.env_cred: name: example-credential - debug: yes + debug: true """ RETURN = r""" diff --git a/plugins/modules/env_idbroker.py b/plugins/modules/env_idbroker.py index 9531ff7..325bb7f 100644 --- a/plugins/modules/env_idbroker.py +++ b/plugins/modules/env_idbroker.py @@ -148,7 +148,7 @@ # Clear the actor-to-role mappings for ID Broker on an existing environment - cloudera.cloud.env_idbroker: name: example-environment - clear_mappings: yes + clear_mappings: true # Don't sync the mappings for ID Broker to the environment's datalakes - cloudera.cloud.env_idbroker: @@ -156,12 +156,12 @@ mappings: - accessor: crn:altus:iam:us-west-1:1234:group:some-group/abcd-1234-efghi role: arn:aws:iam::654468598544:role/another-data-access-role - sync: no + sync: false # Now sync the mappings for the ID Broker once the environment has a datalake - cloudera.cloud.env_idbroker: name: example-environment - sync: yes + sync: true """ RETURN = r""" diff --git a/plugins/modules/env_info.py b/plugins/modules/env_info.py index f889027..a20110e 100644 --- a/plugins/modules/env_info.py +++ b/plugins/modules/env_info.py @@ -53,7 +53,7 @@ # Gather detailed information about a named Environment - cloudera.cloud.env_info: name: example-environment - descendants: True + descendants: true """ RETURN = r""" diff --git a/plugins/modules/env_telemetry.py b/plugins/modules/env_telemetry.py index 2231303..d6f2a2b 100644 --- a/plugins/modules/env_telemetry.py +++ b/plugins/modules/env_telemetry.py @@ -59,8 +59,8 @@ # Turn off both workload analytics and log collection - cloudera.cloud.env_telemetry: name: the-environment - workload_analytics: no - logs_collection: no + workload_analytics: false + logs_collection: false """ RETURN = r""" diff --git a/plugins/modules/env_user_sync.py b/plugins/modules/env_user_sync.py index 60a808c..cc0747b 100644 --- a/plugins/modules/env_user_sync.py +++ b/plugins/modules/env_user_sync.py @@ -83,7 +83,7 @@ # Sync the current CDP User - cloudera.cloud.env_user_sync: - current_user: yes + current_user: true """ RETURN = r""" diff --git a/plugins/modules/iam_group.py b/plugins/modules/iam_group.py index bb65b0f..9ac4ec5 100644 --- a/plugins/modules/iam_group.py +++ b/plugins/modules/iam_group.py @@ -119,7 +119,7 @@ - cloudera.cloud.iam_group: state: present name: group-example - sync: no + sync: false # Delete a group - cloudera.cloud.iam_group: @@ -146,7 +146,7 @@ resource_roles: - role-c - role-d - purge: yes + purge: true """ RETURN = r""" diff --git a/plugins/modules/iam_user_info.py b/plugins/modules/iam_user_info.py index 660cf8d..6cb063b 100644 --- a/plugins/modules/iam_user_info.py +++ b/plugins/modules/iam_user_info.py @@ -83,11 +83,11 @@ # Gather detailed information about a named User - cloudera.cdp.iam_user_info: filter: - workloadUsername: my[0-9]{2}_admin.*?' + workloadUsername: my[0-9]{2}_admin.*?' # Gather detailed information about the current user - cloudera.cloud.iam_user_info: - current_user: yes + current_user: true """ RETURN = r""" diff --git a/plugins/modules/ml.py b/plugins/modules/ml.py index 9777bb5..22c6a35 100644 --- a/plugins/modules/ml.py +++ b/plugins/modules/ml.py @@ -328,8 +328,8 @@ - cloudera.cloud.ml: name: ml-example env: cdp-env - tls: no - wait: yes + tls: false + wait: true # Create a ML Workspace (in AWS) with a custom Kubernetes request configuration - cloudera.cloud.ml: @@ -361,14 +361,14 @@ instanceType: "p2.8xlarge" rootVolume: size: 40 - wait: yes + wait: true # Remove a ML Workspace, but return immediately - cloudera.cloud.ml: name: ml-example env: cdp-env state: absent - wait: no + wait: false """ RETURN = r""" diff --git a/plugins/modules/recipe_info.py b/plugins/modules/recipe_info.py index 18fecf0..39c7f33 100644 --- a/plugins/modules/recipe_info.py +++ b/plugins/modules/recipe_info.py @@ -62,7 +62,7 @@ - name: Gather detailed information about a named recipe cloudera.cloud.recipe_info: name: example-recipe - return_content: yes + return_content: true register: my_recipe """ diff --git a/tests/config.yml b/tests/config.yml index fb30b8a..bc6ceee 100644 --- a/tests/config.yml +++ b/tests/config.yml @@ -1,3 +1,4 @@ +--- # Copyright 2023 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,4 +19,4 @@ # - https://github.com/ansible/ansible/blob/devel/test/lib/ansible_test/config/config.yml modules: - python_requires: '>=3.6' + python_requires: ">=3.6" diff --git a/tests/integration/targets/cred/tasks/main.yml b/tests/integration/targets/cred/tasks/main.yml index d2ca94a..91242df 100644 --- a/tests/integration/targets/cred/tasks/main.yml +++ b/tests/integration/targets/cred/tasks/main.yml @@ -1,5 +1,4 @@ --- - # Copyright 2023 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/integration/targets/datalake_multi_az/tasks/main.yml b/tests/integration/targets/datalake_multi_az/tasks/main.yml index 9c5a717..592b34b 100644 --- a/tests/integration/targets/datalake_multi_az/tasks/main.yml +++ b/tests/integration/targets/datalake_multi_az/tasks/main.yml @@ -1,5 +1,4 @@ --- - # Copyright 2023 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/integration/targets/datalake_single_az/tasks/main.yml b/tests/integration/targets/datalake_single_az/tasks/main.yml index 54a33e4..eabbcaa 100644 --- a/tests/integration/targets/datalake_single_az/tasks/main.yml +++ b/tests/integration/targets/datalake_single_az/tasks/main.yml @@ -1,5 +1,4 @@ --- - # Copyright 2023 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/integration/targets/environ_multi_az/tasks/main.yml b/tests/integration/targets/environ_multi_az/tasks/main.yml index 9796935..d2dbadd 100644 --- a/tests/integration/targets/environ_multi_az/tasks/main.yml +++ b/tests/integration/targets/environ_multi_az/tasks/main.yml @@ -1,5 +1,4 @@ --- - # Copyright 2023 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/integration/targets/environ_single_az/tasks/main.yml b/tests/integration/targets/environ_single_az/tasks/main.yml index 61b03b8..b2ef4ba 100644 --- a/tests/integration/targets/environ_single_az/tasks/main.yml +++ b/tests/integration/targets/environ_single_az/tasks/main.yml @@ -1,5 +1,4 @@ --- - # Copyright 2023 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/integration/targets/idbroker_multi_az/tasks/main.yml b/tests/integration/targets/idbroker_multi_az/tasks/main.yml index b306663..ee17279 100644 --- a/tests/integration/targets/idbroker_multi_az/tasks/main.yml +++ b/tests/integration/targets/idbroker_multi_az/tasks/main.yml @@ -1,5 +1,4 @@ --- - # Copyright 2023 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/integration/targets/idbroker_single_az/tasks/main.yml b/tests/integration/targets/idbroker_single_az/tasks/main.yml index 9b04494..f00a43e 100644 --- a/tests/integration/targets/idbroker_single_az/tasks/main.yml +++ b/tests/integration/targets/idbroker_single_az/tasks/main.yml @@ -1,5 +1,4 @@ --- - # Copyright 2023 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/integration/targets/setup_cred/tasks/main.yml b/tests/integration/targets/setup_cred/tasks/main.yml index a94d345..0cba19d 100644 --- a/tests/integration/targets/setup_cred/tasks/main.yml +++ b/tests/integration/targets/setup_cred/tasks/main.yml @@ -1,5 +1,4 @@ --- - # Copyright 2023 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/integration/targets/setup_env_multi_az/tasks/main.yml b/tests/integration/targets/setup_env_multi_az/tasks/main.yml index 23c32f3..5682d17 100644 --- a/tests/integration/targets/setup_env_multi_az/tasks/main.yml +++ b/tests/integration/targets/setup_env_multi_az/tasks/main.yml @@ -1,5 +1,4 @@ --- - # Copyright 2023 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/integration/targets/setup_env_single_az/tasks/main.yml b/tests/integration/targets/setup_env_single_az/tasks/main.yml index 8c16d30..c822bb9 100644 --- a/tests/integration/targets/setup_env_single_az/tasks/main.yml +++ b/tests/integration/targets/setup_env_single_az/tasks/main.yml @@ -1,5 +1,4 @@ --- - # Copyright 2023 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/integration/targets/setup_idbroker_multi_az/tasks/main.yml b/tests/integration/targets/setup_idbroker_multi_az/tasks/main.yml index 0bfa8f8..2976c62 100644 --- a/tests/integration/targets/setup_idbroker_multi_az/tasks/main.yml +++ b/tests/integration/targets/setup_idbroker_multi_az/tasks/main.yml @@ -1,5 +1,4 @@ --- - # Copyright 2023 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/integration/targets/setup_idbroker_single_az/tasks/main.yml b/tests/integration/targets/setup_idbroker_single_az/tasks/main.yml index 1eaf0a0..dd481c2 100644 --- a/tests/integration/targets/setup_idbroker_single_az/tasks/main.yml +++ b/tests/integration/targets/setup_idbroker_single_az/tasks/main.yml @@ -1,5 +1,4 @@ --- - # Copyright 2023 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/integration/targets/teardown_cred/tasks/main.yml b/tests/integration/targets/teardown_cred/tasks/main.yml index 4abeb87..c225e2c 100644 --- a/tests/integration/targets/teardown_cred/tasks/main.yml +++ b/tests/integration/targets/teardown_cred/tasks/main.yml @@ -1,5 +1,4 @@ --- - # Copyright 2023 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/integration/targets/teardown_dl/tasks/main.yml b/tests/integration/targets/teardown_dl/tasks/main.yml index 5011536..f459fa1 100644 --- a/tests/integration/targets/teardown_dl/tasks/main.yml +++ b/tests/integration/targets/teardown_dl/tasks/main.yml @@ -1,5 +1,4 @@ --- - # Copyright 2023 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/tests/integration/targets/teardown_environ/tasks/main.yml b/tests/integration/targets/teardown_environ/tasks/main.yml index 5f2e039..1393b1a 100644 --- a/tests/integration/targets/teardown_environ/tasks/main.yml +++ b/tests/integration/targets/teardown_environ/tasks/main.yml @@ -1,5 +1,4 @@ --- - # Copyright 2023 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,13 +16,13 @@ - name: Destroy integration testing multi-AZ Environment cloudera.cloud.env: name: "{{ environment_multi_az }}" - cascade: yes + cascade: true state: absent register: __env_multi_az - name: Destroy integration testing single-AZ Environment cloudera.cloud.env: name: "{{ environment_single_az }}" - cascade: yes + cascade: true state: absent register: __env_single_az diff --git a/tests/integration/targets/xaccount/tasks/main.yml b/tests/integration/targets/xaccount/tasks/main.yml index 6691ac3..0f74313 100644 --- a/tests/integration/targets/xaccount/tasks/main.yml +++ b/tests/integration/targets/xaccount/tasks/main.yml @@ -1,5 +1,4 @@ --- - # Copyright 2023 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); From 1bd1b816ad0299f43bd120f24ef313cd2f90c575 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Tue, 24 Jun 2025 16:54:40 -0400 Subject: [PATCH 09/17] Update pre-commit and its hooks for ansible-lint, black, and multiple checks Signed-off-by: Webster Mudge --- .pre-commit-config.yaml | 25 +++- plugins/lookup/datahub_definition.py | 12 +- plugins/lookup/datahub_instance.py | 6 +- plugins/lookup/datahub_service.py | 4 +- plugins/lookup/datahub_template.py | 10 +- plugins/lookup/datalake_instance.py | 8 +- plugins/lookup/datalake_runtime.py | 2 +- plugins/lookup/datalake_service.py | 11 +- plugins/lookup/env_freeipa_domain.py | 2 +- plugins/lookup/env_freeipa_hosts.py | 4 +- plugins/module_utils/cdp_common.py | 12 +- plugins/module_utils/cdp_service.py | 11 +- plugins/modules/account_auth.py | 4 +- plugins/modules/account_auth_info.py | 3 +- plugins/modules/account_cred_info.py | 2 +- plugins/modules/datahub_cluster.py | 58 ++++---- plugins/modules/datahub_cluster_recipe.py | 2 +- plugins/modules/datahub_cluster_repair.py | 10 +- plugins/modules/datahub_definition_info.py | 2 +- plugins/modules/datahub_template_info.py | 2 +- plugins/modules/datalake.py | 81 +++++++----- plugins/modules/datalake_backup.py | 15 ++- plugins/modules/datalake_backup_info.py | 12 +- plugins/modules/datalake_runtime_info.py | 6 +- plugins/modules/de.py | 46 ++++--- plugins/modules/de_info.py | 8 +- plugins/modules/de_virtual_cluster.py | 40 +++--- plugins/modules/df_customflow.py | 8 +- plugins/modules/df_customflow_version.py | 6 +- plugins/modules/df_deployment.py | 22 ++-- plugins/modules/df_deployment_info.py | 4 +- plugins/modules/df_readyflow.py | 12 +- plugins/modules/df_readyflow_info.py | 8 +- plugins/modules/df_service.py | 51 ++++--- plugins/modules/df_service_info.py | 4 +- plugins/modules/dw_cluster.py | 49 ++++--- plugins/modules/dw_data_visualization.py | 32 +++-- plugins/modules/dw_data_visualization_info.py | 7 +- plugins/modules/dw_database_catalog.py | 31 +++-- plugins/modules/dw_database_catalog_info.py | 8 +- plugins/modules/dw_virtual_warehouse.py | 69 ++++++---- plugins/modules/dw_virtual_warehouse_info.py | 8 +- plugins/modules/env.py | 124 +++++++++++------- plugins/modules/env_auth.py | 10 +- plugins/modules/env_auth_info.py | 13 +- .../modules/env_automated_user_sync_info.py | 4 +- plugins/modules/env_cred.py | 21 ++- plugins/modules/env_cred_info.py | 2 +- plugins/modules/env_idbroker.py | 23 +++- plugins/modules/env_idbroker_info.py | 2 +- plugins/modules/env_info.py | 9 +- plugins/modules/env_proxy.py | 6 +- plugins/modules/env_proxy_info.py | 2 +- plugins/modules/env_telemetry.py | 4 +- plugins/modules/env_user_sync.py | 10 +- plugins/modules/env_user_sync_info.py | 6 +- plugins/modules/freeipa_info.py | 6 +- plugins/modules/iam_group.py | 14 +- plugins/modules/iam_group_info.py | 7 +- plugins/modules/iam_resource_role_info.py | 2 +- plugins/modules/iam_role_info.py | 2 +- plugins/modules/iam_user_info.py | 2 +- plugins/modules/ml.py | 57 +++++--- plugins/modules/ml_info.py | 4 +- plugins/modules/ml_workspace_access.py | 20 ++- plugins/modules/opdb.py | 32 +++-- plugins/modules/opdb_info.py | 3 +- plugins/modules/recipe.py | 10 +- plugins/modules/recipe_info.py | 10 +- tests/unit/conftest.py | 2 +- .../{test_env_i.py => env_i_test.py} | 0 .../environment/{test_env.py => env_test.py} | 16 +-- ...iam_role_info.py => iam_role_info_test.py} | 4 +- ...iam_user_info.py => iam_user_info_test.py} | 0 tests/unit/plugins/modules/utils.py | 4 +- 75 files changed, 726 insertions(+), 422 deletions(-) rename tests/unit/plugins/modules/environment/{test_env_i.py => env_i_test.py} (100%) rename tests/unit/plugins/modules/environment/{test_env.py => env_test.py} (95%) rename tests/unit/plugins/modules/iam_role_info/{test_iam_role_info.py => iam_role_info_test.py} (98%) rename tests/unit/plugins/modules/iam_user_info/{test_iam_user_info.py => iam_user_info_test.py} (100%) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0916215..1ae38ba 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,13 +15,34 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.2.0 + rev: v5.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml + - id: check-toml + - id: check-json - id: check-added-large-files + - id: check-case-conflict + - id: check-docstring-first + - id: check-merge-conflict + - id: check-symlinks + - id: debug-statements + - id: detect-aws-credentials + - id: detect-private-key + - id: forbid-submodules + # - id: name-tests-test + - repo: https://github.com/asottile/add-trailing-comma.git + rev: v3.2.0 + hooks: + - id: add-trailing-comma + args: + - --py36-plus - repo: https://github.com/psf/black - rev: 22.10.0 + rev: 25.1.0 hooks: - id: black + - repo: https://github.com/ansible/ansible-lint + rev: v25.6.1 + hooks: + - id: ansible-lint diff --git a/plugins/lookup/datahub_definition.py b/plugins/lookup/datahub_definition.py index f5fe5c5..f9ce7a4 100644 --- a/plugins/lookup/datahub_definition.py +++ b/plugins/lookup/datahub_definition.py @@ -119,7 +119,7 @@ def run(self, terms, variables=None, **kwargs): cloud_platform, raw_version, semantic_version = parse_environment(term) display.vvv( "Filtering definitions for %s[%s][%s]" - % (term, cloud_platform, semantic_version) + % (term, cloud_platform, semantic_version), ) for d in all_definitions: @@ -138,10 +138,12 @@ def run(self, terms, variables=None, **kwargs): continue results.append( [ - d - if self.get_option("detailed") - else d["clusterDefinitionName"] - ] + ( + d + if self.get_option("detailed") + else d["clusterDefinitionName"] + ), + ], ) return results except KeyError as e: diff --git a/plugins/lookup/datahub_instance.py b/plugins/lookup/datahub_instance.py index a0335b1..1ef2b5f 100644 --- a/plugins/lookup/datahub_instance.py +++ b/plugins/lookup/datahub_instance.py @@ -95,7 +95,7 @@ def run(self, terms, variables=None, **kwargs): datahub = Cdpy().datahub.describe_cluster(self.get_option("datahub")) if datahub is None: raise AnsibleError( - "No Datahub found for '%s'" % self.get_option("datahub") + "No Datahub found for '%s'" % self.get_option("datahub"), ) all_instance_groups = {ig["name"]: ig for ig in datahub["instanceGroups"]} @@ -104,14 +104,14 @@ def run(self, terms, variables=None, **kwargs): for term in LookupBase._flatten(terms): display.vvv( "Filtering instance groups for %s[%s]" - % (self.get_option("datahub"), term) + % (self.get_option("datahub"), term), ) if term in all_instance_groups: if self.get_option("detailed"): results.append(all_instance_groups[term]["instances"]) else: results.append( - [i["fqdn"] for i in all_instance_groups[term]["instances"]] + [i["fqdn"] for i in all_instance_groups[term]["instances"]], ) else: results.append(self.get_option("default")) diff --git a/plugins/lookup/datahub_service.py b/plugins/lookup/datahub_service.py index c51ae9d..d5c0913 100644 --- a/plugins/lookup/datahub_service.py +++ b/plugins/lookup/datahub_service.py @@ -100,7 +100,7 @@ def run(self, terms, variables=None, **kwargs): datahub = Cdpy().datahub.describe_cluster(self.get_option("datahub")) if datahub is None: raise AnsibleError( - "No Datahub found for '%s'" % self.get_option("datahub") + "No Datahub found for '%s'" % self.get_option("datahub"), ) return parse_services( terms, @@ -113,5 +113,5 @@ def run(self, terms, variables=None, **kwargs): except CdpError as e: raise AnsibleError( "Error connecting to service '%s': %s" - % (self.get_option("datahub"), to_native(e)) + % (self.get_option("datahub"), to_native(e)), ) diff --git a/plugins/lookup/datahub_template.py b/plugins/lookup/datahub_template.py index 8d6f93f..92bb093 100644 --- a/plugins/lookup/datahub_template.py +++ b/plugins/lookup/datahub_template.py @@ -127,10 +127,12 @@ def run(self, terms, variables=None, **kwargs): continue results.append( [ - t - if self.get_option("detailed") - else t["clusterTemplateName"] - ] + ( + t + if self.get_option("detailed") + else t["clusterTemplateName"] + ), + ], ) return results except KeyError as e: diff --git a/plugins/lookup/datalake_instance.py b/plugins/lookup/datalake_instance.py index 278403b..1a69daf 100644 --- a/plugins/lookup/datalake_instance.py +++ b/plugins/lookup/datalake_instance.py @@ -97,12 +97,12 @@ def run(self, terms, variables=None, **kwargs): env = Cdpy().datalake.describe_all_datalakes(self.get_option("environment")) if not env: raise AnsibleError( - "No Environment found for '%s'" % self.get_option("environment") + "No Environment found for '%s'" % self.get_option("environment"), ) elif len(env) > 1: raise AnsibleError( "Multiple Datalakes found for Enviroment '%s'" - % self.get_option("environment") + % self.get_option("environment"), ) all_instance_groups = {ig["name"]: ig for ig in env[0]["instanceGroups"]} @@ -111,14 +111,14 @@ def run(self, terms, variables=None, **kwargs): for term in LookupBase._flatten(terms): display.vvv( "Filtering instance groups for %s[%s]" - % (self.get_option("environment"), term) + % (self.get_option("environment"), term), ) if term in all_instance_groups: if self.get_option("detailed"): results.append(all_instance_groups[term]["instances"]) else: results.append( - [i["id"] for i in all_instance_groups[term]["instances"]] + [i["id"] for i in all_instance_groups[term]["instances"]], ) else: results.append(self.get_option("default")) diff --git a/plugins/lookup/datalake_runtime.py b/plugins/lookup/datalake_runtime.py index dae40ab..5744274 100644 --- a/plugins/lookup/datalake_runtime.py +++ b/plugins/lookup/datalake_runtime.py @@ -78,7 +78,7 @@ def run(self, terms, variables=None, **kwargs): raise AnsibleError("No Datalake found for Environment '%s'" % term) elif len(env) > 1: raise AnsibleError( - "Multiple Datalakes found for Environment '%s'" % term + "Multiple Datalakes found for Environment '%s'" % term, ) results.append(env[0]["productVersions"][0]["version"]) return results diff --git a/plugins/lookup/datalake_service.py b/plugins/lookup/datalake_service.py index b860b42..bd8a2df 100644 --- a/plugins/lookup/datalake_service.py +++ b/plugins/lookup/datalake_service.py @@ -105,7 +105,7 @@ def run(self, terms, variables=None, **kwargs): if not self.get_option("datalake") and not self.get_option("environment"): raise AnsibleError( - "One of 'environment' or 'datalake' parameters must be present" + "One of 'environment' or 'datalake' parameters must be present", ) try: @@ -114,20 +114,21 @@ def run(self, terms, variables=None, **kwargs): dl = Cdpy().datalake.describe_datalake(self.get_option("datalake")) if dl is None: raise AnsibleError( - "No Datalake found for '%s'" % self.get_option("datalake") + "No Datalake found for '%s'" % self.get_option("datalake"), ) else: env = Cdpy().datalake.describe_all_datalakes( - self.get_option("environment") + self.get_option("environment"), ) if not env: raise AnsibleError( - "No Environment found for '%s'" % self.get_option("environment") + "No Environment found for '%s'" + % self.get_option("environment"), ) elif len(env) > 1: raise AnsibleError( "Multiple Datalakes found for Enviroment '%s'" - % self.get_option("environment") + % self.get_option("environment"), ) dl = env[0] return parse_services( diff --git a/plugins/lookup/env_freeipa_domain.py b/plugins/lookup/env_freeipa_domain.py index 5719650..9053e2c 100644 --- a/plugins/lookup/env_freeipa_domain.py +++ b/plugins/lookup/env_freeipa_domain.py @@ -87,7 +87,7 @@ def run(self, terms, variables=None, **kwargs): if self.get_option("detailed"): server_ips = environment["freeipa"]["serverIP"] results = [ - {"domain": freeipa_client_domain, "server_ips": server_ips} + {"domain": freeipa_client_domain, "server_ips": server_ips}, ] else: results = [freeipa_client_domain] diff --git a/plugins/lookup/env_freeipa_hosts.py b/plugins/lookup/env_freeipa_hosts.py index 55be997..d75cd88 100644 --- a/plugins/lookup/env_freeipa_hosts.py +++ b/plugins/lookup/env_freeipa_hosts.py @@ -85,7 +85,9 @@ def run(self, terms, variables=None, **kwargs): results = [] for term in LookupBase._flatten(terms): free_ipa_info = Cdpy().sdk.call( - svc="environments", func="get_freeipa_status", environmentName=term + svc="environments", + func="get_freeipa_status", + environmentName=term, ) if self.get_option("detailed"): diff --git a/plugins/module_utils/cdp_common.py b/plugins/module_utils/cdp_common.py index a0bc562..7f6e5a2 100644 --- a/plugins/module_utils/cdp_common.py +++ b/plugins/module_utils/cdp_common.py @@ -105,10 +105,16 @@ def argument_spec(**spec): **spec, verify_tls=dict(required=False, type="bool", default=True, aliases=["tls"]), debug=dict( - required=False, type="bool", default=False, aliases=["debug_endpoints"] + required=False, + type="bool", + default=False, + aliases=["debug_endpoints"], ), strict=dict( - required=False, type="bool", default=False, aliases=["strict_errors"] + required=False, + type="bool", + default=False, + aliases=["strict_errors"], ), agent_header=dict(required=False, type="str", default="ClouderaFoundry"), cdp_region=dict( @@ -116,5 +122,5 @@ def argument_spec(**spec): type="str", default="default", aliases=["cdp_endpoint_region", "endpoint_region"], - ) + ), ) diff --git a/plugins/module_utils/cdp_service.py b/plugins/module_utils/cdp_service.py index 3c0fb5a..22a991d 100644 --- a/plugins/module_utils/cdp_service.py +++ b/plugins/module_utils/cdp_service.py @@ -28,14 +28,19 @@ def parse_services( - terms: list, name: str, entity: dict, service: str, knox: bool, default: any + terms: list, + name: str, + entity: dict, + service: str, + knox: bool, + default: any, ): lookup = "knoxService" if knox else "serviceName" results = [] try: for term in LookupBase._flatten(terms): display.vvv( - "%s_service lookup connecting to '%s[%s]'" % (service, name, term) + "%s_service lookup connecting to '%s[%s]'" % (service, name, term), ) services = [ s @@ -65,7 +70,7 @@ def parse_environment(environment: str): if not match: raise AnsibleError( "Unable to parse runtime version for Environment '%s': %s" - % (environment, raw_version) + % (environment, raw_version), ) return env[0]["cloudPlatform"], raw_version, match.group(0) diff --git a/plugins/modules/account_auth.py b/plugins/modules/account_auth.py index 6784a5b..527ae4e 100644 --- a/plugins/modules/account_auth.py +++ b/plugins/modules/account_auth.py @@ -143,7 +143,9 @@ def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( enable_sso=dict( - required=False, type="bool", aliases=["sso", "enable_cloudera_sso"] + required=False, + type="bool", + aliases=["sso", "enable_cloudera_sso"], ), password_lifetime=dict( required=False, diff --git a/plugins/modules/account_auth_info.py b/plugins/modules/account_auth_info.py index 9665cd1..a47a8b3 100644 --- a/plugins/modules/account_auth_info.py +++ b/plugins/modules/account_auth_info.py @@ -99,7 +99,8 @@ def process(self): def main(): module = AnsibleModule( - argument_spec=CdpModule.argument_spec(), supports_check_mode=True + argument_spec=CdpModule.argument_spec(), + supports_check_mode=True, ) result = AccountAuthenticationInfo(module) diff --git a/plugins/modules/account_cred_info.py b/plugins/modules/account_cred_info.py index 2d00748..acb825d 100644 --- a/plugins/modules/account_cred_info.py +++ b/plugins/modules/account_cred_info.py @@ -121,7 +121,7 @@ def main(): type="str", aliases=["cloud_platform"], choices=["aws", "azure"], - ) + ), ), supports_check_mode=True, ) diff --git a/plugins/modules/datahub_cluster.py b/plugins/modules/datahub_cluster.py index ec25ec7..c3ec40b 100644 --- a/plugins/modules/datahub_cluster.py +++ b/plugins/modules/datahub_cluster.py @@ -597,12 +597,12 @@ def process(self): # Reconcile and error if specifying invalid cloud parameters if self.environment is not None: self.host_env = self.cdpy.environments.describe_environment( - self.environment + self.environment, ) if self.host_env["crn"] != existing["environmentCrn"]: self.module.fail_json( msg="Datahub exists in a different Environment: %s" - % existing["environmentCrn"] + % existing["environmentCrn"], ) # Check for changes mismatch = self._reconcile_existing_state(existing) @@ -635,7 +635,7 @@ def process(self): # Else not exists already, therefore create the datahub else: self.host_env = self.cdpy.environments.describe_environment( - self.environment + self.environment, ) if self.host_env is not None: if self.cdpy.datalake.is_datalake_running(self.environment) is True: @@ -643,11 +643,11 @@ def process(self): else: self.module.fail_json( msg="Unable to find datalake or not Running, '%s'" - % self.environment + % self.environment, ) else: self.module.fail_json( - msg="Unable to find environment, '%s'" % self.environment + msg="Unable to find environment, '%s'" % self.environment, ) elif self.state == "stopped": # If the datahub exists @@ -655,13 +655,13 @@ def process(self): # Warn if attempting to stop an already stopped/stopping datahub if existing["status"] in self.cdpy.sdk.STOPPED_STATES: self.module.warn( - "Attempting to stop a datahub already stopped or in stopping cycle" + "Attempting to stop a datahub already stopped or in stopping cycle", ) self.datahub = existing # Warn if attempting to stop an already terminated/terminating datahub elif existing["status"] in self.cdpy.sdk.TERMINATION_STATES: self.module.warn( - "Attempting to stop an datahub during the termination cycle" + "Attempting to stop an datahub during the termination cycle", ) self.datahub = existing # Otherwise, stop the datahub @@ -688,7 +688,7 @@ def process(self): if not self.module.check_mode: if existing["status"] in self.cdpy.sdk.TERMINATION_STATES: self.module.warn( - "Attempting to delete an datahub during the termination cycle" + "Attempting to delete an datahub during the termination cycle", ) self.datahub = existing # Otherwise, delete the datahub @@ -714,20 +714,26 @@ def create_cluster(self): if self.host_env["cloudPlatform"] == "AWS": self.datahub = self.cdpy.sdk.call( - "datahub", "create_aws_cluster", **payload + "datahub", + "create_aws_cluster", + **payload, ) elif self.host_env["cloudPlatform"] == "AZURE": self.datahub = self.cdpy.sdk.call( - "datahub", "create_azure_cluster", **payload + "datahub", + "create_azure_cluster", + **payload, ) elif self.host_env["cloudPlatform"] == "GCP": self.datahub = self.cdpy.sdk.call( - "datahub", "create_gcp_cluster", **payload + "datahub", + "create_gcp_cluster", + **payload, ) else: self.module.fail_json( msg="cloudPlatform %s datahub deployment not implemented" - % self.host_env["cloudPlatform"] + % self.host_env["cloudPlatform"], ) self.changed = True @@ -766,7 +772,7 @@ def _configure_payload(self): if not subnet_metadata: self.module.fail_json( msg="Could not retrieve subnet metadata for CDP Environment %s" - % self.env_crn + % self.env_crn, ) subnets = self._filter_subnets(self.subnets_filter, subnet_metadata) @@ -813,14 +819,14 @@ def _filter_subnets(self, query, subnets): except Exception: self.module.fail_json( msg="The specified subnet filter is an invalid JMESPath expression: " - % query + % query, ) try: return [s["subnetId"] for s in filtered_subnets] except Exception: self.module.fail_json( msg='The subnet filter "%s" should return an array of subnet objects ' - "but instead returned this: %s" % (query, json.dumps(filtered_subnets)) + "but instead returned this: %s" % (query, json.dumps(filtered_subnets)), ) def _reconcile_existing_state(self, existing): @@ -828,17 +834,17 @@ def _reconcile_existing_state(self, existing): if existing["cloudPlatform"] == "AWS": self.module.warn( - "Datahub configuration reconciliation not implemented on AWS" + "Datahub configuration reconciliation not implemented on AWS", ) if existing["cloudPlatform"].upper() == "AZURE": self.module.warn( - "Datahub configuration reconciliation not implemented on Azure" + "Datahub configuration reconciliation not implemented on Azure", ) if existing["cloudPlatform"].upper() == "GCP": self.module.warn( - "Datahub configuration reconciliation not implemented on GCP" + "Datahub configuration reconciliation not implemented on GCP", ) if self.tags: @@ -846,7 +852,7 @@ def _reconcile_existing_state(self, existing): "Updating an existing Datahub's 'tags' " "directly are not supported at this time. If you " "need to change the tags, explicitly delete " - "and recreate the Datahub." + "and recreate the Datahub.", ) return mismatched @@ -854,7 +860,7 @@ def _validate_datahub_name(self): if len(self.name) < 5 or len(self.name) > 100: self.module.fail_json( msg="Invalid datahub name, '%s'. Names must be between 5-100 characters." - % self.name + % self.name, ) elif ( self.cdpy.sdk.regex_search(self.cdpy.sdk.DATAHUB_NAME_PATTERN, self.name) @@ -862,7 +868,7 @@ def _validate_datahub_name(self): ): self.module.fail_json( msg="Invalid datahub name, '%s'. Names must contain only lowercase " - "letters, numbers and hyphens." % self.name + "letters, numbers and hyphens." % self.name, ) @@ -891,10 +897,16 @@ def main(): force=dict(required=False, type="bool", default=False), wait=dict(required=False, type="bool", default=True), delay=dict( - required=False, type="int", aliases=["polling_delay"], default=15 + required=False, + type="int", + aliases=["polling_delay"], + default=15, ), timeout=dict( - required=False, type="int", aliases=["polling_timeout"], default=3600 + required=False, + type="int", + aliases=["polling_timeout"], + default=3600, ), ), supports_check_mode=True, diff --git a/plugins/modules/datahub_cluster_recipe.py b/plugins/modules/datahub_cluster_recipe.py index e7cbc57..c042dd1 100644 --- a/plugins/modules/datahub_cluster_recipe.py +++ b/plugins/modules/datahub_cluster_recipe.py @@ -154,7 +154,7 @@ def process(self): if not self.module.check_mode: results = camel_dict_to_snake_dict( - self.cdpy.sdk.call(svc="datahub", func="replace_recipes", **payload) + self.cdpy.sdk.call(svc="datahub", func="replace_recipes", **payload), ) for r in ["attached_recipes", "detached_recipes"]: diff --git a/plugins/modules/datahub_cluster_repair.py b/plugins/modules/datahub_cluster_repair.py index e8f5d51..773fea8 100644 --- a/plugins/modules/datahub_cluster_repair.py +++ b/plugins/modules/datahub_cluster_repair.py @@ -430,7 +430,9 @@ def process(self): timeout=self.timeout, ) self._wait_for_instance_state( - existing, ["HEALTHY", "UNHEALTHY"], node_count + existing, + ["HEALTHY", "UNHEALTHY"], + node_count, ) instance_payload = dict( @@ -445,7 +447,7 @@ def process(self): ] if set(self.instances).difference(set(discovered_instances)): self.module.fail_json( - msg=f"Instance(s) not found in Datahub: {str(self.instances)}" + msg=f"Instance(s) not found in Datahub: {str(self.instances)}", ) instance_payload.update(instanceIds=self.instances) @@ -458,7 +460,7 @@ def process(self): ] if not discovered_instances: self.module.fail_json( - msg=f"No instances found for instance group(s) in Datahub: {str(self.instance_groups)}" + msg=f"No instances found for instance group(s) in Datahub: {str(self.instance_groups)}", ) instance_payload.update(instanceIds=discovered_instances) @@ -503,7 +505,7 @@ def parse_instances(): outstanding_instances = parse_instances() if outstanding_instances or current["nodeCount"] != node_count: self.module.warn( - f"Waiting for state(s) [{str(state)}] for instances: {str(outstanding_instances)}; Node count: {str(current['nodeCount'])}/{str(node_count)}" + f"Waiting for state(s) [{str(state)}] for instances: {str(outstanding_instances)}; Node count: {str(current['nodeCount'])}/{str(node_count)}", ) sleep(self.delay) current = self.cdpy.datahub.describe_cluster(self.datahub) diff --git a/plugins/modules/datahub_definition_info.py b/plugins/modules/datahub_definition_info.py index 6831aaf..94fea89 100644 --- a/plugins/modules/datahub_definition_info.py +++ b/plugins/modules/datahub_definition_info.py @@ -176,7 +176,7 @@ def _describe_definition(self, short_desc): else: self.module.fail_json( msg="Failed to retrieve Cluster Definition content, '%s'" - % short_desc["clusterDefinitionName"] + % short_desc["clusterDefinitionName"], ) diff --git a/plugins/modules/datahub_template_info.py b/plugins/modules/datahub_template_info.py index 189e8ef..2a4c26e 100644 --- a/plugins/modules/datahub_template_info.py +++ b/plugins/modules/datahub_template_info.py @@ -182,7 +182,7 @@ def _describe_template(self, short_desc): else: self.module.fail_json( msg="Failed to retrieve Cluster Template content, '%s'" - % short_desc["clusterTemplateName"] + % short_desc["clusterTemplateName"], ) diff --git a/plugins/modules/datalake.py b/plugins/modules/datalake.py index 63e1c0e..3bcbcd3 100644 --- a/plugins/modules/datalake.py +++ b/plugins/modules/datalake.py @@ -487,7 +487,7 @@ def process(self): or self._get_nested_param("image", "id") ): self.module.fail_json( - msg="Image Id and/or image catalog name cannot be specified if runtime is set." + msg="Image Id and/or image catalog name cannot be specified if runtime is set.", ) if self.state in ["present"]: @@ -500,7 +500,7 @@ def process(self): if "status" in existing: if existing["status"] in self.cdpy.sdk.FAILED_STATES: self.module.fail_json( - msg="Attempting to restart a failed datalake" + msg="Attempting to restart a failed datalake", ) # For upgrade confirm state is not stopped if ( @@ -509,7 +509,7 @@ def process(self): ): self.module.fail_json( - msg="Unable to upgrade a stopped datalake." + msg="Unable to upgrade a stopped datalake.", ) # Check for Datalake actions during create or started @@ -520,12 +520,12 @@ def process(self): # Reconcile and error if specifying invalid cloud parameters if self.environment is not None: env = self.cdpy.environments.describe_environment( - self.environment + self.environment, ) if env["crn"] != existing["environmentCrn"]: self.module.fail_json( msg="Datalake exists in a different Environment: %s" - % existing["environmentCrn"] + % existing["environmentCrn"], ) # Check for changes mismatch = self._reconcile_existing_state(existing) @@ -544,7 +544,7 @@ def process(self): # Wait if not self.wait: self.module.warn( - "Datalake already creating or started, changes may not be possible" + "Datalake already creating or started, changes may not be possible", ) else: # Wait for creation to complete if previously requested and still running @@ -564,11 +564,11 @@ def process(self): self.create_datalake(env) else: self.module.fail_json( - msg="Unable to find environment, '%s'" % self.environment + msg="Unable to find environment, '%s'" % self.environment, ) else: self.module.fail_json( - msg="Datalake creation failed, required parameter 'environment' missing" + msg="Datalake creation failed, required parameter 'environment' missing", ) # Once the datalake is existing and started state then we can upgrade @@ -589,7 +589,7 @@ def process(self): and existing["status"] in self.cdpy.sdk.TERMINATION_STATES ): self.module.warn( - "Attempting to delete an datalake during the termination cycle" + "Attempting to delete an datalake during the termination cycle", ) self.datalake = existing @@ -638,7 +638,7 @@ def upgrade_datalake(self): upgrade_performed = True else: self.module.fail_json( - msg="No upgrade candidate available for specified runtime or image id." + msg="No upgrade candidate available for specified runtime or image id.", ) # Wait for prepare to complete @@ -686,41 +686,48 @@ def create_datalake(self, environment): if environment["cloudPlatform"] == "AWS": if self.instance_profile is None or self.storage is None: self.module.fail_json( - msg="One of the following are missing: instance_profile, storage" + msg="One of the following are missing: instance_profile, storage", ) payload.update( cloudProviderConfiguration=dict( instanceProfile=self.instance_profile, storageBucketLocation=self.storage, - ) + ), ) self.datalake = self.cdpy.sdk.call( - "datalake", "create_aws_datalake", **payload + "datalake", + "create_aws_datalake", + **payload, ) elif environment["cloudPlatform"] == "AZURE": payload.update( cloudProviderConfiguration=dict( - managedIdentity=self.instance_profile, storageLocation=self.storage - ) + managedIdentity=self.instance_profile, + storageLocation=self.storage, + ), ) self.datalake = self.cdpy.sdk.call( - "datalake", "create_azure_datalake", **payload + "datalake", + "create_azure_datalake", + **payload, ) elif environment["cloudPlatform"] == "GCP": payload.update( cloudProviderConfiguration=dict( serviceAccountEmail=self.instance_profile, storageLocation=self.storage, - ) + ), ) self.datalake = self.cdpy.sdk.call( - "datalake", "create_gcp_datalake", **payload + "datalake", + "create_gcp_datalake", + **payload, ) else: self.module.fail_json( - msg="Datalakes not yet implemented for this Environment Type" + msg="Datalakes not yet implemented for this Environment Type", ) self.changed = True @@ -762,7 +769,7 @@ def _configure_payload(self, environment): payload.update( image={ key: value for key, value in self.image.items() if value is not None - } + }, ) if self.scale: @@ -784,7 +791,7 @@ def _configure_payload(self, environment): payload.update(multiAz=self.multi_az) else: self.module.fail_json( - msg="Multi-AZ Datalakes are not supported on GCP and Azure" + msg="Multi-AZ Datalakes are not supported on GCP and Azure", ) elif environment["cloudPlatform"] == "AWS": payload.update(multiAz=self.multi_az) @@ -812,7 +819,7 @@ def _reconcile_existing_state(self, existing): [ "instance_profile", existing["awsConfiguration"]["instanceProfile"], - ] + ], ) if self.storage is not None: @@ -820,7 +827,7 @@ def _reconcile_existing_state(self, existing): "Updating an existing Datalake's 'storage' " "directly is not supported at this time. If " "you need to change the storage, explicitly " - "delete and recreate the Datalake." + "delete and recreate the Datalake.", ) if self.runtime: @@ -829,14 +836,14 @@ def _reconcile_existing_state(self, existing): "directly is not supported at this time. If you " "need to change the runtime, either use the " "'upgrade' state or explicitly delete and " - "recreate the Datalake." + "recreate the Datalake.", ) if self.scale: self.module.warn( "Updating an existing Datalake's 'scale' " "directly is not supported at this time. If you " "need to change the scale, explicitly delete " - "and recreate the Datalake." + "and recreate the Datalake.", ) if self.tags: @@ -844,7 +851,7 @@ def _reconcile_existing_state(self, existing): "Updating an existing Datalake's 'tags' " "directly are not supported at this time. If you " "need to change the tags, explicitly delete " - "and recreate the Datalake." + "and recreate the Datalake.", ) if self.raz: @@ -852,7 +859,7 @@ def _reconcile_existing_state(self, existing): "Updating an existing Datalake's 'enableRangerRaz' " "directly is not supported at this time. If you " "need to change the enableRangerRaz, explicitly delete " - "and recreate the Datalake." + "and recreate the Datalake.", ) if self.multi_az: @@ -860,7 +867,7 @@ def _reconcile_existing_state(self, existing): "Updating an existing Datalake's 'multiAz' " "directly is not supported at this time. If you " "need to change the multiAz, explicitly delete " - "and recreate the Datalake." + "and recreate the Datalake.", ) return mismatched @@ -869,7 +876,7 @@ def _validate_datalake_name(self): if len(self.name) < 5 or len(self.name) > 100: self.module.fail_json( msg="Invalid datalake name, '%s'. Names must be between 5-100 characters." - % self.name + % self.name, ) elif ( self.cdpy.sdk.regex_search(self.cdpy.sdk.DATALAKE_NAME_PATTERN, self.name) @@ -877,7 +884,7 @@ def _validate_datalake_name(self): ): self.module.fail_json( msg="Invalid datalake name, '%s'. Names must contain only lowercase " - "letters, numbers and hyphens." % self.name + "letters, numbers and hyphens." % self.name, ) @@ -892,7 +899,9 @@ def main(): default="present", ), instance_profile=dict( - required=False, type="str", aliases=["managed_identity"] + required=False, + type="str", + aliases=["managed_identity"], ), image=dict( required=False, @@ -919,10 +928,16 @@ def main(): force=dict(required=False, type="bool", default=False), wait=dict(required=False, type="bool", default=True), delay=dict( - required=False, type="int", aliases=["polling_delay"], default=15 + required=False, + type="int", + aliases=["polling_delay"], + default=15, ), timeout=dict( - required=False, type="int", aliases=["polling_timeout"], default=3600 + required=False, + type="int", + aliases=["polling_timeout"], + default=3600, ), raz=dict(required=False, type="bool", default=False), multi_az=dict(required=False, type="bool", default=False), diff --git a/plugins/modules/datalake_backup.py b/plugins/modules/datalake_backup.py index 62ba180..2a5f4ee 100644 --- a/plugins/modules/datalake_backup.py +++ b/plugins/modules/datalake_backup.py @@ -484,7 +484,7 @@ def process(self): or self.skip_validation ): self.module.fail_json( - msg="Unable to use 'state=backup' with args 'backup_id', 'backup_location', 'skip_atlas_indexes', 'skip_atlas_metadata', 'skip_ranger_audits', 'skip_ranger_hms_metadata' or 'skip_validation'" + msg="Unable to use 'state=backup' with args 'backup_id', 'backup_location', 'skip_atlas_indexes', 'skip_atlas_metadata', 'skip_ranger_audits', 'skip_ranger_hms_metadata' or 'skip_validation'", ) # Confirm datalake exists @@ -492,13 +492,14 @@ def process(self): if datalake_info is None: self.module.fail_json( - msg="Datalake {0} does not exist".format(self.datalake_name) + msg="Datalake {0} does not exist".format(self.datalake_name), ) else: if self.state == "backup": backup = self.cdpy.datalake.create_datalake_backup( - datalake_name=self.datalake_name, backup_name=self.backup_name + datalake_name=self.datalake_name, + backup_name=self.backup_name, ) if self.wait: @@ -512,7 +513,7 @@ def process(self): ) datalake_backups = self.cdpy.datalake.list_datalake_backups( - datalake_name=self.datalake_name + datalake_name=self.datalake_name, ) self.output = [ item @@ -527,7 +528,7 @@ def process(self): bk is not None for bk in [self.backup_name, self.backup_id] ): datalake_backups = self.cdpy.datalake.list_datalake_backups( - datalake_name=self.datalake_name + datalake_name=self.datalake_name, ) if ( len( @@ -536,7 +537,7 @@ def process(self): for item in datalake_backups["backups"] if item["backupName"] == self.backup_name or item["backupId"] == self.backup_id - ] + ], ) == 0 ): @@ -548,7 +549,7 @@ def process(self): if bk is not None ), self.datalake_name, - ) + ), ) restore = self.cdpy.datalake.restore_datalake_backup( diff --git a/plugins/modules/datalake_backup_info.py b/plugins/modules/datalake_backup_info.py index 761f9ac..decda51 100644 --- a/plugins/modules/datalake_backup_info.py +++ b/plugins/modules/datalake_backup_info.py @@ -138,7 +138,7 @@ def process(self): self.module.warn("Datalake {0} not found".format(self.datalake_name)) else: datalake_backups = self.cdpy.datalake.list_datalake_backups( - datalake_name=self.datalake_name + datalake_name=self.datalake_name, ) # Filter for backup name or backup id if specified @@ -151,8 +151,9 @@ def process(self): if len(named_backups) == 0: self.module.warn( "Backup name {0} not found for Datalake {1}".format( - self.backup_name, self.datalake_name - ) + self.backup_name, + self.datalake_name, + ), ) self.output = named_backups @@ -167,8 +168,9 @@ def process(self): if len(single_backup) == 0: self.module.warn( "Backup id {0} not found for Datalake {1}".format( - self.backup_id, self.datalake_name - ) + self.backup_id, + self.datalake_name, + ), ) self.output = single_backup diff --git a/plugins/modules/datalake_runtime_info.py b/plugins/modules/datalake_runtime_info.py index dc2646a..dd49572 100644 --- a/plugins/modules/datalake_runtime_info.py +++ b/plugins/modules/datalake_runtime_info.py @@ -96,11 +96,13 @@ def __init__(self, module): @CdpModule._Decorators.process_debug def process(self): retrieved_versions = self.cdpy.sdk.call( - svc="datalake", func="list_runtimes", ret_field="versions" + svc="datalake", + func="list_runtimes", + ret_field="versions", ) if self.default: self.versions = list( - filter(lambda r: r["defaultRuntimeVersion"], retrieved_versions) + filter(lambda r: r["defaultRuntimeVersion"], retrieved_versions), ) else: self.versions = retrieved_versions diff --git a/plugins/modules/de.py b/plugins/modules/de.py index 76b68e1..19ee019 100644 --- a/plugins/modules/de.py +++ b/plugins/modules/de.py @@ -377,7 +377,8 @@ def __init__(self, module): @CdpModule._Decorators.process_debug def process(self): self.cluster_id = self.cdpy.de.get_service_id_by_name( - name=self.name, env=self.env + name=self.name, + env=self.env, ) initial_desc = ( self.cdpy.de.describe_service(self.cluster_id) if self.cluster_id else None @@ -398,15 +399,15 @@ def process(self): else: self.module.warn( "DE Service is not in a removable state: %s" - % initial_desc["status"] + % initial_desc["status"], ) if self.wait: self.module.warn( - "Waiting for DE Service to reach Active or Disabled state" + "Waiting for DE Service to reach Active or Disabled state", ) current_desc = self._wait_for_state( self.cdpy.sdk.REMOVABLE_STATES - + self.cdpy.sdk.STOPPED_STATES + + self.cdpy.sdk.STOPPED_STATES, ) # If we just waited fo the service to be provisioned, then dis-abled it if current_desc["status"] in self.cdpy.sdk.REMOVABLE_STATES: @@ -418,18 +419,18 @@ def process(self): not in self.cdpy.sdk.STOPPED_STATES ): self.module.warn( - "DE service did not disable successfully" + "DE service did not disable successfully", ) elif self.state == "present": # Check the existing configuration and state self.module.warn( "DE Service already present and configuration validation" - + "and reconciliation is not supported" + + "and reconciliation is not supported", ) self.service = initial_desc if self.wait: current_desc = self._wait_for_state( - self.cdpy.sdk.REMOVABLE_STATES + self.cdpy.sdk.STOPPED_STATES + self.cdpy.sdk.REMOVABLE_STATES + self.cdpy.sdk.STOPPED_STATES, ) # If we just waited for the service to be disabled, then enable it if current_desc["status"] in self.cdpy.sdk.STOPPED_STATES: @@ -440,7 +441,7 @@ def process(self): self.module.warn("DE service did not enable successfully") else: self.module.fail_json( - msg="State %s is not valid for this module" % self.state + msg="State %s is not valid for this module" % self.state, ) # Else if the Service does not exist @@ -448,7 +449,7 @@ def process(self): if self.state == "absent": self.module.log( "DE service %s already absent or terminated in Environment %s" - % (self.name, self.env) + % (self.name, self.env), ) # Create the Service elif self.state == "present": @@ -456,7 +457,7 @@ def process(self): self.service = self._enable_service() else: self.module.fail_json( - msg="State %s is not valid for this module" % self.state + msg="State %s is not valid for this module" % self.state, ) def _enable_service(self): @@ -534,7 +535,10 @@ def main(): enable_public_endpoint=dict(required=False, type="bool", default=True), enable_private_network=dict(required=False, type="bool", default=False), loadbalancer_ips=dict( - required=False, type="list", elements="str", default=None + required=False, + type="list", + elements="str", + default=None, ), enable_workload_analytics=dict(required=False, type="bool", default=True), initial_instances=dict(required=False, type="int", default=1), @@ -544,10 +548,16 @@ def main(): tags=dict(required=False, type="dict", default=None), use_ssd=dict(required=False, type="bool", default=None), whitelist_ips=dict( - required=False, type="list", elements="str", default=None + required=False, + type="list", + elements="str", + default=None, ), force=dict( - required=False, type="bool", default=False, aliases=["force_delete"] + required=False, + type="bool", + default=False, + aliases=["force_delete"], ), state=dict( required=False, @@ -557,10 +567,16 @@ def main(): ), wait=dict(required=False, type="bool", default=True), delay=dict( - required=False, type="int", aliases=["polling_delay"], default=60 + required=False, + type="int", + aliases=["polling_delay"], + default=60, ), timeout=dict( - required=False, type="int", aliases=["polling_timeout"], default=7200 + required=False, + type="int", + aliases=["polling_timeout"], + default=7200, ), ), supports_check_mode=True, diff --git a/plugins/modules/de_info.py b/plugins/modules/de_info.py index f26ac01..d82e8aa 100644 --- a/plugins/modules/de_info.py +++ b/plugins/modules/de_info.py @@ -217,19 +217,19 @@ def process(self): name_match = list(filter(lambda s: s["name"] == self.name, service_list)) if self.env: env_match = list( - filter(lambda s: s["environmentName"] == self.env, name_match) + filter(lambda s: s["environmentName"] == self.env, name_match), ) if env_match: self.services.append( - self.cdpy.de.describe_service(env_match[0]["clusterId"]) + self.cdpy.de.describe_service(env_match[0]["clusterId"]), ) elif name_match: self.services.append( - self.cdpy.de.describe_service(name_match[0]["clusterId"]) + self.cdpy.de.describe_service(name_match[0]["clusterId"]), ) elif self.env: env_match = list( - filter(lambda s: s["environmentName"] == self.env, service_list) + filter(lambda s: s["environmentName"] == self.env, service_list), ) self.services.extend(env_match) else: diff --git a/plugins/modules/de_virtual_cluster.py b/plugins/modules/de_virtual_cluster.py index dc2daee..2f8543f 100644 --- a/plugins/modules/de_virtual_cluster.py +++ b/plugins/modules/de_virtual_cluster.py @@ -279,10 +279,12 @@ def __init__(self, module): @CdpModule._Decorators.process_debug def process(self): self.cluster_id = self.cdpy.de.get_service_id_by_name( - name=self.cluster_name, env=self.env + name=self.cluster_name, + env=self.env, ) self.vc_id = self.cdpy.de.get_vc_id_by_name( - name=self.name, cluster_id=self.cluster_id + name=self.name, + cluster_id=self.cluster_id, ) initial_desc = ( self.cdpy.de.describe_vc(self.cluster_id, self.vc_id) @@ -305,16 +307,16 @@ def process(self): else: self.module.warn( "DE virtual cluster (%s) is not in a removable state: %s" - % (self.name, initial_desc["status"]) + % (self.name, initial_desc["status"]), ) if self.wait: self.module.warn( "Waiting for DE virtual cluster (%s) to reach Active or Deleted state" - % self.name + % self.name, ) current_desc = self._wait_for_state( self.cdpy.sdk.REMOVABLE_STATES - + self.cdpy.sdk.STOPPED_STATES + + self.cdpy.sdk.STOPPED_STATES, ) # If we just waited fo the virtual cluster to be provisioned, then delete it if current_desc["status"] in self.cdpy.sdk.REMOVABLE_STATES: @@ -327,7 +329,7 @@ def process(self): ): self.module.warn( "DE virtual cluster (%s) did not delete successfully" - % self.name + % self.name, ) elif self.state == "present": # Check the existing configuration and state @@ -335,7 +337,7 @@ def process(self): self.virtual_cluster = initial_desc if self.wait: current_desc = self._wait_for_state( - self.cdpy.sdk.REMOVABLE_STATES + self.cdpy.sdk.STOPPED_STATES + self.cdpy.sdk.REMOVABLE_STATES + self.cdpy.sdk.STOPPED_STATES, ) # If we just waited for the virtual cluster to be deleted, then create it if current_desc["status"] in self.cdpy.sdk.STOPPED_STATES: @@ -345,11 +347,11 @@ def process(self): if current_desc["status"] not in self.cdpy.sdk.REMOVABLE_STATES: self.module.warn( "DE virtual cluster (%s) did not create successfully" - % self.name + % self.name, ) else: self.module.fail_json( - msg="State %s is not valid for this module" % self.state + msg="State %s is not valid for this module" % self.state, ) # Else if the virtual cluster does not exist @@ -357,7 +359,7 @@ def process(self): if self.state == "absent": self.module.log( "DE virtual cluster (%s) already absent or deleted within service ID (%s)" - % (self.name, self.cluster_name) + % (self.name, self.cluster_name), ) # Create the virtual cluster elif self.state == "present": @@ -365,7 +367,7 @@ def process(self): self.virtual_cluster = self._create_vc() else: self.module.fail_json( - msg="State %s is not valid for this module" % self.state + msg="State %s is not valid for this module" % self.state, ) def _create_vc(self): @@ -392,13 +394,13 @@ def _create_vc(self): if return_desc["status"] not in self.cdpy.sdk.REMOVABLE_STATES: self.module.warn( "DE virtual cluster (%s) did not create successfully" - % self.name + % self.name, ) else: return_desc = result else: self.module.warn( - "DE virtual cluster (%s) did not create successfully" % self.name + "DE virtual cluster (%s) did not create successfully" % self.name, ) return return_desc @@ -408,7 +410,7 @@ def _delete_vc(self): current_desc = self._wait_for_state(self.cdpy.sdk.STOPPED_STATES) if current_desc["status"] not in self.cdpy.sdk.STOPPED_STATES: self.module.warn( - "DE virtual cluster (%s) did not delete successfully" % self.name + "DE virtual cluster (%s) did not delete successfully" % self.name, ) return current_desc else: @@ -450,10 +452,16 @@ def main(): ), wait=dict(required=False, type="bool", default=True), delay=dict( - required=False, type="int", aliases=["polling_delay"], default=30 + required=False, + type="int", + aliases=["polling_delay"], + default=30, ), timeout=dict( - required=False, type="int", aliases=["polling_timeout"], default=600 + required=False, + type="int", + aliases=["polling_timeout"], + default=600, ), ), supports_check_mode=True, diff --git a/plugins/modules/df_customflow.py b/plugins/modules/df_customflow.py index 3004505..be2c057 100644 --- a/plugins/modules/df_customflow.py +++ b/plugins/modules/df_customflow.py @@ -176,8 +176,8 @@ def process(self): else: self.module.log( "Check mode enabled, skipping deletion of flow [{}]".format( - self.name - ) + self.name, + ), ) else: if self.state == "present": @@ -193,8 +193,8 @@ def process(self): else: self.module.log( "Check mode enabled, skipping import of flow [{}]".format( - self.name - ) + self.name, + ), ) if self.state == "absent": # Flow does not exist. Nothing to do. diff --git a/plugins/modules/df_customflow_version.py b/plugins/modules/df_customflow_version.py index fed3a05..001747e 100644 --- a/plugins/modules/df_customflow_version.py +++ b/plugins/modules/df_customflow_version.py @@ -121,14 +121,16 @@ def process(self): flow = self.cdpy.df.describe_customflow(self.flow_crn) if not flow: self.module.fail_json( - msg="Flow definition with crn {} does not exist".format(self.flow_crn) + msg="Flow definition with crn {} does not exist".format(self.flow_crn), ) else: # Only possible state is "present" self.changed = True if not self.module.check_mode: self.flow_version = self.cdpy.df.import_customflow_version( - self.flow_crn, self.file, self.comments + self.flow_crn, + self.file, + self.comments, ) diff --git a/plugins/modules/df_deployment.py b/plugins/modules/df_deployment.py index 81cbe9a..9b7059c 100644 --- a/plugins/modules/df_deployment.py +++ b/plugins/modules/df_deployment.py @@ -363,7 +363,7 @@ def __init__(self, module): and self.df_name is None ): self.module.fail_json( - msg="name is specified but any of the following are missing: df_crn, df_name" + msg="name is specified but any of the following are missing: df_crn, df_name", ) # Initialize return values @@ -386,11 +386,12 @@ def process(self): self.df_crn = self.cdpy.df.resolve_service_crn_from_name(self.df_name) if self.df_crn is None: self.module.fail_json( - msg="Either df_crn must be supplied or resolvable from df_name" + msg="Either df_crn must be supplied or resolvable from df_name", ) if self.name is not None and self.df_crn is not None: self.target = self.cdpy.df.describe_deployment( - df_crn=self.df_crn, name=self.name + df_crn=self.df_crn, + name=self.name, ) if self.target is not None: self.dep_crn = self.target["crn"] @@ -402,7 +403,7 @@ def process(self): if self.module.check_mode: self.module.log( "Check mode enabled, skipping termination of Deployment %s" - % self.dep_crn + % self.dep_crn, ) self.deployment = self.target else: @@ -412,20 +413,20 @@ def process(self): self.module.warn( "Dataflow Deployment already exists and configuration validation and reconciliation " + "is not supported;" - + "to change a Deployment, explicitly terminate and recreate it or use the UI" + + "to change a Deployment, explicitly terminate and recreate it or use the UI", ) if self.wait: self.deployment = self._wait_for_deployed() else: self.module.fail_json( - msg="State %s is not valid for this module" % self.state + msg="State %s is not valid for this module" % self.state, ) else: # Deployment CRN not found in Tenant, and probably doesn't exist if self.state in ["absent"]: # Deployment not found, and not wanted, return self.module.log( - "Dataflow Deployment not found in CDP Tenant %s" % self.dep_crn + "Dataflow Deployment not found in CDP Tenant %s" % self.dep_crn, ) elif self.state in ["present"]: # create Deployment @@ -437,14 +438,15 @@ def process(self): pass # Check mode can return the described deployment else: self.module.fail_json( - msg="State %s is not valid for this module" % self.state + msg="State %s is not valid for this module" % self.state, ) def _create_deployment(self): if self.flow_ver_crn is None: # flow_name must be populated if flow_ver_crn is None self.flow_ver_crn = self.cdpy.df.get_version_crn_from_flow_definition( - self.flow_name, self.flow_ver + self.flow_name, + self.flow_ver, ) self.deployment = self.cdpy.df.create_deployment( df_crn=self.df_crn, @@ -479,7 +481,7 @@ def _terminate_deployment(self): else: self.module.warn( "Attempting to disable DataFlow Deployment but state %s not in Removable States %s" - % (self.target["status"]["state"], self.cdpy.sdk.REMOVABLE_STATES) + % (self.target["status"]["state"], self.cdpy.sdk.REMOVABLE_STATES), ) if self.wait: self.deployment = self.cdpy.sdk.wait_for_state( diff --git a/plugins/modules/df_deployment_info.py b/plugins/modules/df_deployment_info.py index c353664..a164976 100644 --- a/plugins/modules/df_deployment_info.py +++ b/plugins/modules/df_deployment_info.py @@ -222,7 +222,9 @@ def __init__(self, module): @CdpModule._Decorators.process_debug def process(self): self.deployments = self.cdpy.df.list_deployments( - dep_crn=self.crn, name=self.name, described=True + dep_crn=self.crn, + name=self.name, + described=True, ) diff --git a/plugins/modules/df_readyflow.py b/plugins/modules/df_readyflow.py index cee648b..b8ad99e 100644 --- a/plugins/modules/df_readyflow.py +++ b/plugins/modules/df_readyflow.py @@ -213,35 +213,35 @@ def process(self): # ReadyFlow is imported and should be left alone # helpfully return the detailed description self.readyflow = self.cdpy.df.describe_added_readyflow( - def_crn=self.target["importedArtifactCrn"] + def_crn=self.target["importedArtifactCrn"], ) if self.state == "absent": if not self.module.check_mode: # ReadyFlow is imported and should be deleted self.readyflow = self.cdpy.df.delete_added_readyflow( - def_crn=self.target["importedArtifactCrn"] + def_crn=self.target["importedArtifactCrn"], ) self.changed = True else: self.module.log( - "Check mode enabled, skipping deletion of %s" % self.name + "Check mode enabled, skipping deletion of %s" % self.name, ) else: if self.state == "present": # ReadyFlow should be imported if not self.module.check_mode: self.readyflow = self.cdpy.df.import_readyflow( - def_crn=self.target["readyflowCrn"] + def_crn=self.target["readyflowCrn"], ) self.changed = True else: self.module.log( - "Check mode enabled, skipping import of %s" % self.name + "Check mode enabled, skipping import of %s" % self.name, ) if self.state == "absent": # ReadyFlow is not imported and should stay that way self.module.log( - "ReadyFlow already not imported to CDP Tenant %s" % self.name + "ReadyFlow already not imported to CDP Tenant %s" % self.name, ) diff --git a/plugins/modules/df_readyflow_info.py b/plugins/modules/df_readyflow_info.py index 2ed44ac..880a0b1 100644 --- a/plugins/modules/df_readyflow_info.py +++ b/plugins/modules/df_readyflow_info.py @@ -203,14 +203,14 @@ def process(self): if this_readyflow["imported"]: self.flows.append( self.cdpy.df.describe_added_readyflow( - def_crn=this_readyflow["importedArtifactCrn"] - ) + def_crn=this_readyflow["importedArtifactCrn"], + ), ) else: self.flows.append( self.cdpy.df.describe_readyflow( - def_crn=this_readyflow["readyflowCrn"] - ) + def_crn=this_readyflow["readyflowCrn"], + ), ) else: self.flows = self.listing diff --git a/plugins/modules/df_service.py b/plugins/modules/df_service.py index bf28441..8c968e3 100644 --- a/plugins/modules/df_service.py +++ b/plugins/modules/df_service.py @@ -332,7 +332,8 @@ def process(self): self.env_crn = self.cdpy.environments.resolve_environment_crn(self.env_crn) if self.env_crn is not None or self.df_crn is not None: self.target = self.cdpy.df.describe_service( - env_crn=self.env_crn, df_crn=self.df_crn + env_crn=self.env_crn, + df_crn=self.df_crn, ) if self.target is not None: @@ -346,60 +347,62 @@ def process(self): self.module.warn( "Dataflow Service already enabled and configuration validation and reconciliation is not " "supported; to change a Dataflow Service, explicitly disable and recreate the Service or " - "use the UI" + "use the UI", ) if self.wait: self.service = self._wait_for_enabled() else: self.module.fail_json( - msg="State %s is not valid for this module" % self.state + msg="State %s is not valid for this module" % self.state, ) else: # Environment does not have DF database entry, and probably doesn't exist if self.state in ["absent"]: self.module.log( "Dataflow Service already disabled in CDP Environment %s" - % self.env_crn + % self.env_crn, ) elif self.state in ["present"]: if self.env_crn is None: self.module.fail_json( msg="Could not retrieve CRN for CDP Environment %s" - % original_env_crn + % original_env_crn, ) else: # create DF Service if self.cluster_subnets_filter or self.lb_subnets_filter: try: env_info = self.cdpy.environments.describe_environment( - self.env_crn + self.env_crn, ) subnet_metadata = list( - env_info["network"]["subnetMetadata"].values() + env_info["network"]["subnetMetadata"].values(), ) except Exception: subnet_metadata = [] if not subnet_metadata: self.module.fail_json( msg="Could not retrieve subnet metadata for CDP Environment %s" - % self.env_crn + % self.env_crn, ) if self.cluster_subnets_filter: self.cluster_subnets = self._filter_subnets( - self.cluster_subnets_filter, subnet_metadata + self.cluster_subnets_filter, + subnet_metadata, ) self.module.warn( "Found the following cluster subnets: %s" - % ", ".join(self.cluster_subnets) + % ", ".join(self.cluster_subnets), ) if self.lb_subnets_filter: self.lb_subnets = self._filter_subnets( - self.lb_subnets_filter, subnet_metadata + self.lb_subnets_filter, + subnet_metadata, ) self.module.warn( "Found the following load balancer subnets: %s" - % ", ".join(self.lb_subnets) + % ", ".join(self.lb_subnets), ) if not self.module.check_mode: @@ -420,7 +423,7 @@ def process(self): self.service = self._wait_for_enabled() else: self.module.fail_json( - msg="State %s is not valid for this module" % self.state + msg="State %s is not valid for this module" % self.state, ) def _wait_for_enabled(self): @@ -449,32 +452,34 @@ def _filter_subnets(self, query, subnets): except Exception: self.module.fail_json( msg="The specified subnet filter is an invalid JMESPath expression: " - % query + % query, ) try: return [s["subnetId"] for s in filtered_subnets] except Exception: self.module.fail_json( msg='The subnet filter "%s" should return an array of subnet objects ' - "but instead returned this: %s" % (query, json.dumps(filtered_subnets)) + "but instead returned this: %s" % (query, json.dumps(filtered_subnets)), ) def _disable_df(self): # Attempt clean Disable, which also ensures we have tried at least once before we do a forced removal if self.target["status"]["state"] in self.cdpy.sdk.REMOVABLE_STATES: self.service = self.cdpy.df.disable_service( - df_crn=self.df_crn, persist=self.persist, terminate=self.terminate + df_crn=self.df_crn, + persist=self.persist, + terminate=self.terminate, ) self.changed = True elif self.target["status"]["state"] in self.cdpy.sdk.TERMINATION_STATES: self.module.warn( - "DataFlow Service is already Disabling, skipping termination request" + "DataFlow Service is already Disabling, skipping termination request", ) pass else: self.module.warn( "Attempting to disable DataFlow Service but state %s not in Removable States %s" - % (self.target["status"]["state"], self.cdpy.sdk.REMOVABLE_STATES) + % (self.target["status"]["state"], self.cdpy.sdk.REMOVABLE_STATES), ) if self.wait: # Wait for Clean Disable, if possible @@ -499,7 +504,7 @@ def _disable_df(self): self.changed = True else: self.module.fail_json( - msg="DF Service Disable failed and Force delete not requested" + msg="DF Service Disable failed and Force delete not requested", ) if self.wait: self.service = self.cdpy.sdk.wait_for_state( @@ -521,10 +526,14 @@ def main(): nodes_min=dict(type="int", default=3, aliases=["min_k8s_node_count"]), nodes_max=dict(type="int", default=3, aliases=["max_k8s_node_count"]), public_loadbalancer=dict( - type="bool", default=False, aliases=["use_public_load_balancer"] + type="bool", + default=False, + aliases=["use_public_load_balancer"], ), private_cluster=dict( - type="bool", default=False, aliases=["enable_private_cluster"] + type="bool", + default=False, + aliases=["enable_private_cluster"], ), loadbalancer_ip_ranges=dict(type="list", elements="str", default=None), k8s_ip_ranges=dict(type="list", elements="str", default=None), diff --git a/plugins/modules/df_service_info.py b/plugins/modules/df_service_info.py index 88212bc..2cc3edc 100644 --- a/plugins/modules/df_service_info.py +++ b/plugins/modules/df_service_info.py @@ -190,7 +190,9 @@ def __init__(self, module): def process(self): # Note that parameters are defaulted to None, and are skipped if None at submission self.all_services = self.cdpy.df.list_services( - df_crn=self.df_crn, name=self.name, env_crn=self.env_crn + df_crn=self.df_crn, + name=self.name, + env_crn=self.env_crn, ) if any(x is not None for x in [self.name, self.df_crn, self.env_crn]): # Any set parameter indicates a describe is preferred to the lower information list command diff --git a/plugins/modules/dw_cluster.py b/plugins/modules/dw_cluster.py index cb496aa..c86567c 100644 --- a/plugins/modules/dw_cluster.py +++ b/plugins/modules/dw_cluster.py @@ -314,11 +314,11 @@ def __init__(self, module): self.timeout = self._get_param("timeout") self.custom_subdomain = self._get_param("custom_subdomain") self.database_backup_retention_period = self._get_param( - "database_backup_retention_period" + "database_backup_retention_period", ) self.reserved_compute_nodes = self._get_param("reserved_compute_nodes") self.reserved_shared_services_nodes = self._get_param( - "reserved_shared_services_nodes" + "reserved_shared_services_nodes", ) self.resource_pool = self._get_param("resource_pool") self.lb_ip_ranges = self._get_param("whitelist_workload_access_ip_cidrs") @@ -326,26 +326,33 @@ def __init__(self, module): # Azure nested parameters self.az_compute_instance_types = self._get_nested_param( - "azure", "compute_instance_types" + "azure", + "compute_instance_types", ) self.az_enable_az = self._get_nested_param("azure", "enable_az") self.az_enable_private_aks = self._get_nested_param( - "azure", "enable_private_aks" + "azure", + "enable_private_aks", ) self.az_enable_private_sql = self._get_nested_param( - "azure", "enable_private_sql" + "azure", + "enable_private_sql", ) self.az_enable_spot_instances = self._get_nested_param( - "azure", "enable_spot_instances" + "azure", + "enable_spot_instances", ) self.az_log_analytics_workspace_id = self._get_nested_param( - "azure", "log_analytics_workspace_id" + "azure", + "log_analytics_workspace_id", ) self.az_network_outbound_type = self._get_nested_param( - "azure", "network_outbound_type" + "azure", + "network_outbound_type", ) self.az_aks_private_dns_zone = self._get_nested_param( - "azure", "aks_private_dns_zone" + "azure", + "aks_private_dns_zone", ) self.az_subnet = self._get_nested_param("azure", "subnet") self.az_managed_identity = self._get_nested_param("azure", "managed_identity") @@ -377,7 +384,7 @@ def process(self): else: self.module.fail_json( msg="Received multiple (i.e. ambiguous) Clusters in Environment %s" - % self.env + % self.env, ) else: self.target = None @@ -393,11 +400,12 @@ def process(self): if self.target["status"] not in self.cdpy.sdk.REMOVABLE_STATES: self.module.warn( "Cluster is not in a valid state for Delete operations: %s" - % self.target["status"] + % self.target["status"], ) else: _ = self.cdpy.dw.delete_cluster( - cluster_id=self.name, force=self.force + cluster_id=self.name, + force=self.force, ) if self.wait: @@ -411,13 +419,13 @@ def process(self): else: self.cdpy.sdk.sleep(self.delay) # Wait for consistency sync self.cluster = self.cdpy.dw.describe_cluster( - cluster_id=self.name + cluster_id=self.name, ) # End Delete elif self.state == "present": # Begin Config Check self.module.warn( - "Cluster is already present and reconciliation is not yet implemented" + "Cluster is already present and reconciliation is not yet implemented", ) if self.wait: self.target = self.cdpy.sdk.wait_for_state( @@ -431,7 +439,7 @@ def process(self): # End Config Check else: self.module.fail_json( - msg="State %s is not valid for this module" % self.state + msg="State %s is not valid for this module" % self.state, ) # End Cluster Exists else: @@ -439,7 +447,7 @@ def process(self): if self.state == "absent": self.module.warn( "Cluster %s already absent in Environment %s" - % (self.name, self.env) + % (self.name, self.env), ) elif self.state == "present": if not self.module.check_mode: @@ -448,7 +456,7 @@ def process(self): if env_crn is None: self.module.fail_json( msg="Could not retrieve CRN for CDP Environment %s" - % self.env + % self.env, ) else: self.name = self.cdpy.dw.create_cluster( @@ -486,7 +494,7 @@ def process(self): ) else: self.cluster = self.cdpy.dw.describe_cluster( - cluster_id=self.name + cluster_id=self.name, ) # End Cluster Creation else: @@ -541,7 +549,10 @@ def main(): aliases=["loadbalancer_ip_ranges", "workload_ip_ranges"], ), whitelist_k8s_cluster_access_ip_cidrs=dict( - type="list", elements="str", default=None, aliases=["k8s_ip_ranges"] + type="list", + elements="str", + default=None, + aliases=["k8s_ip_ranges"], ), delay=dict(type="int", aliases=["polling_delay"], default=15), timeout=dict(type="int", aliases=["polling_timeout"], default=3600), diff --git a/plugins/modules/dw_data_visualization.py b/plugins/modules/dw_data_visualization.py index 0d9347d..841c955 100644 --- a/plugins/modules/dw_data_visualization.py +++ b/plugins/modules/dw_data_visualization.py @@ -211,33 +211,35 @@ def process(self): listing = self.cdpy.dw.list_clusters(env_crn) # Always returns a list if len(listing) == 1: self.cluster = self.cdpy.dw.describe_cluster( - cluster_id=listing[0]["id"] + cluster_id=listing[0]["id"], ) elif len(listing) == 0: self.cluster = None else: self.module.fail_json( msg="Received multiple (i.e. ambiguous) Clusters in Environment {}".format( - self.env - ) + self.env, + ), ) if not self.cluster: self.module.warn( "No cluster found with id {} or in environment {}.".format( - self.cluster_id, self.env - ) + self.cluster_id, + self.env, + ), ) return # Retrieves target data visualization, if any if self.id: self.target = self.cdpy.dw.describe_data_visualization( - cluster_id=self.cluster_id, data_viz_id=self.id + cluster_id=self.cluster_id, + data_viz_id=self.id, ) else: listing = self.cdpy.dw.list_data_visualizations( - cluster_id=self.cluster["id"] + cluster_id=self.cluster["id"], ) listing = [ v @@ -252,7 +254,7 @@ def process(self): else: self.module.fail_json( msg="Received multiple (i.e. ambiguous)" - " Data Visualizations in Cluster {}".format(self.cluster["name"]) + " Data Visualizations in Cluster {}".format(self.cluster["name"]), ) if self.target is not None: @@ -262,7 +264,8 @@ def process(self): else: self.changed = True self.cdpy.dw.delete_data_visualization( - cluster_id=self.cluster["id"], data_viz_id=self.target["id"] + cluster_id=self.cluster["id"], + data_viz_id=self.target["id"], ) if self.wait: @@ -312,8 +315,9 @@ def process(self): if self.state == "absent": self.module.warn( "Data Visualization {} already absent in Environment {}".format( - self.name, self.env - ) + self.name, + self.env, + ), ) elif self.state == "present": if not self.module.check_mode: @@ -339,7 +343,8 @@ def process(self): ) else: self.data_visualization = self.cdpy.dw.describe_cluster( - cluster_id=self.name, data_viz_id=data_visualization_id + cluster_id=self.name, + data_viz_id=data_visualization_id, ) @@ -374,7 +379,8 @@ def main(): instance = DwCluster(module) instance.process() output = dict( - changed=instance.changed, data_visualization=instance.data_visualization + changed=instance.changed, + data_visualization=instance.data_visualization, ) if instance.debug: diff --git a/plugins/modules/dw_data_visualization_info.py b/plugins/modules/dw_data_visualization_info.py index 0ed43b9..82c664c 100644 --- a/plugins/modules/dw_data_visualization_info.py +++ b/plugins/modules/dw_data_visualization_info.py @@ -152,8 +152,9 @@ def process(self): if not self.clusters: self.module.fail_json( msg="No clusters found for the specified filter. Cluster ID: {}, Env ID: {}".format( - self.cluster_id, self.environment - ) + self.cluster_id, + self.environment, + ), ) for cluster in self.clusters: @@ -170,7 +171,7 @@ def process(self): self.data_visualization_name is None or v["name"] == self.data_visualization_name ) - ] + ], ) diff --git a/plugins/modules/dw_database_catalog.py b/plugins/modules/dw_database_catalog.py index 0863c3d..56eaa69 100644 --- a/plugins/modules/dw_database_catalog.py +++ b/plugins/modules/dw_database_catalog.py @@ -163,11 +163,13 @@ def process(self): for dbc in dbcs: if dbc["name"] == self.name: self.target = self.cdpy.dw.describe_dbc( - cluster_id=self.cluster_id, dbc_id=dbc["id"] + cluster_id=self.cluster_id, + dbc_id=dbc["id"], ) else: self.target = self.cdpy.dw.describe_dbc( - cluster_id=self.cluster_id, dbc_id=self.catalog_id + cluster_id=self.cluster_id, + dbc_id=self.catalog_id, ) if self.target is not None: @@ -180,18 +182,20 @@ def process(self): if self.target["status"] not in self.cdpy.sdk.REMOVABLE_STATES: self.module.fail_json( msg="Database Catalog is not in a valid state for Delete operations: %s" - % self.target["status"] + % self.target["status"], ) else: _ = self.cdpy.dw.delete_dbc( - cluster_id=self.cluster_id, dbc_id=self.target["id"] + cluster_id=self.cluster_id, + dbc_id=self.target["id"], ) self.changed = True if self.wait: self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_dbc, params=dict( - cluster_id=self.cluster_id, dbc_id=self.target["id"] + cluster_id=self.cluster_id, + dbc_id=self.target["id"], ), field=None, delay=self.delay, @@ -200,24 +204,26 @@ def process(self): else: self.cdpy.sdk.sleep(self.delay) # Wait for consistency sync self.database_catalog = self.cdpy.dw.describe_dbc( - cluster_id=self.cluster_id, dbc_id=self.target["id"] + cluster_id=self.cluster_id, + dbc_id=self.target["id"], ) # End Drop elif self.state == "present": # Begin Config Check self.module.warn( - "Database Catalog already present and reconciliation is not yet implemented" + "Database Catalog already present and reconciliation is not yet implemented", ) if self.target["status"] in self.cdpy.sdk.STOPPED_STATES: # self.target = self.cdpy.dw.restart_dbc(cluster_id=self.cluster_id, dbc_id=self.target['id']) self.module.fail_json( - msg="Unable to restart a stopped DB Catalog. You must manually restart." + msg="Unable to restart a stopped DB Catalog. You must manually restart.", ) if self.wait: self.target = self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_dbc, params=dict( - cluster_id=self.cluster_id, dbc_id=self.target["id"] + cluster_id=self.cluster_id, + dbc_id=self.target["id"], ), state=self.cdpy.sdk.STARTED_STATES, delay=self.delay, @@ -233,7 +239,7 @@ def process(self): if self.state == "absent": self.module.warn( "Database Catalog %s already absent in Cluster %s" - % (self.name, self.cluster_id) + % (self.name, self.cluster_id), ) elif self.state == "present": if not self.module.check_mode: @@ -253,11 +259,12 @@ def process(self): ) else: self.database_catalog = self.cdpy.dw.describe_dbc( - cluster_id=self.cluster_id, dbc_id=dbc_id + cluster_id=self.cluster_id, + dbc_id=dbc_id, ) else: self.module.fail_json( - msg="State %s is not valid for this module" % self.state + msg="State %s is not valid for this module" % self.state, ) # End Database Catalog Not Found diff --git a/plugins/modules/dw_database_catalog_info.py b/plugins/modules/dw_database_catalog_info.py index fb0c7a3..a355dae 100644 --- a/plugins/modules/dw_database_catalog_info.py +++ b/plugins/modules/dw_database_catalog_info.py @@ -118,7 +118,8 @@ def __init__(self, module): def process(self): if self.catalog_id is not None: target = self.cdpy.dw.describe_dbc( - cluster_id=self.cluster_id, dbc_id=self.catalog_id + cluster_id=self.cluster_id, + dbc_id=self.catalog_id, ) if target is not None: self.database_catalogs.append(target) @@ -129,8 +130,9 @@ def process(self): if dbc["name"] == self.name: self.database_catalogs.append( self.cdpy.dw.describe_dbc( - cluster_id=self.cluster_id, dbc_id=dbc["id"] - ) + cluster_id=self.cluster_id, + dbc_id=dbc["id"], + ), ) else: self.database_catalogs = dbcs diff --git a/plugins/modules/dw_virtual_warehouse.py b/plugins/modules/dw_virtual_warehouse.py index 48376eb..6e97a2f 100644 --- a/plugins/modules/dw_virtual_warehouse.py +++ b/plugins/modules/dw_virtual_warehouse.py @@ -412,41 +412,53 @@ def __init__(self, module): self.autoscaling_min_nodes = self._get_nested_param("autoscaling", "min_nodes") self.autoscaling_max_nodes = self._get_nested_param("autoscaling", "max_nodes") self.autoscaling_auto_suspend_timeout_seconds = self._get_nested_param( - "autoscaling", "auto_suspend_timeout_seconds" + "autoscaling", + "auto_suspend_timeout_seconds", ) self.autoscaling_disable_auto_suspend = self._get_nested_param( - "autoscaling", "disable_auto_suspend" + "autoscaling", + "disable_auto_suspend", ) self.autoscaling_hive_desired_free_capacity = self._get_nested_param( - "autoscaling", "hive_desired_free_capacity" + "autoscaling", + "hive_desired_free_capacity", ) self.autoscaling_hive_scale_wait_time_seconds = self._get_nested_param( - "autoscaling", "hive_scale_wait_time_seconds" + "autoscaling", + "hive_scale_wait_time_seconds", ) self.autoscaling_impala_scale_down_delay_seconds = self._get_nested_param( - "autoscaling", "impala_scale_down_delay_seconds" + "autoscaling", + "impala_scale_down_delay_seconds", ) self.autoscaling_impala_scale_up_delay_seconds = self._get_nested_param( - "autoscaling", "impala_scale_up_delay_seconds" + "autoscaling", + "impala_scale_up_delay_seconds", ) self.autoscaling_pod_config_name = self._get_nested_param( - "autoscaling", "pod_config_name" + "autoscaling", + "pod_config_name", ) # impala_ha nested parameters self.impala_ha_enable_catalog_high_availability = self._get_nested_param( - "impala_ha", "enable_catalog_high_availability" + "impala_ha", + "enable_catalog_high_availability", ) self.impala_ha_enable_shutdown_of_coordinator = self._get_nested_param( - "impala_ha", "enable_shutdown_of_coordinator" + "impala_ha", + "enable_shutdown_of_coordinator", ) self.impala_ha_high_availability_mode = self._get_nested_param( - "impala_ha", "high_availability_mode" + "impala_ha", + "high_availability_mode", ) self.impala_ha_num_of_active_coordinators = self._get_nested_param( - "impala_ha", "num_of_active_coordinators" + "impala_ha", + "num_of_active_coordinators", ) self.impala_ha_shutdown_of_coordinator_delay_seconds = self._get_nested_param( - "impala_ha", "shutdown_of_coordinator_delay_seconds" + "impala_ha", + "shutdown_of_coordinator_delay_seconds", ) # Initialize return values @@ -466,11 +478,13 @@ def process(self): for vw in vws: if self.name is not None and vw["name"] == self.name: self.target = self.cdpy.dw.describe_vw( - cluster_id=self.cluster_id, vw_id=vw["id"] + cluster_id=self.cluster_id, + vw_id=vw["id"], ) else: self.target = self.cdpy.dw.describe_vw( - cluster_id=self.cluster_id, vw_id=self.warehouse_id + cluster_id=self.cluster_id, + vw_id=self.warehouse_id, ) if self.target is not None: @@ -483,18 +497,20 @@ def process(self): if self.target["status"] not in self.cdpy.sdk.REMOVABLE_STATES: self.module.fail_json( msg="Virtual Warehouse not in valid state for Delete operation: %s" - % self.target["status"] + % self.target["status"], ) else: _ = self.cdpy.dw.delete_vw( - cluster_id=self.cluster_id, vw_id=self.target["id"] + cluster_id=self.cluster_id, + vw_id=self.target["id"], ) self.changed = True if self.wait: self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_vw, params=dict( - cluster_id=self.cluster_id, vw_id=self.target["id"] + cluster_id=self.cluster_id, + vw_id=self.target["id"], ), field=None, delay=self.delay, @@ -503,19 +519,21 @@ def process(self): else: self.cdpy.sdk.sleep(self.delay) # Wait for consistency sync self.virtual_warehouse = self.cdpy.dw.describe_vw( - cluster_id=self.cluster_id, vw_id=self.target["id"] + cluster_id=self.cluster_id, + vw_id=self.target["id"], ) # End Drop elif self.state == "present": # Begin Config check self.module.warn( - "Virtual Warehouse already present and reconciliation is not yet implemented" + "Virtual Warehouse already present and reconciliation is not yet implemented", ) if self.wait and not self.module.check_mode: self.target = self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.dw.describe_vw, params=dict( - cluster_id=self.cluster_id, vw_id=self.target["id"] + cluster_id=self.cluster_id, + vw_id=self.target["id"], ), state=self.cdpy.sdk.STARTED_STATES + self.cdpy.sdk.STOPPED_STATES, @@ -526,7 +544,7 @@ def process(self): # End Config check else: self.module.fail_json( - msg="State %s is not valid for this module" % self.state + msg="State %s is not valid for this module" % self.state, ) # End Virtual Warehouse Exists else: @@ -534,7 +552,7 @@ def process(self): if self.state == "absent": self.module.warn( "Virtual Warehouse is already absent in Cluster %s" - % self.cluster_id + % self.cluster_id, ) elif self.state == "present": if not self.module.check_mode: @@ -580,11 +598,12 @@ def process(self): ) else: self.virtual_warehouse = self.cdpy.dw.describe_vw( - cluster_id=self.cluster_id, vw_id=vw_id + cluster_id=self.cluster_id, + vw_id=vw_id, ) else: self.module.fail_json( - msg="State %s is not valid for this module" % self.state + msg="State %s is not valid for this module" % self.state, ) # End Virtual Warehouse Not Found @@ -658,7 +677,7 @@ def main(): ), ), ), - ) + ), ), ), application_configs=dict(type="dict"), diff --git a/plugins/modules/dw_virtual_warehouse_info.py b/plugins/modules/dw_virtual_warehouse_info.py index d56bdb8..3bbd5fa 100644 --- a/plugins/modules/dw_virtual_warehouse_info.py +++ b/plugins/modules/dw_virtual_warehouse_info.py @@ -192,7 +192,8 @@ def __init__(self, module): def process(self): if self.warehouse_id is not None: target = self.cdpy.dw.describe_vw( - cluster_id=self.cluster_id, vw_id=self.warehouse_id + cluster_id=self.cluster_id, + vw_id=self.warehouse_id, ) if target is not None: self.virtual_warehouses.append(target) @@ -203,8 +204,9 @@ def process(self): if vw["name"] == self.name: self.virtual_warehouses.append( self.cdpy.dw.describe_vw( - cluster_id=self.cluster_id, vw_id=vw["id"] - ) + cluster_id=self.cluster_id, + vw_id=vw["id"], + ), ) elif self.catalog_id is not None: self.virtual_warehouses = [ diff --git a/plugins/modules/env.py b/plugins/modules/env.py index e4bcd85..9209b56 100644 --- a/plugins/modules/env.py +++ b/plugins/modules/env.py @@ -737,7 +737,7 @@ def process(self): # Check parameters that should only specified with freeipa upgrade if self.freeipa["upgrade"] == None and (self.freeipa["image_id"]): self.module.fail_json( - msg="FreeIPA image Id should only be specified during FreeIPA upgrade" + msg="FreeIPA image Id should only be specified during FreeIPA upgrade", ) existing = self.cdpy.environments.describe_environment(self.name) @@ -758,7 +758,7 @@ def process(self): ): self.module.fail_json( - msg="Unable to start and upgrade a stopped environment without waiting for completion of start." + msg="Unable to start and upgrade a stopped environment without waiting for completion of start.", ) # Reconcile if specifying cloud parameters @@ -768,7 +768,7 @@ def process(self): if existing["cloudPlatform"].lower() != self.cloud: self.module.fail_json( msg="Environment exists in a different cloud platform. " - "Platform: '%s'" % existing["cloudPlatform"] + "Platform: '%s'" % existing["cloudPlatform"], ) # Check for changes (except for credentials and cloud platform) @@ -792,24 +792,25 @@ def process(self): # Fail if attempting to restart a failed environment if existing["status"] in self.cdpy.sdk.FAILED_STATES: self.module.fail_json( - msg="Attempting to restart a failed environment" + msg="Attempting to restart a failed environment", ) # Warn if attempting to start an environment amidst the creation cycle elif existing["status"] in self.cdpy.sdk.CREATION_STATES: self.module.warn( - "Skipping attempt to start an environment during its creation cycle" + "Skipping attempt to start an environment during its creation cycle", ) # Otherwise attempt to start the environment elif existing["status"] not in self.cdpy.sdk.STARTED_STATES: if not self.module.check_mode: self.environment = self.cdpy.environments.start_environment( - self.name, self.datahub_start + self.name, + self.datahub_start, ) else: self.module.warn( - "Environment state %s is unexpected" % existing["status"] + "Environment state %s is unexpected" % existing["status"], ) if self.wait: @@ -826,7 +827,7 @@ def process(self): # Catch errors for updating the credential if self.cloud is None: self.module.fail_json( - msg="Environment does not exist, or 'cloud' is not defined." + msg="Environment does not exist, or 'cloud' is not defined.", ) self._validate_environment_name() @@ -836,7 +837,7 @@ def process(self): if not self.module.check_mode: if self.cloud not in ["aws", "azure", "gcp"]: self.module.fail_json( - msg="Cloud %s is not yet implemented" % self.cloud + msg="Cloud %s is not yet implemented" % self.cloud, ) elif self.cloud == "aws": self.environment = ( @@ -875,34 +876,36 @@ def process(self): # Fail if attempting to upgrade with a declared state of stopped if self.freeipa["upgrade"] != None: self.module.fail_json( - msg="Attempting to upgrade and stop an environment is not supported" + msg="Attempting to upgrade and stop an environment is not supported", ) # Warn if attempting to stop an already stopped/stopping environment if existing["status"] in self.cdpy.sdk.STOPPED_STATES: if not self.wait: self.module.warn( - "Attempting to stop an environment already stopped or in stopping cycle" + "Attempting to stop an environment already stopped or in stopping cycle", ) self.environment = existing # Warn if attempting to stop a terminated/terminating environment elif existing["status"] in self.cdpy.sdk.TERMINATION_STATES: self.module.fail_json( - msg="Attempting to stop a terminating environment", **existing + msg="Attempting to stop a terminating environment", + **existing, ) # Fail if attempting to stop a failed environment elif existing["status"] in self.cdpy.sdk.FAILED_STATES: self.module.fail_json( - msg="Attempting to stop a failed environment", **existing + msg="Attempting to stop a failed environment", + **existing, ) # Otherwise, stop the environment else: if not self.module.check_mode: self.environment = self.cdpy.environments.stop_environment( - self.name + self.name, ) if self.wait: self.environment = self.cdpy.sdk.wait_for_state( @@ -925,7 +928,7 @@ def process(self): and existing["status"] in self.cdpy.sdk.TERMINATION_STATES ): self.module.warn( - "Attempting to delete an environment during the termination cycle" + "Attempting to delete an environment during the termination cycle", ) self.environment = existing # Otherwise, delete the environment @@ -933,7 +936,9 @@ def process(self): else: if not self.module.check_mode: self.cdpy.environments.delete_environment( - self.name, self.cascade, self.force + self.name, + self.cascade, + self.force, ) self.changed = True @@ -970,7 +975,8 @@ def upgrade_freeipa(self, wait): # Check if an upgrade is available ipa_updates = self.cdpy.environments.get_freeipa_upgrade_options( - self.name, allow_major_os_upgrade=allow_major_os_upgrade + self.name, + allow_major_os_upgrade=allow_major_os_upgrade, ) if len(ipa_updates["images"]) > 0: # Perform the upgrade @@ -1004,7 +1010,7 @@ def _validate_environment_name(self): self.module.fail_json( msg="Invalid environment name, '%s'. Names must contain only lowercase " "letters, numbers, and hyphens, must start with a lowercase letter " - "or a number, and be between 5 and 28 characters" % self.name + "or a number, and be between 5 and 28 characters" % self.name, ) def _configure_payload(self): @@ -1047,7 +1053,7 @@ def _configure_payload(self): payload["freeIpa"] = dict() if self.freeipa["instanceCountByGroup"] is not None: payload["freeIpa"].update( - dict(instanceCountByGroup=self.freeipa["instanceCountByGroup"]) + dict(instanceCountByGroup=self.freeipa["instanceCountByGroup"]), ) if self.freeipa["multiAz"] is not None: payload["freeIpa"].update(dict(multiAz=self.freeipa["multiAz"])) @@ -1064,7 +1070,7 @@ def _configure_payload(self): if self.s3_guard_name is not None: self.module.warn( "As of CDP Runtime 7.2.10 (and given consistent s3), s3Guard is no longer needed. " - "Proceeding without s3Guard." + "Proceeding without s3Guard.", ) if self.inbound_cidr is not None: @@ -1101,7 +1107,7 @@ def _configure_payload(self): if self.freeipa is not None: payload["freeIpa"] = dict( - instanceCountByGroup=self.freeipa["instanceCountByGroup"] + instanceCountByGroup=self.freeipa["instanceCountByGroup"], ) if self.zones is not None: @@ -1135,7 +1141,7 @@ def _configure_payload(self): ) if self.freeipa is not None: payload["freeIpa"] = dict( - instanceCountByGroup=self.freeipa["instanceCountByGroup"] + instanceCountByGroup=self.freeipa["instanceCountByGroup"], ) if self.use_single_resource_group: payload["resourceGroupName"] = self.resource_gp @@ -1152,20 +1158,20 @@ def _reconcile_existing_state(self, existing): self.module.warn( "Environment SSH tunneling specified. Currently, the SSH tunnel setting cannot be " "reconciled. To update the tunneling setting, explicitly delete and recreate the " - "environment." + "environment.", ) if self.workload_analytics is not None: self.module.warn( "Environment workload analytics specified. Currently, the environment's workload " "analytics setting cannot be reconciled. To update the workload analytics setting for the" - "environment, explicitly delete and recreate the environment." + "environment, explicitly delete and recreate the environment.", ) if self.tags is not None: self.module.warn( "Environment tags specified. Currently, tags cannot be reconciled. To update tags, " - "explicitly delete and recreate the environment." + "explicitly delete and recreate the environment.", ) if self.cloud == "aws": @@ -1178,7 +1184,7 @@ def _reconcile_existing_state(self, existing): [ "log_identity", existing["logStorage"]["awsDetails"]["instanceProfile"], - ] + ], ) if ( @@ -1190,7 +1196,7 @@ def _reconcile_existing_state(self, existing): [ "log_location", existing["logStorage"]["awsDetails"]["storageLocationBase"], - ] + ], ) if ( @@ -1202,7 +1208,7 @@ def _reconcile_existing_state(self, existing): [ "backup_location", existing["backupStorage"]["awsDetails"]["storageLocationBase"], - ] + ], ) if self.public_key_id is not None or self.public_key_text is not None: @@ -1235,7 +1241,7 @@ def _reconcile_existing_state(self, existing): mismatch.append(["vpc_id", existing["network"]["aws"]["vpcId"]]) if self.subnet_ids is not None and set( - existing["network"]["subnetIds"] + existing["network"]["subnetIds"], ) != set(self.subnet_ids): mismatch.append(["subnetIds", existing["network"]["subnetIds"]]) @@ -1258,7 +1264,7 @@ def _reconcile_existing_state(self, existing): and access.get("defaultSecurityGroupId") != self.default_sg ): mismatch.append( - ["default_sg", access.get("defaultSecurityGroupId")] + ["default_sg", access.get("defaultSecurityGroupId")], ) if ( self.knox_sg is not None @@ -1270,7 +1276,7 @@ def _reconcile_existing_state(self, existing): if "proxyConfig" in existing: if existing["proxyConfig"]["proxyConfigName"] != self.proxy: mismatch.append( - ["proxy", existing["proxyConfig"]["proxyConfigName"]] + ["proxy", existing["proxyConfig"]["proxyConfigName"]], ) else: mismatch.append(["proxy", "n/a"]) @@ -1278,12 +1284,12 @@ def _reconcile_existing_state(self, existing): mismatch.append(["proxy", existing["proxyConfig"]["proxyConfigName"]]) elif self.cloud == "gcp": self.module.warn( - "Environment configuration reconciliation not implemented on GCP" + "Environment configuration reconciliation not implemented on GCP", ) else: # For Azure self.module.warn( - "Environment configuration reconciliation not implemented on Azure" + "Environment configuration reconciliation not implemented on Azure", ) return mismatch @@ -1309,7 +1315,9 @@ def main(): aliases=["default", "default_security_group"], ), knox_sg=dict( - required=False, type="str", aliases=["knox", "knox_security_group"] + required=False, + type="str", + aliases=["knox", "knox_security_group"], ), public_key_text=dict(required=False, type="str", aliases=["ssh_key_text"]), public_key_id=dict( @@ -1318,25 +1326,38 @@ def main(): aliases=["public_key", "ssh_key", "ssh_key_id"], ), log_location=dict( - required=False, type="str", aliases=["storage_location_base"] + required=False, + type="str", + aliases=["storage_location_base"], ), backup_location=dict( - required=False, type="str", aliases=["backup_storage_location_base"] + required=False, + type="str", + aliases=["backup_storage_location_base"], ), log_identity=dict(required=False, type="str", aliases=["instance_profile"]), network_cidr=dict(required=False, type="str"), vpc_id=dict( - required=False, type="str", aliases=["vpc", "network"] + required=False, + type="str", + aliases=["vpc", "network"], ), # TODO: Update Docs subnet_ids=dict( - required=False, type="list", elements="str", aliases=["subnets"] + required=False, + type="list", + elements="str", + aliases=["subnets"], ), public_ip=dict(required=False, type="bool"), # TODO: add to docs s3_guard_name=dict( - required=False, type="str", aliases=["s3_guard", "s3_guard_table_name"] + required=False, + type="str", + aliases=["s3_guard", "s3_guard_table_name"], ), resource_gp=dict( - required=False, type="str", aliases=["resource_group_name"] + required=False, + type="str", + aliases=["resource_group_name"], ), tags=dict(required=False, type="dict", aliases=["environment_tags"]), workload_analytics=dict(required=False, type="bool", default=True), @@ -1355,7 +1376,9 @@ def main(): multiAz=dict(required=False, type="bool"), image_id=dict(required=False, type="str"), upgrade=dict( - required=False, type="str", choices=["major", "minor"] + required=False, + type="str", + choices=["major", "minor"], ), ), default=dict(instanceCountByGroup=2, multiAz=False), @@ -1367,16 +1390,25 @@ def main(): aliases=["[proxy_config", "proxy_config_name"], ), cascade=dict( - required=False, type="bool", default=False, aliases=["cascading"] + required=False, + type="bool", + default=False, + aliases=["cascading"], ), force=dict(required=False, type="bool", default=False), wait=dict(required=False, type="bool", default=True), datahub_start=dict(required=False, type="bool", default=True), delay=dict( - required=False, type="int", aliases=["polling_delay"], default=15 + required=False, + type="int", + aliases=["polling_delay"], + default=15, ), timeout=dict( - required=False, type="int", aliases=["polling_timeout"], default=3600 + required=False, + type="int", + aliases=["polling_timeout"], + default=3600, ), zones=dict( required=False, @@ -1386,7 +1418,9 @@ def main(): ), endpoint_access_subnets=dict(required=False, type="list", elements="str"), endpoint_access_scheme=dict( - required=False, type="str", choices=["PUBLIC", "PRIVATE"] + required=False, + type="str", + choices=["PUBLIC", "PRIVATE"], ), use_single_resource_group=dict(required=False, type="bool", default=False), ), diff --git a/plugins/modules/env_auth.py b/plugins/modules/env_auth.py index 692ee0e..754c75c 100644 --- a/plugins/modules/env_auth.py +++ b/plugins/modules/env_auth.py @@ -112,10 +112,16 @@ def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( name=dict( - required=False, type="list", elements="str", aliases=["environment"] + required=False, + type="list", + elements="str", + aliases=["environment"], ), password=dict( - required=True, type="str", no_log=True, aliases=["workload_password"] + required=True, + type="str", + no_log=True, + aliases=["workload_password"], ), ), supports_check_mode=True, diff --git a/plugins/modules/env_auth_info.py b/plugins/modules/env_auth_info.py index 8629933..03119af 100644 --- a/plugins/modules/env_auth_info.py +++ b/plugins/modules/env_auth_info.py @@ -218,7 +218,8 @@ def get_keytabs_for_user(self, workload_user_crn): all_envs = self.cdpy.environments.list_environments() for env in all_envs: result = self.cdpy.environments.get_keytab( - workload_user_crn, env["crn"] + workload_user_crn, + env["crn"], ) keytabs[env["environmentName"]] = result @@ -246,11 +247,17 @@ def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( name=dict( - required=False, type="list", elements="str", aliases=["environment"] + required=False, + type="list", + elements="str", + aliases=["environment"], ), user=dict(required=False, type="list", elements="str", aliases=["users"]), root_certificate=dict( - required=False, type="bool", aliases=["root_ca", "cert"], default=True + required=False, + type="bool", + aliases=["root_ca", "cert"], + default=True, ), keytab=dict( required=False, diff --git a/plugins/modules/env_automated_user_sync_info.py b/plugins/modules/env_automated_user_sync_info.py index 9a857e2..5625ec1 100644 --- a/plugins/modules/env_automated_user_sync_info.py +++ b/plugins/modules/env_automated_user_sync_info.py @@ -121,14 +121,14 @@ def __init__(self, module): @CdpModule._Decorators.process_debug def process(self): self.sync = self.cdpy.environments.get_automated_sync_environment_status( - self.name + self.name, ) def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( - name=dict(required=True, type="str", aliases=["environment"]) + name=dict(required=True, type="str", aliases=["environment"]), ), supports_check_mode=True, ) diff --git a/plugins/modules/env_cred.py b/plugins/modules/env_cred.py index 187f917..52c08ff 100644 --- a/plugins/modules/env_cred.py +++ b/plugins/modules/env_cred.py @@ -217,13 +217,14 @@ def validate_credential_name(self): """Ensures that Credential names follow required formatting and fails the module on error.""" if ( self.cdpy.sdk.regex_search( - self.cdpy.environments.sdk.CREDENTIAL_NAME_PATTERN, self.name + self.cdpy.environments.sdk.CREDENTIAL_NAME_PATTERN, + self.name, ) is not None ): self.module.fail_json( msg='Invalid credential name, "%s". CDP credentials must contain only lowercase ' - "letters, numbers and hyphens." % self.name + "letters, numbers and hyphens." % self.name, ) def reconcile_credential(self, credential): @@ -234,7 +235,7 @@ def reconcile_credential(self, credential): """ self.module.warn( "Changes to Role ARN cannot be checked. If you need to change the Role ARN, explicitly delete" - " and recreate the credential." + " and recreate the credential.", ) if ( self.description is not None @@ -249,7 +250,11 @@ def handle_create_credential(self): if not self.module.check_mode: if self.cloud == "aws": resp = self.cdpy.environments.create_aws_credential( - self.name, self.role, self.description, self.retries, self.delay + self.name, + self.role, + self.description, + self.retries, + self.delay, ) self.changed = True return resp @@ -265,7 +270,8 @@ def handle_create_credential(self): return resp elif self.cloud == "gcp": resp = self.cdpy.environments.create_gcp_credential( - name=self.name, key_file=self.secret + name=self.name, + key_file=self.secret, ) self.changed = True return resp @@ -290,7 +296,10 @@ def main(): secret=dict(required=False, type="str"), role=dict(required=False, type="str", aliases=["arn", "role_arn"]), description=dict( - required=False, type="str", aliases=["desc"], default=None + required=False, + type="str", + aliases=["desc"], + default=None, ), retries=dict(required=False, type="int", default=5), delay=dict(required=False, type="int", default=3), diff --git a/plugins/modules/env_cred_info.py b/plugins/modules/env_cred_info.py index 987ebc8..412fdee 100644 --- a/plugins/modules/env_cred_info.py +++ b/plugins/modules/env_cred_info.py @@ -119,7 +119,7 @@ def process(self): def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( - name=dict(required=False, type="str", aliases=["credential"]) + name=dict(required=False, type="str", aliases=["credential"]), ), supports_check_mode=True, ) diff --git a/plugins/modules/env_idbroker.py b/plugins/modules/env_idbroker.py index 325bb7f..7ee321c 100644 --- a/plugins/modules/env_idbroker.py +++ b/plugins/modules/env_idbroker.py @@ -372,14 +372,16 @@ def set_mappings(self, mappings): "environments", "set_id_broker_mappings", environmentName=self.name, - **mappings + **mappings, ) def sync_mappings(self): self.changed = True if not self.module.check_mode: self.cdpy.sdk.call( - "environments", "sync_id_broker_mappings", environmentName=self.name + "environments", + "sync_id_broker_mappings", + environmentName=self.name, ) @@ -388,13 +390,19 @@ def main(): argument_spec=CdpModule.argument_spec( name=dict(required=True, type="str", aliases=["environment"]), data_access=dict( - required=False, type="str", aliases=["data_access_arn", "data"] + required=False, + type="str", + aliases=["data_access_arn", "data"], ), ranger_audit=dict( - required=False, type="str", aliases=["ranger_audit_arn", "audit"] + required=False, + type="str", + aliases=["ranger_audit_arn", "audit"], ), ranger_cloud_access=dict( - required=False, type="str", aliases=["ranger_cloud_access_arn", "cloud"] + required=False, + type="str", + aliases=["ranger_cloud_access_arn", "cloud"], ), mappings=dict( required=False, @@ -412,7 +420,10 @@ def main(): aliases=["set_empty_mappings"], ), sync=dict( - required=False, type="bool", default=True, aliases=["sync_mappings"] + required=False, + type="bool", + default=True, + aliases=["sync_mappings"], ), ), mutually_exclusive=[["mappings", "clear_mappings"]], diff --git a/plugins/modules/env_idbroker_info.py b/plugins/modules/env_idbroker_info.py index d96255c..5b81656 100644 --- a/plugins/modules/env_idbroker_info.py +++ b/plugins/modules/env_idbroker_info.py @@ -187,7 +187,7 @@ def process(self): def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( - name=dict(required=True, type="str", aliases=["environment"]) + name=dict(required=True, type="str", aliases=["environment"]), ), supports_check_mode=True, ) diff --git a/plugins/modules/env_info.py b/plugins/modules/env_info.py index a20110e..5fa33ea 100644 --- a/plugins/modules/env_info.py +++ b/plugins/modules/env_info.py @@ -435,17 +435,18 @@ def process(self): df = self.cdpy.df.list_services(env_crn=this_env["crn"]) this_env["descendants"] = { "datahub": self.cdpy.datahub.describe_all_clusters( - this_env["environmentName"] + this_env["environmentName"], ), "dw": self.cdpy.dw.gather_clusters(this_env["crn"]), "ml": self.cdpy.ml.describe_all_workspaces( - this_env["environmentName"] + this_env["environmentName"], ), "de": self.cdpy.de.list_services( - this_env["environmentName"], remove_deleted=True + this_env["environmentName"], + remove_deleted=True, ), "opdb": self.cdpy.opdb.describe_all_databases( - this_env["environmentName"] + this_env["environmentName"], ), "df": df if df is not None else [], } diff --git a/plugins/modules/env_proxy.py b/plugins/modules/env_proxy.py index 8d98ede..b720bc4 100644 --- a/plugins/modules/env_proxy.py +++ b/plugins/modules/env_proxy.py @@ -200,7 +200,7 @@ def process(self): self.changed = True self._create_auth_payload() self.proxy_config = self.cdpy.environments.create_proxy_config( - **self._payload + **self._payload, ) else: if self.state == "present": @@ -216,13 +216,13 @@ def process(self): self.changed = True self._create_auth_payload() self.module.warn( - "Proxy authentication details are set. Forcing update." + "Proxy authentication details are set. Forcing update.", ) if self.changed: self.cdpy.environments.delete_proxy_config(self.name) self.proxy_config = self.cdpy.environments.create_proxy_config( - **self._payload + **self._payload, ) else: self.proxy_config = existing diff --git a/plugins/modules/env_proxy_info.py b/plugins/modules/env_proxy_info.py index f413eb6..e80de48 100644 --- a/plugins/modules/env_proxy_info.py +++ b/plugins/modules/env_proxy_info.py @@ -132,7 +132,7 @@ def process(self): def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( - name=dict(required=False, type="str", aliases=["proxyConfigName"]) + name=dict(required=False, type="str", aliases=["proxyConfigName"]), ), supports_check_mode=True, ) diff --git a/plugins/modules/env_telemetry.py b/plugins/modules/env_telemetry.py index d6f2a2b..9a44039 100644 --- a/plugins/modules/env_telemetry.py +++ b/plugins/modules/env_telemetry.py @@ -107,7 +107,9 @@ def main(): name=dict(required=True, type="str", aliases=["environment"]), workload_analytics=dict(required=False, type="bool", aliases=["analytics"]), logs_collection=dict( - required=False, type="bool", aliases=["logs", "report_deployment_logs"] + required=False, + type="bool", + aliases=["logs", "report_deployment_logs"], ), ), supports_check_mode=True, diff --git a/plugins/modules/env_user_sync.py b/plugins/modules/env_user_sync.py index cc0747b..69d32aa 100644 --- a/plugins/modules/env_user_sync.py +++ b/plugins/modules/env_user_sync.py @@ -215,10 +215,16 @@ def main(): current_user=dict(required=False, type="bool", aliases=["user"]), wait=dict(required=False, type="bool", default=True), delay=dict( - required=False, type="int", aliases=["polling_delay"], default=15 + required=False, + type="int", + aliases=["polling_delay"], + default=15, ), timeout=dict( - required=False, type="int", aliases=["polling_timeout"], default=3600 + required=False, + type="int", + aliases=["polling_timeout"], + default=3600, ), ), mutually_exclusive=(["name", "current_user"]), diff --git a/plugins/modules/env_user_sync_info.py b/plugins/modules/env_user_sync_info.py index 357406f..73ceb14 100644 --- a/plugins/modules/env_user_sync_info.py +++ b/plugins/modules/env_user_sync_info.py @@ -157,8 +157,10 @@ def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( name=dict( - required=True, type="str", aliases=["operation_id", "operation_crn"] - ) + required=True, + type="str", + aliases=["operation_id", "operation_crn"], + ), ), supports_check_mode=True, ) diff --git a/plugins/modules/freeipa_info.py b/plugins/modules/freeipa_info.py index c608dfc..1586aea 100644 --- a/plugins/modules/freeipa_info.py +++ b/plugins/modules/freeipa_info.py @@ -110,14 +110,16 @@ def __init__(self, module): def process(self): if self.name: self.freeipa = self.cdpy.sdk.call( - svc="environments", func="get_freeipa_status", environmentName=self.name + svc="environments", + func="get_freeipa_status", + environmentName=self.name, ) def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( - name=dict(required=True, type="str", aliases=["environment"]) + name=dict(required=True, type="str", aliases=["environment"]), ), supports_check_mode=True, ) diff --git a/plugins/modules/iam_group.py b/plugins/modules/iam_group.py index 9ac4ec5..e84f2a1 100644 --- a/plugins/modules/iam_group.py +++ b/plugins/modules/iam_group.py @@ -248,7 +248,9 @@ def process(self): if self.resource_roles: for assignment in self.resource_roles: self.cdpy.iam.assign_group_resource_role( - self.name, assignment["resource"], assignment["role"] + self.name, + assignment["resource"], + assignment["role"], ) self.info = self._retrieve_group() else: @@ -303,16 +305,20 @@ def process(self): for assignment in new_assignments: self.changed = True self.cdpy.iam.assign_group_resource_role( - self.name, assignment["resource"], assignment["role"] + self.name, + assignment["resource"], + assignment["role"], ) if self.purge: stale_assignments = self._stale_assignments( - existing["resource_roles"] + existing["resource_roles"], ) for assignment in stale_assignments: self.changed = True self.cdpy.iam.unassign_group_resource_role( - self.name, assignment["resource"], assignment["role"] + self.name, + assignment["resource"], + assignment["role"], ) if self.changed: diff --git a/plugins/modules/iam_group_info.py b/plugins/modules/iam_group_info.py index 867094e..5a31c4b 100644 --- a/plugins/modules/iam_group_info.py +++ b/plugins/modules/iam_group_info.py @@ -145,8 +145,11 @@ def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( name=dict( - required=False, type="list", elements="str", aliases=["group_name"] - ) + required=False, + type="list", + elements="str", + aliases=["group_name"], + ), ), supports_check_mode=True, ) diff --git a/plugins/modules/iam_resource_role_info.py b/plugins/modules/iam_resource_role_info.py index afa0e5a..914ae6c 100644 --- a/plugins/modules/iam_resource_role_info.py +++ b/plugins/modules/iam_resource_role_info.py @@ -110,7 +110,7 @@ def process(self): def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( - name=dict(required=False, type="list", elements="str", aliases=["crn"]) + name=dict(required=False, type="list", elements="str", aliases=["crn"]), ), supports_check_mode=True, ) diff --git a/plugins/modules/iam_role_info.py b/plugins/modules/iam_role_info.py index d23bb93..28d7064 100644 --- a/plugins/modules/iam_role_info.py +++ b/plugins/modules/iam_role_info.py @@ -95,7 +95,7 @@ def process(self): def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( - name=dict(required=False, type="list", elements="str", aliases=["crn"]) + name=dict(required=False, type="list", elements="str", aliases=["crn"]), ), supports_check_mode=True, ) diff --git a/plugins/modules/iam_user_info.py b/plugins/modules/iam_user_info.py index 6cb063b..edb3762 100644 --- a/plugins/modules/iam_user_info.py +++ b/plugins/modules/iam_user_info.py @@ -207,7 +207,7 @@ def get_detailed_user_info(self, user): user["groups"] = self.cdpy.iam.list_groups_for_user(user["userId"]) user["roles"] = self.cdpy.iam.list_user_assigned_roles(user["userId"]) user["resource_roles"] = self.cdpy.iam.list_user_assigned_resource_roles( - user["userId"] + user["userId"], ) return user diff --git a/plugins/modules/ml.py b/plugins/modules/ml.py index 22c6a35..b087135 100644 --- a/plugins/modules/ml.py +++ b/plugins/modules/ml.py @@ -627,16 +627,16 @@ def process(self): ): self.module.log( "ML Workspace already performing Delete operation: %s" - % self.target["instanceStatus"] + % self.target["instanceStatus"], ) else: self.module.warn( "ML Workspace not in valid state to perform Delete operation: %s" - % self.target["instanceStatus"] + % self.target["instanceStatus"], ) if self.wait: self.module.warn( - "Waiting for ML Workspace to reach Active state before performing Delete operation" + "Waiting for ML Workspace to reach Active state before performing Delete operation", ) self._wait_ready_state() self._delete_workspace() @@ -649,13 +649,13 @@ def process(self): # Check the existing configuration self.module.warn( "ML Workspace already present and configuration validation and reconciliation is not supported;" - + "to change a ML Workspace, explicitly destroy and recreate the Workspace" + + "to change a ML Workspace, explicitly destroy and recreate the Workspace", ) if self.wait: self.workspace = self._wait_ready_state() else: self.module.fail_json( - msg="State %s is not valid for this module" % self.state + msg="State %s is not valid for this module" % self.state, ) # Else if the Workspace does not exist @@ -663,7 +663,7 @@ def process(self): if self.state == "absent": self.module.log( "ML Workspace %s already absent in Environment %s" - % (self.name, self.env) + % (self.name, self.env), ) # Create the Workspace elif self.state == "present": @@ -695,7 +695,7 @@ def process(self): self.workspace = self._wait_ready_state() else: self.module.fail_json( - msg="State %s is not valid for this module" % self.state + msg="State %s is not valid for this module" % self.state, ) def _delete_workspace(self): @@ -747,7 +747,9 @@ def main(): argument_spec=CdpModule.argument_spec( # TODO - Handle CRN as separate parameter with tests name=dict( - required=True, type="str", aliases=["workspace", "crn", "workspace_crn"] + required=True, + type="str", + aliases=["workspace", "crn", "workspace_crn"], ), environment=dict(required=False, type="str", aliases=["env"]), tls=dict(required=False, type="bool", default=True, aliases=["enable_tls"]), @@ -764,7 +766,10 @@ def main(): aliases=["enable_governance"], ), metrics=dict( - required=False, type="bool", default=False, aliases=["enable_metrics"] + required=False, + type="bool", + default=False, + aliases=["enable_metrics"], ), database=dict( required=False, @@ -795,14 +800,18 @@ def main(): type="dict", options=dict( enabled=dict( - required=False, type="bool", default=True + required=False, + type="bool", + default=True, ), maxInstances=dict(required=True, type="int"), minInstances=dict(required=True, type="int"), ), ), ingressRules=dict( - required=False, type="list", elements="str" + required=False, + type="list", + elements="str", ), instanceCount=dict(required=False, type="int", default=0), instanceTier=dict(required=False, type="str"), @@ -825,8 +834,10 @@ def main(): type="dict", options=dict( subnets=dict( - required=False, type="list", elements="str" - ) + required=False, + type="list", + elements="str", + ), ), ), ), @@ -854,10 +865,16 @@ def main(): aliases=["enable_private_cluster"], ), force=dict( - required=False, type="bool", default=False, aliases=["force_delete"] + required=False, + type="bool", + default=False, + aliases=["force_delete"], ), storage=dict( - required=False, type="bool", default=True, aliases=["remove_storage"] + required=False, + type="bool", + default=True, + aliases=["remove_storage"], ), state=dict( required=False, @@ -867,10 +884,16 @@ def main(): ), wait=dict(required=False, type="bool", default=True), delay=dict( - required=False, type="int", aliases=["polling_delay"], default=15 + required=False, + type="int", + aliases=["polling_delay"], + default=15, ), timeout=dict( - required=False, type="int", aliases=["polling_timeout"], default=3600 + required=False, + type="int", + aliases=["polling_timeout"], + default=3600, ), ), supports_check_mode=True, diff --git a/plugins/modules/ml_info.py b/plugins/modules/ml_info.py index e5937de..aed89f7 100644 --- a/plugins/modules/ml_info.py +++ b/plugins/modules/ml_info.py @@ -294,7 +294,9 @@ def process(self): self.name and self.env ) or self.crn: # Note that both None and '' will trigger this workspace_single = self.cdpy.ml.describe_workspace( - name=self.name, env=self.env, crn=self.crn + name=self.name, + env=self.env, + crn=self.crn, ) if workspace_single is not None: self.workspaces.append(workspace_single) diff --git a/plugins/modules/ml_workspace_access.py b/plugins/modules/ml_workspace_access.py index 31baa4d..f10c6c5 100644 --- a/plugins/modules/ml_workspace_access.py +++ b/plugins/modules/ml_workspace_access.py @@ -132,34 +132,42 @@ def process(self): if not self.module.check_mode: self.changed = True self.cdpy.ml.revoke_workspace_access( - name=self.name, env=self.env, identifier=self.user + name=self.name, + env=self.env, + identifier=self.user, ) # Reinstate to get the kubeconfig else: self.module.warn( "Refreshing access for user %s in ML Workspace, %s" - % (self.user, self.name) + % (self.user, self.name), ) if not self.module.check_mode: self.changed = True self.cdpy.ml.revoke_workspace_access( - name=self.name, env=self.env, identifier=self.user + name=self.name, + env=self.env, + identifier=self.user, ) self.access = self.cdpy.ml.grant_workspace_access( - name=self.name, env=self.env, identifier=self.user + name=self.name, + env=self.env, + identifier=self.user, ) # Else the access does not exist else: if self.state == "absent": self.module.log( - "User %s absent in ML Workspace %s" % (self.user, self.name) + "User %s absent in ML Workspace %s" % (self.user, self.name), ) # Grant else: if not self.module.check_mode: self.changed = True self.access = self.cdpy.ml.grant_workspace_access( - name=self.name, env=self.env, identifier=self.user + name=self.name, + env=self.env, + identifier=self.user, ) diff --git a/plugins/modules/opdb.py b/plugins/modules/opdb.py index a267645..f4c29f7 100644 --- a/plugins/modules/opdb.py +++ b/plugins/modules/opdb.py @@ -197,15 +197,16 @@ def process(self): if self.target["status"] not in self.cdpy.sdk.REMOVABLE_STATES: self.module.warn( "OpDB Database not in valid state for Drop operation: %s" - % self.target["status"] + % self.target["status"], ) else: drop_status = self.cdpy.opdb.drop_database( - name=self.name, env=self.env + name=self.name, + env=self.env, + ) + self.target["status"] = ( + drop_status # Drop command only returns status, not full object ) - self.target[ - "status" - ] = drop_status # Drop command only returns status, not full object if self.wait: self.cdpy.sdk.wait_for_state( describe_func=self.cdpy.opdb.describe_database, @@ -220,7 +221,7 @@ def process(self): elif self.state == "present": # Being Config check self.module.warn( - "OpDB Database already present and config validation is not implemented" + "OpDB Database already present and config validation is not implemented", ) if self.wait: self.target = self.cdpy.sdk.wait_for_state( @@ -234,7 +235,7 @@ def process(self): # End Config check else: self.module.fail_json( - msg="State %s is not valid for this module" % self.state + msg="State %s is not valid for this module" % self.state, ) # End handling Database exists else: @@ -242,7 +243,7 @@ def process(self): if self.state == "absent": self.module.warn( "OpDB Database %s already absent in Environment %s" - % (self.name, self.env) + % (self.name, self.env), ) elif self.state == "present": if self.module.check_mode: @@ -250,7 +251,8 @@ def process(self): else: # Being handle Database Creation create_status = self.cdpy.opdb.create_database( - name=self.name, env=self.env + name=self.name, + env=self.env, ) if self.wait: self.target = self.cdpy.sdk.wait_for_state( @@ -265,7 +267,7 @@ def process(self): self.databases.append(create_status) else: self.module.fail_json( - msg="State %s is not valid for this module" % self.state + msg="State %s is not valid for this module" % self.state, ) @@ -282,10 +284,16 @@ def main(): ), wait=dict(required=False, type="bool", default=True), delay=dict( - required=False, type="int", aliases=["polling_delay"], default=15 + required=False, + type="int", + aliases=["polling_delay"], + default=15, ), timeout=dict( - required=False, type="int", aliases=["polling_timeout"], default=3600 + required=False, + type="int", + aliases=["polling_timeout"], + default=3600, ), ), supports_check_mode=True, diff --git a/plugins/modules/opdb_info.py b/plugins/modules/opdb_info.py index cc13f33..11a18b4 100644 --- a/plugins/modules/opdb_info.py +++ b/plugins/modules/opdb_info.py @@ -148,7 +148,8 @@ def __init__(self, module): def process(self): if self.name and self.env: # Note that both None and '' will trigger this database_single = self.cdpy.opdb.describe_database( - name=self.name, env=self.env + name=self.name, + env=self.env, ) if database_single is not None: self.databases.append(database_single) diff --git a/plugins/modules/recipe.py b/plugins/modules/recipe.py index 6c21d74..da9bd35 100644 --- a/plugins/modules/recipe.py +++ b/plugins/modules/recipe.py @@ -192,7 +192,7 @@ def process(self): svc="datahub", func="create_recipe", ret_field="recipe", - **payload + **payload, ) else: self.recipe = existing @@ -203,7 +203,7 @@ def process(self): if tmp != payload and not self.module.check_mode: self.changed = True self.module.warn( - "Existing recipe is different from input. Recreating recipe." + "Existing recipe is different from input. Recreating recipe.", ) self.cdpy.sdk.call( svc="datahub", @@ -214,7 +214,7 @@ def process(self): svc="datahub", func="create_recipe", ret_field="recipe", - **payload + **payload, ) else: self.recipe = existing @@ -232,7 +232,9 @@ def main(): module = AnsibleModule( argument_spec=CdpModule.argument_spec( state=dict( - required=False, choices=["present", "absent"], default="present" + required=False, + choices=["present", "absent"], + default="present", ), name=dict(required=True, aliases=["recipe", "recipe_name"]), description=dict(required=False, aliases=["desc"]), diff --git a/plugins/modules/recipe_info.py b/plugins/modules/recipe_info.py index 39c7f33..013dbc9 100644 --- a/plugins/modules/recipe_info.py +++ b/plugins/modules/recipe_info.py @@ -134,7 +134,9 @@ def __init__(self, module): @CdpModule._Decorators.process_debug def process(self): self.all_recipes = self.cdpy.sdk.call( - svc="datahub", func="list_recipes", ret_field="recipes" + svc="datahub", + func="list_recipes", + ret_field="recipes", ) if self.name: @@ -163,13 +165,15 @@ def process(self): def _describe_recipe(self, recipe): full = self.cdpy.datahub.describe_cluster_template(recipe["crn"]) full = self.cdpy.sdk.call( - svc="datahub", func="describe_recipe", recipeName=recipe["crn"] + svc="datahub", + func="describe_recipe", + recipeName=recipe["crn"], ) if full is not None: return full else: self.module.fail_json( - msg="Failed to retrieve recipe content, '%s'" % recipe["recipeName"] + msg="Failed to retrieve recipe content, '%s'" % recipe["recipeName"], ) diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index 21637bc..f077085 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -27,5 +27,5 @@ def skip_python(): if sys.version_info < (3, 6): pytest.skip( "Skipping on Python %s. cloudera.cloud supports Python 3.6 and higher." - % sys.version + % sys.version, ) diff --git a/tests/unit/plugins/modules/environment/test_env_i.py b/tests/unit/plugins/modules/environment/env_i_test.py similarity index 100% rename from tests/unit/plugins/modules/environment/test_env_i.py rename to tests/unit/plugins/modules/environment/env_i_test.py diff --git a/tests/unit/plugins/modules/environment/test_env.py b/tests/unit/plugins/modules/environment/env_test.py similarity index 95% rename from tests/unit/plugins/modules/environment/test_env.py rename to tests/unit/plugins/modules/environment/env_test.py index 9611a56..1949f39 100644 --- a/tests/unit/plugins/modules/environment/test_env.py +++ b/tests/unit/plugins/modules/environment/env_test.py @@ -48,7 +48,7 @@ def test_freeipa_specified(self): "log_identity": "fake_log_identity", "wait": False, "freeipa": {"instanceCountByGroup": 3}, - } + }, ) expected = dict( @@ -74,7 +74,7 @@ def test_freeipa_specified(self): with patch("cdpy.cdpy.CdpyEnvironments") as mocked_cdp: mocked_cdp.return_value.describe_environment.return_value = None mocked_cdp.return_value.create_aws_environment.return_value = { - "name": "Successful test" + "name": "Successful test", } with pytest.raises(AnsibleExitJson) as e: @@ -83,10 +83,10 @@ def test_freeipa_specified(self): print("Returned: ", str(e.value)) mocked_cdp.return_value.describe_environment.assert_called_once_with( - "unit-test" + "unit-test", ) mocked_cdp.return_value.create_aws_environment.assert_called_once_with( - **expected + **expected, ) def test_freeipa_default(self): @@ -104,7 +104,7 @@ def test_freeipa_default(self): "log_location": "fake_log_location", "log_identity": "fake_log_identity", "wait": False, - } + }, ) expected = dict( @@ -130,7 +130,7 @@ def test_freeipa_default(self): with patch("cdpy.cdpy.CdpyEnvironments") as mocked_cdp: mocked_cdp.return_value.describe_environment.return_value = None mocked_cdp.return_value.create_aws_environment.return_value = { - "name": "Successful test" + "name": "Successful test", } with pytest.raises(AnsibleExitJson) as e: @@ -139,10 +139,10 @@ def test_freeipa_default(self): print("Returned: ", str(e.value)) mocked_cdp.return_value.describe_environment.assert_called_once_with( - "unit-test" + "unit-test", ) mocked_cdp.return_value.create_aws_environment.assert_called_once_with( - **expected + **expected, ) diff --git a/tests/unit/plugins/modules/iam_role_info/test_iam_role_info.py b/tests/unit/plugins/modules/iam_role_info/iam_role_info_test.py similarity index 98% rename from tests/unit/plugins/modules/iam_role_info/test_iam_role_info.py rename to tests/unit/plugins/modules/iam_role_info/iam_role_info_test.py index 4fb9e90..189aaff 100644 --- a/tests/unit/plugins/modules/iam_role_info/test_iam_role_info.py +++ b/tests/unit/plugins/modules/iam_role_info/iam_role_info_test.py @@ -39,8 +39,8 @@ def test_get_multiple_role_details(): "name": [ "crn:iam:us-west-1:role:ClassicClustersCreator", "crn:iam:us-west-1:role:EnvironmentCreator", - ] - } + ], + }, ) with pytest.raises(AnsibleExitJson) as e: diff --git a/tests/unit/plugins/modules/iam_user_info/test_iam_user_info.py b/tests/unit/plugins/modules/iam_user_info/iam_user_info_test.py similarity index 100% rename from tests/unit/plugins/modules/iam_user_info/test_iam_user_info.py rename to tests/unit/plugins/modules/iam_user_info/iam_user_info_test.py diff --git a/tests/unit/plugins/modules/utils.py b/tests/unit/plugins/modules/utils.py index d737263..c0aab71 100644 --- a/tests/unit/plugins/modules/utils.py +++ b/tests/unit/plugins/modules/utils.py @@ -53,7 +53,9 @@ def fail_json(*args, **kwargs): class ModuleTestCase(unittest.TestCase): def setUp(self): self.mock_module = patch.multiple( - basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json + basic.AnsibleModule, + exit_json=exit_json, + fail_json=fail_json, ) self.mock_module.start() self.mock_sleep = patch("time.sleep") From 8e81bd3bc9e070cf7de934b7527997d590455c54 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Tue, 24 Jun 2025 16:58:12 -0400 Subject: [PATCH 10/17] Remove lint environment and move linting to default environment Signed-off-by: Webster Mudge --- .gitignore | 3 +++ pyproject.toml | 10 ++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 54ad921..f54f191 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,9 @@ # Keep the Galaxy builds !cloudera-cloud-*.tar.gz +# Ignore the ansible-lint builds +.ansible + # Ignore the test output tests/output diff --git a/pyproject.toml b/pyproject.toml index a0b8665..ce17ff3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,17 +33,11 @@ dependencies = [ "tox-ansible", "ansible-core<2.17", # For RHEL 8 support "cdpy @ git+https://github.com/cloudera-labs/cdpy@main#egg=cdpy", -] - -[tool.hatch.envs.lint] -python = "3.12" -detached = true -extra-dependencies = [ "ansible-lint", ] -[tool.hatch.envs.lint.scripts] -run = "pre-commit run -a" +[tool.hatch.envs.default.scripts] +lint = "pre-commit run -a" [tool.hatch.envs.docs] python = "3.12" From 21c627836412ab4cca231cdb33cf132c55b7b095 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Tue, 24 Jun 2025 17:18:41 -0400 Subject: [PATCH 11/17] Allow missing AWS credentials for pre-commit check Signed-off-by: Webster Mudge --- .pre-commit-config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1ae38ba..48884ab 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,6 +29,8 @@ repos: - id: check-symlinks - id: debug-statements - id: detect-aws-credentials + args: + - --allow-missing-credentials - id: detect-private-key - id: forbid-submodules # - id: name-tests-test From 1fce170e3a998852dd1f33940d536d940adb4ad0 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Fri, 27 Jun 2025 12:17:37 -0400 Subject: [PATCH 12/17] Fix empty extra-docs.yml Signed-off-by: Webster Mudge --- docs/docsite/extra-docs.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/docsite/extra-docs.yml b/docs/docsite/extra-docs.yml index 2b69dbe..a7eefc0 100644 --- a/docs/docsite/extra-docs.yml +++ b/docs/docsite/extra-docs.yml @@ -1,6 +1,4 @@ ---- - -# Copyright 2023 Cloudera, Inc. All Rights Reserved. +# Copyright 2025 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -24,3 +22,7 @@ # - title: Usage and Configuration # toctree: # - usage + +--- + +sections: [] From 7123133f4fad38c4358ef05c9455c323ea2f4ddf Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Fri, 27 Jun 2025 12:18:23 -0400 Subject: [PATCH 13/17] Fix documentation field for enumerated choices Signed-off-by: Webster Mudge --- plugins/modules/datalake.py | 2 +- plugins/modules/env.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/modules/datalake.py b/plugins/modules/datalake.py index 3bcbcd3..57a6602 100644 --- a/plugins/modules/datalake.py +++ b/plugins/modules/datalake.py @@ -178,7 +178,7 @@ - Specify if an upgrade of Datalake should be attempted type: str required: False - choice: + choices: - prepare - os - full diff --git a/plugins/modules/env.py b/plugins/modules/env.py index 9209b56..382d733 100644 --- a/plugins/modules/env.py +++ b/plugins/modules/env.py @@ -223,7 +223,7 @@ - Specify if an upgrade of FreeIPA should be attempted type: str required: False - choice: + choices: - minor - major proxy: From da72af6a3e5f31ce1001e854cab954c76e479b12 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Fri, 27 Jun 2025 12:18:47 -0400 Subject: [PATCH 14/17] Update pre-commit hook labels Signed-off-by: Webster Mudge --- .pre-commit-config.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 48884ab..a8c32c3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,13 +38,16 @@ repos: rev: v3.2.0 hooks: - id: add-trailing-comma + name: ensure trailing commas args: - --py36-plus - repo: https://github.com/psf/black rev: 25.1.0 hooks: - id: black + name: lint python - repo: https://github.com/ansible/ansible-lint rev: v25.6.1 hooks: - id: ansible-lint + name: lint ansible From a8df84dfd42b8cc6637509bb75ad3f7bc195f821 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Fri, 27 Jun 2025 12:19:18 -0400 Subject: [PATCH 15/17] Add Ansible documentation linting to default lint script Signed-off-by: Webster Mudge --- pyproject.toml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ce17ff3..4b8dabf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,10 +34,14 @@ dependencies = [ "ansible-core<2.17", # For RHEL 8 support "cdpy @ git+https://github.com/cloudera-labs/cdpy@main#egg=cdpy", "ansible-lint", + "antsibull-docs @ git+https://github.com/cloudera-labs/antsibull-docs@cldr-docsite#egg=antsibull-docs", ] [tool.hatch.envs.default.scripts] -lint = "pre-commit run -a" +lint = [ + "pre-commit run -a", + "antsibull-docs lint-collection-docs --plugin-docs --validate-collection-refs=all --skip-rstcheck ." +] [tool.hatch.envs.docs] python = "3.12" @@ -48,12 +52,10 @@ extra-dependencies = [ "ansible-pygments", "sphinx", "sphinx-ansible-theme >= 0.9.0", - "antsibull-docs @ git+https://github.com/cloudera-labs/antsibull-docs@cldr-docsite#egg=antsibull-docs", "antsichaut", ] [tool.hatch.envs.docs.scripts] -lint = "antsibull-docs lint-collection-docs --plugin-docs --validate-collection-refs=all --skip-rstcheck ." build = "docsbuild/build.sh" changelog = [ # Read the version in galaxy.yml via hatch itself (normalizes release candidates, etc.) From c0f78fff84d0cf968aa275f856f0950f2405039e Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Fri, 27 Jun 2025 12:44:09 -0400 Subject: [PATCH 16/17] Update README instructions for running Hatch commands Signed-off-by: Webster Mudge --- README.md | 58 +++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 2979ae7..50625c8 100644 --- a/README.md +++ b/README.md @@ -118,38 +118,66 @@ For example, here we use the > [!IMPORTANT] > The CDP modules expect standard CDP authentication configurations, e.g. `CDP_PROFILE`, as described by the *Configuring* section of [CDP CLI/SDK](https://github.com/cloudera/cdpcli#configuring). -## Building the Collection +## Building and Developing the Collection -To create a local collection tarball, run: +To develop the collection -- additions, updates, bugfixes, etc. -- or to build resources from the collections -- API documentation, etc. -- you must first install [Hatch](https://hatch.pypa.io/latest/) according to your specific development environment. ```bash -ansible-galaxy collection build +# As a Python application +pip install hatch + +# With Brew (OSX) +brew install hatch + +# On Fedora +sudo dnf install hatch ``` -## Building the API Documentation +### Developing Collection Resources -To create a local copy of the API documentation, first make sure the collection is in your `ANSIBLE_COLLECTIONS_PATHS`. Then run the following: +To set up a development environment, you can first use the following to install the Python dependencies: ```bash -# change into the /docsbuild directory -cd docsbuild +hatch shell +``` + +This will create a `hatch`-managed virtual environment. (You can also associate this Python environment with your IDE, like VSCode!) + +> [!TIP] +> You also need to ensure the collection's project directory is in your `ANSIBLE_COLLECTIONS_PATH` variable. + +While you develop and work on collection resources, you can easily execute checks and linters with the following command: + +```bash +hatch run lint +``` -# install the build requirements (antsibull-docs); you may want to set up a -# dedicated virtual environment -pip install ansible-core https://github.com/cloudera-labs/antsibull-docs/archive/cldr-docsite.tar.gz +This script will run a number of `pre-commit` hooks, including `ansible-lint`, as well as lint any API documentation, guides, and other resources. -# Install the collection's build dependencies -pip install -r requirements.txt +If you wish to contribute your changes, please check out the instructions in the [CONTRIBUTING](./CONTRIBUTING.md) guide. -# Then run the build script -./build.sh +### Building the API Documentation + +To create a local copy of the API documentation, first make sure the project, i.e. the collection, is in your `ANSIBLE_COLLECTIONS_PATH`. Then run the following: + +```bash +hatch run docs:build ``` Your local documentation will be found at `docsbuild/build/html`. + +### Building the Collection Bundle + +To create a local collection tarball, run: + +```bash +ansible-galaxy collection build +``` + ## License and Copyright -Copyright 2023, Cloudera, Inc. +Copyright 2025, Cloudera, Inc. ``` Licensed under the Apache License, Version 2.0 (the "License"); From 099f42e593d3bf52f9e469b0140bd3015921c15f Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Fri, 27 Jun 2025 14:07:16 -0400 Subject: [PATCH 17/17] Update Hatch default and docs environment dependencies Signed-off-by: Webster Mudge --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4b8dabf..67acd37 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,7 @@ dependencies = [ "ansible-core<2.17", # For RHEL 8 support "cdpy @ git+https://github.com/cloudera-labs/cdpy@main#egg=cdpy", "ansible-lint", - "antsibull-docs @ git+https://github.com/cloudera-labs/antsibull-docs@cldr-docsite#egg=antsibull-docs", + "antsibull-docs >= 2.0.0, < 3.0.0", ] [tool.hatch.envs.default.scripts] @@ -49,6 +49,7 @@ detached = true extra-dependencies = [ "ansible-core<2.17", # For RHEL 8 support # "antsibull-docs >= 2.0.0, < 3.0.0", + "antsibull-docs @ git+https://github.com/cloudera-labs/antsibull-docs@cldr-docsite#egg=antsibull-docs", "ansible-pygments", "sphinx", "sphinx-ansible-theme >= 0.9.0",