Merge pull request #7039 from ryanpetrello/more-downstream-fixes-to-merge

merge in a few downstream fixes

Reviewed-by: Chris Meyers
             https://github.com/chrismeyersfsu
This commit is contained in:
softwarefactory-project-zuul[bot] 2020-05-15 17:15:50 +00:00 committed by GitHub
commit 99701e4112
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 95 additions and 29 deletions

View File

@ -12,6 +12,7 @@ MANAGEMENT_COMMAND ?= awx-manage
IMAGE_REPOSITORY_AUTH ?=
IMAGE_REPOSITORY_BASE ?= https://gcr.io
VERSION := $(shell cat VERSION)
PYCURL_SSL_LIBRARY ?= openssl
# NOTE: This defaults the container image version to the branch that's active
COMPOSE_TAG ?= $(GIT_BRANCH)
@ -24,7 +25,7 @@ CELERY_SCHEDULE_FILE ?= /var/lib/awx/beat.db
DEV_DOCKER_TAG_BASE ?= gcr.io/ansible-tower-engineering
# Python packages to install only from source (not from binary wheels)
# Comma separated list
SRC_ONLY_PKGS ?= cffi,pycparser,psycopg2,twilio
SRC_ONLY_PKGS ?= cffi,pycparser,psycopg2,twilio,pycurl
# These should be upgraded in the AWX and Ansible venv before attempting
# to install the actual requirements
VENV_BOOTSTRAP ?= pip==19.3.1 setuptools==41.6.0
@ -173,9 +174,9 @@ virtualenv_awx:
# --ignore-install flag is not used because *.txt files should specify exact versions
requirements_ansible: virtualenv_ansible
if [[ "$(PIP_OPTIONS)" == *"--no-index"* ]]; then \
cat requirements/requirements_ansible.txt requirements/requirements_ansible_local.txt | $(VENV_BASE)/ansible/bin/pip install $(PIP_OPTIONS) -r /dev/stdin ; \
cat requirements/requirements_ansible.txt requirements/requirements_ansible_local.txt | PYCURL_SSL_LIBRARY=$(PYCURL_SSL_LIBRARY) $(VENV_BASE)/ansible/bin/pip install $(PIP_OPTIONS) -r /dev/stdin ; \
else \
cat requirements/requirements_ansible.txt requirements/requirements_ansible_git.txt | $(VENV_BASE)/ansible/bin/pip install $(PIP_OPTIONS) --no-binary $(SRC_ONLY_PKGS) -r /dev/stdin ; \
cat requirements/requirements_ansible.txt requirements/requirements_ansible_git.txt | PYCURL_SSL_LIBRARY=$(PYCURL_SSL_LIBRARY) $(VENV_BASE)/ansible/bin/pip install $(PIP_OPTIONS) --no-binary $(SRC_ONLY_PKGS) -r /dev/stdin ; \
fi
$(VENV_BASE)/ansible/bin/pip uninstall --yes -r requirements/requirements_ansible_uninstall.txt
# Same effect as using --system-site-packages flag on venv creation
@ -183,9 +184,9 @@ requirements_ansible: virtualenv_ansible
requirements_ansible_py3: virtualenv_ansible_py3
if [[ "$(PIP_OPTIONS)" == *"--no-index"* ]]; then \
cat requirements/requirements_ansible.txt requirements/requirements_ansible_local.txt | $(VENV_BASE)/ansible/bin/pip3 install $(PIP_OPTIONS) -r /dev/stdin ; \
cat requirements/requirements_ansible.txt requirements/requirements_ansible_local.txt | PYCURL_SSL_LIBRARY=$(PYCURL_SSL_LIBRARY) $(VENV_BASE)/ansible/bin/pip3 install $(PIP_OPTIONS) -r /dev/stdin ; \
else \
cat requirements/requirements_ansible.txt requirements/requirements_ansible_git.txt | $(VENV_BASE)/ansible/bin/pip3 install $(PIP_OPTIONS) --no-binary $(SRC_ONLY_PKGS) -r /dev/stdin ; \
cat requirements/requirements_ansible.txt requirements/requirements_ansible_git.txt | PYCURL_SSL_LIBRARY=$(PYCURL_SSL_LIBRARY) $(VENV_BASE)/ansible/bin/pip3 install $(PIP_OPTIONS) --no-binary $(SRC_ONLY_PKGS) -r /dev/stdin ; \
fi
$(VENV_BASE)/ansible/bin/pip3 uninstall --yes -r requirements/requirements_ansible_uninstall.txt
# Same effect as using --system-site-packages flag on venv creation
@ -639,7 +640,7 @@ docker-compose-runtest: awx/projects
cd tools && CURRENT_UID=$(shell id -u) TAG=$(COMPOSE_TAG) DEV_DOCKER_TAG_BASE=$(DEV_DOCKER_TAG_BASE) docker-compose run --rm --service-ports awx /start_tests.sh
docker-compose-build-swagger: awx/projects
cd tools && CURRENT_UID=$(shell id -u) TAG=$(COMPOSE_TAG) DEV_DOCKER_TAG_BASE=$(DEV_DOCKER_TAG_BASE) docker-compose run --rm --service-ports awx /start_tests.sh swagger
cd tools && CURRENT_UID=$(shell id -u) TAG=$(COMPOSE_TAG) DEV_DOCKER_TAG_BASE=$(DEV_DOCKER_TAG_BASE) docker-compose run --rm --service-ports --no-deps awx /start_tests.sh swagger
detect-schema-change: genschema
curl https://s3.amazonaws.com/awx-public-ci-files/schema.json -o reference-schema.json

View File

@ -777,13 +777,13 @@ msgstr "このグループ内でインスタンスをコンテナー化するか
#: awx/api/serializers.py:4683
msgid "Policy Instance Percentage"
msgstr "ポリシーインスタンスのパーセンテージ"
msgstr "ポリシーインスタンスの割合"
#: awx/api/serializers.py:4684
msgid ""
"Minimum percentage of all instances that will be automatically assigned to "
"this group when new instances come online."
msgstr "新規インスタンスがオンライン状態になるとこのグループに自動的に割り当てられるすべてのインスタンスの最小パーセンテージです。"
msgstr "新規インスタンスがオンラインになると、このグループに自動的に最小限割り当てられるインスタンスの割合を選択します。"
#: awx/api/serializers.py:4689
msgid "Policy Instance Minimum"
@ -793,7 +793,7 @@ msgstr "ポリシーインスタンスの最小値"
msgid ""
"Static minimum number of Instances that will be automatically assign to this "
"group when new instances come online."
msgstr "新規インスタンスがオンライン状態になるとこのグループに自動的に割り当てられるインスタンスの静的な最小数です。"
msgstr "新規インスタンスがオンラインになると、このグループに自動的に最小限割り当てられるインスタンス数を入力します。"
#: awx/api/serializers.py:4695
msgid "Policy Instance List"
@ -1886,7 +1886,7 @@ msgstr "組織管理者が、それぞれの組織に関連付けられていな
#: awx/main/conf.py:50
msgid "Organization Admins Can Manage Users and Teams"
msgstr "組織管理者はユーザーおよびチームを管理できます"
msgstr "組織管理者はユーザーおよびチームを管理でき"
#: awx/main/conf.py:51
msgid ""
@ -2243,7 +2243,7 @@ msgid ""
"downloaded from the primary if the specific role or collection is available "
"there. If the content is not avilable in the primary, or if this field is "
"left blank, it will default to galaxy.ansible.com."
msgstr "これにより、Galaxy サービスを実行する組織では、プライマリーの Galaxy Server としてホストを指定するオプションが追加されます。特定のロールやコレクションが利用できる場合には、このプライマリーのサーバーから要件がダウンロードされます。または、フィールドが空白の場合は、galaxy.ansible.com のデフォルト設定を使用します。"
msgstr "Galaxy サービスを実行する組織では、プライマリーの Galaxy Server としてホストを指定するオプションが追加されます。特定のロールやコレクションが利用できる場合には、このプライマリーのサーバーから要件がダウンロードされます。または、フィールドが空白の場合は、galaxy.ansible.com のデフォルト設定を使用します。"
#: awx/main/conf.py:459
msgid "Primary Galaxy Server Username"
@ -3448,7 +3448,7 @@ msgstr "認証する OpenShift または Kubernetes API エンドポイント。
#: awx/main/models/credential/__init__.py:1139
msgid "API authentication bearer token"
msgstr "API 認証ベアラートークン"
msgstr "API 認証ベアラートークン"
#: awx/main/models/credential/__init__.py:1149
msgid "Certificate Authority data"
@ -3605,7 +3605,7 @@ msgstr "このグループをリモートで制御するためのインスタン
#: awx/main/models/ha.py:200
msgid "Percentage of Instances to automatically assign to this group"
msgstr "このグループに自動的に割り当てるインスタンスのパーセンテージ"
msgstr "このグループに自動的に割り当てるインスタンスの割合"
#: awx/main/models/ha.py:204
msgid ""

View File

@ -2500,6 +2500,25 @@ class rhv(PluginFileInjector):
def script_name(self):
return 'ovirt4.py' # exception
def inventory_as_dict(self, inventory_update, private_data_dir):
ret = super(rhv, self).inventory_as_dict(inventory_update, private_data_dir)
ret['ovirt_insecure'] = False # Default changed from script
# TODO: process strict option upstream
ret['compose'] = {
'ansible_host': '(devices.values() | list)[0][0] if devices else None'
}
ret['keyed_groups'] = []
for key in ('cluster', 'status'):
ret['keyed_groups'].append({'prefix': key, 'separator': '_', 'key': key})
ret['keyed_groups'].append({'prefix': 'tag', 'separator': '_', 'key': 'tags'})
ret['ovirt_hostname_preference'] = ['name', 'fqdn']
source_vars = inventory_update.source_vars_dict
for key, value in source_vars.items():
if key == 'plugin':
continue
ret[key] = value
return ret
class satellite6(PluginFileInjector):
plugin_name = 'foreman'

View File

@ -1,14 +1,37 @@
import redis
import logging
from django.conf.urls import url
from django.conf import settings
from channels.auth import AuthMiddlewareStack
from channels.routing import ProtocolTypeRouter, URLRouter
from . import consumers
logger = logging.getLogger('awx.main.routing')
class AWXProtocolTypeRouter(ProtocolTypeRouter):
def __init__(self, *args, **kwargs):
try:
r = redis.Redis.from_url(settings.BROKER_URL)
for k in r.scan_iter('asgi:*', 500):
logger.debug(f"cleaning up Redis key {k}")
r.delete(k)
except redis.exceptions.RedisError as e:
logger.warn("encountered an error communicating with redis.")
raise e
super().__init__(*args, **kwargs)
websocket_urlpatterns = [
url(r'websocket/$', consumers.EventConsumer),
url(r'websocket/broadcast/$', consumers.BroadcastConsumer),
]
application = ProtocolTypeRouter({
application = AWXProtocolTypeRouter({
'websocket': AuthMiddlewareStack(
URLRouter(websocket_urlpatterns)
),

View File

@ -1 +1,20 @@
base_source_var: value_of_var
compose:
ansible_host: (devices.values() | list)[0][0] if devices else None
groups:
dev: '"dev" in tags'
keyed_groups:
- key: cluster
prefix: cluster
separator: _
- key: status
prefix: status
separator: _
- key: tags
prefix: tag
separator: _
ovirt_hostname_preference:
- name
- fqdn
ovirt_insecure: false
plugin: ovirt.ovirt.ovirt

View File

@ -50,7 +50,6 @@ INI_TEST_VARS = {
'expand_hostvars': True,
'fail_on_errors': True
},
'rhv': {}, # there are none
'tower': {}, # there are none
'vmware': {
'alias_pattern': "{{ config.foo }}",
@ -78,6 +77,12 @@ INI_TEST_VARS = {
'nest_tags': 'yes',
'suffix': '.ppt',
'prefer_ipv4': 'yes'
},
'rhv': { # options specific to the plugin
'ovirt_insecure': False,
'groups': {
'dev': '"dev" in tags'
}
}
}

View File

@ -957,6 +957,7 @@ CHANNEL_LAYERS = {
"CONFIG": {
"hosts": [BROKER_URL],
"capacity": 10000,
"group_expiry": 157784760, # 5 years
},
},
}

View File

@ -67,7 +67,7 @@ msgid ""
" </div>"
msgstr "<i class=\"LoginModal-alertIcon fa fa-exclamation-triangle\"></i>\n"
" <div class=\"LoginModal-alertText\" translate=\"\">\n"
" ログアウトしています。サインインしてください。\n"
" ログアウトされました。サインインしてください。\n"
" </div>"
#: client/lib/components/code-mirror/code-mirror.strings.js:19
@ -478,7 +478,7 @@ msgstr "すべてのジョブ"
#: client/src/projects/projects.form.js:208
#: client/src/projects/projects.form.js:211
msgid "Allow branch override"
msgstr "ブランチの上書き許可する"
msgstr "ブランチの上書き許可"
#: client/src/projects/projects.form.js:210
msgid "Allow changing the SCM branch or revision in a job template that uses this project."
@ -916,7 +916,7 @@ msgstr "キャッシュタイムアウト"
#: client/src/projects/projects.form.js:220
msgid "Cache Timeout%s (seconds)%s"
msgstr "キャッシュタイムアウト%s (seconds)%s"
msgstr "キャッシュタイムアウト%s ()%s"
#: client/src/users/list/users-list.controller.js:85
msgid "Call to %s failed. DELETE returned status:"
@ -1191,11 +1191,11 @@ msgstr "CloudForms URL"
#: client/features/output/output.strings.js:19
#: client/src/workflow-results/workflow-results.controller.js:201
msgid "Collapse Output"
msgstr "出力の縮小"
msgstr "出力の折りたたみ"
#: client/lib/components/components.strings.js:120
msgid "Compact"
msgstr "縮小"
msgstr "簡略表示"
#: client/src/inventories-hosts/hosts/host.form.js:125
#: client/src/inventories-hosts/inventories/related/hosts/related-host.form.js:135
@ -1307,8 +1307,7 @@ msgstr "{{resourceType}} のコピー"
msgid ""
"Copyright &copy; 2019 Red Hat, Inc. <br>\n"
" Visit <a href=\"http://www.ansible.com/\" target=\"_blank\">Ansible.com</a> for more information.<br>"
msgstr "Copyright &copy; 2019 Red Hat, Inc. <br>\n"
" 詳細は、 <a href=\"http://www.ansible.com/\" target=\"_blank\">Ansible.com</a> をご覧ください。<br>"
msgstr "Copyright &copy; 2019 Red Hat, Inc. <br> 詳細は、 <a href=\"http://www.ansible.com/\" target=\"_blank\">Ansible.com</a> をご覧ください。<br>"
#: client/lib/components/components.strings.js:90
msgid "Copyright © 2019 Red Hat, Inc."
@ -2128,7 +2127,7 @@ msgstr "このワークフローのジョブテンプレートの Webhook を有
#: client/src/templates/job_templates/job-template.form.js:335
msgid "Enables creation of a provisioning callback URL. Using the URL a host can contact {{BRAND_NAME}} and request a configuration update using this job template."
msgstr "プロビジョニングコールバック URL の作成を有効にします。この URL を使用してホストは {{BRAND_NAME}} に接続でき、このジョブテンプレートを使用して設定の更新を要求できます。"
msgstr "プロビジョニングコールバック URL の作成を有効にします。ホストは、この URL を使用して {{BRAND_NAME}} に接続でき、このジョブテンプレートを使用して設定の更新を要求できます。"
#: client/src/credentials/factories/credential-form-save.factory.js:73
msgid "Encrypted credentials are not supported."
@ -2368,7 +2367,7 @@ msgstr "出力の展開"
#: client/lib/components/components.strings.js:121
msgid "Expanded"
msgstr "展開"
msgstr "詳細表示"
#: client/src/license/license.partial.html:246
msgid "Expires"
@ -5372,7 +5371,7 @@ msgstr "Insights の更新"
#: client/src/configuration/settings.service.js:44
msgid "Refresh Token Expiration"
msgstr "トークンの有効期限を更新します。"
msgstr "トークンの有効期限を更新する"
#: client/src/activity-stream/streams.list.js:51
#: client/src/bread-crumb/bread-crumb.partial.html:6
@ -7281,7 +7280,7 @@ msgstr "TLS の使用"
#: client/src/notifications/notificationTemplates.form.js:586
msgid "Use custom messages to change the content of notifications sent when a job starts, succeeds, or fails. Use curly braces to access information about the job: <code ng-non-bindable>{{ job_friendly_name }}</code>, <code ng-non-bindable>{{ url }}</code>, or attributes of the job such as <code ng-non-bindable>{{ job.status }}</code>. You may apply a number of possible variables in the message. Refer to the <a href=\"https://docs.ansible.com/ansible-tower/latest/html/userguide/notifications.html#create-custom-notifications\" target=\"_blank\">Ansible Tower documentation</a> for more details."
msgstr "カスタムメッセージを使用して、ジョブの開始時、成功時、または湿板時に送信する通知内容を変更します。中括弧を使用して、ジョブの情報 (<code ng-non-bindable>{{ job_friendly_name }}</code>, <code ng-non-bindable>{{ url }}</code>) またはジョブの属性 (<code ng-non-bindable>{{ job.status }}</code>) にアクセスします。メッセージには、使用可能な変数を複数適用できます。詳細は、<a href=\"https://docs.ansible.com/ansible-tower/latest/html/userguide/notifications.html#create-custom-notifications\" target=\"_blank\">Ansible Tower ドキュメント</a> を参照してください。"
msgstr "カスタムメッセージを使用して、ジョブの開始時、成功時、または失敗時に送信する通知内容を変更します。中括弧を使用して、ジョブの情報 (<code ng-non-bindable>{{ job_friendly_name }}</code>, <code ng-non-bindable>{{ url }}</code>) またはジョブの属性 (<code ng-non-bindable>{{ job.status }}</code>) にアクセスします。メッセージには、使用可能な変数を複数適用できます。詳細は、<a href=\"https://docs.ansible.com/ansible-tower/latest/html/userguide/notifications.html#create-custom-notifications\" target=\"_blank\">Ansible Tower ドキュメント</a> を参照してください。"
#: client/src/instance-groups/instance-groups.strings.js:24
#: client/src/instance-groups/instance-groups.strings.js:50
@ -7509,7 +7508,7 @@ msgstr "YAML サンプルを %s に表示"
#: client/src/configuration/settings.partial.html:15
msgid "View and edit your license information"
msgstr "ライセンス情報を表示し、編集します。"
msgstr "ライセンス情報の表示、編集"
#: client/src/credentials/credentials.list.js:84
msgid "View credential"
@ -7876,7 +7875,7 @@ msgstr "ホストフィルターの編集に必要なパーミッションがあ
#: client/src/login/loginModal/loginModal.partial.html:34
msgid "You have been logged out. Please sign in."
msgstr "ログアウトしています。サインインしてください。"
msgstr "ログアウトされました。サインインしてください。"
#: client/src/configuration/forms/auth-form/configuration-auth.controller.js:51
#: client/src/configuration/forms/settings-form.controller.js:443

View File

@ -1,2 +1 @@
pycurl # requires system package version
rsa # stop adding new crypto libs