forked from sonic-net/sonic-mgmt-framework
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Management interface cli tree, actioner implementation and sonic yang…
… for management port and interface config handling. (#153)
- Loading branch information
Showing
7 changed files
with
329 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
module sonic-mgmt-interface { | ||
namespace "http://github.com/Azure/sonic-mgmt-interface"; | ||
prefix sint; | ||
|
||
import ietf-yang-types { | ||
prefix yang; | ||
} | ||
|
||
import ietf-inet-types { | ||
prefix inet; | ||
} | ||
|
||
import sonic-common { | ||
prefix scommon; | ||
} | ||
|
||
import sonic-mgmt-port { | ||
prefix mgmtprt; | ||
} | ||
|
||
organization | ||
"DELL"; | ||
|
||
contact | ||
"DELL"; | ||
|
||
description | ||
"SONIC MANAGEMENT INTERFACE"; | ||
|
||
revision 2019-07-02 { | ||
description | ||
"Initial revision."; | ||
} | ||
|
||
container sonic-mgmt-interface { | ||
list MGMT_INTERFACE { | ||
key "portname ip_prefix"; | ||
|
||
leaf portname{ | ||
type leafref { | ||
path "/mgmtprt:sonic-mgmt-port/mgmtprt:MGMT_PORT/mgmtprt:ifname"; | ||
} | ||
} | ||
|
||
leaf ip_prefix { | ||
mandatory true; | ||
type inet:ip-prefix; | ||
|
||
} | ||
leaf gwaddr { | ||
type inet:ip-prefix; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
module sonic-mgmt-port { | ||
namespace "http://github.com/Azure/sonic-mgmt-port"; | ||
prefix prt; | ||
|
||
import ietf-yang-types { | ||
prefix yang; | ||
} | ||
|
||
import sonic-common { | ||
prefix scommon; | ||
} | ||
|
||
organization | ||
"DELL"; | ||
|
||
contact | ||
"DELL"; | ||
|
||
description | ||
"SONIC Management Interface"; | ||
|
||
revision 2019-09-17 { | ||
description | ||
"Initial revision."; | ||
} | ||
|
||
|
||
container sonic-mgmt-port { | ||
list MGMT_PORT { | ||
key "ifname"; | ||
|
||
leaf ifname { | ||
type string { | ||
pattern "eth([1-3][0-9]{3}|[1-9][0-9]{2}|[1-9][0-9]|[0-9])"{ | ||
error-message "Invalid interface name"; | ||
error-app-tag interface-name-invalid; | ||
} | ||
} | ||
} | ||
|
||
leaf speed { | ||
type uint64; | ||
} | ||
|
||
leaf autoneg { | ||
type boolean; | ||
} | ||
|
||
leaf alias { | ||
type string; | ||
} | ||
|
||
leaf description { | ||
type string; | ||
} | ||
|
||
leaf mtu{ | ||
type uint32; | ||
} | ||
|
||
leaf admin_status { | ||
type scommon:admin-status; | ||
} | ||
} | ||
} | ||
} |