mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
Add API validation when creating ReceptorAddress
- websocket_path can only be set if protocol is ws - is_internal must be False - only 1 address per instance can have peers_from_control_nodes set to True Signed-off-by: Seth Foster <fosterbseth@gmail.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# Generated by Django 4.2.6 on 2023-11-02 18:07
|
||||
# Generated by Django 4.2.6 on 2023-11-09 19:11
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
@@ -15,7 +16,12 @@ class Migration(migrations.Migration):
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('address', models.CharField(max_length=255)),
|
||||
('port', models.IntegerField(default=27199)),
|
||||
(
|
||||
'port',
|
||||
models.IntegerField(
|
||||
default=27199, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(65535)]
|
||||
),
|
||||
),
|
||||
('protocol', models.CharField(default='tcp', max_length=10)),
|
||||
('websocket_path', models.CharField(blank=True, default='', max_length=255)),
|
||||
('is_internal', models.BooleanField(default=False)),
|
||||
|
||||
Reference in New Issue
Block a user