Skip to content

yc.o sync #1658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions experimental/ietf-extracted-YANG-modules/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
module draft-extended-example {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:draft-extended-example";
prefix dr-ext-exp;

import draft-template {
prefix dr-tmp;
}

organization
"INSA Lyon";
contact
"Editor: Vivekananda Boudia
<mailto:[email protected]>";
description
"add external references to RFC8345";
revision 2025-03-09 {
description
"Initial revision.";
reference
"";
}

identity AUGMENT-EXAMPLE-TEMPLATE-TYPE {
base dr-tmp:template-type;
description
"augment example for template type";
}

identity AUGMENT-EXAMPLE-EXTRA-LABEL {
base dr-tmp:extra-label;
description
"augment example for extra label";
}

identity AUGMENT-EXAMPLE-REQUEST-TYPE {
base dr-tmp:request-type;
description
"augment example for request type";
}

grouping augment-example-request {
description
"augment example for a request";
leaf foo {
type string;
description
"leaf example";
}
}

augment "/dr-tmp:template/dr-tmp:template/dr-tmp:request/dr-tmp:request-builder" {
when "derived-from-or-self(../dr-tmp:request-type, 'AUGMENT-EXAMPLE-REQUEST-TYPE')";
uses augment-example-request;
description
"we add our example to the possible request type";
}
}
132 changes: 132 additions & 0 deletions experimental/ietf-extracted-YANG-modules/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
module draft-relation {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:draft-relation";
prefix dr-rel;

import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Data Types";
}
import ietf-network {
prefix nw;
reference
"RFC 8345: A YANG Data Model for Network Topologies";
}
import ietf-network-topology {
prefix nt;
reference
"RFC 8345: A YANG Data Model for Network Topologies";
}
import draft-template {
prefix dr-tmp;
}

organization
"INSA Lyon";
contact
"Editor: Vivekananda Boudia
<mailto:[email protected]>";
description
"relations external of RFC8345";

revision 2025-03-09 {
description
"Initial revision";
reference
"";
}

container relation {
description
"relation container";
list relation {
key "relation-id";
description
"relation list";
leaf relation-id {
type inet:uri;
description
"relation id";
}
choice network-element-ref {
description
"linking to RFC8345";
leaf network-ref {
type leafref {
path "/nw:networks/nw:network/nw:network-id";
}
description
"linking to network";
}
leaf node-ref {
type leafref {
path "/nw:networks/nw:network/nw:node/nw:node-id";
}
description
"linking to node";
}
leaf link-ref {
type leafref {
path "/nw:networks/nw:network/nt:link/nt:link-id";
}
description
"linking to link";
}
leaf tp-ref {
type leafref {
path "/nw:networks/nw:network/nw:node/nt:termination-point/nt:tp-id";
}
description
"linking to termination point";
}
}
leaf template-ref {
type leafref {
path "/dr-tmp:template/dr-tmp:template/dr-tmp:template-id";
}
description
"reference to template";
}
leaf-list request-type-supported {
type identityref {
base dr-tmp:request-type;
}
description
"template is generic and may include requests that are not supported by the network element
here, we specify the types of requests that the network element supports
if network element supports all template ALL-REQUEST may be used";
}
leaf path {
type string;
description
"network element can be augmented and may contain containers nested within other containers.
path is used for filtering.";
}
list parameter-value {
key "param-ref request-type";
description
"parameter value from network element";
leaf param-ref {
type leafref {
path "/dr-tmp:template/dr-tmp:template/dr-tmp:parameter/dr-tmp:param-id";
}
description
"reference to template parameter";
}
leaf request-type {
type identityref {
base dr-tmp:request-type;
}
description
"value can be different depending on the request";
}
leaf value {
type string;
description
"value of the parameter";
}
}
}
}
}
165 changes: 165 additions & 0 deletions experimental/ietf-extracted-YANG-modules/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
module draft-template {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:draft-template";
prefix dr-tmp;

import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Data Types";
}

organization
"INSA Lyon";
contact
"Editor: Vivekananda Boudia
<mailto:[email protected]>";
description
"template yang model";

revision 2025-03-09 {
description
"Initial revision";
reference
"";
}

identity template-type {
description
"base identity for template type";
}

identity CONFIG {
base template-type;
description
"template used to retrieve configuration data";
}

identity STATE {
base template-type;
description
"template used to retrieve operational state data";
}

identity extra-label {
description
"base identity for extra label";
}

identity request-type {
description
"base identity for request type";
}

identity ALL_REQUEST {
base request-type;
description
"all request";
}

identity NETCONF {
base request-type;
description
"request that retrieves data using the NETCONF protocol";
}

grouping netconf-request {
description
"netconf request";
leaf xpath {
type string;
description
"netconf xpath for request";
}
}

container template {
description
"template container";
list template {
key "template-id";
description
"template list";
leaf template-id {
type inet:uri;
description
"uniquely identifies a template";
}
leaf description {
type string;
description
"template description";
}
container template-type {
description
"template type
used for filtering";
leaf base {
type identityref {
base template-type;
}
description
"template base
used for filtering";
}
leaf is-historical {
type boolean;
description
"check is template is used to get historical data or not
used for filtering";
}
leaf-list extra-label {
type identityref {
base extra-label;
}
description
"extra label
used for filtering";
}
}
list parameter {
key "param-id";
description
"list of parameter used by request";
leaf param-id {
type inet:uri;
description
"uniquely identifies a parameter";
}
leaf description {
type string;
description
"parameter description";
}
}
list request {
key "request-type";
description
"request list";
leaf request-type {
type identityref {
base request-type;
}
description
"request type";
}
container request-builder {
description
"request container that allows users to retrieve data
parameters must be enclosed in brackets.";
}
}
container extra {
description
"use for augmentation";
}
}
}

augment "/template/template/request/request-builder" {
when "derived-from-or-self(../request-type, 'NETCONF')";
uses netconf-request;
description
"adding netconf request to possible request";
}
}
Loading