Skip to content

Commit

Permalink
snabb-snabbflow-v1.yang: use leafrefs where sensible
Browse files Browse the repository at this point in the history
  • Loading branch information
eugeneia committed Nov 17, 2022
1 parent 78f1a11 commit 68cd6c4
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions src/lib/yang/snabb-snabbflow-v1.yang
Expand Up @@ -106,7 +106,10 @@ module snabb-snabbflow-v1 {
"Sofware RSS configuration for the selected exporter.";

leaf name {
type string-name;
type leafref {
path "/snabbflow-config/ipfix/exporter/name";
require-instance true;
}
description
"The 'name' of an exporter defined in
/snabbflow-config/ipfix/exporter.";
Expand Down Expand Up @@ -184,7 +187,10 @@ module snabb-snabbflow-v1 {
ordered-by user;

leaf exporter {
type string-name;
type leafref {
path "/snabbflow-config/ipfix/exporter/name";
require-instance true;
}
description
"An exporter defined in /snabbflow-config/ipfix/exporter.
Packets matched by the class are processed by this exporter.";
Expand Down Expand Up @@ -215,7 +221,10 @@ module snabb-snabbflow-v1 {
any other traffic class.";

leaf exporter {
type string-name;
type leafref {
path "/snabbflow-config/ipfix/exporter/name";
require-instance true;
}
description
"An exporter defined in /snabbflow-config/ipfix/exporter.
Flows matched by the default class are processed by this
Expand Down Expand Up @@ -390,7 +399,7 @@ module snabb-snabbflow-v1 {
type string-name;
description
"Identifier used to refer to the collector pool in
/snabbflow-config/ipic/exporter.";
/snabbflow-config/ipfix/exporter/collector-pool.";
}

list collector {
Expand Down Expand Up @@ -436,7 +445,7 @@ module snabb-snabbflow-v1 {
type string-name;
description
"The name used to refer to this exporter in
/snabbflow-config/rss/software-scaling.";
/snabbflow-config/rss/software-scaling/exporter/name.";
}

leaf-list template {
Expand All @@ -447,7 +456,11 @@ module snabb-snabbflow-v1 {
}

leaf collector-pool {
type string;
type leafref {
path "/snabbflow-config/ipfix/collector-pool/name";
require-instance true;
}
mandatory true;
description
"A collector pool defined in /snabbflow-config/ipfix/collector-pool.";
}
Expand Down Expand Up @@ -500,7 +513,9 @@ module snabb-snabbflow-v1 {
"Exporter statistics.";

leaf name {
type string-name;
type leafref {
path "/snabbflow-config/ipfix/exporter/name";
}
description
"An exporter defined in /snabbflow-config/ipfix/exporter.";
}
Expand Down Expand Up @@ -555,7 +570,9 @@ module snabb-snabbflow-v1 {
/snabbflow-config/rss/software-scaling.";

leaf name {
type string-name;
type leafref {
path "/snabbflow-config/ipfix/exporter/name";
}
description
"An exporter defined in /snabbflow-config/ipfix/exporter.";
}
Expand Down Expand Up @@ -589,7 +606,7 @@ module snabb-snabbflow-v1 {

grouping interface-state {
leaf device {
type string;
type pci-address;
description
"PCI address of the network device.";
}
Expand Down

0 comments on commit 68cd6c4

Please sign in to comment.