mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-30 04:33:00 +02:00
Compare commits
1
Commits
modem
...
wkz/native
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9bdf44ad7a |
@@ -9,7 +9,7 @@
|
|||||||
<CLICON_FEATURE>ietf-system:ntp-udp-port</CLICON_FEATURE>
|
<CLICON_FEATURE>ietf-system:ntp-udp-port</CLICON_FEATURE>
|
||||||
<CLICON_YANG_DIR>@DATAROOTDIR@/clixon</CLICON_YANG_DIR>
|
<CLICON_YANG_DIR>@DATAROOTDIR@/clixon</CLICON_YANG_DIR>
|
||||||
<CLICON_YANG_DIR>@DATAROOTDIR@/yang</CLICON_YANG_DIR>
|
<CLICON_YANG_DIR>@DATAROOTDIR@/yang</CLICON_YANG_DIR>
|
||||||
<CLICON_YANG_MODULE_MAIN>infix</CLICON_YANG_MODULE_MAIN>
|
<CLICON_YANG_MODULE_MAIN>device</CLICON_YANG_MODULE_MAIN>
|
||||||
<CLICON_CLI_MODE>exec</CLICON_CLI_MODE>
|
<CLICON_CLI_MODE>exec</CLICON_CLI_MODE>
|
||||||
<CLICON_BACKEND_DIR>@LIBDIR@/clixon/backend</CLICON_BACKEND_DIR>
|
<CLICON_BACKEND_DIR>@LIBDIR@/clixon/backend</CLICON_BACKEND_DIR>
|
||||||
<CLICON_NETCONF_DIR>@LIBDIR@/clixon/netconf</CLICON_NETCONF_DIR>
|
<CLICON_NETCONF_DIR>@LIBDIR@/clixon/netconf</CLICON_NETCONF_DIR>
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
module device {
|
||||||
|
yang-version 1.1;
|
||||||
|
namespace "urn:kernelkit:yang:device";
|
||||||
|
prefix device;
|
||||||
|
|
||||||
|
import ietf-datastores {
|
||||||
|
prefix ds;
|
||||||
|
}
|
||||||
|
|
||||||
|
import ietf-system {
|
||||||
|
prefix sys;
|
||||||
|
}
|
||||||
|
|
||||||
|
import infix {
|
||||||
|
prefix ix;
|
||||||
|
}
|
||||||
|
|
||||||
|
import clixon-autocli {
|
||||||
|
prefix autocli;
|
||||||
|
}
|
||||||
|
|
||||||
|
description
|
||||||
|
"Base model
|
||||||
|
";
|
||||||
|
|
||||||
|
revision 2023-02-10 {
|
||||||
|
description
|
||||||
|
"Initial revision.";
|
||||||
|
reference
|
||||||
|
"N/A";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
submodule infix-if-bridge {
|
||||||
|
yang-version 1.1;
|
||||||
|
belongs-to infix {
|
||||||
|
prefix ix;
|
||||||
|
}
|
||||||
|
|
||||||
|
include infix-if;
|
||||||
|
|
||||||
|
augment "/native/interfaces/interface/type" {
|
||||||
|
case bridge {
|
||||||
|
container bridge {
|
||||||
|
presence bridge;
|
||||||
|
description
|
||||||
|
"Bridge configuration";
|
||||||
|
|
||||||
|
container vlans {
|
||||||
|
list vlan {
|
||||||
|
key vid;
|
||||||
|
|
||||||
|
leaf vid {
|
||||||
|
type uint16;
|
||||||
|
}
|
||||||
|
|
||||||
|
leaf-list untagged {
|
||||||
|
type interface-ref;
|
||||||
|
|
||||||
|
must "deref(.)/../bridge-port/bridge = ../../../../name" {
|
||||||
|
error-message
|
||||||
|
"All interfaces must be attached to this bridge";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
leaf-list tagged {
|
||||||
|
type interface-ref;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
augment "/native/interfaces/interface/port" {
|
||||||
|
case bridge-port {
|
||||||
|
container bridge-port {
|
||||||
|
description
|
||||||
|
"Bridge port specific configuration";
|
||||||
|
|
||||||
|
leaf bridge {
|
||||||
|
type interface-ref;
|
||||||
|
mandatory true;
|
||||||
|
description
|
||||||
|
"Bridge interface to which this interface is attached";
|
||||||
|
|
||||||
|
must "deref(.)/../bridge" {
|
||||||
|
error-message
|
||||||
|
"Must refer to a bridge interface";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
leaf pvid {
|
||||||
|
type uint16;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
submodule infix-if-lag {
|
||||||
|
yang-version 1.1;
|
||||||
|
belongs-to infix {
|
||||||
|
prefix ix;
|
||||||
|
}
|
||||||
|
|
||||||
|
include infix-if;
|
||||||
|
|
||||||
|
augment "/native/interfaces/interface/type" {
|
||||||
|
case lag {
|
||||||
|
container lag {
|
||||||
|
presence lag;
|
||||||
|
description
|
||||||
|
"Link aggregation configuration";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
augment "/native/interfaces/interface/port" {
|
||||||
|
case lag-port {
|
||||||
|
container lag-port {
|
||||||
|
description
|
||||||
|
"LAG port configuration";
|
||||||
|
|
||||||
|
leaf lag {
|
||||||
|
type interface-ref;
|
||||||
|
mandatory true;
|
||||||
|
description
|
||||||
|
"LAG interface to which this interface is attached";
|
||||||
|
|
||||||
|
must "deref(.)/../lag" {
|
||||||
|
error-message
|
||||||
|
"Must refer to a LAG interface";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
submodule infix-if-veth {
|
||||||
|
yang-version 1.1;
|
||||||
|
belongs-to infix {
|
||||||
|
prefix ix;
|
||||||
|
}
|
||||||
|
|
||||||
|
include infix-if;
|
||||||
|
|
||||||
|
augment "/native/interfaces/interface/type" {
|
||||||
|
case veth {
|
||||||
|
container veth {
|
||||||
|
description
|
||||||
|
"Virtual ethernet pair specific configuration";
|
||||||
|
|
||||||
|
leaf peer {
|
||||||
|
type interface-ref;
|
||||||
|
mandatory true;
|
||||||
|
description
|
||||||
|
"Peer veth interface to which this interface is connected";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
submodule infix-if-vlan {
|
||||||
|
yang-version 1.1;
|
||||||
|
belongs-to infix {
|
||||||
|
prefix ix;
|
||||||
|
}
|
||||||
|
|
||||||
|
include infix-if;
|
||||||
|
|
||||||
|
typedef vid {
|
||||||
|
type uint16 {
|
||||||
|
range "1..4095";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
augment "/native/interfaces/interface/type" {
|
||||||
|
case vlan {
|
||||||
|
container vlan {
|
||||||
|
description
|
||||||
|
"VLAN specific configuration";
|
||||||
|
|
||||||
|
leaf interface {
|
||||||
|
type interface-ref;
|
||||||
|
mandatory true;
|
||||||
|
description
|
||||||
|
"Lower interface from which the specified VLAN is demuxed";
|
||||||
|
}
|
||||||
|
|
||||||
|
leaf id {
|
||||||
|
type vid;
|
||||||
|
mandatory true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
submodule infix-if {
|
||||||
|
yang-version 1.1;
|
||||||
|
belongs-to infix {
|
||||||
|
prefix ix;
|
||||||
|
}
|
||||||
|
|
||||||
|
include infix-native;
|
||||||
|
|
||||||
|
typedef interface-ref {
|
||||||
|
type leafref {
|
||||||
|
path "/native/interfaces/interface/name";
|
||||||
|
}
|
||||||
|
description
|
||||||
|
"This type is used by data models that need to reference
|
||||||
|
interfaces.";
|
||||||
|
}
|
||||||
|
|
||||||
|
augment "/native" {
|
||||||
|
container interfaces {
|
||||||
|
list interface {
|
||||||
|
key "name";
|
||||||
|
|
||||||
|
leaf name {
|
||||||
|
type string;
|
||||||
|
}
|
||||||
|
|
||||||
|
choice type;
|
||||||
|
choice port;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
submodule infix-native {
|
||||||
|
yang-version 1.1;
|
||||||
|
belongs-to infix {
|
||||||
|
prefix ix;
|
||||||
|
}
|
||||||
|
|
||||||
|
container native;
|
||||||
|
}
|
||||||
+19
-40
@@ -1,46 +1,25 @@
|
|||||||
module infix {
|
module infix {
|
||||||
yang-version 1.1;
|
yang-version 1.1;
|
||||||
namespace "urn:kernelkit:infix";
|
namespace "urn:kernelkit:yang:infix";
|
||||||
prefix ix;
|
prefix ix;
|
||||||
|
|
||||||
import ietf-datastores {
|
include infix-native;
|
||||||
prefix ds;
|
include infix-if;
|
||||||
}
|
include infix-if-bridge;
|
||||||
|
include infix-if-lag;
|
||||||
|
include infix-if-veth;
|
||||||
|
include infix-if-vlan;
|
||||||
|
|
||||||
import ietf-system {
|
organization "Kernelkit";
|
||||||
prefix sys;
|
contact
|
||||||
}
|
"https://github.com/kernelkit/";
|
||||||
|
description
|
||||||
import ietf-interfaces {
|
"Infix's native system model";
|
||||||
prefix if;
|
|
||||||
}
|
|
||||||
import ietf-ip {
|
|
||||||
prefix ip;
|
|
||||||
}
|
|
||||||
import iana-if-type {
|
|
||||||
prefix ianaift;
|
|
||||||
}
|
|
||||||
|
|
||||||
import clixon-autocli {
|
|
||||||
prefix autocli;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
revision 2023-03-17 {
|
||||||
description
|
description
|
||||||
"Base model
|
"Initial revision.";
|
||||||
";
|
reference
|
||||||
|
"github.com/kernelkit/infix";
|
||||||
revision 2023-02-10 {
|
}
|
||||||
description
|
|
||||||
"Initial revision.";
|
|
||||||
reference
|
|
||||||
"N/A";
|
|
||||||
}
|
|
||||||
revision 2023-03-16 {
|
|
||||||
description "Add timezone deviations for system/clock.";
|
|
||||||
reference "N/A";
|
|
||||||
}
|
|
||||||
|
|
||||||
deviation /sys:system/clock/timezone-utc-offset {
|
|
||||||
deviate not-supported;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user