mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 23:17:32 -02:30
add a new field to the instance model for use with receptor changes (incoming)
This commit is contained in:
@@ -4799,6 +4799,7 @@ class InstanceSerializer(BaseSerializer):
|
||||
"mem_capacity",
|
||||
"enabled",
|
||||
"managed_by_policy",
|
||||
"node_type",
|
||||
)
|
||||
|
||||
def get_related(self, obj):
|
||||
|
||||
22
awx/main/migrations/0152_instance_node_type.py
Normal file
22
awx/main/migrations/0152_instance_node_type.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# Generated by Django 2.2.20 on 2021-07-26 19:42
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('main', '0151_rename_managed_by_tower'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='instance',
|
||||
name='node_type',
|
||||
field=models.CharField(
|
||||
choices=[('control', 'Control plane node'), ('execution', 'Execution plane node'), ('hybrid', 'Controller and execution')],
|
||||
default='hybrid',
|
||||
max_length=16,
|
||||
),
|
||||
),
|
||||
]
|
||||
@@ -86,6 +86,8 @@ class Instance(HasPolicyEditsMixin, BaseModel):
|
||||
default=0,
|
||||
editable=False,
|
||||
)
|
||||
NODE_TYPE_CHOICES = [("control", "Control plane node"), ("execution", "Execution plane node"), ("hybrid", "Controller and execution")]
|
||||
node_type = models.CharField(default='hybrid', choices=NODE_TYPE_CHOICES, max_length=16)
|
||||
|
||||
class Meta:
|
||||
app_label = 'main'
|
||||
|
||||
Reference in New Issue
Block a user