-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ip_nexthop,cmdgen: add group extension and code refactor for cmdgen
[+] added group extension to ip-nexthop and group separator [+] changed cmdgen logic to generate args for starcmd, this will allow us to change the lyd_node before passing to the args generator usefull for iproute replace action. Signed-off-by: ali-aqrabawi <[email protected]>
- Loading branch information
1 parent
5d5ebae
commit b7314d7
Showing
4 changed files
with
160 additions
and
101 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,6 @@ module iproute2-ip-nexthop { | |
<[email protected]>"; | ||
|
||
description | ||
|
||
"This module contain the iproute2 'ip nexthop' configurations , | ||
this is module contains all IP-NEXTHOP(8) related configs, | ||
refer to https://manpages.debian.org/experimental/iproute2/ip-nexthop.8.en.html"; | ||
|
@@ -97,9 +96,12 @@ module iproute2-ip-nexthop { | |
} | ||
} | ||
} | ||
list group { | ||
key "id weight"; | ||
description "create a nexthop group. Group specification is id with an optional weight"; | ||
container group { | ||
description "create a nexthop group. Group specification is id with an optional weight"; | ||
list nh { | ||
key "id"; | ||
ipr2cgen:group-list-with-separator "/"; | ||
ipr2cgen:group-leafs-values-separator ","; | ||
leaf id{ | ||
type leafref { | ||
path "../../id"; | ||
|
@@ -113,6 +115,7 @@ module iproute2-ip-nexthop { | |
description "nexthop weight for this member"; | ||
type uint16; | ||
} | ||
} | ||
leaf type { | ||
default "mpath"; | ||
type enumeration { | ||
|