From bf5657a06aef7e1affa591982b1f7aa9dead98e8 Mon Sep 17 00:00:00 2001 From: Bianca Date: Tue, 13 Nov 2018 14:33:32 -0500 Subject: [PATCH 1/2] Update register_queue.py file to enable registration of instance groups with unicode --- awx/main/management/commands/register_queue.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/awx/main/management/commands/register_queue.py b/awx/main/management/commands/register_queue.py index 6a99d11849..e65b5af63e 100644 --- a/awx/main/management/commands/register_queue.py +++ b/awx/main/management/commands/register_queue.py @@ -104,7 +104,7 @@ class Command(BaseCommand): changed3 = False (ig, created, changed1) = self.get_create_update_instance_group(queuename, inst_per, inst_min) if created: - print(six.text_type("Creating instance group {}".format(ig.name))) + print(six.text_type("Creating instance group {}").format(ig.name)) elif not created: print(six.text_type("Instance Group already registered {}").format(ig.name)) @@ -126,4 +126,3 @@ class Command(BaseCommand): if instance_not_found_err: print(instance_not_found_err.message) sys.exit(1) - From f1e3be5ec8494842233b9bac6d14b24adf8f440e Mon Sep 17 00:00:00 2001 From: Bianca Date: Wed, 14 Nov 2018 17:40:25 -0500 Subject: [PATCH 2/2] Removing unicode fix-related lines in ha.py --- awx/main/models/ha.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/awx/main/models/ha.py b/awx/main/models/ha.py index d5e718fc4c..0a0f4e2599 100644 --- a/awx/main/models/ha.py +++ b/awx/main/models/ha.py @@ -152,10 +152,6 @@ class Instance(HasPolicyEditsMixin, BaseModel): self.save(update_fields=['capacity', 'version', 'modified', 'cpu', 'memory', 'cpu_capacity', 'mem_capacity']) - def clean_hostname(self): - return self.hostname - - class InstanceGroup(HasPolicyEditsMixin, BaseModel, RelatedJobsMixin): """A model representing a Queue/Group of AWX Instances.""" @@ -222,8 +218,6 @@ class InstanceGroup(HasPolicyEditsMixin, BaseModel, RelatedJobsMixin): class Meta: app_label = 'main' - def clean_name(self): - return self.name def fit_task_to_most_remaining_capacity_instance(self, task): instance_most_capacity = None