/// Validate the local-remote BGP Role pairs.
///
/// This function checks the role correctness by following the description in [Section 4.2 of RFC9234](https://www.rfc-editor.org/rfc/rfc9234.html#section-4.2).
///
/// The acceptable local-remote BGP pairs are:
///
/// Local AS Role | Remote AS Role
/// --- | ---
/// Provider | Customer
/// Customer | Provider
/// RouteServer | RouterServer-Client
/// RouterServer-Client | RouteServer
/// Peer | Peer
///
Validate the local-remote BGP Role pairs.
This function checks the role correctness by following the description in [Section 4.2 of RFC9234].

The acceptable local-remote BGP pairs are.


Validate the local - remote BGP Role pairs . This function checks the role correctness by following the description in [ Section 4 . 2 of RFC9234 ] . The acceptable local - remote BGP pairs are .
pub fn validate_role_pairs(local_role: &BgpRole, remote_role: &BgpRole) -> bool {
    match local_role {
        BgpRole::Provider => {
            if let BgpRole::Customer =  remote_role {
                return true
            }
            return false
        }
        BgpRole::RouteServer => {
            if let BgpRole::RouteServerClient =  remote_role {
                return true
            }
            return false
        }
        BgpRole::RouteServerClient => {
            if let BgpRole::RouteServer =  remote_role {
                return true
            }
            return false
        }
        BgpRole::Customer => {
            if let BgpRole::Provider =  remote_role {
                return true
            }
            return false
        }
        BgpRole::Peer => {
            if let BgpRole::Peer =  remote_role {
                return true
            }
            return false
        }
    }
}
pub fn validate_role_pairs ( local_role : & BgpRole , remote_role : & BgpRole ) -> bool { match local_role { BgpRole :: Provider => { if let BgpRole :: Customer = remote_role { return true } return false } BgpRole :: RouteServer => { if let BgpRole :: RouteServerClient = remote_role { return true } return false } BgpRole :: RouteServerClient => { if let BgpRole :: RouteServer = remote_role { return true } return false } BgpRole :: Customer => { if let BgpRole :: Provider = remote_role { return true } return false } BgpRole :: Peer => { if let BgpRole :: Peer = remote_role { return true } return false } } }
Validate the local-remote BGP Role pairs.
Validate the local - remote BGP Role pairs .
local_role
&BgpRole
remote_role
&BgpRole