Пример #1
0
 def openapi_field(self) -> gui_fields.Field:
     return fields.List(
         fields.String(validate=fields.ValidateAnyOfValidators([
             fields.ValidateIPv4(),
             gui_fields.ValidateHostName(),
         ])),
         description="A list of IPv4 addresses.",
     )
Пример #2
0
 def openapi_field(self) -> gui_fields.Field:
     return fields.String(
         description="An IPv4 address.",
         validate=fields.ValidateAnyOfValidators([
             fields.ValidateIPv4(),
             gui_fields.ValidateHostName(),
         ]),
     )
Пример #3
0
 def openapi_field(self) -> gui_fields.Field:
     return fields.String(
         description=
         "Address (IPv4 or IPv6) under which the management board can be reached.",
         validate=fields.ValidateAnyOfValidators([
             fields.ValidateIPv4(),
             fields.ValidateIPv6(),
         ]),
     )