From f8515857b289edc687f60cedecea4bbf58fad49c Mon Sep 17 00:00:00 2001
From: Bill Nottingham
Date: Wed, 5 Jul 2017 16:42:47 -0400
Subject: [PATCH] Remove assorted references to Tower.
Reword and remove references to Tower so they don't need parameterized.
---
awx/api/serializers.py | 4 ++--
awx/api/views.py | 16 ++++++++--------
awx/main/conf.py | 18 +++++++++---------
awx/main/management/commands/cleanup_facts.py | 2 +-
.../management/commands/inventory_import.py | 2 +-
awx/main/models/inventory.py | 2 +-
awx/main/models/schedules.py | 2 +-
awx/main/models/unified_jobs.py | 2 +-
awx/main/tasks.py | 6 +++---
awx/sso/conf.py | 2 +-
.../related/sources/sources.form.js | 4 ++--
.../src/setup-menu/setup-menu.partial.html | 2 +-
.../job_templates/job-template.form.js | 2 +-
awx/ui/client/src/templates/workflows.form.js | 2 +-
14 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/awx/api/serializers.py b/awx/api/serializers.py
index d3bf440976..54959f4f1a 100644
--- a/awx/api/serializers.py
+++ b/awx/api/serializers.py
@@ -1653,7 +1653,7 @@ class InventorySourceSerializer(UnifiedJobTemplateSerializer, InventorySourceOpt
raise serializers.ValidationError({"detail": _("Inventory controlled by project-following SCM.")})
elif source=='scm' and not overwrite_vars:
raise serializers.ValidationError({"detail": _(
- "SCM type sources must set `overwrite_vars` to `true` until a future Tower release.")})
+ "SCM type sources must set `overwrite_vars` to `true`.")})
return super(InventorySourceSerializer, self).validate(attrs)
@@ -1895,7 +1895,7 @@ class CredentialTypeSerializer(BaseSerializer):
def validate(self, attrs):
if self.instance and self.instance.managed_by_tower:
raise PermissionDenied(
- detail=_("Modifications not allowed for credential types managed by Tower")
+ detail=_("Modifications not allowed for managed credential types")
)
if self.instance and self.instance.credentials.exists():
if 'inputs' in attrs and attrs['inputs'] != self.instance.inputs:
diff --git a/awx/api/views.py b/awx/api/views.py
index 3b6d6ee08c..39f65b2758 100644
--- a/awx/api/views.py
+++ b/awx/api/views.py
@@ -213,7 +213,7 @@ class ApiV2RootView(ApiVersionRootView):
class ApiV1PingView(APIView):
- """A simple view that reports very basic information about this Tower
+ """A simple view that reports very basic information about this
instance, which is acceptable to be public information.
"""
permission_classes = (AllowAny,)
@@ -222,7 +222,7 @@ class ApiV1PingView(APIView):
new_in_210 = True
def get(self, request, format=None):
- """Return some basic information about this Tower instance.
+ """Return some basic information about this instance.
Everything returned here should be considered public / insecure, as
this requires no auth and is intended for use by the installer process.
@@ -320,7 +320,7 @@ class ApiV1ConfigView(APIView):
try:
data_actual = json.dumps(request.data)
except Exception:
- logger.info(smart_text(u"Invalid JSON submitted for Tower license."),
+ logger.info(smart_text(u"Invalid JSON submitted for license."),
extra=dict(actor=request.user.username))
return Response({"error": _("Invalid JSON")}, status=status.HTTP_400_BAD_REQUEST)
try:
@@ -328,7 +328,7 @@ class ApiV1ConfigView(APIView):
license_data = json.loads(data_actual)
license_data_validated = TaskEnhancer(**license_data).validate_enhancements()
except Exception:
- logger.warning(smart_text(u"Invalid Tower license submitted."),
+ logger.warning(smart_text(u"Invalid license submitted."),
extra=dict(actor=request.user.username))
return Response({"error": _("Invalid License")}, status=status.HTTP_400_BAD_REQUEST)
@@ -338,7 +338,7 @@ class ApiV1ConfigView(APIView):
settings.TOWER_URL_BASE = "{}://{}".format(request.scheme, request.get_host())
return Response(license_data_validated)
- logger.warning(smart_text(u"Invalid Tower license submitted."),
+ logger.warning(smart_text(u"Invalid license submitted."),
extra=dict(actor=request.user.username))
return Response({"error": _("Invalid license")}, status=status.HTTP_400_BAD_REQUEST)
@@ -813,7 +813,7 @@ class OrganizationList(OrganizationCountsMixin, ListCreateAPIView):
def create(self, request, *args, **kwargs):
"""Create a new organzation.
- If there is already an organization and the license of the Tower
+ If there is already an organization and the license of this
instance does not permit multiple organizations, then raise
LicenseForbids.
"""
@@ -822,7 +822,7 @@ class OrganizationList(OrganizationCountsMixin, ListCreateAPIView):
# if no organizations exist in the system.
if (not feature_enabled('multiple_organizations') and
self.model.objects.exists()):
- raise LicenseForbids(_('Your Tower license only permits a single '
+ raise LicenseForbids(_('Your license only permits a single '
'organization to exist.'))
# Okay, create the organization as usual.
@@ -1589,7 +1589,7 @@ class CredentialTypeDetail(RetrieveUpdateDestroyAPIView):
def destroy(self, request, *args, **kwargs):
instance = self.get_object()
if instance.managed_by_tower:
- raise PermissionDenied(detail=_("Deletion not allowed for credential types managed by Tower"))
+ raise PermissionDenied(detail=_("Deletion not allowed for managed credential types"))
if instance.credentials.exists():
raise PermissionDenied(detail=_("Credential types that are in use cannot be deleted"))
return super(CredentialTypeDetail, self).destroy(request, *args, **kwargs)
diff --git a/awx/main/conf.py b/awx/main/conf.py
index b5ea195c5b..438c100bef 100644
--- a/awx/main/conf.py
+++ b/awx/main/conf.py
@@ -18,7 +18,7 @@ register(
'ACTIVITY_STREAM_ENABLED',
field_class=fields.BooleanField,
label=_('Enable Activity Stream'),
- help_text=_('Enable capturing activity for the Tower activity stream.'),
+ help_text=_('Enable capturing activity for the activity stream.'),
category=_('System'),
category_slug='system',
feature_required='activity_streams',
@@ -28,7 +28,7 @@ register(
'ACTIVITY_STREAM_ENABLED_FOR_INVENTORY_SYNC',
field_class=fields.BooleanField,
label=_('Enable Activity Stream for Inventory Sync'),
- help_text=_('Enable capturing activity for the Tower activity stream when running inventory sync.'),
+ help_text=_('Enable capturing activity for the activity stream when running inventory sync.'),
category=_('System'),
category_slug='system',
feature_required='activity_streams',
@@ -46,8 +46,8 @@ register(
register(
'TOWER_ADMIN_ALERTS',
field_class=fields.BooleanField,
- label=_('Enable Tower Administrator Alerts'),
- help_text=_('Allow Tower to email Admin users for system events that may require attention.'),
+ label=_('Enable Administrator Alerts'),
+ help_text=_('Email Admin users for system events that may require attention.'),
category=_('System'),
category_slug='system',
)
@@ -99,9 +99,9 @@ register(
'LICENSE',
field_class=fields.DictField,
default=_load_default_license_from_file,
- label=_('Tower License'),
+ label=_('License'),
help_text=_('The license controls which features and functionality are '
- 'enabled in Tower. Use /api/v1/config/ to update or change '
+ 'enabled. Use /api/v1/config/ to update or change '
'the license.'),
category=_('System'),
category_slug='system',
@@ -121,7 +121,7 @@ register(
'AWX_PROOT_ENABLED',
field_class=fields.BooleanField,
label=_('Enable job isolation'),
- help_text=_('Isolates an Ansible job from protected parts of the Tower system to prevent exposing sensitive information.'),
+ help_text=_('Isolates an Ansible job from protected parts of the system to prevent exposing sensitive information.'),
category=_('Jobs'),
category_slug='jobs',
)
@@ -292,7 +292,7 @@ register(
min_value=0,
default=0,
label=_('Per-Host Ansible Fact Cache Timeout'),
- help_text=_('Maximum time, in seconds, that Tower stored Ansible facts are considered valid since '
+ help_text=_('Maximum time, in seconds, that stored Ansible facts are considered valid since '
'the last time they were modified. Only valid, non-stale, facts will be accessible by '
'a playbook. Note, this does not influence the deletion of ansible_facts from the database.'),
category=_('Jobs'),
@@ -359,7 +359,7 @@ register(
label=_('Loggers to send data to the log aggregator from'),
help_text=_('List of loggers that will send HTTP logs to the collector, these can '
'include any or all of: \n'
- 'awx - Tower service logs\n'
+ 'awx - service logs\n'
'activity_stream - activity stream records\n'
'job_events - callback data from Ansible job events\n'
'system_tracking - facts gathered from scan jobs.'),
diff --git a/awx/main/management/commands/cleanup_facts.py b/awx/main/management/commands/cleanup_facts.py
index f6b3c76b26..051763e8a2 100644
--- a/awx/main/management/commands/cleanup_facts.py
+++ b/awx/main/management/commands/cleanup_facts.py
@@ -130,7 +130,7 @@ class Command(BaseCommand):
@transaction.atomic
def handle(self, *args, **options):
if not feature_enabled('system_tracking'):
- raise CommandError("The System Tracking feature is not enabled for your Tower instance")
+ raise CommandError("The System Tracking feature is not enabled for your instance")
cleanup_facts = CleanupFacts()
if not all([options[GRANULARITY], options[OLDER_THAN]]):
raise CommandError('Both --granularity and --older_than are required.')
diff --git a/awx/main/management/commands/inventory_import.py b/awx/main/management/commands/inventory_import.py
index 7562b3a6dd..691fbaca78 100644
--- a/awx/main/management/commands/inventory_import.py
+++ b/awx/main/management/commands/inventory_import.py
@@ -848,7 +848,7 @@ class Command(NoArgsCommand):
license_info = TaskEnhancer().validate_enhancements()
if license_info.get('license_key', 'UNLICENSED') == 'UNLICENSED':
logger.error(LICENSE_NON_EXISTANT_MESSAGE)
- raise CommandError('No Tower license found!')
+ raise CommandError('No license found!')
available_instances = license_info.get('available_instances', 0)
free_instances = license_info.get('free_instances', 0)
time_remaining = license_info.get('time_remaining', 0)
diff --git a/awx/main/models/inventory.py b/awx/main/models/inventory.py
index 73fc884f83..192b22902f 100644
--- a/awx/main/models/inventory.py
+++ b/awx/main/models/inventory.py
@@ -829,7 +829,7 @@ class InventorySourceOptions(BaseModel):
SOURCE_CHOICES = [
('', _('Manual')),
('file', _('File, Directory or Script')),
- ('scm', _('Sourced from a project in Tower')),
+ ('scm', _('Sourced from a Project')),
('ec2', _('Amazon EC2')),
('gce', _('Google Compute Engine')),
('azure', _('Microsoft Azure Classic (deprecated)')),
diff --git a/awx/main/models/schedules.py b/awx/main/models/schedules.py
index ae0cc12987..4257862e57 100644
--- a/awx/main/models/schedules.py
+++ b/awx/main/models/schedules.py
@@ -66,7 +66,7 @@ class Schedule(CommonModel):
)
enabled = models.BooleanField(
default=True,
- help_text=_("Enables processing of this schedule by Tower.")
+ help_text=_("Enables processing of this schedule.")
)
dtstart = models.DateTimeField(
null=True,
diff --git a/awx/main/models/unified_jobs.py b/awx/main/models/unified_jobs.py
index b7b5ca8073..37a97ffa26 100644
--- a/awx/main/models/unified_jobs.py
+++ b/awx/main/models/unified_jobs.py
@@ -474,7 +474,7 @@ class UnifiedJob(PolymorphicModel, PasswordFieldsModel, CommonModelNameNotUnique
blank=True,
default='',
editable=False,
- help_text=_("The Tower node the job executed on."),
+ help_text=_("The node the job executed on."),
)
notifications = models.ManyToManyField(
'Notification',
diff --git a/awx/main/tasks.py b/awx/main/tasks.py
index 27d4865f08..ff32cfdb4e 100644
--- a/awx/main/tasks.py
+++ b/awx/main/tasks.py
@@ -67,7 +67,7 @@ HIDDEN_PASSWORD = '**********'
OPENSSH_KEY_ERROR = u'''\
It looks like you're trying to use a private key in OpenSSH format, which \
-isn't supported by the installed version of OpenSSH on this Tower instance. \
+isn't supported by the installed version of OpenSSH on this instance. \
Try upgrading OpenSSH or providing your private key in an different format. \
'''
@@ -79,7 +79,7 @@ def celery_startup(conf=None, **kwargs):
# Re-init all schedules
# NOTE: Rework this during the Rampart work
startup_logger = logging.getLogger('awx.main.tasks')
- startup_logger.info("Syncing Tower Schedules")
+ startup_logger.info("Syncing Schedules")
for sch in Schedule.objects.all():
try:
sch.update_computed_fields()
@@ -190,7 +190,7 @@ def cluster_node_heartbeat(self):
if other_inst.version == "":
continue
if Version(other_inst.version.split('-', 1)[0]) > Version(tower_application_version) and not settings.DEBUG:
- logger.error("Host {} reports Tower version {}, but this node {} is at {}, shutting down".format(other_inst.hostname,
+ logger.error("Host {} reports version {}, but this node {} is at {}, shutting down".format(other_inst.hostname,
other_inst.version,
inst.hostname,
inst.version))
diff --git a/awx/sso/conf.py b/awx/sso/conf.py
index f682f429b3..f717869e7e 100644
--- a/awx/sso/conf.py
+++ b/awx/sso/conf.py
@@ -270,7 +270,7 @@ register(
field_class=fields.LDAPSearchField,
default=[],
label=_('LDAP Group Search'),
- help_text=_('Users in Tower are mapped to organizations based on their '
+ help_text=_('Users are mapped to organizations based on their '
'membership in LDAP groups. This setting defines the LDAP search '
'query to find groups. Note that this, unlike the user search '
'above, does not support LDAPSearchUnion.'),
diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/sources/sources.form.js b/awx/ui/client/src/inventories-hosts/inventories/related/sources/sources.form.js
index 8296bda460..2275986f78 100644
--- a/awx/ui/client/src/inventories-hosts/inventories/related/sources/sources.form.js
+++ b/awx/ui/client/src/inventories-hosts/inventories/related/sources/sources.form.js
@@ -126,7 +126,7 @@ return {
dataTitle: 'Source Regions',
dataPlacement: 'right',
awPopOver: "Click on the regions field to see a list of regions for your cloud provider. You can select multiple regions, " +
- "or choose All to include all regions. Tower will only be updated with Hosts associated with the selected regions." +
+ "or choose All to include all regions. Only Hosts associated with the selected regions will be updated." +
"
",
dataContainer: 'body',
ngDisabled: '!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd)'
@@ -138,7 +138,7 @@ return {
dataTitle: 'Instance Filters',
dataPlacement: 'right',
awPopOver: "Provide a comma-separated list of filter expressions. " +
- "Hosts are imported to Tower when ANY of the filters match.
" +
+ "Hosts are imported when ANY of the filters match.
" +
"Limit to hosts having a tag:
\n" +
"tag-key=TowerManaged
\n" +
"Limit to hosts using either key pair:
\n" +
diff --git a/awx/ui/client/src/setup-menu/setup-menu.partial.html b/awx/ui/client/src/setup-menu/setup-menu.partial.html
index b8fd513f25..65c2f5aad6 100644
--- a/awx/ui/client/src/setup-menu/setup-menu.partial.html
+++ b/awx/ui/client/src/setup-menu/setup-menu.partial.html
@@ -21,7 +21,7 @@
Credentials
- Add passwords, SSH keys, etc. for Tower to use when launching jobs against machines, or when syncing inventories or projects.
+ Add passwords, SSH keys, and other credentials to use when launching jobs against machines, or when syncing inventories or projects.
diff --git a/awx/ui/client/src/templates/job_templates/job-template.form.js b/awx/ui/client/src/templates/job_templates/job-template.form.js
index 5c67e9f217..b2b74be93b 100644
--- a/awx/ui/client/src/templates/job_templates/job-template.form.js
+++ b/awx/ui/client/src/templates/job_templates/job-template.form.js
@@ -338,7 +338,7 @@ function(NotificationsList, CompletedJobsList, i18n) {
multiSelect: true,
dataTitle: i18n._('Labels'),
dataPlacement: 'right',
- awPopOver: "" + i18n._("Optional labels that describe this job template, such as 'dev' or 'test'. Labels can be used to group and filter job templates and completed jobs in the Tower display.") + "
",
+ awPopOver: "" + i18n._("Optional labels that describe this job template, such as 'dev' or 'test'. Labels can be used to group and filter job templates and completed jobs.") + "
",
dataContainer: 'body',
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate)'
},
diff --git a/awx/ui/client/src/templates/workflows.form.js b/awx/ui/client/src/templates/workflows.form.js
index 5a709e1067..07b470b9c3 100644
--- a/awx/ui/client/src/templates/workflows.form.js
+++ b/awx/ui/client/src/templates/workflows.form.js
@@ -63,7 +63,7 @@ export default ['NotificationsList', 'i18n', function(NotificationsList, i18n) {
multiSelect: true,
dataTitle: i18n._('Labels'),
dataPlacement: 'right',
- awPopOver: "" + i18n._("Optional labels that describe this job template, such as 'dev' or 'test'. Labels can be used to group and filter job templates and completed jobs in the Tower display.") + "
",
+ awPopOver: "" + i18n._("Optional labels that describe this job template, such as 'dev' or 'test'. Labels can be used to group and filter job templates and completed jobs.") + "
",
dataContainer: 'body',
ngDisabled: '!(workflow_job_template_obj.summary_fields.user_capabilities.edit || canAddWorkflowJobTemplate)'
},