initial import
This commit is contained in:
commit
ae3778c57c
19
.gitignore
vendored
Normal file
19
.gitignore
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
*.pyc
|
||||
__pycache__
|
||||
.tox
|
||||
build_artifact
|
||||
ansible_collections
|
||||
galaxy.yml
|
||||
FILES.json
|
||||
MANIFEST.json
|
||||
importer_result.json
|
||||
**.swp
|
||||
|
||||
*.tar.gz
|
||||
doc/build
|
||||
tmp
|
||||
|
||||
#idea
|
||||
.idea/**
|
||||
*/.idea/**
|
||||
|
8
bindep.txt
Normal file
8
bindep.txt
Normal file
@ -0,0 +1,8 @@
|
||||
# This is a cross-platform list tracking distribution packages needed by tests;
|
||||
# see https://docs.openstack.org/infra/bindep/ for additional information.
|
||||
|
||||
gcc-c++ [doc test platform:rpm]
|
||||
libyaml-devel [test platform:rpm]
|
||||
libyaml-dev [test platform:dpkg]
|
||||
python3-devel [test platform:rpm]
|
||||
python3 [test platform:rpm]
|
32
galaxy.yml
Normal file
32
galaxy.yml
Normal file
@ -0,0 +1,32 @@
|
||||
---
|
||||
namespace: opentelekomcloud
|
||||
name: backend
|
||||
version: 0.1.0
|
||||
readme: README.rst
|
||||
authors:
|
||||
- Artem Goncharov (@gtema)
|
||||
|
||||
description: Roles and modules for managing Open Telekom Cloud Backend
|
||||
license:
|
||||
- GPL-2.0-or-later
|
||||
tags:
|
||||
- opentelekomcloud
|
||||
dependencies: {}
|
||||
repository: https://gitea.eco.tsi-dev.otc-service.com/infra/ansible-collection-backend
|
||||
documentation: http://docs.otc-service.com
|
||||
homepage: https://open-telekom-cloud.com
|
||||
issues: https://gitea.eco.tsi-dev.otc-service.com/infra/ansible-collection-backend/issues
|
||||
build_ignore:
|
||||
- '*.tar.gz'
|
||||
- build_artifact/
|
||||
- ci/
|
||||
- galaxy.yml.in
|
||||
- setup.cfg
|
||||
- setup.py
|
||||
- tools
|
||||
- tox.ini
|
||||
- .gitignore
|
||||
- .gitreview
|
||||
- .zuul.yaml
|
||||
- .pytest_cache
|
||||
- importer_result.json
|
106
plugins/doc_fragments/otc.py
Normal file
106
plugins/doc_fragments/otc.py
Normal file
File diff suppressed because it is too large
Load Diff
206
plugins/module_utils/otc.py
Normal file
206
plugins/module_utils/otc.py
Normal file
File diff suppressed because it is too large
Load Diff
345
plugins/modules/service_catalog.py
Normal file
345
plugins/modules/service_catalog.py
Normal file
File diff suppressed because it is too large
Load Diff
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
otcextensions
|
2
runtime.yml
Normal file
2
runtime.yml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
{}
|
32
setup.cfg
Normal file
32
setup.cfg
Normal file
@ -0,0 +1,32 @@
|
||||
[metadata]
|
||||
name = ansible-collection-backend
|
||||
summary = Ansible collections for managing OTC Backend
|
||||
description-file =
|
||||
README.md
|
||||
|
||||
author = opentelekomcloud
|
||||
home-page = https://open.telekom.cloud
|
||||
classifier =
|
||||
License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
||||
Development Status :: 5 - Production/Stable
|
||||
Intended Audience :: Developers
|
||||
Intended Audience :: System Administrators
|
||||
Intended Audience :: Information Technology
|
||||
Topic :: System :: Systems Administration
|
||||
Topic :: Utilities
|
||||
|
||||
[global]
|
||||
setup-hooks =
|
||||
pbr.hooks.setup_hook
|
||||
|
||||
[files]
|
||||
data_files =
|
||||
share/ansible/collections/ansible_collections/opentelekomcloud/backend/ = README.md
|
||||
share/ansible/collections/ansible_collections/opentelekomcloud/backend/plugins = plugins/*
|
||||
|
||||
[wheel]
|
||||
universal = 1
|
||||
|
||||
[pbr]
|
||||
skip_authors = True
|
||||
skip_changelog = True
|
17
setup.py
Normal file
17
setup.py
Normal file
@ -0,0 +1,17 @@
|
||||
# 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.
|
||||
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['pbr'],
|
||||
pbr=True)
|
10
test-requirements.txt
Normal file
10
test-requirements.txt
Normal file
@ -0,0 +1,10 @@
|
||||
ansible-core
|
||||
ansible-lint==5.4.0
|
||||
pycodestyle==2.6.0
|
||||
flake8==3.8.4
|
||||
pylint
|
||||
voluptuous
|
||||
yamllint
|
||||
rstcheck
|
||||
ruamel.yaml
|
||||
requests
|
1
tests/integration/integration_config.yml
Normal file
1
tests/integration/integration_config.yml
Normal file
@ -0,0 +1 @@
|
||||
cloud: "otc"
|
2
tests/integration/requirements.txt
Normal file
2
tests/integration/requirements.txt
Normal file
@ -0,0 +1,2 @@
|
||||
otcextensions
|
||||
openstacksdk
|
19
tests/integration/targets/service_catalog/tasks/main.yaml
Normal file
19
tests/integration/targets/service_catalog/tasks/main.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
- ansible.builtin.set_fact:
|
||||
services:
|
||||
compute:
|
||||
name: "nova"
|
||||
environments:
|
||||
production:
|
||||
endpoints:
|
||||
eu-de:
|
||||
- url: "https://ecs.eu-de.otc.t-systems.com/v2.1/$(tenant_id)s"
|
||||
eu-nl:
|
||||
- url: "https://ecs.eu-nl.otc.t-systems.com/v2.1/$(tenant_id)s"
|
||||
|
||||
- name: Check run
|
||||
opentelekomcloud.backend.service_catalog:
|
||||
cloud: "{{ cloud }}"
|
||||
environment: "production"
|
||||
services: "{{ services }}"
|
||||
check_mode: true
|
93
tox.ini
Normal file
93
tox.ini
Normal file
@ -0,0 +1,93 @@
|
||||
[tox]
|
||||
minversion = 3.1
|
||||
envlist = pep8
|
||||
skipsdist = True
|
||||
ignore_basepython_conflict = True
|
||||
|
||||
[testenv]
|
||||
skip_install = True
|
||||
install_command = python -m pip install {opts} {packages}
|
||||
basepython = python3
|
||||
passenv =
|
||||
OS_*
|
||||
pip: PIP_INSTALL
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
LANG=en_US.UTF-8
|
||||
LANGUAGE=en_US:en
|
||||
LC_ALL=C
|
||||
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
||||
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
||||
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
||||
pip: PIP_INSTALL={env:PIP_INSTALL:true}
|
||||
deps =
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
pip: {toxinidir}
|
||||
|
||||
commands = stestr run {posargs}
|
||||
stestr slowest
|
||||
|
||||
[testenv:pep8]
|
||||
commands =
|
||||
flake8
|
||||
|
||||
[testenv:build]
|
||||
deps =
|
||||
pbr
|
||||
ruamel.yaml
|
||||
ansible-base
|
||||
|
||||
commands =
|
||||
ansible --version
|
||||
ansible-galaxy collection build --force {toxinidir} --output-path {toxinidir}/build_artifact
|
||||
|
||||
[testenv:linters]
|
||||
passenv = *
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
commands =
|
||||
ansible-lint -vvv
|
||||
|
||||
[testenv:linters-2.9]
|
||||
passenv = {[testenv:linters]passenv}
|
||||
commands = {[testenv:linters]commands}
|
||||
deps =
|
||||
-r{toxinidir}/test-requirements-2.9.txt
|
||||
|
||||
[testenv:venv]
|
||||
deps =
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands = {posargs}
|
||||
|
||||
[flake8]
|
||||
# W503 Is supposed to be off by default but in the latest pycodestyle isn't.
|
||||
# Also, both openstacksdk and Donald Knuth disagree with the rule. Line
|
||||
# breaks should occur before the binary operator for readability.
|
||||
# H4 are rules for docstrings. Maybe we should clean them?
|
||||
# E501,E402,H301 are ignored so we can import the existing
|
||||
# modules unchanged and then clean them in subsequent patches.
|
||||
ignore = W503,H4,E501,E402,H301
|
||||
show-source = True
|
||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,ansible_collections
|
||||
|
||||
[testenv:ansible]
|
||||
# Need to pass some env vars for the Ansible playbooks
|
||||
passenv = HOME USER ANSIBLE_*
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
commands =
|
||||
/bin/bash {toxinidir}/ci/run-ansible-tests-collection.sh -e {envdir} {posargs}
|
||||
|
||||
# PIP job runs with Ansible-2.9
|
||||
[testenv:ansible-pip]
|
||||
deps =
|
||||
-r{toxinidir}/test-requirements-2.9.txt
|
||||
{toxinidir}
|
||||
passenv = {[testenv:ansible]passenv}
|
||||
commands = {[testenv:ansible]commands}
|
||||
|
||||
[testenv:ansible-2.9]
|
||||
deps =
|
||||
-r{toxinidir}/test-requirements-2.9.txt
|
||||
passenv = {[testenv:ansible]passenv}
|
||||
commands = {[testenv:ansible]commands}
|
63
zuul.yaml
Normal file
63
zuul.yaml
Normal file
@ -0,0 +1,63 @@
|
||||
# yamllint disable
|
||||
---
|
||||
- job:
|
||||
name: gitcontrol-test-integration
|
||||
parent: ansible-collection-test-integration
|
||||
description: |
|
||||
Execute ansible-test integration for the collection
|
||||
vars:
|
||||
ansible_test_test_command: "integration"
|
||||
ansible_test_no_temp_unicode: true
|
||||
files:
|
||||
plugins/module_utils/git.py
|
||||
plugins/module_utils/github.py
|
||||
plugins/modules/github
|
||||
pre-run: tests/playbooks/pre.yaml
|
||||
secrets:
|
||||
- secret: gitcontrol-secret
|
||||
name: gitcontrol
|
||||
|
||||
- secret:
|
||||
name: gitcontrol-secret
|
||||
data:
|
||||
token: !encrypted/pkcs1-oaep
|
||||
- QduY2mJaxznljZMLGoGE/LcHwb0Fk4QRcqX8DY+a8i320Rl0GdRE9yfFwkxfdFQ245UXT
|
||||
ZgcnHsuofTCbRQOWkt5eEN/+OqKqgvtDyP2QmOfOksbTUhnpWR1jV9/wDgqXIKTH7USgf
|
||||
EQbnaSBYCgUTIi2BZVhJBPEtb9AvO8h1NcrhCxR4R8Cw8PJ/bOzPAgfvZ/D9067S9smgz
|
||||
cKZyOuloBhwVRskdbj5tbvViya44cGDs13j6Dpvv1C2tgdVctM/6iHwvXyOL2PtTu5LCP
|
||||
3OVxgZCWx3XPzgfUl+QwL5KZSaDmsU6b7v5lr89HcTDrVmu02El6sEkMbUPQ/dDB6/7LK
|
||||
fzMxCXz17bSWehIt1ASC+e+1jkfZKXHC5ss/6ebzRESdEeYDMb/6ueq3FPNslRbKwoGTK
|
||||
54D8fSOIagjg+F+AYJjXaozslsj5S1Uv7HgGj6Ecgv75Hcx8/jJiUsqyHazx7EZ4CDBfG
|
||||
Lh28IR72f6JqALD01ontiYLWb7CdlxIa0zzNmmiA2oC/Zcvnef6hpSdvoFwmamY3HNUsM
|
||||
VsvUiEJiT0uRropSKEr4q3/uKbwsqqbQ8TkWj/CaKbZ+MeIR4N4WO54r81K8W7p/3W6pt
|
||||
qUFW1s/mMQWoYeQRh1gPHetpEgGfVP8d636Dk0hzK33vuvaJIfQdZxST7hkmuw=
|
||||
|
||||
- project:
|
||||
merge-mode: squash-merge
|
||||
vars:
|
||||
ansible_collection_namespace: "opentelekomcloud"
|
||||
ansible_collection_name: "gitcontrol"
|
||||
check:
|
||||
jobs:
|
||||
- otc-tox-pep8
|
||||
- otc-tox-linters
|
||||
- ansible-collection-test-sanity
|
||||
- ansible-collection-build
|
||||
- ansible-collection-docs
|
||||
check-post:
|
||||
jobs:
|
||||
- gitcontrol-test-integration
|
||||
gate:
|
||||
jobs:
|
||||
- otc-tox-pep8
|
||||
- otc-tox-linters
|
||||
- ansible-collection-test-sanity
|
||||
- ansible-collection-build
|
||||
- ansible-collection-docs
|
||||
- gitcontrol-test-integration
|
||||
release:
|
||||
jobs:
|
||||
- release-ansible-collection
|
||||
promote:
|
||||
jobs:
|
||||
- promote-ansible-collection-docs
|
Loading…
x
Reference in New Issue
Block a user