Skip to content

Commit

Permalink
1. Include PortChannel type in sflow agent id. 2. Fix import prefixes
Browse files Browse the repository at this point in the history
Signed-off-by: ArthiSivanantham <arthi_sivanantham@dell.com>
  • Loading branch information
ArthiSivanantham committed May 15, 2021
1 parent 2a15653 commit 5ac683f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
20 changes: 13 additions & 7 deletions src/sonic-yang-models/yang-models/sonic-sflow.yang
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ module sonic-sflow{
prefix stypes;
}
import sonic-port {
prefix prt;
prefix port;
}
import sonic-vlan {
prefix svlan;
prefix vlan;
}
import sonic-portchannel {
prefix lag;
}
/*
import sonic-mgmt-port {
prefix smt;
prefix mgmt-port;
}
*/

Expand Down Expand Up @@ -62,7 +65,7 @@ module sonic-sflow{

leaf port {
type leafref {
path "/prt:sonic-port/prt:PORT/prt:PORT_LIST/prt:name";
path "/port:sonic-port/port:PORT/port:PORT_LIST/port:name";
}
}

Expand Down Expand Up @@ -104,14 +107,17 @@ module sonic-sflow{
leaf agent_id {
type union {
type leafref {
path "/prt:sonic-port/prt:PORT/prt:PORT_LIST/prt:name";
path "/port:sonic-port/port:PORT/port:PORT_LIST/port:name";
}
type leafref {
path "/lag:sonic-portchannel/lag:PORTCHANNEL/lag:PORTCHANNEL_LIST/lag:name";
}
/*
type leafref {
path "/smt:sonic-mgmt-port/smt:MGMT_PORT/smt:MGMT_PORT_LIST/smt:name";
path "/mgmt-port:sonic-mgmt-port/mgmt-port:MGMT_PORT/mgmt-port:MGMT_PORT_LIST/mgmt-port:name";
}*/
type leafref {
path "/svlan:sonic-vlan/svlan:VLAN/svlan:VLAN_LIST/svlan:name";
path "/vlan:sonic-vlan/vlan:VLAN/vlan:VLAN_LIST/vlan:name";
}
}
description "Interface name";
Expand Down
22 changes: 11 additions & 11 deletions src/sonic-yang-models/yang-models/sonic-system-tacacs.yang
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ module sonic-system-tacacs {
}

import sonic-port {
prefix prt;
prefix port;
}

import sonic-portchannel {
prefix spc;
prefix lag;
}

import sonic-vlan {
prefix svlan;
prefix vlan;
}

import sonic-loopback-interface {
prefix lo;
prefix loopback;
}

import sonic-interface {
prefix sintf;
prefix interface;
}

// import sonic-mgmt-port {
// prefix smt;
// prefix mgmt-port;
// }

revision 2021-04-15 {
Expand Down Expand Up @@ -142,19 +142,19 @@ module sonic-system-tacacs {
leaf src_intf {
type union {
type leafref {
path "/prt:sonic-port/prt:PORT/prt:PORT_LIST/prt:name";
path "/port:sonic-port/port:PORT/port:PORT_LIST/port:name";
}
type leafref {
path "/spc:sonic-portchannel/spc:PORTCHANNEL/spc:PORTCHANNEL_LIST/spc:name";
path "/lag:sonic-portchannel/lag:PORTCHANNEL/lag:PORTCHANNEL_LIST/lag:name";
}
type leafref {
path "/svlan:sonic-vlan/svlan:VLAN/svlan:VLAN_LIST/svlan:name";
path "/vlan:sonic-vlan/vlan:VLAN/vlan:VLAN_LIST/vlan:name";
}
type leafref {
path "/lo:sonic-loopback-interface/lo:LOOPBACK_INTERFACE/lo:LOOPBACK_INTERFACE_LIST/lo:name";
path "/loopback:sonic-loopback-interface/loopback:LOOPBACK_INTERFACE/loopback:LOOPBACK_INTERFACE_LIST/loopback:name";
}
//type leafref {
// path "/smt:sonic-mgmt-port/smt:MGMT_PORT/smt:MGMT_PORT_LIST/smt:name";
// path "/mgmt-port:sonic-mgmt-port/mgmt-port:MGMT_PORT/mgmt-port:MGMT_PORT_LIST/mgmt-port:name";
//}
}
description "Source IP to use from source interface for TACACS+ server communication.";
Expand Down

0 comments on commit 5ac683f

Please sign in to comment.