mirror of
https://github.com/ansible/awx.git
synced 2026-02-15 10:10:01 -03:30
Update awx_collection to support ReceptorAddress
- Add receptor_address module which allows users to create addresses for instances - Update awx_collection functional and integration tests to support new peering design Signed-off-by: Seth Foster <fosterbseth@gmail.com>
This commit is contained in:
@@ -397,7 +397,7 @@ class InstanceReceptorAddressesList(ListCreateAPIView):
|
||||
return super().post(request, *args, **kwargs)
|
||||
|
||||
|
||||
class ReceptorAddressesList(ListAPIView):
|
||||
class ReceptorAddressesList(ListCreateAPIView):
|
||||
name = _("Receptor Addresses")
|
||||
model = models.ReceptorAddress
|
||||
serializer_class = serializers.ReceptorAddressSerializer
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Generated by Django 4.2.6 on 2023-11-13 16:10
|
||||
# Generated by Django 4.2.6 on 2023-11-15 17:32
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
@@ -29,7 +29,7 @@ class Migration(migrations.Migration):
|
||||
models.CharField(
|
||||
choices=[('tcp', 'TCP'), ('ws', 'WS'), ('wss', 'WSS')],
|
||||
default='tcp',
|
||||
help_text="Protocol to use when connecting, 'tcp' or 'ws'.",
|
||||
help_text="Protocol to use when connecting, 'tcp', 'wss', or 'ws'.",
|
||||
max_length=10,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -19,13 +19,15 @@ class ReceptorAddress(models.Model):
|
||||
]
|
||||
|
||||
class Protocols(models.TextChoices):
|
||||
TCP = 'tcp', _('TCP')
|
||||
WS = 'ws', _('WS')
|
||||
WSS = 'wss', _('WSS')
|
||||
TCP = 'tcp', 'TCP'
|
||||
WS = 'ws', 'WS'
|
||||
WSS = 'wss', 'WSS'
|
||||
|
||||
address = models.CharField(help_text=_("Routable address for this instance."), max_length=255)
|
||||
port = models.IntegerField(help_text=_("Port for the address."), default=27199, validators=[MinValueValidator(0), MaxValueValidator(65535)])
|
||||
protocol = models.CharField(help_text=_("Protocol to use when connecting, 'tcp' or 'ws'."), max_length=10, default=Protocols.TCP, choices=Protocols.choices)
|
||||
protocol = models.CharField(
|
||||
help_text=_("Protocol to use when connecting, 'tcp', 'wss', or 'ws'."), max_length=10, default=Protocols.TCP, choices=Protocols.choices
|
||||
)
|
||||
websocket_path = models.CharField(help_text=_("Websocket path."), max_length=255, default="", blank=True)
|
||||
is_internal = models.BooleanField(help_text=_("If True, only routable inside of the Kubernetes cluster."), default=False)
|
||||
peers_from_control_nodes = models.BooleanField(help_text=_("If True, control plane cluster nodes should automatically peer to it."), default=False)
|
||||
|
||||
Reference in New Issue
Block a user