فهرست منبع

Fixes #20056: Add rf_role to generate_schema.json (#20071)

m-hau 6 ماه پیش
والد
کامیت
34e4ccb212

+ 7 - 0
contrib/generated_schema.json

@@ -474,6 +474,13 @@
                         "passive-48v-2pair",
                         "passive-48v-4pair"
                     ]
+                },
+                "rf_role": {
+                    "type": "string",
+                    "enum": [
+                        "ap",
+                        "station"
+                    ]
                 }
             }
         },

+ 2 - 0
netbox/dcim/management/commands/buildschema.py

@@ -7,6 +7,7 @@ from jinja2 import FileSystemLoader, Environment
 
 from dcim.choices import *
 from netbox.choices import WeightUnitChoices
+from wireless.choices import WirelessRoleChoices
 
 TEMPLATE_FILENAME = 'devicetype_schema.jinja2'
 OUTPUT_FILENAME = 'contrib/generated_schema.json'
@@ -23,6 +24,7 @@ CHOICES_MAP = {
     'interface_type_choices': InterfaceTypeChoices,
     'interface_poe_mode_choices': InterfacePoEModeChoices,
     'interface_poe_type_choices': InterfacePoETypeChoices,
+    'interface_rf_role_choices': WirelessRoleChoices,
     'front_port_type_choices': PortTypeChoices,
     'rear_port_type_choices': PortTypeChoices,
 }

+ 4 - 0
netbox/templates/extras/schema/devicetype_schema.jinja2

@@ -70,6 +70,10 @@
         "poe_type": {
           "type": "string",
           "enum": {{ interface_poe_type_choices }}
+        },
+        "rf_role": {
+          "type": "string",
+          "enum": {{ interface_rf_role_choices }}
         }
       }
     },