File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
db-queries/src/db/datastore Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -642,9 +642,13 @@ pub struct SwitchPortBgpPeerConfigCommunity {
642
642
) ]
643
643
#[ diesel( table_name = switch_port_settings_bgp_peer_config_allow_export) ]
644
644
pub struct SwitchPortBgpPeerConfigAllowExport {
645
+ /// Parent switch port configuration
645
646
pub port_settings_id : Uuid ,
647
+ /// Interface peer is reachable on
646
648
pub interface_name : String ,
649
+ /// Peer Address
647
650
pub addr : IpNetwork ,
651
+ /// Allowed Prefix
648
652
pub prefix : IpNetwork ,
649
653
}
650
654
@@ -660,9 +664,13 @@ pub struct SwitchPortBgpPeerConfigAllowExport {
660
664
) ]
661
665
#[ diesel( table_name = switch_port_settings_bgp_peer_config_allow_import) ]
662
666
pub struct SwitchPortBgpPeerConfigAllowImport {
667
+ /// Parent switch port configuration
663
668
pub port_settings_id : Uuid ,
669
+ /// Interface peer is reachable on
664
670
pub interface_name : String ,
671
+ /// Peer Address
665
672
pub addr : IpNetwork ,
673
+ /// Allowed Prefix
666
674
pub prefix : IpNetwork ,
667
675
}
668
676
Original file line number Diff line number Diff line change @@ -606,6 +606,7 @@ impl DataStore {
606
606
. transaction ( & conn, |conn| async move {
607
607
let active = peer_dsl:: switch_port_settings_bgp_peer_config
608
608
. filter ( db_peer:: port_settings_id. eq ( port_settings_id) )
609
+ . filter ( db_peer:: addr. eq ( addr) )
609
610
. select ( db_peer:: allow_export_list_active)
610
611
. limit ( 1 )
611
612
. first_async :: < bool > ( & conn)
@@ -652,6 +653,7 @@ impl DataStore {
652
653
. transaction ( & conn, |conn| async move {
653
654
let active = peer_dsl:: switch_port_settings_bgp_peer_config
654
655
. filter ( db_peer:: port_settings_id. eq ( port_settings_id) )
656
+ . filter ( db_peer:: addr. eq ( addr) )
655
657
. select ( db_peer:: allow_import_list_active)
656
658
. limit ( 1 )
657
659
. first_async :: < bool > ( & conn)
You can’t perform that action at this time.
0 commit comments