Skip to content

Commit

Permalink
Added extensions/ with examples of Junper PTX extensions.
Browse files Browse the repository at this point in the history
  • Loading branch information
krihal committed Feb 12, 2025
1 parent acbc71e commit ba7ed4b
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 0 deletions.
30 changes: 30 additions & 0 deletions extensions/junos/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Extension to BGP to ignore the authentication-key since it is
* re-written by JunOS and will not match the original configuration.
*/

module controller-extensions-bgp-md5 {
namespace "http://clicon.org/ext/bgp-md5";

prefix cl-ext;

import clixon-lib {
prefix cl;
}

import junos-conf-root {
prefix jc;
}

import junos-conf-protocols {
prefix jcp;
}

revision 2024-04-25 {
description "Initial prototype";
}

augment "/jc:configuration/jcp:protocols/jcp:bgp/jcp:group/jcp:neighbor/jcp:authentication-key" {
cl:ignore-compare;
}
}
35 changes: 35 additions & 0 deletions extensions/junos/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Extension module for MACsec configuration, the secret key length is
* extended to 1024 characters.
*/

module controller-extensions-macsec {
namespace "http://clicon.org/ext/macsec";

prefix cl-ext;

import junos-conf-root {
prefix jc;
}

import junos-conf-security {
prefix jcs;
}

revision 2024-01-01 {
description "Initial prototype";
}

deviation "/jc:configuration/jcs:security/jcs:authentication-key-chains/jcs:key-chain/jcs:name" {
deviate replace {
type string;
}
}
deviation "/jc:configuration/jcs:security/jcs:authentication-key-chains/jcs:key-chain/jcs:key/jcs:secret" {
deviate replace {
type string {
length "1 .. 1024";
}
}
}
}
31 changes: 31 additions & 0 deletions extensions/junos/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Extension to ignore the UID configuration in the Junos
* configuration since it can be generated by the system and will not
* match the configuration.
*/

module controller-extensions-uid {
namespace "http://clicon.org/ext/uid";

prefix cl-ext;

import clixon-lib {
prefix cl;
}

import junos-conf-root {
prefix jc;
}

import junos-conf-system {
prefix jcs;
}

revision 2024-01-01 {
description "Initial prototype";
}

augment "/jc:configuration/jcs:system/jcs:login/jcs:user/jcs:uid" {
cl:ignore-compare;
}
}

0 comments on commit ba7ed4b

Please sign in to comment.