Skip to content

Commit

Permalink
Merge pull request #2 from adaraiseh/main
Browse files Browse the repository at this point in the history
fix yang modules warnings and errors
  • Loading branch information
adaraiseh authored Feb 19, 2024
2 parents c53a24a + 593bed8 commit 8ab1df5
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
8 changes: 3 additions & 5 deletions yang/iproute2-ip-link-vlan-ext.yang
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ module iproute2-ip-link-vlan-ext {
namespace "urn:okda:iproute2:ip:link:vlan:ext";
prefix "iplinkvlan";

import ietf-inet-types { prefix inet; }
import ietf-yang-types { prefix yang; }
import iproute2-ip-link {prefix iplink;}


organization
"Okda networks";
"Okda Networks";

contact
"Author: Ali Aqrabawi
Expand All @@ -31,9 +29,9 @@ module iproute2-ip-link-vlan-ext {
augment "/iplink:links/iplink:link" {
description "adding vlan type paramters";
container vlan {
when "../type='vlan'";
when "../iplink:type = 'iplink:vlan'";
description "vlan type interface paramters";
leaf protcol {
leaf protocol {
description "VLAN_PROTO - either 802.1Q or 802.1ad.";
default "802.1q";
type enumeration {
Expand Down
12 changes: 9 additions & 3 deletions yang/iproute2-ip-link.yang
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ module iproute2-ip-link {
namespace "urn:okda:iproute2:ip:link";
prefix "iplink";

import ietf-inet-types { prefix inet; }
import ietf-yang-types { prefix yang; }
//import ietf-inet-types { prefix inet; }
//import ietf-yang-types { prefix yang; }
organization
"Okda networks";
"Okda Networks";

contact
"Author: Ali Aqrabawi
Expand Down Expand Up @@ -37,6 +37,12 @@ module iproute2-ip-link {
"Base identity for ip link types.";
}

identity vlan {
base link-type;
description
"VLAN device.";
}

identity bond {
base link-type;
description
Expand Down
8 changes: 4 additions & 4 deletions yang/iproute2-ip-nexthop.yang
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ module iproute2-ip-nexthop {
prefix "ipnh";

import ietf-inet-types { prefix inet; }
import ietf-yang-types { prefix yang; }
//import ietf-yang-types { prefix yang; }
import iproute2-ip-link { prefix iplink; }

organization
"Okda networks";
"Okda Networks";

contact
"Author: Ali Aqrabawi
Expand Down Expand Up @@ -44,7 +44,7 @@ module iproute2-ip-nexthop {

}
}
choice via {
choice via { // review this: why a choice with one option ?
description "nexthop ip address";
container ipv4 {
description "ipv4 nexthop";
Expand All @@ -66,7 +66,7 @@ module iproute2-ip-nexthop {
default false;
description " specify if this is blackhole nexthop, which discards all traffic sent to it.";
type boolean;
when "not(../interface) and not(../via)";
when "not(../dev) and not(../ipv6) and not(../ipv4)";
}
leaf online {
type boolean;
Expand Down
4 changes: 2 additions & 2 deletions yang/iproute2-ip-route.yang
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ module iproute2-ip-route {
prefix "iprt";

import ietf-inet-types { prefix inet; }
import ietf-yang-types { prefix yang; }
//import ietf-yang-types { prefix yang; }
organization
"Okda networks";
"Okda Networks";

contact
"Author: Ali Aqrabawi
Expand Down
2 changes: 1 addition & 1 deletion yang/iproute2-tc-filter.yang
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module iproute2-tc-filter {

list filter {
description "A list of filters.";

key "handle";
choice dev-or-block { //review
case dev-case {
leaf dev {
Expand Down

0 comments on commit 8ab1df5

Please sign in to comment.