From c8cf28f266f674ea4cd0096886a0827f629cffac Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 30 Apr 2021 14:14:38 -0400 Subject: [PATCH] Assorted renaming and string changes --- API_STANDARDS.md | 2 +- README.md | 2 +- awx/__init__.py | 2 +- awx/api/conf.py | 2 +- awx/api/swagger.py | 2 +- awx/api/views/__init__.py | 8 +- awx/asgi.py | 4 +- awx/conf/__init__.py | 2 +- awx/conf/access.py | 2 +- awx/conf/conf.py | 2 +- awx/conf/license.py | 2 +- awx/conf/models.py | 2 +- awx/conf/serializers.py | 2 +- awx/conf/settings.py | 2 +- awx/conf/signals.py | 2 +- awx/conf/views.py | 2 +- awx/main/analytics/metrics.py | 16 +- awx/main/conf.py | 24 +- awx/main/dispatch/reaper.py | 4 +- .../commands/deprovision_instance.py | 2 +- .../commands/regenerate_secret_key.py | 3 +- awx/main/migrations/0140_rename.py | 90 +++++ awx/main/migrations/_galaxy.py | 2 +- awx/main/models/activity_stream.py | 2 +- awx/main/models/credential/__init__.py | 14 +- awx/main/models/inventory.py | 4 +- awx/main/models/jobs.py | 2 +- awx/main/notifications/webhook_backend.py | 7 +- awx/main/scheduler/tasks.py | 2 +- awx/main/utils/common.py | 4 +- awx/main/utils/licensing.py | 4 +- awx/playbooks/action_plugins/insights.py | 2 +- awx/settings/defaults.py | 12 +- awx/settings/production.py | 4 +- awx/sso/conf.py | 88 ++--- awx/sso/fields.py | 2 +- awx/sso/models.py | 2 +- .../test_get_or_set_enterprise_user.py | 2 +- awx/templates/rest_framework/api.html | 6 +- awx/ui/conf.py | 2 +- awx/ui/fields.py | 2 +- awx/ui_next/SEARCH.md | 4 +- .../components/Lookup/HostFilterLookup.jsx | 2 +- .../shared/data.credentialTypes.json | 4 +- .../shared/CredentialTypeForm.jsx | 4 +- .../InventorySourceDetail.jsx | 2 +- .../Inventory/shared/InventoryForm.jsx | 2 +- .../InventorySourceSubForms/SharedFields.jsx | 2 +- .../Inventory/shared/SmartInventoryForm.jsx | 2 +- .../shared/CustomMessagesSubForm.jsx | 2 +- .../shared/TypeInputsSubForm.jsx | 2 +- .../shared/ProjectSubForms/GitSubForm.jsx | 2 +- .../LDAP/LDAPDetail/LDAPDetail.test.jsx | 2 +- .../Setting/LDAP/LDAPEdit/LDAPEdit.test.jsx | 2 +- .../MiscSystemDetail.test.jsx | 2 +- .../SubscriptionEdit/AnalyticsStep.jsx | 10 +- .../shared/data.allSettingOptions.json | 346 +++++++++--------- .../Setting/shared/data.allSettings.json | 2 +- .../Setting/shared/data.ldapSettings.json | 2 +- .../Template/Survey/SurveyQuestionForm.jsx | 2 +- .../Template/shared/JobTemplateForm.jsx | 8 +- .../shared/WorkflowJobTemplateForm.jsx | 2 +- awx/wsgi.py | 4 +- awxkit/awxkit/api/pages/api.py | 2 +- awxkit/awxkit/cli/sphinx.py | 2 +- config/wsgi.py | 4 - docs/auth/README.md | 14 +- docs/auth/oauth.md | 6 +- docs/auth/session.md | 4 +- docs/auth/tacacsplus.md | 16 +- docs/capacity.md | 26 +- docs/clustering.md | 43 ++- docs/credentials/README.md | 2 +- docs/credentials/extract_credentials.md | 4 +- .../multi_credential_assignment.md | 2 +- docs/debugging.md | 8 +- docs/inventory/README.md | 2 +- docs/inventory/inventory_refresh.md | 6 +- docs/inventory/scm_inventory.md | 4 +- docs/job_events.md | 6 +- docs/job_slicing.md | 2 +- docs/licenses/README | 19 +- docs/logging_integration.md | 26 +- docs/named_url.md | 18 +- docs/notification_system.md | 16 +- docs/rbac.md | 4 +- docs/task_manager_system.md | 8 +- docs/tower_configuration.md | 22 +- docs/workflow.md | 8 +- requirements/README.md | 3 +- setup.py | 63 ++-- .../rbac_dummy_data_generator.py | 291 +++++++-------- tools/docker-credential-plugins-override.yml | 2 +- tools/elastic/README.md | 2 +- .../docker-compose.logstash-link-cluster.yml | 2 +- tools/scripts/awx-python | 2 +- tools/scripts/pk_to_named_url.py | 46 +-- 97 files changed, 730 insertions(+), 707 deletions(-) create mode 100644 awx/main/migrations/0140_rename.py delete mode 100644 config/wsgi.py diff --git a/API_STANDARDS.md b/API_STANDARDS.md index 469fef585d..19248f06ec 100644 --- a/API_STANDARDS.md +++ b/API_STANDARDS.md @@ -1,7 +1,7 @@ Coding Standards and Practices ============================== -This is not meant to be a style document so much as a practices document for ensuring performance and convention in the Ansible Tower API. +This is not meant to be a style document so much as a practices document for ensuring performance and convention in the AWX API. Paginate Everything =================== diff --git a/README.md b/README.md index b587153de4..e7e308e172 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ AWX -AWX provides a web-based user interface, REST API, and task engine built on top of [Ansible](https://github.com/ansible/ansible). It is the upstream project for [Tower](https://www.ansible.com/tower), a commercial derivative of AWX. +AWX provides a web-based user interface, REST API, and task engine built on top of [Ansible](https://github.com/ansible/ansible). It is one of the upstream projects for [Red Hat Ansible Automation Platform](https://www.ansible.com/products/automation-platform). To install AWX, please view the [Install guide](./INSTALL.md). diff --git a/awx/__init__.py b/awx/__init__.py index b9aa936785..b9cc01174f 100644 --- a/awx/__init__.py +++ b/awx/__init__.py @@ -85,7 +85,7 @@ def oauth2_getattribute(self, attr): # setting lookups for references to model classes (e.g., # oauth2_settings.REFRESH_TOKEN_MODEL) # If we're doing an OAuth2 setting lookup *while running* a migration, - # don't do our usual "Configure Tower in Tower" database setting lookup + # don't do our usual database settings lookup val = settings.OAUTH2_PROVIDER.get(attr) if val is None: val = object.__getattribute__(self, attr) diff --git a/awx/api/conf.py b/awx/api/conf.py index b71892d76e..0a2ac6a89f 100644 --- a/awx/api/conf.py +++ b/awx/api/conf.py @@ -77,7 +77,7 @@ register( required=False, default='', label=_('Login redirect override URL'), - help_text=_('URL to which unauthorized users will be redirected to log in. If blank, users will be sent to the Tower login page.'), + help_text=_('URL to which unauthorized users will be redirected to log in. If blank, users will be sent to the login page.'), category=_('Authentication'), category_slug='authentication', ) diff --git a/awx/api/swagger.py b/awx/api/swagger.py index b7a23a9f6d..d5ed23407a 100644 --- a/awx/api/swagger.py +++ b/awx/api/swagger.py @@ -62,7 +62,7 @@ class SwaggerSchemaView(APIView): renderer_classes = [CoreJSONRenderer, renderers.OpenAPIRenderer, renderers.SwaggerUIRenderer] def get(self, request): - generator = SuperUserSchemaGenerator(title='Ansible Tower API', patterns=None, urlconf=None) + generator = SuperUserSchemaGenerator(title='Ansible Automation Platform controller API', patterns=None, urlconf=None) schema = generator.get_schema(request=request) # python core-api doesn't support the deprecation yet, so track it # ourselves and return it in a response header diff --git a/awx/api/views/__init__.py b/awx/api/views/__init__.py index ed13e7ffdf..6f7238d8ca 100644 --- a/awx/api/views/__init__.py +++ b/awx/api/views/__init__.py @@ -4250,13 +4250,13 @@ class NotificationTemplateTest(GenericAPIView): def post(self, request, *args, **kwargs): obj = self.get_object() - msg = "Tower Notification Test {} {}".format(obj.id, settings.TOWER_URL_BASE) + msg = "Notification Test {} {}".format(obj.id, settings.TOWER_URL_BASE) if obj.notification_type in ('email', 'pagerduty'): - body = "Ansible Tower Test Notification {} {}".format(obj.id, settings.TOWER_URL_BASE) + body = "Test Notification {} {}".format(obj.id, settings.TOWER_URL_BASE) elif obj.notification_type in ('webhook', 'grafana'): - body = '{{"body": "Ansible Tower Test Notification {} {}"}}'.format(obj.id, settings.TOWER_URL_BASE) + body = '{{"body": "Test Notification {} {}"}}'.format(obj.id, settings.TOWER_URL_BASE) else: - body = {"body": "Ansible Tower Test Notification {} {}".format(obj.id, settings.TOWER_URL_BASE)} + body = {"body": "Test Notification {} {}".format(obj.id, settings.TOWER_URL_BASE)} notification = obj.generate_notification(msg, body) if not notification: diff --git a/awx/asgi.py b/awx/asgi.py index 30ef2ffa3f..d7be21d2d2 100644 --- a/awx/asgi.py +++ b/awx/asgi.py @@ -30,8 +30,8 @@ if MODE == 'production': except FileNotFoundError: pass except ValueError as e: - logger.error("Missing or incorrect metadata for Tower version. Ensure Tower was installed using the setup playbook.") - raise Exception("Missing or incorrect metadata for Tower version. Ensure Tower was installed using the setup playbook.") from e + logger.error("Missing or incorrect metadata for controller version. Ensure controller was installed using the setup playbook.") + raise Exception("Missing or incorrect metadata for controller version. Ensure controller was installed using the setup playbook.") from e os.environ.setdefault("DJANGO_SETTINGS_MODULE", "awx.settings") diff --git a/awx/conf/__init__.py b/awx/conf/__init__.py index 9371e22b2f..661295a685 100644 --- a/awx/conf/__init__.py +++ b/awx/conf/__init__.py @@ -4,7 +4,7 @@ # Django from django.utils.module_loading import autodiscover_modules -# Tower +# AWX from .registry import settings_registry default_app_config = 'awx.conf.apps.ConfConfig' diff --git a/awx/conf/access.py b/awx/conf/access.py index 6d390a8f52..fdad9c60a1 100644 --- a/awx/conf/access.py +++ b/awx/conf/access.py @@ -4,7 +4,7 @@ # Django from django.db.models import Q -# Tower +# AWX from awx.main.access import BaseAccess, register_access from awx.conf.models import Setting diff --git a/awx/conf/conf.py b/awx/conf/conf.py index 6de90427e0..45a3442756 100644 --- a/awx/conf/conf.py +++ b/awx/conf/conf.py @@ -2,7 +2,7 @@ from django.conf import settings from django.utils.translation import ugettext_lazy as _ -# Tower +# AWX from awx.conf import fields, register from awx.conf import settings_registry diff --git a/awx/conf/license.py b/awx/conf/license.py index 4ccdd2155e..5eca5986f2 100644 --- a/awx/conf/license.py +++ b/awx/conf/license.py @@ -11,5 +11,5 @@ def _get_validated_license_data(): def get_license(): - """Return a dictionary representing the active license on this Tower instance.""" + """Return a dictionary representing the active license on this instance.""" return _get_validated_license_data() diff --git a/awx/conf/models.py b/awx/conf/models.py index 90ee8f06c0..f64d8a2aab 100644 --- a/awx/conf/models.py +++ b/awx/conf/models.py @@ -7,7 +7,7 @@ import json # Django from django.db import models -# Tower +# AWX from awx.main.models.base import CreatedModifiedModel, prevent_search from awx.main.fields import JSONField from awx.main.utils import encrypt_field diff --git a/awx/conf/serializers.py b/awx/conf/serializers.py index be3126870c..ea4820aa5b 100644 --- a/awx/conf/serializers.py +++ b/awx/conf/serializers.py @@ -1,7 +1,7 @@ # Django REST Framework from rest_framework import serializers -# Tower +# AWX from awx.api.fields import VerbatimField from awx.api.serializers import BaseSerializer from awx.conf.models import Setting diff --git a/awx/conf/settings.py b/awx/conf/settings.py index cd8b2efe16..fc3e228cb4 100644 --- a/awx/conf/settings.py +++ b/awx/conf/settings.py @@ -20,7 +20,7 @@ from rest_framework.fields import empty, SkipField import cachetools -# Tower +# AWX from awx.main.utils import encrypt_field, decrypt_field from awx.conf import settings_registry from awx.conf.models import Setting diff --git a/awx/conf/signals.py b/awx/conf/signals.py index ad388501f4..00e486734b 100644 --- a/awx/conf/signals.py +++ b/awx/conf/signals.py @@ -8,7 +8,7 @@ from django.db.models.signals import post_save, pre_delete, post_delete from django.core.cache import cache from django.dispatch import receiver -# Tower +# AWX from awx.conf import settings_registry from awx.conf.models import Setting diff --git a/awx/conf/views.py b/awx/conf/views.py index c5a6a16f0f..e98b28cc49 100644 --- a/awx/conf/views.py +++ b/awx/conf/views.py @@ -21,7 +21,7 @@ from rest_framework.response import Response from rest_framework import serializers from rest_framework import status -# Tower +# AWX from awx.api.generics import APIView, GenericAPIView, ListAPIView, RetrieveUpdateDestroyAPIView from awx.api.permissions import IsSuperUser from awx.api.versioning import reverse diff --git a/awx/main/analytics/metrics.py b/awx/main/analytics/metrics.py index 03ea674db8..b9cd5153cc 100644 --- a/awx/main/analytics/metrics.py +++ b/awx/main/analytics/metrics.py @@ -40,8 +40,8 @@ def metrics(): registry=REGISTRY, ) CUSTOM_VENVS = Gauge('awx_custom_virtualenvs_total', 'Number of virtualenvs', registry=REGISTRY) - RUNNING_JOBS = Gauge('awx_running_jobs_total', 'Number of running jobs on the Tower system', registry=REGISTRY) - PENDING_JOBS = Gauge('awx_pending_jobs_total', 'Number of pending jobs on the Tower system', registry=REGISTRY) + RUNNING_JOBS = Gauge('awx_running_jobs_total', 'Number of running jobs on the system', registry=REGISTRY) + PENDING_JOBS = Gauge('awx_pending_jobs_total', 'Number of pending jobs on the system', registry=REGISTRY) STATUS = Gauge( 'awx_status_total', 'Status of Job launched', @@ -53,7 +53,7 @@ def metrics(): INSTANCE_CAPACITY = Gauge( 'awx_instance_capacity', - 'Capacity of each node in a Tower system', + 'Capacity of each node in the system', [ 'hostname', 'instance_uuid', @@ -62,7 +62,7 @@ def metrics(): ) INSTANCE_CPU = Gauge( 'awx_instance_cpu', - 'CPU cores on each node in a Tower system', + 'CPU cores on each node in the system', [ 'hostname', 'instance_uuid', @@ -71,7 +71,7 @@ def metrics(): ) INSTANCE_MEMORY = Gauge( 'awx_instance_memory', - 'RAM (Kb) on each node in a Tower system', + 'RAM (Kb) on each node in the system', [ 'hostname', 'instance_uuid', @@ -80,7 +80,7 @@ def metrics(): ) INSTANCE_INFO = Info( 'awx_instance', - 'Info about each node in a Tower system', + 'Info about each node in the system', [ 'hostname', 'instance_uuid', @@ -107,7 +107,7 @@ def metrics(): ) INSTANCE_CONSUMED_CAPACITY = Gauge( 'awx_instance_consumed_capacity', - 'Consumed capacity of each node in a Tower system', + 'Consumed capacity of each node in the system', [ 'hostname', 'instance_uuid', @@ -116,7 +116,7 @@ def metrics(): ) INSTANCE_REMAINING_CAPACITY = Gauge( 'awx_instance_remaining_capacity', - 'Remaining capacity of each node in a Tower system', + 'Remaining capacity of each node in the system', [ 'hostname', 'instance_uuid', diff --git a/awx/main/conf.py b/awx/main/conf.py index 2644e2cdd7..c0fc86c63c 100644 --- a/awx/main/conf.py +++ b/awx/main/conf.py @@ -7,7 +7,7 @@ from django.utils.translation import ugettext_lazy as _ # Django REST Framework from rest_framework import serializers -# Tower +# AWX from awx.conf import fields, register, register_validate from awx.main.models import ExecutionEnvironment @@ -58,8 +58,8 @@ register( field_class=fields.URLField, schemes=('http', 'https'), allow_plain_hostname=True, # Allow hostname only without TLD. - label=_('Base URL of the Tower host'), - help_text=_('This setting is used by services like notifications to render ' 'a valid url to the Tower host.'), + label=_('Base URL of the service'), + help_text=_('This setting is used by services like notifications to render ' 'a valid url to the service.'), category=_('System'), category_slug='system', ) @@ -84,8 +84,8 @@ register( field_class=fields.StringListField, label=_('Proxy IP Allowed List'), help_text=_( - "If Tower is behind a reverse proxy/load balancer, use this setting " - "to configure the proxy IP addresses from which Tower should trust " + "If the service is behind a reverse proxy/load balancer, use this setting " + "to configure the proxy IP addresses from which the service should trust " "custom REMOTE_HOST_HEADERS header values. " "If this setting is an empty list (the default), the headers specified by " "REMOTE_HOST_HEADERS will be trusted unconditionally')" @@ -172,7 +172,7 @@ register( register( 'INSTALL_UUID', field_class=fields.CharField, - label=_('Unique identifier for an AWX/Tower installation'), + label=_('Unique identifier for an installation'), category=_('System'), category_slug='system', read_only=True, @@ -223,7 +223,7 @@ register( help_text=_( 'Ansible allows variable substitution via the Jinja2 templating ' 'language for --extra-vars. This poses a potential security ' - 'risk where Tower users with the ability to specify extra vars at job ' + 'risk where users with the ability to specify extra vars at job ' 'launch time can use Jinja2 templates to run arbitrary Python. It is ' 'recommended that this value be set to "template" or "never".' ), @@ -235,7 +235,7 @@ register( 'AWX_ISOLATION_BASE_PATH', field_class=fields.CharField, label=_('Job execution path'), - help_text=_('The directory in which Tower will create new temporary directories for job execution and isolation (such as credential files).'), + help_text=_('The directory in which the service will create new temporary directories for job execution and isolation (such as credential files).'), category=_('Jobs'), category_slug='jobs', ) @@ -266,7 +266,7 @@ register( field_class=fields.BooleanField, default=False, label=_('Gather data for Automation Analytics'), - help_text=_('Enables Tower to gather data on automation and send it to Red Hat.'), + help_text=_('Enables the service to gather data on automation and send it to Red Hat Insights.'), category=_('System'), category_slug='system', ) @@ -537,8 +537,8 @@ register( field_class=fields.CharField, allow_blank=True, default='', - label=_('Cluster-wide Tower unique identifier.'), - help_text=_('Useful to uniquely identify Tower instances.'), + label=_('Cluster-wide unique identifier.'), + help_text=_('Useful to uniquely identify instances.'), category=_('Logging'), category_slug='logging', ) @@ -573,7 +573,7 @@ register( label=_('Enable/disable HTTPS certificate verification'), help_text=_( 'Flag to control enable/disable of certificate verification' - ' when LOG_AGGREGATOR_PROTOCOL is "https". If enabled, Tower\'s' + ' when LOG_AGGREGATOR_PROTOCOL is "https". If enabled, the' ' log handler will verify certificate sent by external log aggregator' ' before establishing connection.' ), diff --git a/awx/main/dispatch/reaper.py b/awx/main/dispatch/reaper.py index 773c75f975..d256c7206f 100644 --- a/awx/main/dispatch/reaper.py +++ b/awx/main/dispatch/reaper.py @@ -18,7 +18,7 @@ def reap_job(j, status): j.start_args = '' # blank field to remove encrypted passwords j.job_explanation += ' '.join( ( - 'Task was marked as running in Tower but was not present in', + 'Task was marked as running but was not present in', 'the job queue, so it has been marked as failed.', ) ) @@ -37,7 +37,7 @@ def reap(instance=None, status='failed', excluded_uuids=[]): if me is None: (changed, me) = Instance.objects.get_or_register() if changed: - logger.info("Registered tower node '{}'".format(me.hostname)) + logger.info("Registered node '{}'".format(me.hostname)) now = tz_now() workflow_ctype_id = ContentType.objects.get_for_model(WorkflowJob).id jobs = UnifiedJob.objects.filter( diff --git a/awx/main/management/commands/deprovision_instance.py b/awx/main/management/commands/deprovision_instance.py index 6bbffc712f..7f614891da 100644 --- a/awx/main/management/commands/deprovision_instance.py +++ b/awx/main/management/commands/deprovision_instance.py @@ -10,7 +10,7 @@ from awx.main.utils.pglock import advisory_lock class Command(BaseCommand): """ - Deprovision a Tower cluster node + Deprovision a cluster node """ help = 'Remove instance from the database. ' 'Specify `--hostname` to use this command.' diff --git a/awx/main/management/commands/regenerate_secret_key.py b/awx/main/management/commands/regenerate_secret_key.py index 68a1102daa..09d110d0ee 100644 --- a/awx/main/management/commands/regenerate_secret_key.py +++ b/awx/main/management/commands/regenerate_secret_key.py @@ -16,8 +16,7 @@ from awx.main.utils.encryption import encrypt_field, decrypt_field, encrypt_valu class Command(BaseCommand): """ - Regenerate a new SECRET_KEY value and re-encrypt every secret in the - Tower database. + Regenerate a new SECRET_KEY value and re-encrypt every secret in the database. """ @transaction.atomic diff --git a/awx/main/migrations/0140_rename.py b/awx/main/migrations/0140_rename.py new file mode 100644 index 0000000000..16ab7be7ac --- /dev/null +++ b/awx/main/migrations/0140_rename.py @@ -0,0 +1,90 @@ +# Generated by Django 2.2.16 on 2021-04-27 18:07 + +import awx.main.fields +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('main', '0139_isolated_removal'), + ] + + operations = [ + migrations.AlterField( + model_name='credential', + name='credential_type', + field=models.ForeignKey( + help_text='Specify the type of credential you want to create. Refer to the documentation for details on each type.', + on_delete=django.db.models.deletion.CASCADE, + related_name='credentials', + to='main.CredentialType', + ), + ), + migrations.AlterField( + model_name='credential', + name='inputs', + field=awx.main.fields.CredentialInputField( + blank=True, default=dict, help_text='Enter inputs using either JSON or YAML syntax. Refer to the documentation for example syntax.' + ), + ), + migrations.AlterField( + model_name='credentialtype', + name='injectors', + field=awx.main.fields.CredentialTypeInjectorField( + blank=True, default=dict, help_text='Enter injectors using either JSON or YAML syntax. Refer to the documentation for example syntax.' + ), + ), + migrations.AlterField( + model_name='credentialtype', + name='inputs', + field=awx.main.fields.CredentialTypeInputField( + blank=True, default=dict, help_text='Enter inputs using either JSON or YAML syntax. Refer to the documentation for example syntax.' + ), + ), + migrations.AlterField( + model_name='inventorysource', + name='enabled_value', + field=models.TextField( + blank=True, + default='', + help_text='Only used when enabled_var is set. Value when the host is considered enabled. For example if enabled_var="status.power_state"and enabled_value="powered_on" with host variables:{ "status": { "power_state": "powered_on", "created": "2020-08-04T18:13:04+00:00", "healthy": true }, "name": "foobar", "ip_address": "192.168.2.1"}The host would be marked enabled. If power_state where any value other than powered_on then the host would be disabled when imported. If the key is not found then the host will be enabled', + ), + ), + migrations.AlterField( + model_name='inventorysource', + name='host_filter', + field=models.TextField(blank=True, default='', help_text='Regex where only matching hosts will be imported.'), + ), + migrations.AlterField( + model_name='inventoryupdate', + name='enabled_value', + field=models.TextField( + blank=True, + default='', + help_text='Only used when enabled_var is set. Value when the host is considered enabled. For example if enabled_var="status.power_state"and enabled_value="powered_on" with host variables:{ "status": { "power_state": "powered_on", "created": "2020-08-04T18:13:04+00:00", "healthy": true }, "name": "foobar", "ip_address": "192.168.2.1"}The host would be marked enabled. If power_state where any value other than powered_on then the host would be disabled when imported. If the key is not found then the host will be enabled', + ), + ), + migrations.AlterField( + model_name='inventoryupdate', + name='host_filter', + field=models.TextField(blank=True, default='', help_text='Regex where only matching hosts will be imported.'), + ), + migrations.AlterField( + model_name='job', + name='use_fact_cache', + field=models.BooleanField( + default=False, + help_text='If enabled, the service will act as an Ansible Fact Cache Plugin; persisting facts at the end of a playbook run to the database and caching facts for use by Ansible.', + ), + ), + migrations.AlterField( + model_name='jobtemplate', + name='use_fact_cache', + field=models.BooleanField( + default=False, + help_text='If enabled, the service will act as an Ansible Fact Cache Plugin; persisting facts at the end of a playbook run to the database and caching facts for use by Ansible.', + ), + ), + ] diff --git a/awx/main/migrations/_galaxy.py b/awx/main/migrations/_galaxy.py index eb9454a1bf..9e7684cdcf 100644 --- a/awx/main/migrations/_galaxy.py +++ b/awx/main/migrations/_galaxy.py @@ -27,7 +27,7 @@ def migrate_galaxy_settings(apps, schema_editor): galaxy_type = CredentialType.objects.get(kind='galaxy') private_galaxy_url = Setting.objects.filter(key='PRIMARY_GALAXY_URL').first() - # by default, prior versions of AWX/Tower automatically pulled content + # by default, prior versions of AWX automatically pulled content # from galaxy.ansible.com public_galaxy_enabled = True public_galaxy_setting = Setting.objects.filter(key='PUBLIC_GALAXY_ENABLED').first() diff --git a/awx/main/models/activity_stream.py b/awx/main/models/activity_stream.py index e0eafbcfbb..6215e17a5a 100644 --- a/awx/main/models/activity_stream.py +++ b/awx/main/models/activity_stream.py @@ -1,7 +1,7 @@ # Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. -# Tower +# AWX from awx.api.versioning import reverse from awx.main.fields import JSONField from awx.main.models.base import accepts_json diff --git a/awx/main/models/credential/__init__.py b/awx/main/models/credential/__init__.py index c7ef7cf635..3d9ef00a09 100644 --- a/awx/main/models/credential/__init__.py +++ b/awx/main/models/credential/__init__.py @@ -89,7 +89,7 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique, ResourceMixin): related_name='credentials', null=False, on_delete=models.CASCADE, - help_text=_('Specify the type of credential you want to create. Refer ' 'to the Ansible Tower documentation for details on each type.'), + help_text=_('Specify the type of credential you want to create. Refer ' 'to the documentation for details on each type.'), ) managed_by_tower = models.BooleanField(default=False, editable=False) organization = models.ForeignKey( @@ -101,7 +101,7 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique, ResourceMixin): related_name='credentials', ) inputs = CredentialInputField( - blank=True, default=dict, help_text=_('Enter inputs using either JSON or YAML syntax. ' 'Refer to the Ansible Tower documentation for example syntax.') + blank=True, default=dict, help_text=_('Enter inputs using either JSON or YAML syntax. ' 'Refer to the documentation for example syntax.') ) admin_role = ImplicitRoleField( parent_role=[ @@ -343,12 +343,12 @@ class CredentialType(CommonModelNameNotUnique): managed_by_tower = models.BooleanField(default=False, editable=False) namespace = models.CharField(max_length=1024, null=True, default=None, editable=False) inputs = CredentialTypeInputField( - blank=True, default=dict, help_text=_('Enter inputs using either JSON or YAML syntax. ' 'Refer to the Ansible Tower documentation for example syntax.') + blank=True, default=dict, help_text=_('Enter inputs using either JSON or YAML syntax. ' 'Refer to the documentation for example syntax.') ) injectors = CredentialTypeInjectorField( blank=True, default=dict, - help_text=_('Enter injectors using either JSON or YAML syntax. ' 'Refer to the Ansible Tower documentation for example syntax.'), + help_text=_('Enter injectors using either JSON or YAML syntax. ' 'Refer to the documentation for example syntax.'), ) @classmethod @@ -752,7 +752,7 @@ ManagedCredentialType( 'help_text': ugettext_noop( 'OpenStack domains define administrative boundaries. ' 'It is only needed for Keystone v3 authentication ' - 'URLs. Refer to Ansible Tower documentation for ' + 'URLs. Refer to the documentation for ' 'common scenarios.' ), }, @@ -1032,9 +1032,7 @@ ManagedCredentialType( 'label': ugettext_noop('OAuth Token'), 'type': 'string', 'secret': True, - 'help_text': ugettext_noop( - 'An OAuth token to use to authenticate to Tower with.' 'This should not be set if username/password are being used.' - ), + 'help_text': ugettext_noop('An OAuth token to use to authenticate with.' 'This should not be set if username/password are being used.'), }, {'id': 'verify_ssl', 'label': ugettext_noop('Verify SSL'), 'type': 'boolean', 'secret': False}, ], diff --git a/awx/main/models/inventory.py b/awx/main/models/inventory.py index 363544e0c6..99dc7b837b 100644 --- a/awx/main/models/inventory.py +++ b/awx/main/models/inventory.py @@ -877,14 +877,14 @@ class InventorySourceOptions(BaseModel): '}' 'The host would be marked enabled. If power_state where any ' 'value other than powered_on then the host would be disabled ' - 'when imported into Tower. If the key is not found then the ' + 'when imported. If the key is not found then the ' 'host will be enabled' ), ) host_filter = models.TextField( blank=True, default='', - help_text=_('Regex where only matching hosts will be imported into Tower.'), + help_text=_('Regex where only matching hosts will be imported.'), ) overwrite = models.BooleanField( default=False, diff --git a/awx/main/models/jobs.py b/awx/main/models/jobs.py index 2b0bb6fd20..735623142c 100644 --- a/awx/main/models/jobs.py +++ b/awx/main/models/jobs.py @@ -162,7 +162,7 @@ class JobOptions(BaseModel): use_fact_cache = models.BooleanField( default=False, help_text=_( - "If enabled, Tower will act as an Ansible Fact Cache Plugin; persisting " + "If enabled, the service will act as an Ansible Fact Cache Plugin; persisting " "facts at the end of a playbook run to the database and caching facts for use by Ansible." ), ) diff --git a/awx/main/notifications/webhook_backend.py b/awx/main/notifications/webhook_backend.py index b99052f09e..3e38ae3cab 100644 --- a/awx/main/notifications/webhook_backend.py +++ b/awx/main/notifications/webhook_backend.py @@ -9,7 +9,7 @@ from django.utils.encoding import smart_text from django.utils.translation import ugettext_lazy as _ from awx.main.notifications.base import AWXBaseEmailBackend -from awx.main.utils import get_awx_version +from awx.main.utils import get_awx_http_client_headers from awx.main.notifications.custom_notification_base import CustomNotificationBase logger = logging.getLogger('awx.main.notifications.webhook_backend') @@ -61,9 +61,6 @@ class WebhookBackend(AWXBaseEmailBackend, CustomNotificationBase): def send_messages(self, messages): sent_messages = 0 - self.headers['Content-Type'] = 'application/json' - if 'User-Agent' not in self.headers: - self.headers['User-Agent'] = "Tower {}".format(get_awx_version()) if self.http_method.lower() not in ['put', 'post']: raise ValueError("HTTP method must be either 'POST' or 'PUT'.") chosen_method = getattr(requests, self.http_method.lower(), None) @@ -75,7 +72,7 @@ class WebhookBackend(AWXBaseEmailBackend, CustomNotificationBase): "{}".format(m.recipients()[0]), auth=auth, data=json.dumps(m.body, ensure_ascii=False).encode('utf-8'), - headers=self.headers, + headers=get_awx_http_client_headers(), verify=(not self.disable_ssl_verification), ) if r.status_code >= 400: diff --git a/awx/main/scheduler/tasks.py b/awx/main/scheduler/tasks.py index b35e542d3a..65c2a88be7 100644 --- a/awx/main/scheduler/tasks.py +++ b/awx/main/scheduler/tasks.py @@ -11,5 +11,5 @@ logger = logging.getLogger('awx.main.scheduler') @task(queue=get_local_queuename) def run_task_manager(): - logger.debug("Running Tower task manager.") + logger.debug("Running task manager.") TaskManager().schedule() diff --git a/awx/main/utils/common.py b/awx/main/utils/common.py index 3a8cf08c64..b9690fd641 100644 --- a/awx/main/utils/common.py +++ b/awx/main/utils/common.py @@ -220,7 +220,7 @@ def get_awx_http_client_headers(): license = get_license().get('license_type', 'UNLICENSED') headers = { 'Content-Type': 'application/json', - 'User-Agent': '{} {} ({})'.format('AWX' if license == 'open' else 'Red Hat Ansible Tower', get_awx_version(), license), + 'User-Agent': '{} {} ({})'.format('AWX' if license == 'open' else 'Red Hat Ansible Automation Platform', get_awx_version(), license), } return headers @@ -234,7 +234,7 @@ def get_licenser(*args, **kwargs): else: return OpenLicense() except Exception as e: - raise ValueError(_('Error importing Tower License: %s') % e) + raise ValueError(_('Error importing License: %s') % e) def update_scm_url(scm_type, url, username=True, password=True, check_special_cases=True, scp_format=False): diff --git a/awx/main/utils/licensing.py b/awx/main/utils/licensing.py index c972905cb9..e21f98a00f 100644 --- a/awx/main/utils/licensing.py +++ b/awx/main/utils/licensing.py @@ -231,7 +231,7 @@ class Licenser(object): raise error except OSError as error: raise OSError( - 'Unable to open certificate bundle {}. Check that Ansible Tower is running on Red Hat Enterprise Linux.'.format(verify) + 'Unable to open certificate bundle {}. Check that the service is running on Red Hat Enterprise Linux.'.format(verify) ) from error # noqa subs.raise_for_status() @@ -258,7 +258,7 @@ class Licenser(object): raise error except OSError as error: raise OSError( - 'Unable to open certificate bundle {}. Check that Ansible Tower is running on Red Hat Enterprise Linux.'.format(verify) + 'Unable to open certificate bundle {}. Check that the service is running on Red Hat Enterprise Linux.'.format(verify) ) from error # noqa orgs.raise_for_status() diff --git a/awx/playbooks/action_plugins/insights.py b/awx/playbooks/action_plugins/insights.py index 2b3ba5fd3b..0d9bf6abd7 100644 --- a/awx/playbooks/action_plugins/insights.py +++ b/awx/playbooks/action_plugins/insights.py @@ -50,7 +50,7 @@ class ActionModule(ActionBase): session.auth = requests.auth.HTTPBasicAuth(username, password) headers = { 'Content-Type': 'application/json', - 'User-Agent': '{} {} ({})'.format('AWX' if license == 'open' else 'Red Hat Ansible Tower', awx_version, license), + 'User-Agent': '{} {} ({})'.format('AWX' if license == 'open' else 'Red Hat Ansible Automation Platform', awx_version, license), } url = '/api/remediations/v1/remediations' while url: diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index 587ef34d5a..5d1a3b1dd6 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -137,7 +137,7 @@ JOBOUTPUT_ROOT = '/var/lib/awx/job_status/' # Absolute filesystem path to the directory to store logs LOG_ROOT = '/var/log/tower/' -# The heartbeat file for the tower scheduler +# The heartbeat file for the scheduler SCHEDULE_METADATA_LOCATION = os.path.join(BASE_DIR, '.tower_cycle') # Django gettext files path: locale//LC_MESSAGES/django.po, django.mo @@ -167,7 +167,7 @@ ALLOWED_HOSTS = [] # reverse proxy. REMOTE_HOST_HEADERS = ['REMOTE_ADDR', 'REMOTE_HOST'] -# If Tower is behind a reverse proxy/load balancer, use this setting to +# If we is behind a reverse proxy/load balancer, use this setting to # allow the proxy IP addresses from which Tower should trust custom # REMOTE_HOST_HEADERS header values # REMOTE_HOST_HEADERS = ['HTTP_X_FORWARDED_FOR', ''REMOTE_ADDR', 'REMOTE_HOST'] @@ -178,7 +178,7 @@ PROXY_IP_ALLOWED_LIST = [] CUSTOM_VENV_PATHS = [] -# Warning: this is a placeholder for a configure tower-in-tower setting +# Warning: this is a placeholder for a database setting # This should not be set via a file. DEFAULT_EXECUTION_ENVIRONMENT = None @@ -568,7 +568,7 @@ GALAXY_IGNORE_CERTS = False # Note: This setting may be overridden by database settings. AWX_ISOLATION_SHOW_PATHS = [] -# The directory in which Tower will create new temporary directories for job +# The directory in which the service will create new temporary directories for job # execution and isolation (such as credential files and custom # inventory scripts). # Note: This setting may be overridden by database settings. @@ -585,7 +585,7 @@ AWX_AUTO_DEPROVISION_INSTANCES = False # Note: This setting may be overridden by database settings. PENDO_TRACKING_STATE = "off" -# Enables Insights data collection for Ansible Tower. +# Enables Insights data collection. # Note: This setting may be overridden by database settings. INSIGHTS_TRACKING_STATE = False @@ -738,7 +738,7 @@ LOG_AGGREGATOR_RSYSLOGD_DEBUG = False LOG_AGGREGATOR_RSYSLOGD_ERROR_LOG_FILE = '/var/log/tower/rsyslog.err' # The number of retry attempts for websocket session establishment -# If you're encountering issues establishing websockets in clustered Tower, +# If you're encountering issues establishing websockets in a cluster, # raising this value can help CHANNEL_LAYER_RECEIVE_MAX_RETRY = 10 diff --git a/awx/settings/production.py b/awx/settings/production.py index d74f1a4a85..f912b6727e 100644 --- a/awx/settings/production.py +++ b/awx/settings/production.py @@ -30,14 +30,14 @@ SECRET_KEY = None # See https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts ALLOWED_HOSTS = [] -# The heartbeat file for the tower scheduler +# The heartbeat file for the scheduler SCHEDULE_METADATA_LOCATION = '/var/lib/awx/.tower_cycle' # Ansible base virtualenv paths and enablement BASE_VENV_PATH = os.path.realpath("/var/lib/awx/venv") ANSIBLE_VENV_PATH = os.path.join(BASE_VENV_PATH, "ansible") -# Tower base virtualenv paths and enablement +# Base virtualenv paths and enablement AWX_VENV_PATH = os.path.join(BASE_VENV_PATH, "awx") # Store a snapshot of default settings at this point before loading any diff --git a/awx/sso/conf.py b/awx/sso/conf.py index f160cc565c..a5c57dc4d1 100644 --- a/awx/sso/conf.py +++ b/awx/sso/conf.py @@ -10,7 +10,7 @@ from django.utils.translation import ugettext_lazy as _ # Django REST Framework from rest_framework import serializers -# Tower +# AWX from awx.conf import register, register_validate, fields from awx.sso.fields import ( AuthenticationBackendsField, @@ -51,9 +51,9 @@ class SocialAuthCallbackURL(object): SOCIAL_AUTH_ORGANIZATION_MAP_HELP_TEXT = _( '''\ Mapping to organization admins/users from social auth accounts. This setting -controls which users are placed into which Tower organizations based on their -username and email address. Configuration details are available in the Ansible -Tower documentation.\ +controls which users are placed into which organizations based on their +username and email address. Configuration details are available in the +documentation.\ ''' ) @@ -80,7 +80,7 @@ SOCIAL_AUTH_ORGANIZATION_MAP_PLACEHOLDER = collections.OrderedDict( SOCIAL_AUTH_TEAM_MAP_HELP_TEXT = _( '''\ Mapping of team members (users) from social auth accounts. Configuration -details are available in Tower documentation.\ +details are available in the documentation.\ ''' ) @@ -182,7 +182,7 @@ def _register_ldap(append=None): help_text=_( 'DN (Distinguished Name) of user to bind for all search queries. This' ' is the system user account we will use to login to query LDAP for other' - ' user information. Refer to the Ansible Tower documentation for example syntax.' + ' user information. Refer to the documentation for example syntax.' ), category=_('LDAP'), category_slug='ldap', @@ -235,11 +235,11 @@ def _register_ldap(append=None): label=_('LDAP User Search'), help_text=_( 'LDAP search query to find users. Any user that matches the given ' - 'pattern will be able to login to Tower. The user should also be ' - 'mapped into a Tower organization (as defined in the ' + 'pattern will be able to login to the service. The user should also be ' + 'mapped into an organization (as defined in the ' 'AUTH_LDAP_ORGANIZATION_MAP setting). If multiple search queries ' 'need to be supported use of "LDAPUnion" is possible. See ' - 'Tower documentation for details.' + 'the documentation for details.' ), category=_('LDAP'), category_slug='ldap', @@ -271,10 +271,10 @@ def _register_ldap(append=None): default={}, label=_('LDAP User Attribute Map'), help_text=_( - 'Mapping of LDAP user schema to Tower API user attributes. The default' + 'Mapping of LDAP user schema to API user attributes. The default' ' setting is valid for ActiveDirectory but users with other LDAP' - ' configurations may need to change the values. Refer to the Ansible' - ' Tower documentation for additional details.' + ' configurations may need to change the values. Refer to the' + ' documentation for additional details.' ), category=_('LDAP'), category_slug='ldap', @@ -333,12 +333,12 @@ def _register_ldap(append=None): help_text=_( 'Group DN required to login. If specified, user must be a member ' 'of this group to login via LDAP. If not set, everyone in LDAP ' - 'that matches the user search will be able to login via Tower. ' + 'that matches the user search will be able to login to the service. ' 'Only one require group is supported.' ), category=_('LDAP'), category_slug='ldap', - placeholder='CN=Tower Users,OU=Users,DC=example,DC=com', + placeholder='CN=Service Users,OU=Users,DC=example,DC=com', ) register( @@ -363,7 +363,7 @@ def _register_ldap(append=None): label=_('LDAP User Flags By Group'), help_text=_( 'Retrieve users from a given group. At this time, superuser and system' - ' auditors are the only groups supported. Refer to the Ansible Tower' + ' auditors are the only groups supported. Refer to the' ' documentation for more detail.' ), category=_('LDAP'), @@ -380,9 +380,9 @@ def _register_ldap(append=None): label=_('LDAP Organization Map'), help_text=_( 'Mapping between organization admins/users and LDAP groups. This ' - 'controls which users are placed into which Tower organizations ' + 'controls which users are placed into which organizations ' 'relative to their LDAP group memberships. Configuration details ' - 'are available in the Ansible Tower documentation.' + 'are available in the documentation.' ), category=_('LDAP'), category_slug='ldap', @@ -415,7 +415,7 @@ def _register_ldap(append=None): field_class=LDAPTeamMapField, default={}, label=_('LDAP Team Map'), - help_text=_('Mapping between team members (users) and LDAP groups. Configuration' ' details are available in the Ansible Tower documentation.'), + help_text=_('Mapping between team members (users) and LDAP groups. Configuration' ' details are available in the documentation.'), category=_('LDAP'), category_slug='ldap', placeholder=collections.OrderedDict( @@ -554,9 +554,7 @@ register( default=SocialAuthCallbackURL('google-oauth2'), label=_('Google OAuth2 Callback URL'), help_text=_( - 'Provide this URL as the callback URL for your application as part ' - 'of your registration process. Refer to the Ansible Tower ' - 'documentation for more detail.' + 'Provide this URL as the callback URL for your application as part ' 'of your registration process. Refer to the ' 'documentation for more detail.' ), category=_('Google OAuth2'), category_slug='google-oauth2', @@ -607,7 +605,7 @@ register( help_text=_( 'Extra arguments for Google OAuth2 login. You can restrict it to' ' only allow a single domain to authenticate, even if the user is' - ' logged in with multple Google accounts. Refer to the Ansible Tower' + ' logged in with multple Google accounts. Refer to the' ' documentation for more detail.' ), category=_('Google OAuth2'), @@ -650,9 +648,7 @@ register( default=SocialAuthCallbackURL('github'), label=_('GitHub OAuth2 Callback URL'), help_text=_( - 'Provide this URL as the callback URL for your application as part ' - 'of your registration process. Refer to the Ansible Tower ' - 'documentation for more detail.' + 'Provide this URL as the callback URL for your application as part ' 'of your registration process. Refer to the ' 'documentation for more detail.' ), category=_('GitHub OAuth2'), category_slug='github', @@ -717,9 +713,7 @@ register( default=SocialAuthCallbackURL('github-org'), label=_('GitHub Organization OAuth2 Callback URL'), help_text=_( - 'Provide this URL as the callback URL for your application as part ' - 'of your registration process. Refer to the Ansible Tower ' - 'documentation for more detail.' + 'Provide this URL as the callback URL for your application as part ' 'of your registration process. Refer to the ' 'documentation for more detail.' ), category=_('GitHub Organization OAuth2'), category_slug='github-org', @@ -874,9 +868,7 @@ register( default=SocialAuthCallbackURL('github-enterprise'), label=_('GitHub Enterprise OAuth2 Callback URL'), help_text=_( - 'Provide this URL as the callback URL for your application as part ' - 'of your registration process. Refer to the Ansible Tower ' - 'documentation for more detail.' + 'Provide this URL as the callback URL for your application as part ' 'of your registration process. Refer to the ' 'documentation for more detail.' ), category=_('GitHub Enterprise OAuth2'), category_slug='github-enterprise', @@ -965,9 +957,7 @@ register( default=SocialAuthCallbackURL('github-enterprise-org'), label=_('GitHub Enterprise Organization OAuth2 Callback URL'), help_text=_( - 'Provide this URL as the callback URL for your application as part ' - 'of your registration process. Refer to the Ansible Tower ' - 'documentation for more detail.' + 'Provide this URL as the callback URL for your application as part ' 'of your registration process. Refer to the ' 'documentation for more detail.' ), category=_('GitHub Enterprise Organization OAuth2'), category_slug='github-enterprise-org', @@ -1170,9 +1160,7 @@ register( default=SocialAuthCallbackURL('azuread-oauth2'), label=_('Azure AD OAuth2 Callback URL'), help_text=_( - 'Provide this URL as the callback URL for your application as part' - ' of your registration process. Refer to the Ansible Tower' - ' documentation for more detail. ' + 'Provide this URL as the callback URL for your application as part' ' of your registration process. Refer to the' ' documentation for more detail. ' ), category=_('Azure AD OAuth2'), category_slug='azuread-oauth2', @@ -1256,7 +1244,7 @@ register( default=SocialAuthCallbackURL('saml'), label=_('SAML Assertion Consumer Service (ACS) URL'), help_text=_( - 'Register Tower as a service provider (SP) with each identity ' + 'Register the service as a service provider (SP) with each identity ' 'provider (IdP) you have configured. Provide your SP Entity ID ' 'and this ACS URL for your application.' ), @@ -1285,7 +1273,7 @@ register( help_text=_( 'The application-defined unique identifier used as the ' 'audience of the SAML service provider (SP) configuration. ' - 'This is usually the URL for Tower.' + 'This is usually the URL for the service.' ), category=_('SAML'), category_slug='saml', @@ -1299,7 +1287,7 @@ register( required=True, validators=[validate_certificate], label=_('SAML Service Provider Public Certificate'), - help_text=_('Create a keypair for Tower to use as a service provider (SP) ' 'and include the certificate content here.'), + help_text=_('Create a keypair to use as a service provider (SP) ' 'and include the certificate content here.'), category=_('SAML'), category_slug='saml', ) @@ -1311,7 +1299,7 @@ register( required=True, validators=[validate_private_key], label=_('SAML Service Provider Private Key'), - help_text=_('Create a keypair for Tower to use as a service provider (SP) ' 'and include the private key content here.'), + help_text=_('Create a keypair to use as a service provider (SP) ' 'and include the private key content here.'), category=_('SAML'), category_slug='saml', encrypted=True, @@ -1322,7 +1310,7 @@ register( field_class=SAMLOrgInfoField, required=True, label=_('SAML Service Provider Organization Info'), - help_text=_('Provide the URL, display name, and the name of your app. Refer to' ' the Ansible Tower documentation for example syntax.'), + help_text=_('Provide the URL, display name, and the name of your app. Refer to' ' the documentation for example syntax.'), category=_('SAML'), category_slug='saml', placeholder=collections.OrderedDict( @@ -1336,11 +1324,7 @@ register( allow_blank=True, required=True, label=_('SAML Service Provider Technical Contact'), - help_text=_( - 'Provide the name and email address of the technical contact for' - ' your service provider. Refer to the Ansible Tower documentation' - ' for example syntax.' - ), + help_text=_('Provide the name and email address of the technical contact for' ' your service provider. Refer to the documentation' ' for example syntax.'), category=_('SAML'), category_slug='saml', placeholder=collections.OrderedDict([('givenName', 'Technical Contact'), ('emailAddress', 'techsup@example.com')]), @@ -1352,11 +1336,7 @@ register( allow_blank=True, required=True, label=_('SAML Service Provider Support Contact'), - help_text=_( - 'Provide the name and email address of the support contact for your' - ' service provider. Refer to the Ansible Tower documentation for' - ' example syntax.' - ), + help_text=_('Provide the name and email address of the support contact for your' ' service provider. Refer to the documentation for' ' example syntax.'), category=_('SAML'), category_slug='saml', placeholder=collections.OrderedDict([('givenName', 'Support Contact'), ('emailAddress', 'support@example.com')]), @@ -1500,7 +1480,7 @@ register( allow_null=True, default=None, label=_('SAML Organization Attribute Mapping'), - help_text=_('Used to translate user organization membership into Tower.'), + help_text=_('Used to translate user organization membership.'), category=_('SAML'), category_slug='saml', placeholder=collections.OrderedDict( @@ -1521,7 +1501,7 @@ register( allow_null=True, default=None, label=_('SAML Team Attribute Mapping'), - help_text=_('Used to translate user team membership into Tower.'), + help_text=_('Used to translate user team membership.'), category=_('SAML'), category_slug='saml', placeholder=collections.OrderedDict( diff --git a/awx/sso/fields.py b/awx/sso/fields.py index 7ee1725cb4..c2ad629d6f 100644 --- a/awx/sso/fields.py +++ b/awx/sso/fields.py @@ -22,7 +22,7 @@ from rest_framework.fields import empty, Field, SkipField # This must be imported so get_subclasses picks it up from awx.sso.ldap_group_types import PosixUIDGroupType # noqa -# Tower +# AWX from awx.conf import fields from awx.main.validators import validate_certificate from awx.sso.validators import ( # noqa diff --git a/awx/sso/models.py b/awx/sso/models.py index 901386e586..95da1b82c7 100644 --- a/awx/sso/models.py +++ b/awx/sso/models.py @@ -8,7 +8,7 @@ from django.utils.translation import ugettext_lazy as _ class UserEnterpriseAuth(models.Model): - """Tower Enterprise Auth association model""" + """Enterprise Auth association model""" PROVIDER_CHOICES = (('radius', _('RADIUS')), ('tacacs+', _('TACACS+')), ('saml', _('SAML'))) diff --git a/awx/sso/tests/functional/test_get_or_set_enterprise_user.py b/awx/sso/tests/functional/test_get_or_set_enterprise_user.py index 9e6feec080..0d48c54d87 100644 --- a/awx/sso/tests/functional/test_get_or_set_enterprise_user.py +++ b/awx/sso/tests/functional/test_get_or_set_enterprise_user.py @@ -2,7 +2,7 @@ import pytest from unittest import mock -# Tower +# AWX from awx.sso.backends import _get_or_set_enterprise_user diff --git a/awx/templates/rest_framework/api.html b/awx/templates/rest_framework/api.html index 5f0e9e1e15..eaf49aa23c 100644 --- a/awx/templates/rest_framework/api.html +++ b/awx/templates/rest_framework/api.html @@ -39,8 +39,8 @@ {% else %}
  • Log in
  • {% endif %} -
  • {% trans 'Ansible Tower API Guide' %}
  • -
  • {% trans 'Back to Ansible Tower' %}
  • +
  • {% trans 'API Guide' %}
  • +
  • {% trans 'Back to application' %}
  • @@ -64,7 +64,7 @@
    diff --git a/awx/ui/conf.py b/awx/ui/conf.py index cc930113e8..34208f2339 100644 --- a/awx/ui/conf.py +++ b/awx/ui/conf.py @@ -4,7 +4,7 @@ # Django from django.utils.translation import ugettext_lazy as _ -# Tower +# AWX from awx.conf import register, fields from awx.ui.fields import PendoTrackingStateField, CustomLogoField # noqa diff --git a/awx/ui/fields.py b/awx/ui/fields.py index 04c6fba972..d9b46890ff 100644 --- a/awx/ui/fields.py +++ b/awx/ui/fields.py @@ -9,7 +9,7 @@ import re # Django from django.utils.translation import ugettext_lazy as _ -# Tower +# AWX from awx.conf import fields diff --git a/awx/ui_next/SEARCH.md b/awx/ui_next/SEARCH.md index 131e4fe277..c6bf611e50 100644 --- a/awx/ui_next/SEARCH.md +++ b/awx/ui_next/SEARCH.md @@ -2,7 +2,7 @@ ## UX Considerations -Historically, the code that powers search in the AngularJS version of the AWX/Tower UI is very complex and prone to bugs. In order to reduce that complexity, we've made some UX decisions to help make the code easier to maintain. +Historically, the code that powers search in the AngularJS version of the AWX UI is very complex and prone to bugs. In order to reduce that complexity, we've made some UX decisions to help make the code easier to maintain. **ALL query params namespaced and in url bar** @@ -311,7 +311,7 @@ It is okay to only make this typing representation available initially (i.e. the when you click through or type in the search bar for the various phases of crafting the query ("not", "related resource project", "related resource key name", "value foo") which might be represented in the top bar as a series of tags that can be added and removed before submitting the tag. -We will try to form options data from a static file. Because options data is static, we may be able to generate and store as a static file of some sort (that we can use for managing smart search). Alan had ideas around this. If we do this it will mean we don't have to make a ton of requests as we craft smart search filters. It sounds like tower cli may start using something similar. +We will try to form options data from a static file. Because options data is static, we may be able to generate and store as a static file of some sort (that we can use for managing smart search). Alan had ideas around this. If we do this it will mean we don't have to make a ton of requests as we craft smart search filters. It sounds like the cli may start using something similar. ## Smart search flow diff --git a/awx/ui_next/src/components/Lookup/HostFilterLookup.jsx b/awx/ui_next/src/components/Lookup/HostFilterLookup.jsx index 89ea2feef0..5cd1c2d598 100644 --- a/awx/ui_next/src/components/Lookup/HostFilterLookup.jsx +++ b/awx/ui_next/src/components/Lookup/HostFilterLookup.jsx @@ -287,7 +287,7 @@ function HostFilterLookup({ content={i18n._( t`Populate the hosts for this inventory by using a search filter. Example: ansible_facts.ansible_distribution:"RedHat". - Refer to the Ansible Tower documentation for further syntax and + Refer to the documentation for further syntax and examples.` )} /> diff --git a/awx/ui_next/src/screens/Credential/shared/data.credentialTypes.json b/awx/ui_next/src/screens/Credential/shared/data.credentialTypes.json index 2fbc4f90a9..7e38183330 100644 --- a/awx/ui_next/src/screens/Credential/shared/data.credentialTypes.json +++ b/awx/ui_next/src/screens/Credential/shared/data.credentialTypes.json @@ -90,7 +90,7 @@ "label": "OAuth Token", "type": "string", "secret": true, - "help_text": "An OAuth token to use to authenticate to Tower with.This should not be set if username/password are being used." + "help_text": "An OAuth token to use to authenticate with.This should not be set if username/password are being used." }, { "id": "verify_ssl", @@ -280,7 +280,7 @@ "id": "domain", "label": "Domain Name", "type": "string", - "help_text": "OpenStack domains define administrative boundaries. It is only needed for Keystone v3 authentication URLs. Refer to Ansible Tower documentation for common scenarios." + "help_text": "OpenStack domains define administrative boundaries. It is only needed for Keystone v3 authentication URLs. Refer to the documentation for common scenarios." }, { "id": "region", diff --git a/awx/ui_next/src/screens/CredentialType/shared/CredentialTypeForm.jsx b/awx/ui_next/src/screens/CredentialType/shared/CredentialTypeForm.jsx index a5e9c540a9..4192d02c19 100644 --- a/awx/ui_next/src/screens/CredentialType/shared/CredentialTypeForm.jsx +++ b/awx/ui_next/src/screens/CredentialType/shared/CredentialTypeForm.jsx @@ -36,7 +36,7 @@ function CredentialTypeFormFields({ i18n }) { {i18n._(t`If checked, any hosts and groups that were previously present on the external source but are now removed - will be removed from the Tower inventory. Hosts and groups + will be removed from the inventory. Hosts and groups that were not managed by the inventory source will be promoted to the next manually created group or if there is no manually created group to promote them into, they will be left in the "all" diff --git a/awx/ui_next/src/screens/Inventory/shared/InventoryForm.jsx b/awx/ui_next/src/screens/Inventory/shared/InventoryForm.jsx index c02edb8ea5..ac79968a05 100644 --- a/awx/ui_next/src/screens/Inventory/shared/InventoryForm.jsx +++ b/awx/ui_next/src/screens/Inventory/shared/InventoryForm.jsx @@ -82,7 +82,7 @@ function InventoryFormFields({ i18n, credentialTypeId, inventory }) { {i18n._(t`If checked, any hosts and groups that were previously present on the external source but are now removed - will be removed from the Tower inventory. Hosts and groups + will be removed from the inventory. Hosts and groups that were not managed by the inventory source will be promoted to the next manually created group or if there is no manually created group to promote them into, they will be left in the "all" diff --git a/awx/ui_next/src/screens/Inventory/shared/SmartInventoryForm.jsx b/awx/ui_next/src/screens/Inventory/shared/SmartInventoryForm.jsx index fca698aef2..71a54592a7 100644 --- a/awx/ui_next/src/screens/Inventory/shared/SmartInventoryForm.jsx +++ b/awx/ui_next/src/screens/Inventory/shared/SmartInventoryForm.jsx @@ -99,7 +99,7 @@ const SmartInventoryFormFields = withI18n()(({ i18n, inventory }) => { tooltip={i18n._( t`Enter inventory variables using either JSON or YAML syntax. Use the radio button to toggle between the two. Refer to the - Ansible Tower documentation for example syntax.` + documentation for example syntax.` )} /> diff --git a/awx/ui_next/src/screens/NotificationTemplate/shared/CustomMessagesSubForm.jsx b/awx/ui_next/src/screens/NotificationTemplate/shared/CustomMessagesSubForm.jsx index 42fe7a65e2..89d92b8c06 100644 --- a/awx/ui_next/src/screens/NotificationTemplate/shared/CustomMessagesSubForm.jsx +++ b/awx/ui_next/src/screens/NotificationTemplate/shared/CustomMessagesSubForm.jsx @@ -96,7 +96,7 @@ function CustomMessagesSubForm({ defaultMessages, type, i18n }) { config )}/html/userguide/notifications.html#create-custom-notifications`} > - {i18n._(t`Ansible Tower Documentation.`)} + {i18n._(t`Documentation.`)} diff --git a/awx/ui_next/src/screens/NotificationTemplate/shared/TypeInputsSubForm.jsx b/awx/ui_next/src/screens/NotificationTemplate/shared/TypeInputsSubForm.jsx index 6d5851254b..0c29b52951 100644 --- a/awx/ui_next/src/screens/NotificationTemplate/shared/TypeInputsSubForm.jsx +++ b/awx/ui_next/src/screens/NotificationTemplate/shared/TypeInputsSubForm.jsx @@ -476,7 +476,7 @@ function WebhookFields({ i18n }) { label={i18n._(t`HTTP Headers`)} mode="javascript" tooltip={i18n._(t`Specify HTTP Headers in JSON format. Refer to - the Ansible Tower documentation for example syntax.`)} + the documentation for example syntax.`)} rows={5} /> diff --git a/awx/ui_next/src/screens/Project/shared/ProjectSubForms/GitSubForm.jsx b/awx/ui_next/src/screens/Project/shared/ProjectSubForms/GitSubForm.jsx index dc90e12df3..abd3508d71 100644 --- a/awx/ui_next/src/screens/Project/shared/ProjectSubForms/GitSubForm.jsx +++ b/awx/ui_next/src/screens/Project/shared/ProjectSubForms/GitSubForm.jsx @@ -88,7 +88,7 @@ const GitSubForm = ({ config )}/html/userguide/projects.html#manage-playbooks-using-source-control`} > - {i18n._(t`Ansible Tower Documentation.`)} + {i18n._(t`Documentation.`)} } diff --git a/awx/ui_next/src/screens/Setting/LDAP/LDAPDetail/LDAPDetail.test.jsx b/awx/ui_next/src/screens/Setting/LDAP/LDAPDetail/LDAPDetail.test.jsx index 8762dc25d4..b326e15204 100644 --- a/awx/ui_next/src/screens/Setting/LDAP/LDAPDetail/LDAPDetail.test.jsx +++ b/awx/ui_next/src/screens/Setting/LDAP/LDAPDetail/LDAPDetail.test.jsx @@ -83,7 +83,7 @@ describe('', () => { assertDetail( wrapper, 'LDAP Require Group', - 'CN=Tower Users,OU=Users,DC=example,DC=com' + 'CN=Service Users,OU=Users,DC=example,DC=com' ); assertDetail(wrapper, 'LDAP Deny Group', 'Not configured'); assertVariableDetail(wrapper, 'LDAP User Search', '[]'); diff --git a/awx/ui_next/src/screens/Setting/LDAP/LDAPEdit/LDAPEdit.test.jsx b/awx/ui_next/src/screens/Setting/LDAP/LDAPEdit/LDAPEdit.test.jsx index dd3e946e17..333cfb9bcc 100644 --- a/awx/ui_next/src/screens/Setting/LDAP/LDAPEdit/LDAPEdit.test.jsx +++ b/awx/ui_next/src/screens/Setting/LDAP/LDAPEdit/LDAPEdit.test.jsx @@ -169,7 +169,7 @@ describe('', () => { AUTH_LDAP_GROUP_TYPE: 'MemberDNGroupType', AUTH_LDAP_GROUP_TYPE_PARAMS: { name_attr: 'cn', member_attr: 'member' }, AUTH_LDAP_ORGANIZATION_MAP: {}, - AUTH_LDAP_REQUIRE_GROUP: 'CN=Tower Users,OU=Users,DC=example,DC=com', + AUTH_LDAP_REQUIRE_GROUP: 'CN=Service Users,OU=Users,DC=example,DC=com', AUTH_LDAP_SERVER_URI: 'ldap://mock.example.com', AUTH_LDAP_START_TLS: false, AUTH_LDAP_USER_ATTR_MAP: {}, diff --git a/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemDetail/MiscSystemDetail.test.jsx b/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemDetail/MiscSystemDetail.test.jsx index 4d7ba94af7..30a6bf90cc 100644 --- a/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemDetail/MiscSystemDetail.test.jsx +++ b/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemDetail/MiscSystemDetail.test.jsx @@ -94,7 +94,7 @@ describe('', () => { 'Automation Analytics upload URL', 'https://example.com' ); - assertDetail(wrapper, 'Base URL of the Tower host', 'https://towerhost'); + assertDetail(wrapper, 'Base URL of the service', 'https://awxhost'); assertDetail(wrapper, 'Enable HTTP Basic Auth', 'On'); assertDetail(wrapper, 'Gather data for Automation Analytics', 'Off'); assertDetail(wrapper, 'Idle Time Force Log Out', '30000000000 seconds'); diff --git a/awx/ui_next/src/screens/Setting/Subscription/SubscriptionEdit/AnalyticsStep.jsx b/awx/ui_next/src/screens/Setting/Subscription/SubscriptionEdit/AnalyticsStep.jsx index ca7f030184..5e529282eb 100644 --- a/awx/ui_next/src/screens/Setting/Subscription/SubscriptionEdit/AnalyticsStep.jsx +++ b/awx/ui_next/src/screens/Setting/Subscription/SubscriptionEdit/AnalyticsStep.jsx @@ -45,8 +45,8 @@ function AnalyticsStep({ i18n }) { User and Insights analytics

    - By default, Tower collects and transmits analytics data on Tower usage - to Red Hat. There are two categories of data collected by Tower. For + By default, we collect and transmit analytics data on the serice usage + to Red Hat. There are two categories of data collected by the service. For more information, see{' '}