Skip to content

Commit c8cf28f

Browse files
committed
Assorted renaming and string changes
1 parent e0d6b13 commit c8cf28f

File tree

97 files changed

+731
-708
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+731
-708
lines changed

API_STANDARDS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Coding Standards and Practices
22
==============================
33

4-
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.
4+
This is not meant to be a style document so much as a practices document for ensuring performance and convention in the AWX API.
55

66
Paginate Everything
77
===================

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<img src="https://raw.githubusercontent.com/ansible/awx-logos/master/awx/ui/client/assets/logo-login.svg?sanitize=true" width=200 alt="AWX" />
55

6-
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.
6+
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).
77

88
To install AWX, please view the [Install guide](./INSTALL.md).
99

awx/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def oauth2_getattribute(self, attr):
8585
# setting lookups for references to model classes (e.g.,
8686
# oauth2_settings.REFRESH_TOKEN_MODEL)
8787
# If we're doing an OAuth2 setting lookup *while running* a migration,
88-
# don't do our usual "Configure Tower in Tower" database setting lookup
88+
# don't do our usual database settings lookup
8989
val = settings.OAUTH2_PROVIDER.get(attr)
9090
if val is None:
9191
val = object.__getattribute__(self, attr)

awx/api/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
required=False,
7878
default='',
7979
label=_('Login redirect override URL'),
80-
help_text=_('URL to which unauthorized users will be redirected to log in. If blank, users will be sent to the Tower login page.'),
80+
help_text=_('URL to which unauthorized users will be redirected to log in. If blank, users will be sent to the login page.'),
8181
category=_('Authentication'),
8282
category_slug='authentication',
8383
)

awx/api/swagger.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class SwaggerSchemaView(APIView):
6262
renderer_classes = [CoreJSONRenderer, renderers.OpenAPIRenderer, renderers.SwaggerUIRenderer]
6363

6464
def get(self, request):
65-
generator = SuperUserSchemaGenerator(title='Ansible Tower API', patterns=None, urlconf=None)
65+
generator = SuperUserSchemaGenerator(title='Ansible Automation Platform controller API', patterns=None, urlconf=None)
6666
schema = generator.get_schema(request=request)
6767
# python core-api doesn't support the deprecation yet, so track it
6868
# ourselves and return it in a response header

awx/api/views/__init__.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -4250,13 +4250,13 @@ class NotificationTemplateTest(GenericAPIView):
42504250

42514251
def post(self, request, *args, **kwargs):
42524252
obj = self.get_object()
4253-
msg = "Tower Notification Test {} {}".format(obj.id, settings.TOWER_URL_BASE)
4253+
msg = "Notification Test {} {}".format(obj.id, settings.TOWER_URL_BASE)
42544254
if obj.notification_type in ('email', 'pagerduty'):
4255-
body = "Ansible Tower Test Notification {} {}".format(obj.id, settings.TOWER_URL_BASE)
4255+
body = "Test Notification {} {}".format(obj.id, settings.TOWER_URL_BASE)
42564256
elif obj.notification_type in ('webhook', 'grafana'):
4257-
body = '{{"body": "Ansible Tower Test Notification {} {}"}}'.format(obj.id, settings.TOWER_URL_BASE)
4257+
body = '{{"body": "Test Notification {} {}"}}'.format(obj.id, settings.TOWER_URL_BASE)
42584258
else:
4259-
body = {"body": "Ansible Tower Test Notification {} {}".format(obj.id, settings.TOWER_URL_BASE)}
4259+
body = {"body": "Test Notification {} {}".format(obj.id, settings.TOWER_URL_BASE)}
42604260
notification = obj.generate_notification(msg, body)
42614261

42624262
if not notification:

awx/asgi.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
except FileNotFoundError:
3131
pass
3232
except ValueError as e:
33-
logger.error("Missing or incorrect metadata for Tower version. Ensure Tower was installed using the setup playbook.")
34-
raise Exception("Missing or incorrect metadata for Tower version. Ensure Tower was installed using the setup playbook.") from e
33+
logger.error("Missing or incorrect metadata for controller version. Ensure controller was installed using the setup playbook.")
34+
raise Exception("Missing or incorrect metadata for controller version. Ensure controller was installed using the setup playbook.") from e
3535

3636

3737
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "awx.settings")

awx/conf/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Django
55
from django.utils.module_loading import autodiscover_modules
66

7-
# Tower
7+
# AWX
88
from .registry import settings_registry
99

1010
default_app_config = 'awx.conf.apps.ConfConfig'

awx/conf/access.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Django
55
from django.db.models import Q
66

7-
# Tower
7+
# AWX
88
from awx.main.access import BaseAccess, register_access
99
from awx.conf.models import Setting
1010

awx/conf/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from django.conf import settings
33
from django.utils.translation import ugettext_lazy as _
44

5-
# Tower
5+
# AWX
66
from awx.conf import fields, register
77
from awx.conf import settings_registry
88

awx/conf/license.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ def _get_validated_license_data():
1111

1212

1313
def get_license():
14-
"""Return a dictionary representing the active license on this Tower instance."""
14+
"""Return a dictionary representing the active license on this instance."""
1515
return _get_validated_license_data()

awx/conf/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Django
88
from django.db import models
99

10-
# Tower
10+
# AWX
1111
from awx.main.models.base import CreatedModifiedModel, prevent_search
1212
from awx.main.fields import JSONField
1313
from awx.main.utils import encrypt_field

awx/conf/serializers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Django REST Framework
22
from rest_framework import serializers
33

4-
# Tower
4+
# AWX
55
from awx.api.fields import VerbatimField
66
from awx.api.serializers import BaseSerializer
77
from awx.conf.models import Setting

awx/conf/settings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
import cachetools
2222

23-
# Tower
23+
# AWX
2424
from awx.main.utils import encrypt_field, decrypt_field
2525
from awx.conf import settings_registry
2626
from awx.conf.models import Setting

awx/conf/signals.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from django.core.cache import cache
99
from django.dispatch import receiver
1010

11-
# Tower
11+
# AWX
1212
from awx.conf import settings_registry
1313
from awx.conf.models import Setting
1414

awx/conf/views.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from rest_framework import serializers
2222
from rest_framework import status
2323

24-
# Tower
24+
# AWX
2525
from awx.api.generics import APIView, GenericAPIView, ListAPIView, RetrieveUpdateDestroyAPIView
2626
from awx.api.permissions import IsSuperUser
2727
from awx.api.versioning import reverse

awx/main/analytics/metrics.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ def metrics():
4040
registry=REGISTRY,
4141
)
4242
CUSTOM_VENVS = Gauge('awx_custom_virtualenvs_total', 'Number of virtualenvs', registry=REGISTRY)
43-
RUNNING_JOBS = Gauge('awx_running_jobs_total', 'Number of running jobs on the Tower system', registry=REGISTRY)
44-
PENDING_JOBS = Gauge('awx_pending_jobs_total', 'Number of pending jobs on the Tower system', registry=REGISTRY)
43+
RUNNING_JOBS = Gauge('awx_running_jobs_total', 'Number of running jobs on the system', registry=REGISTRY)
44+
PENDING_JOBS = Gauge('awx_pending_jobs_total', 'Number of pending jobs on the system', registry=REGISTRY)
4545
STATUS = Gauge(
4646
'awx_status_total',
4747
'Status of Job launched',
@@ -53,7 +53,7 @@ def metrics():
5353

5454
INSTANCE_CAPACITY = Gauge(
5555
'awx_instance_capacity',
56-
'Capacity of each node in a Tower system',
56+
'Capacity of each node in the system',
5757
[
5858
'hostname',
5959
'instance_uuid',
@@ -62,7 +62,7 @@ def metrics():
6262
)
6363
INSTANCE_CPU = Gauge(
6464
'awx_instance_cpu',
65-
'CPU cores on each node in a Tower system',
65+
'CPU cores on each node in the system',
6666
[
6767
'hostname',
6868
'instance_uuid',
@@ -71,7 +71,7 @@ def metrics():
7171
)
7272
INSTANCE_MEMORY = Gauge(
7373
'awx_instance_memory',
74-
'RAM (Kb) on each node in a Tower system',
74+
'RAM (Kb) on each node in the system',
7575
[
7676
'hostname',
7777
'instance_uuid',
@@ -80,7 +80,7 @@ def metrics():
8080
)
8181
INSTANCE_INFO = Info(
8282
'awx_instance',
83-
'Info about each node in a Tower system',
83+
'Info about each node in the system',
8484
[
8585
'hostname',
8686
'instance_uuid',
@@ -107,7 +107,7 @@ def metrics():
107107
)
108108
INSTANCE_CONSUMED_CAPACITY = Gauge(
109109
'awx_instance_consumed_capacity',
110-
'Consumed capacity of each node in a Tower system',
110+
'Consumed capacity of each node in the system',
111111
[
112112
'hostname',
113113
'instance_uuid',
@@ -116,7 +116,7 @@ def metrics():
116116
)
117117
INSTANCE_REMAINING_CAPACITY = Gauge(
118118
'awx_instance_remaining_capacity',
119-
'Remaining capacity of each node in a Tower system',
119+
'Remaining capacity of each node in the system',
120120
[
121121
'hostname',
122122
'instance_uuid',

awx/main/conf.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Django REST Framework
88
from rest_framework import serializers
99

10-
# Tower
10+
# AWX
1111
from awx.conf import fields, register, register_validate
1212
from awx.main.models import ExecutionEnvironment
1313

@@ -58,8 +58,8 @@
5858
field_class=fields.URLField,
5959
schemes=('http', 'https'),
6060
allow_plain_hostname=True, # Allow hostname only without TLD.
61-
label=_('Base URL of the Tower host'),
62-
help_text=_('This setting is used by services like notifications to render ' 'a valid url to the Tower host.'),
61+
label=_('Base URL of the service'),
62+
help_text=_('This setting is used by services like notifications to render ' 'a valid url to the service.'),
6363
category=_('System'),
6464
category_slug='system',
6565
)
@@ -84,8 +84,8 @@
8484
field_class=fields.StringListField,
8585
label=_('Proxy IP Allowed List'),
8686
help_text=_(
87-
"If Tower is behind a reverse proxy/load balancer, use this setting "
88-
"to configure the proxy IP addresses from which Tower should trust "
87+
"If the service is behind a reverse proxy/load balancer, use this setting "
88+
"to configure the proxy IP addresses from which the service should trust "
8989
"custom REMOTE_HOST_HEADERS header values. "
9090
"If this setting is an empty list (the default), the headers specified by "
9191
"REMOTE_HOST_HEADERS will be trusted unconditionally')"
@@ -172,7 +172,7 @@
172172
register(
173173
'INSTALL_UUID',
174174
field_class=fields.CharField,
175-
label=_('Unique identifier for an AWX/Tower installation'),
175+
label=_('Unique identifier for an installation'),
176176
category=_('System'),
177177
category_slug='system',
178178
read_only=True,
@@ -223,7 +223,7 @@
223223
help_text=_(
224224
'Ansible allows variable substitution via the Jinja2 templating '
225225
'language for --extra-vars. This poses a potential security '
226-
'risk where Tower users with the ability to specify extra vars at job '
226+
'risk where users with the ability to specify extra vars at job '
227227
'launch time can use Jinja2 templates to run arbitrary Python. It is '
228228
'recommended that this value be set to "template" or "never".'
229229
),
@@ -235,7 +235,7 @@
235235
'AWX_ISOLATION_BASE_PATH',
236236
field_class=fields.CharField,
237237
label=_('Job execution path'),
238-
help_text=_('The directory in which Tower will create new temporary directories for job execution and isolation (such as credential files).'),
238+
help_text=_('The directory in which the service will create new temporary directories for job execution and isolation (such as credential files).'),
239239
category=_('Jobs'),
240240
category_slug='jobs',
241241
)
@@ -266,7 +266,7 @@
266266
field_class=fields.BooleanField,
267267
default=False,
268268
label=_('Gather data for Automation Analytics'),
269-
help_text=_('Enables Tower to gather data on automation and send it to Red Hat.'),
269+
help_text=_('Enables the service to gather data on automation and send it to Red Hat Insights.'),
270270
category=_('System'),
271271
category_slug='system',
272272
)
@@ -537,8 +537,8 @@
537537
field_class=fields.CharField,
538538
allow_blank=True,
539539
default='',
540-
label=_('Cluster-wide Tower unique identifier.'),
541-
help_text=_('Useful to uniquely identify Tower instances.'),
540+
label=_('Cluster-wide unique identifier.'),
541+
help_text=_('Useful to uniquely identify instances.'),
542542
category=_('Logging'),
543543
category_slug='logging',
544544
)
@@ -573,7 +573,7 @@
573573
label=_('Enable/disable HTTPS certificate verification'),
574574
help_text=_(
575575
'Flag to control enable/disable of certificate verification'
576-
' when LOG_AGGREGATOR_PROTOCOL is "https". If enabled, Tower\'s'
576+
' when LOG_AGGREGATOR_PROTOCOL is "https". If enabled, the'
577577
' log handler will verify certificate sent by external log aggregator'
578578
' before establishing connection.'
579579
),

awx/main/dispatch/reaper.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def reap_job(j, status):
1818
j.start_args = '' # blank field to remove encrypted passwords
1919
j.job_explanation += ' '.join(
2020
(
21-
'Task was marked as running in Tower but was not present in',
21+
'Task was marked as running but was not present in',
2222
'the job queue, so it has been marked as failed.',
2323
)
2424
)
@@ -37,7 +37,7 @@ def reap(instance=None, status='failed', excluded_uuids=[]):
3737
if me is None:
3838
(changed, me) = Instance.objects.get_or_register()
3939
if changed:
40-
logger.info("Registered tower node '{}'".format(me.hostname))
40+
logger.info("Registered node '{}'".format(me.hostname))
4141
now = tz_now()
4242
workflow_ctype_id = ContentType.objects.get_for_model(WorkflowJob).id
4343
jobs = UnifiedJob.objects.filter(

awx/main/management/commands/deprovision_instance.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class Command(BaseCommand):
1212
"""
13-
Deprovision a Tower cluster node
13+
Deprovision a cluster node
1414
"""
1515

1616
help = 'Remove instance from the database. ' 'Specify `--hostname` to use this command.'

awx/main/management/commands/regenerate_secret_key.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616

1717
class Command(BaseCommand):
1818
"""
19-
Regenerate a new SECRET_KEY value and re-encrypt every secret in the
20-
Tower database.
19+
Regenerate a new SECRET_KEY value and re-encrypt every secret in the database.
2120
"""
2221

2322
@transaction.atomic

0 commit comments

Comments
 (0)