net/frr: Improve visibility in ModelRelationFields and enable internalModelUseSafeDelete

This commit is contained in:
Monviech 2026-05-22 10:46:30 +02:00
parent 6a8edb972b
commit c6024d089c
5 changed files with 65 additions and 64 deletions

View file

@ -36,6 +36,7 @@ class BgpController extends ApiMutableModelControllerBase
{
protected static $internalModelName = 'bgp';
protected static $internalModelClass = '\OPNsense\Quagga\BGP';
protected static $internalModelUseSafeDelete = true;
public function searchNeighborAction()
{

View file

@ -280,31 +280,31 @@
<id>neighbor.linkedPrefixlistIn</id>
<label>Prefix-List In</label>
<type>dropdown</type>
<help>Prefix list to filter inbound prefixes from this neighbor.</help>
<help>Prefix list to filter inbound prefixes from this neighbor. If multiple items with the same name exist, choosing one of them will apply all items with the same name.</help>
</field>
<field>
<id>neighbor.linkedPrefixlistOut</id>
<label>Prefix-List Out</label>
<type>dropdown</type>
<help>Prefix list to filter outbound prefixes sent to this neighbor.</help>
<help>Prefix list to filter outbound prefixes sent to this neighbor. If multiple items with the same name exist, choosing one of them will apply all items with the same name.</help>
</field>
<field>
<id>neighbor.linkedRoutemapIn</id>
<label>Route-Map In</label>
<type>dropdown</type>
<help>Route-map to apply to routes received from this neighbor.</help>
<help>Route-map to apply to routes received from this neighbor. If multiple items with the same name exist, choosing one of them will apply all items with the same name.</help>
</field>
<field>
<id>neighbor.linkedRoutemapOut</id>
<label>Route-Map Out</label>
<type>dropdown</type>
<help>Route-map to apply to routes advertised to this neighbor.</help>
<help>Route-map to apply to routes advertised to this neighbor. If multiple items with the same name exist, choosing one of them will apply all items with the same name.</help>
</field>
<field>
<id>neighbor.peergroup</id>
<label>Peer Group</label>
<type>dropdown</type>
<help>Groups neighbors with similar configurations to simplify management.</help>
<help>Groups neighbors with similar configurations to simplify management. If multiple items with the same name exist, choosing one of them will apply all items with the same name.</help>
<grid_view>
<visible>false</visible>
</grid_view>

View file

@ -81,24 +81,24 @@
<id>peergroup.linkedPrefixlistIn</id>
<label>Prefix-List In</label>
<type>dropdown</type>
<help>Prefix list to filter inbound prefixes from this neighbor.</help>
<help>Prefix list to filter inbound prefixes from this neighbor. If multiple items with the same name exist, choosing one of them will apply all items with the same name.</help>
</field>
<field>
<id>peergroup.linkedPrefixlistOut</id>
<label>Prefix-List Out</label>
<type>dropdown</type>
<help>Prefix list to filter outbound prefixes sent to this neighbor.</help>
<help>Prefix list to filter outbound prefixes sent to this neighbor. If multiple items with the same name exist, choosing one of them will apply all items with the same name.</help>
</field>
<field>
<id>peergroup.linkedRoutemapIn</id>
<label>Route-Map In</label>
<type>dropdown</type>
<help>Route-map to apply to routes received from this neighbor.</help>
<help>Route-map to apply to routes received from this neighbor. If multiple items with the same name exist, choosing one of them will apply all items with the same name.</help>
</field>
<field>
<id>peergroup.linkedRoutemapOut</id>
<label>Route-Map Out</label>
<type>dropdown</type>
<help>Route-map to apply to routes advertised to this neighbor.</help>
<help>Route-map to apply to routes advertised to this neighbor. If multiple items with the same name exist, choosing one of them will apply all items with the same name.</help>
</field>
</form>

View file

@ -37,25 +37,22 @@
<id>routemap.match</id>
<label>AS-Path List</label>
<type>select_multiple</type>
<style>tokenize</style>
<allownew>true</allownew>
<help>Select the AS-Path List. If multiples with the same name exist, selecting one is enough.</help>
<help>Select the AS-Path List. If multiple items with the same name exist, choosing one of them will apply all items with the same name.</help>
</field>
<field>
<id>routemap.match2</id>
<label>Prefix List</label>
<type>select_multiple</type>
<style>tokenize</style>
<allownew>true</allownew>
<help>Select the Prefix List. If multiples with the same name exist, selecting one is enough.</help>
<help>Select the Prefix List. If multiple items with the same name exist, choosing one of them will apply all items with the same name.</help>
</field>
<field>
<id>routemap.match3</id>
<label>Community List</label>
<type>select_multiple</type>
<style>tokenize</style>
<allownew>true</allownew>
<help>Select the Community List. If multiples with the same name exist, selecting one is enough.</help>
<help>Select the Community List. If multiple items with the same name exist, choosing one of them will apply all items with the same name.</help>
</field>
<field>
<id>routemap.set</id>

View file

@ -164,56 +164,56 @@
</capabilities>
<linkedPrefixlistIn type="ModelRelationField">
<Model>
<template>
<prefixlists>
<source>OPNsense.quagga.bgp</source>
<items>prefixlists.prefixlist</items>
<display>name</display>
<group>name</group>
</template>
<display>name,seqnumber</display>
<display_format>%s:%s</display_format>
</prefixlists>
</Model>
<ValidationMessage>Related Prefix-List item not found.</ValidationMessage>
</linkedPrefixlistIn>
<linkedPrefixlistOut type="ModelRelationField">
<Model>
<template>
<prefixlists>
<source>OPNsense.quagga.bgp</source>
<items>prefixlists.prefixlist</items>
<display>name</display>
<group>name</group>
</template>
<display>name,seqnumber</display>
<display_format>%s:%s</display_format>
</prefixlists>
</Model>
<ValidationMessage>Related Prefix-List item not found.</ValidationMessage>
</linkedPrefixlistOut>
<linkedRoutemapIn type="ModelRelationField">
<Model>
<template>
<routemaps>
<source>OPNsense.quagga.bgp</source>
<items>routemaps.routemap</items>
<display>name</display>
<group>name</group>
</template>
<display>name,id</display>
<display_format>%s:%s</display_format>
</routemaps>
</Model>
<ValidationMessage>Related Route-Map item not found.</ValidationMessage>
</linkedRoutemapIn>
<linkedRoutemapOut type="ModelRelationField">
<Model>
<template>
<routemaps>
<source>OPNsense.quagga.bgp</source>
<items>routemaps.routemap</items>
<display>name</display>
<group>name</group>
</template>
<display>name,id</display>
<display_format>%s:%s</display_format>
</routemaps>
</Model>
<ValidationMessage>Related Route-Map item not found.</ValidationMessage>
</linkedRoutemapOut>
<peergroup type="ModelRelationField">
<Model>
<template>
<peergroups>
<source>OPNsense.quagga.bgp</source>
<items>peergroups.peergroup</items>
<display>name</display>
<group>name</group>
</template>
<display>name,description</display>
<display_format>%s %s</display_format>
</peergroups>
</Model>
<ValidationMessage>Related Peer Group item not found.</ValidationMessage>
</peergroup>
@ -336,33 +336,36 @@
</id>
<match type="ModelRelationField">
<Model>
<template>
<aspaths>
<source>OPNsense.quagga.bgp</source>
<items>aspaths.aspath</items>
<display>number</display>
</template>
<display>name,description</display>
<display_format>%s %s</display_format>
</aspaths>
</Model>
<ValidationMessage>Related item not found.</ValidationMessage>
<Multiple>Y</Multiple>
</match>
<match2 type="ModelRelationField">
<Model>
<template>
<prefixlists>
<source>OPNsense.quagga.bgp</source>
<items>prefixlists.prefixlist</items>
<display>name</display>
</template>
<display>name,seqnumber</display>
<display_format>%s:%s</display_format>
</prefixlists>
</Model>
<ValidationMessage>Related item PrefixList not found.</ValidationMessage>
<Multiple>Y</Multiple>
</match2>
<match3 type="ModelRelationField">
<Model>
<template>
<communitylists>
<source>OPNsense.quagga.bgp</source>
<items>communitylists.communitylist</items>
<display>number</display>
</template>
<display>name,description</display>
<display_format>%s %s</display_format>
</communitylists>
</Model>
<ValidationMessage>Related item CommunityList not found.</ValidationMessage>
<Multiple>Y</Multiple>
@ -416,45 +419,45 @@
<defaultoriginate type="BooleanField"/>
<linkedPrefixlistIn type="ModelRelationField">
<Model>
<template>
<prefixlists>
<source>OPNsense.quagga.bgp</source>
<items>prefixlists.prefixlist</items>
<display>name</display>
<group>name</group>
</template>
<display>name,seqnumber</display>
<display_format>%s:%s</display_format>
</prefixlists>
</Model>
<ValidationMessage>Related Prefix-List item not found.</ValidationMessage>
</linkedPrefixlistIn>
<linkedPrefixlistOut type="ModelRelationField">
<Model>
<template>
<prefixlists>
<source>OPNsense.quagga.bgp</source>
<items>prefixlists.prefixlist</items>
<display>name</display>
<group>name</group>
</template>
<display>name,seqnumber</display>
<display_format>%s:%s</display_format>
</prefixlists>
</Model>
<ValidationMessage>Related Prefix-List item not found.</ValidationMessage>
</linkedPrefixlistOut>
<linkedRoutemapIn type="ModelRelationField">
<Model>
<template>
<routemaps>
<source>OPNsense.quagga.bgp</source>
<items>routemaps.routemap</items>
<display>name</display>
<group>name</group>
</template>
<display>name,id</display>
<display_format>%s:%s</display_format>
</routemaps>
</Model>
<ValidationMessage>Related Route-Map item not found.</ValidationMessage>
</linkedRoutemapIn>
<linkedRoutemapOut type="ModelRelationField">
<Model>
<template>
<routemaps>
<source>OPNsense.quagga.bgp</source>
<items>routemaps.routemap</items>
<display>name</display>
<group>name</group>
</template>
<display>name,id</display>
<display_format>%s:%s</display_format>
</routemaps>
</Model>
<ValidationMessage>Related Route-Map item not found.</ValidationMessage>
</linkedRoutemapOut>
@ -480,12 +483,12 @@
</redistribute>
<linkedRoutemap type="ModelRelationField">
<Model>
<template>
<routemaps>
<source>OPNsense.quagga.bgp</source>
<items>routemaps.routemap</items>
<display>name</display>
<group>name</group>
</template>
<display>name,id</display>
<display_format>%s:%s</display_format>
</routemaps>
</Model>
<ValidationMessage>Related Route-Map item not found.</ValidationMessage>
</linkedRoutemap>