Skip to content

Commit

Permalink
Adding to netconf-wg/private-candidate repo
Browse files Browse the repository at this point in the history
  • Loading branch information
jgcumming committed Jul 19, 2024
1 parent 1433eea commit 8b4753b
Show file tree
Hide file tree
Showing 30 changed files with 16,954 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build_rfc.yml
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

5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
venv/
.venv/
.vscode/
*.txt
*.html
6 changes: 6 additions & 0 deletions README.md
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/).


38 changes: 38 additions & 0 deletions diagrams/NMDA-with-privcand.txt
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

1,013 changes: 1,013 additions & 0 deletions draft-ietf-netconf-privcand-00.xml

Large diffs are not rendered by default.

1,052 changes: 1,052 additions & 0 deletions draft-ietf-netconf-privcand-01.xml

Large diffs are not rendered by default.

1,035 changes: 1,035 additions & 0 deletions draft-ietf-netconf-privcand-02.xml

Large diffs are not rendered by default.

2,565 changes: 2,565 additions & 0 deletions draft-ietf-netconf-privcand-03.xml

Large diffs are not rendered by default.

2,596 changes: 2,596 additions & 0 deletions draft-ietf-netconf-privcand-04.xml

Large diffs are not rendered by default.

561 changes: 561 additions & 0 deletions draft-jgc-netconf-privcand-00.xml

Large diffs are not rendered by default.

918 changes: 918 additions & 0 deletions draft-jgc-netconf-privcand-01.xml

Large diffs are not rendered by default.

1,004 changes: 1,004 additions & 0 deletions draft-jgc-netconf-privcand-02.xml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
xml2rfc
236 changes: 236 additions & 0 deletions yang/augments-approach/ietf-netconf-private-candidate.yang
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;
}
}
}

}
Loading

0 comments on commit 8b4753b

Please sign in to comment.