Skip to content

Commit

Permalink
yang: rename deviation modules to follow industry convention
Browse files Browse the repository at this point in the history
Rename from ietf-XXX-holo-deviations to holo-ietf-XXX-deviations.
Apparently this is the naming convention most vendors are following.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
  • Loading branch information
rwestphal committed Jul 10, 2024
1 parent 7f47337 commit 32a0313
Show file tree
Hide file tree
Showing 20 changed files with 90 additions and 90 deletions.
6 changes: 3 additions & 3 deletions holo-tools/src/yang_deviations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ fn main() {
// Header.
println!(
"\
module {}-holo-deviations {{\
module holo-{}-deviations {{\
\n yang-version 1.1;\
\n namespace \"http://holo-routing.org/yang/{}-holo-deviations\";\
\n prefix {}-holo-deviations;\
\n namespace \"http://holo-routing.org/yang/holo-{}-deviations\";\
\n prefix holo-{}-deviations;\
\n\
\n import {} {{\
\n prefix {};\
Expand Down
2 changes: 1 addition & 1 deletion holo-yang/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "holo-yang"
version = "0.5.1"
version = "0.5.2"
authors.workspace = true
license.workspace = true
edition.workspace = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ietf-bgp-holo-deviations {
module holo-ietf-bgp-deviations {
yang-version 1.1;
namespace "http://holo-routing.org/yang/ietf-bgp-holo-deviations";
prefix ietf-bgp-holo-deviations;
namespace "http://holo-routing.org/yang/holo-ietf-bgp-deviations";
prefix holo-ietf-bgp-deviations;

import ietf-routing {
prefix rt;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ietf-if-extensions-holo-deviations {
module holo-ietf-if-extensions-deviations {
yang-version 1.1;
namespace "http://holo-routing.org/yang/ietf-if-extensions-holo-deviations";
prefix ietf-if-extensions-holo-deviations;
namespace "http://holo-routing.org/yang/holo-ietf-if-extensions-deviations";
prefix holo-ietf-if-extensions-deviations;

import ietf-interfaces {
prefix if;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ietf-if-vlan-encapsulation-holo-deviations {
module holo-ietf-if-vlan-encapsulation-deviations {
yang-version 1.1;
namespace "http://holo-routing.org/yang/ietf-if-vlan-encapsulation-holo-deviations";
prefix ietf-if-vlan-encapsulation-holo-deviations;
namespace "http://holo-routing.org/yang/holo-ietf-if-vlan-encapsulation-deviations";
prefix holo-ietf-if-vlan-encapsulation-deviations;

import ietf-interfaces {
prefix if;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ietf-interfaces-holo-deviations {
module holo-ietf-interfaces-deviations {
yang-version 1.1;
namespace "http://holo-routing.org/yang/ietf-interfaces-holo-deviations";
prefix ietf-interfaces-holo-deviations;
namespace "http://holo-routing.org/yang/holo-ietf-interfaces-deviations";
prefix holo-ietf-interfaces-deviations;

import ietf-interfaces {
prefix if;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ietf-ip-holo-deviations {
module holo-ietf-ip-deviations {
yang-version 1.1;
namespace "http://holo-routing.org/yang/ietf-ip-holo-deviations";
prefix ietf-ip-holo-deviations;
namespace "http://holo-routing.org/yang/holo-ietf-ip-deviations";
prefix holo-ietf-ip-deviations;

import ietf-interfaces {
prefix if;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ietf-ipv6-unicast-routing-holo-deviations {
module holo-ietf-ipv6-unicast-routing-deviations {
yang-version 1.1;
namespace "http://holo-routing.org/yang/ietf-ipv6-unicast-routing-holo-deviations";
prefix ietf-ipv6-unicast-routing-holo-deviations;
namespace "http://holo-routing.org/yang/holo-ietf-ipv6-unicast-routing-deviations";
prefix holo-ietf-ipv6-unicast-routing-deviations;

import ietf-interfaces {
prefix if;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ietf-key-chain-holo-deviations {
module holo-ietf-key-chain-deviations {
yang-version 1.1;
namespace "http://holo-routing.org/yang/ietf-key-chain-holo-deviations";
prefix ietf-key-chain-holo-deviations;
namespace "http://holo-routing.org/yang/holo-ietf-key-chain-deviations";
prefix holo-ietf-key-chain-deviations;

import ietf-key-chain {
prefix key-chain;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ietf-mpls-holo-deviations {
module holo-ietf-mpls-deviations {
yang-version 1.1;
namespace "http://holo-routing.org/yang/ietf-mpls-holo-deviations";
prefix ietf-mpls-holo-deviations;
namespace "http://holo-routing.org/yang/holo-ietf-mpls-deviations";
prefix holo-ietf-mpls-deviations;

import ietf-routing {
prefix rt;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ietf-mpls-ldp-holo-deviations {
module holo-ietf-mpls-ldp-deviations {
yang-version 1.1;
namespace "http://holo-routing.org/yang/ietf-mpls-ldp-holo-deviations";
prefix ietf-mpls-ldp-holo-deviations;
namespace "http://holo-routing.org/yang/holo-ietf-mpls-ldp-deviations";
prefix holo-ietf-mpls-ldp-deviations;

import ietf-routing {
prefix rt;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ietf-ospf-holo-deviations {
module holo-ietf-ospf-deviations {
yang-version 1.1;
namespace "http://holo-routing.org/yang/ietf-ospf-holo-deviations";
prefix ietf-ospf-holo-deviations;
namespace "http://holo-routing.org/yang/holo-ietf-ospf-deviations";
prefix holo-ietf-ospf-deviations;

import ietf-routing {
prefix rt;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ietf-ospf-sr-mpls-holo-deviations {
module holo-ietf-ospf-sr-mpls-deviations {
yang-version 1.1;
namespace "http://holo-routing.org/yang/ietf-ospf-sr-mpls-holo-deviations";
prefix ietf-ospf-sr-holo-deviations;
namespace "http://holo-routing.org/yang/holo-ietf-ospf-sr-mpls-deviations";
prefix holo-ietf-ospf-sr-deviations;

import ietf-routing {
prefix rt;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ietf-ospfv3-extended-lsa-holo-deviations {
module holo-ietf-ospfv3-extended-lsa-deviations {
yang-version 1.1;
namespace "http://holo-routing.org/yang/ietf-ospfv3-extended-lsa-holo-deviations";
prefix ietf-ospfv3-extended-lsa-holo-deviations;
namespace "http://holo-routing.org/yang/holo-ietf-ospfv3-extended-lsa-deviations";
prefix holo-ietf-ospfv3-extended-lsa-deviations;

import ietf-routing {
prefix rt;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ietf-rip-holo-deviations {
module holo-ietf-rip-deviations {
yang-version 1.1;
namespace "http://holo-routing.org/yang/ietf-rip-holo-deviations";
prefix ietf-rip-holo-deviations;
namespace "http://holo-routing.org/yang/holo-ietf-rip-deviations";
prefix holo-ietf-rip-deviations;

import ietf-routing {
prefix rt;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ietf-routing-holo-deviations {
module holo-ietf-routing-deviations {
yang-version 1.1;
namespace "http://holo-routing.org/yang/ietf-routing-holo-deviations";
prefix ietf-routing-holo-deviations;
namespace "http://holo-routing.org/yang/holo-ietf-routing-deviations";
prefix holo-ietf-routing-deviations;

import ietf-routing {
prefix rt;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ietf-routing-policy-holo-deviations {
module holo-ietf-routing-policy-deviations {
yang-version 1.1;
namespace "http://holo-routing.org/yang/ietf-routing-policy-holo-deviations";
prefix ietf-routing-policy-holo-deviations;
namespace "http://holo-routing.org/yang/holo-ietf-routing-policy-deviations";
prefix holo-ietf-routing-policy-deviations;

import ietf-routing-policy {
prefix rt-pol;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ietf-segment-routing-mpls-holo-deviations {
module holo-ietf-segment-routing-mpls-deviations {
yang-version 1.1;
namespace "http://holo-routing.org/yang/ietf-segment-routing-mpls-holo-deviations";
prefix ietf-segment-routing-mpls-holo-deviations;
namespace "http://holo-routing.org/yang/holo-ietf-segment-routing-mpls-deviations";
prefix holo-ietf-segment-routing-mpls-deviations;

import ietf-routing {
prefix rt;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ietf-system-holo-deviations {
module holo-ietf-system-deviations {
yang-version 1.1;
namespace "http://holo-routing.org/yang/ietf-system-holo-deviations";
prefix ietf-system-holo-deviations;
namespace "http://holo-routing.org/yang/holo-ietf-system-deviations";
prefix holo-ietf-system-deviations;

import ietf-system {
prefix sys;
Expand Down
70 changes: 35 additions & 35 deletions holo-yang/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,40 +131,40 @@ pub static YANG_EMBEDDED_MODULES: Lazy<EmbeddedModules> = Lazy::new(|| {
EmbeddedModuleKey::new("holo-ospf-dev", None, None, None) =>
include_str!("../modules/augmentations/holo-ospf-dev.yang"),
// IETF Holo deviations
EmbeddedModuleKey::new("ietf-bgp-holo-deviations", None, None, None) =>
include_str!("../modules/deviations/ietf-bgp-holo-deviations.yang"),
EmbeddedModuleKey::new("ietf-mpls-ldp-holo-deviations", None, None, None) =>
include_str!("../modules/deviations/ietf-mpls-ldp-holo-deviations.yang"),
EmbeddedModuleKey::new("ietf-if-extensions-holo-deviations", None, None, None) =>
include_str!("../modules/deviations/ietf-if-extensions-holo-deviations.yang"),
EmbeddedModuleKey::new("ietf-if-vlan-encapsulation-holo-deviations", None, None, None) =>
include_str!("../modules/deviations/ietf-if-vlan-encapsulation-holo-deviations.yang"),
EmbeddedModuleKey::new("ietf-interfaces-holo-deviations", None, None, None) =>
include_str!("../modules/deviations/ietf-interfaces-holo-deviations.yang"),
EmbeddedModuleKey::new("ietf-ip-holo-deviations", None, None, None) =>
include_str!("../modules/deviations/ietf-ip-holo-deviations.yang"),
EmbeddedModuleKey::new("ietf-mpls-holo-deviations", None, None, None) =>
include_str!("../modules/deviations/ietf-mpls-holo-deviations.yang"),
EmbeddedModuleKey::new("ietf-key-chain-holo-deviations", None, None, None) =>
include_str!("../modules/deviations/ietf-key-chain-holo-deviations.yang"),
EmbeddedModuleKey::new("ietf-ospf-holo-deviations", None, None, None) =>
include_str!("../modules/deviations/ietf-ospf-holo-deviations.yang"),
EmbeddedModuleKey::new("ietf-ospf-sr-mpls-holo-deviations", None, None, None) =>
include_str!("../modules/deviations/ietf-ospf-sr-mpls-holo-deviations.yang"),
EmbeddedModuleKey::new("ietf-ospfv3-extended-lsa-holo-deviations", None, None, None) =>
include_str!("../modules/deviations/ietf-ospfv3-extended-lsa-holo-deviations.yang"),
EmbeddedModuleKey::new("ietf-rip-holo-deviations", None, None, None) =>
include_str!("../modules/deviations/ietf-rip-holo-deviations.yang"),
EmbeddedModuleKey::new("ietf-system-holo-deviations", None, None, None) =>
include_str!("../modules/deviations/ietf-system-holo-deviations.yang"),
EmbeddedModuleKey::new("ietf-routing-holo-deviations", None, None, None) =>
include_str!("../modules/deviations/ietf-routing-holo-deviations.yang"),
EmbeddedModuleKey::new("ietf-ipv6-unicast-routing-holo-deviations", None, None, None) =>
include_str!("../modules/deviations/ietf-ipv6-unicast-routing-holo-deviations.yang"),
EmbeddedModuleKey::new("ietf-routing-policy-holo-deviations", None, None, None) =>
include_str!("../modules/deviations/ietf-routing-policy-holo-deviations.yang"),
EmbeddedModuleKey::new("ietf-segment-routing-mpls-holo-deviations", None, None, None) =>
include_str!("../modules/deviations/ietf-segment-routing-mpls-holo-deviations.yang"),
EmbeddedModuleKey::new("holo-ietf-bgp-deviations", None, None, None) =>
include_str!("../modules/deviations/holo-ietf-bgp-deviations.yang"),
EmbeddedModuleKey::new("holo-ietf-mpls-ldp-deviations", None, None, None) =>
include_str!("../modules/deviations/holo-ietf-mpls-ldp-deviations.yang"),
EmbeddedModuleKey::new("holo-ietf-if-extensions-deviations", None, None, None) =>
include_str!("../modules/deviations/holo-ietf-if-extensions-deviations.yang"),
EmbeddedModuleKey::new("holo-ietf-if-vlan-encapsulation-deviations", None, None, None) =>
include_str!("../modules/deviations/holo-ietf-if-vlan-encapsulation-deviations.yang"),
EmbeddedModuleKey::new("holo-ietf-interfaces-deviations", None, None, None) =>
include_str!("../modules/deviations/holo-ietf-interfaces-deviations.yang"),
EmbeddedModuleKey::new("holo-ietf-ip-deviations", None, None, None) =>
include_str!("../modules/deviations/holo-ietf-ip-deviations.yang"),
EmbeddedModuleKey::new("holo-ietf-mpls-deviations", None, None, None) =>
include_str!("../modules/deviations/holo-ietf-mpls-deviations.yang"),
EmbeddedModuleKey::new("holo-ietf-key-chain-deviations", None, None, None) =>
include_str!("../modules/deviations/holo-ietf-key-chain-deviations.yang"),
EmbeddedModuleKey::new("holo-ietf-ospf-deviations", None, None, None) =>
include_str!("../modules/deviations/holo-ietf-ospf-deviations.yang"),
EmbeddedModuleKey::new("holo-ietf-ospf-sr-mpls-deviations", None, None, None) =>
include_str!("../modules/deviations/holo-ietf-ospf-sr-mpls-deviations.yang"),
EmbeddedModuleKey::new("holo-ietf-ospfv3-extended-lsa-deviations", None, None, None) =>
include_str!("../modules/deviations/holo-ietf-ospfv3-extended-lsa-deviations.yang"),
EmbeddedModuleKey::new("holo-ietf-rip-deviations", None, None, None) =>
include_str!("../modules/deviations/holo-ietf-rip-deviations.yang"),
EmbeddedModuleKey::new("holo-ietf-system-deviations", None, None, None) =>
include_str!("../modules/deviations/holo-ietf-system-deviations.yang"),
EmbeddedModuleKey::new("holo-ietf-routing-deviations", None, None, None) =>
include_str!("../modules/deviations/holo-ietf-routing-deviations.yang"),
EmbeddedModuleKey::new("holo-ietf-ipv6-unicast-routing-deviations", None, None, None) =>
include_str!("../modules/deviations/holo-ietf-ipv6-unicast-routing-deviations.yang"),
EmbeddedModuleKey::new("holo-ietf-routing-policy-deviations", None, None, None) =>
include_str!("../modules/deviations/holo-ietf-routing-policy-deviations.yang"),
EmbeddedModuleKey::new("holo-ietf-segment-routing-mpls-deviations", None, None, None) =>
include_str!("../modules/deviations/holo-ietf-segment-routing-mpls-deviations.yang"),
}
});

Expand Down Expand Up @@ -351,7 +351,7 @@ pub fn load_module(ctx: &mut Context, name: &str) {

// Loads a YANG deviations module.
pub fn load_deviations(ctx: &mut Context, name: &str) {
let name = format!("{}-holo-deviations", name);
let name = format!("holo-{}-deviations", name);
// Ignore errors since the deviation module might not exist.
let _ = ctx.load_module(&name, None, &[]);
}

0 comments on commit 32a0313

Please sign in to comment.