Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
171 changes: 164 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,164 @@
.idea
.vscode
test*
*.pyc
*.bak
.DS_Store
venv
# Copyright 2022 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.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Keep the Galaxy builds
!cloudera-cluster-*.tar.gz

# Ignore the test output
tests/output

# Remove any integration configuration
tests/integration/integration_config.yml

# Remove the Sphinx build directory
site/_build

### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

17 changes: 17 additions & 0 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---

# Copyright 2022 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.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

requires_ansible: ">=2.10"
30 changes: 30 additions & 0 deletions plugins/doc_fragments/cm_endpoint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright 2022 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.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

class ModuleDocFragment(object):
DOCUMENTATION = r'''
options:
url:
description:
- The CM API endpoint URL and should include scheme, host, port, and API root path.
- Mutually exclusive with I(host).
type: str
required: False
aliases:
- endpoint
- cm_endpoint_url
'''
85 changes: 85 additions & 0 deletions plugins/doc_fragments/cm_options.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright 2022 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.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

class ModuleDocFragment(object):
DOCUMENTATION = r'''
options:
host:
description:
- Hostname of the CM API endpoint.
- If set, the C(host) parameter will trigger CM API endpoint discovery, which will follow redirects.
- Mutually exclusive with I(url).
type: str
required: False
aliases:
- hostname
port:
description:
- Port of the CM API endpoint.
- If set, CM API endpoint discovery will connect to the designated port first and will follow redirects.
type: int
required: False
default: 7180
version:
description:
- API version of the CM API endpoint.
type: str
required: False
default: True
aliases:
- tls
force_tls:
description:
- Flag to force TLS during CM API endpoint discovery.
- If C(False), discovery will first try HTTP and follow any redirects.
type: bool
required: False
default: False
verify_tls:
description:
- Verify the TLS certificates for the CM API endpoint.
type: bool
required: False
default: True
aliases:
- tls
username:
description:
- Username for access to the CM API endpoint.
type: str
required: True
password:
description:
- Password for access to the CM API endpoint.
- This parameter is set to C(no_log).
type: str
required: True
debug:
description:
- Capture the HTTP interaction logs with the CM API endpoint.
type: bool
required: False
default: False
aliases:
- debug_endpoints
agent_header:
description:
- Set the HTTP user agent header when interacting with the CM API endpoint.
type: str
required: False
default: ClouderaFoundry
'''
41 changes: 41 additions & 0 deletions plugins/doc_fragments/cm_resource.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright 2022 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.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

class ModuleDocFragment(object):
DOCUMENTATION = r'''
options:
path:
description:
- Path of the CM API endpoint call.
type: str
required: True
query:
description:
- HTTP query parameters for the CM API endpoint call.
type: dict
aliases:
- query_parameters
- parameters
field:
description:
- Field within the response for result extraction.
- Use I(field) when the returned object has an enclosing field.
type: str
default: 'items'
aliases:
- return_field
'''
Loading