-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding to netconf-wg/private-candidate repo
- Loading branch information
Showing
30 changed files
with
16,954 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Build RFC | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Compile draft or RFC | ||
run: | | ||
mkdir -p build | ||
for file in draft-*.xml; do | ||
xml2rfc --text --html -b build $file | ||
done | ||
- name: Store artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: draft-ietf-netconf-privcand | ||
path: | | ||
build/*.txt | ||
build/*.html | ||
retention-days: 5 | ||
|
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,5 @@ | ||
venv/ | ||
.venv/ | ||
.vscode/ | ||
*.txt | ||
*.html |
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 |
---|---|---|
@@ -1,2 +1,8 @@ | ||
# draft-ietf-netconf-privcand | ||
IETF NETCONF Private Candidates Draft | ||
|
||
This repository is provided to coordinate issues and updates to | ||
the work in progress Internet Draft from the | ||
[NETCONF working group](https://datatracker.ietf.org/wg/netconf/about/). | ||
|
||
|
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,38 @@ | ||
|
||
+-------------+ +-----------+ +---------------------+ | ||
| <candidate> | | <startup> | | <private-candidate> |-+ | ||
| (ct, rw) |<---+ +--->| (ct, rw) | +->| (ct, rw) | |-+ | ||
+-------------+ | | +-----------+ | +---------------------+ | | | ||
| | | | | +---------------------+ | | ||
| +-----------+<--------+ | +---------------------+ | ||
+-------->| <running> | | | // multiple | ||
| (ct, rw) |-------------------+ | // private-candidates | ||
+-----------+<-------------------------------+ // possible | ||
| | ||
| // configuration transformations, | ||
| // e.g., removal of nodes marked as | ||
| // "inactive", expansion of | ||
| // templates | ||
v | ||
+------------+ | ||
| <intended> | // subject to validation | ||
| (ct, ro) | | ||
+------------+ | ||
| // changes applied, subject to | ||
| // local factors, e.g., missing | ||
| // resources, delays | ||
| | ||
dynamic | +-------- learned configuration | ||
configuration | +-------- system configuration | ||
datastores -----+ | +-------- default configuration | ||
| | | | ||
v v v | ||
+---------------+ | ||
| <operational> | <-- system state | ||
| (ct + cf, ro) | | ||
+---------------+ | ||
|
||
ct = config true; cf = config false | ||
rw = read-write; ro = read-only | ||
boxes denote named datastores | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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 @@ | ||
xml2rfc |
236 changes: 236 additions & 0 deletions
236
yang/augments-approach/ietf-netconf-private-candidate.yang
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,236 @@ | ||
module ietf-netconf-private-candidate { | ||
yang-version 1.1; | ||
namespace "urn:ietf:params:xml:ns:netconf:private-candidate:1.0"; | ||
prefix pc; | ||
|
||
import ietf-netconf { | ||
prefix nc; | ||
} | ||
|
||
import ietf-datastores { | ||
prefix ds; | ||
} | ||
|
||
import ietf-nmda-compare { | ||
prefix cmp; | ||
} | ||
|
||
organization | ||
"IETF NETCONF (Network Configuration) Working Group"; | ||
contact | ||
"WG Web: <http://tools.ietf.org/wg/netconf/> | ||
WG List: <[email protected]> | ||
WG Chair: Kent Watsen | ||
<[email protected]> | ||
WG Chair: Per Andersson | ||
<[email protected]> | ||
Editor: James Cumming | ||
<[email protected]> | ||
Editor: Robert Wills | ||
<[email protected]>"; | ||
description | ||
"NETCONF private candidate support. | ||
Copyright (c) 2024 IETF Trust and the persons identified as | ||
authors of the code. All rights reserved. | ||
Redistribution and use in source and binary forms, with or | ||
without modification, is permitted pursuant to, and subject | ||
to the license terms contained in, the Revised BSD License | ||
set forth in Section 4.c of the IETF Trust’s Legal Provisions | ||
Relating to IETF Documents | ||
(https://trustee.ietf.org/license-info). | ||
This version of this YANG module is part of | ||
draft-ietf-netconf-privcand; see these documents for full | ||
legal notices."; | ||
|
||
revision 2024-07-01 { | ||
description | ||
"Introduce private candidate support"; | ||
reference | ||
"draft-ietf-netconf-privcand: Netconf Private Candidates"; | ||
} | ||
|
||
feature private-candidate { | ||
description | ||
"NETCONF :private-candidate capability; | ||
If the server advertises the :private-candidate | ||
capability for a session, then this feature must | ||
also be enabled for that session. Otherwise, | ||
this feature must not be enabled."; | ||
reference | ||
"draft-ietf-netconf-privcand"; | ||
} | ||
|
||
augment /nc:get-config/nc:input/nc:source/nc:config-source { | ||
leaf private-candidate { | ||
if-feature "private-candidate"; | ||
type empty; | ||
description | ||
"The private candidate configuration is the config | ||
source."; | ||
} | ||
} | ||
|
||
augment /nc:edit-config/nc:input/nc:target/nc:config-target { | ||
leaf private-candidate { | ||
if-feature "private-candidate"; | ||
type empty; | ||
description | ||
"The private candidate configuration is the config | ||
target."; | ||
} | ||
} | ||
|
||
augment /nc:copy-config/nc:input/nc:target/nc:config-target { | ||
leaf private-candidate { | ||
if-feature "private-candidate"; | ||
type empty; | ||
description | ||
"The private candidate configuration is the config | ||
target."; | ||
} | ||
} | ||
|
||
augment /nc:copy-config/nc:input/nc:source/nc:config-source { | ||
leaf private-candidate { | ||
if-feature "private-candidate"; | ||
type empty; | ||
description | ||
"The private candidate configuration is the config | ||
source."; | ||
} | ||
} | ||
|
||
augment /nc:delete-config/nc:input/nc:target/nc:config-target { | ||
leaf private-candidate { | ||
if-feature "private-candidate"; | ||
type empty; | ||
description | ||
"The private candidate configuration is the config | ||
target."; | ||
} | ||
} | ||
|
||
|
||
augment /nc:lock/nc:input/nc:target/nc:config-target { | ||
leaf private-candidate { | ||
if-feature "private-candidate"; | ||
type empty; | ||
description | ||
"The private candidate configuration is the config | ||
target."; | ||
} | ||
} | ||
|
||
augment /nc:unlock/nc:input/nc:target/nc:config-target { | ||
leaf private-candidate { | ||
if-feature "private-candidate"; | ||
type empty; | ||
description | ||
"The private candidate configuration is the config | ||
target."; | ||
} | ||
} | ||
|
||
// TODO: Raise issue on this as cannot augment an RPC and cannot | ||
// deviate to add new containers | ||
// augment /nc:commit { | ||
// container source { | ||
// description | ||
// "Particular configuration to copy from."; | ||
// choice config-source { | ||
// mandatory true; | ||
// description | ||
// "The configuration source for the copy operation."; | ||
// leaf candidate { | ||
// if-feature "nc:candidate"; | ||
// type empty; | ||
// description | ||
// "The candidate configuration is the config source."; | ||
// } | ||
// leaf private-candidate { | ||
// if-feature "private-candidate"; | ||
// type empty; | ||
// description | ||
// "The private candidate configuration is the config | ||
// source."; | ||
// } | ||
// } | ||
// } | ||
// } | ||
|
||
// TODO: Raise issue on this as cannot augment an RPC and cannot | ||
// deviate to add new containers | ||
// augment /nc:discard-changes/nc:input/nc:target/nc:config-target { | ||
// leaf private-candidate { | ||
// if-feature "private-candidate"; | ||
// type empty; | ||
// description | ||
// "The private candidate configuration is the config | ||
// target."; | ||
// } | ||
// } | ||
|
||
rpc update { | ||
if-feature "private-candidate"; | ||
description | ||
"Updates the private candidate from the running | ||
configuration."; | ||
reference | ||
"draft-ietf-netconf-privcand"; | ||
input { | ||
leaf resolution-mode { | ||
description | ||
"Mode to resolve conflicts between running and | ||
private-candidate configurations."; | ||
default revert-on-conflict; | ||
type enumeration { | ||
enum revert-on-conflict; | ||
enum ignore; | ||
enum overwrite; | ||
} | ||
} | ||
} | ||
} | ||
|
||
augment /nc:validate/nc:input/nc:source/nc:config-source { | ||
leaf private-candidate { | ||
if-feature "private-candidate"; | ||
type empty; | ||
description | ||
"The private candidate configuration is the config | ||
source."; | ||
} | ||
} | ||
|
||
identity private-candidate { | ||
base ds:conventional; | ||
description | ||
"The private candidate configuration datastore."; | ||
} | ||
|
||
augment /cmp:compare/cmp:input { | ||
leaf reference-point { | ||
reference "draft-ietf-netconf-privcand"; | ||
if-feature "private-candidate"; | ||
description | ||
"When this leaf is provided and the source or | ||
destination are the private-candidate datastore, | ||
the comparison will either occur between the | ||
last-update point of the private candidate or the | ||
creation-point of the private candidate."; | ||
default last-update; | ||
type enumeration { | ||
enum last-update; | ||
enum creation-point; | ||
} | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.