Skip to content

Commit

Permalink
infix-*.yang: fix indentation (2 spaces)
Browse files Browse the repository at this point in the history
Align indentation in all infix yang models to be 2 spaces.

Signed-off-by: Richard Alpe <[email protected]>
  • Loading branch information
rical authored and wkz committed Jan 23, 2024
1 parent 9c466b8 commit 0549de0
Show file tree
Hide file tree
Showing 9 changed files with 619 additions and 623 deletions.
156 changes: 78 additions & 78 deletions src/confd/yang/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -28,58 +28,58 @@ module infix-dhcp-client {
type union {
type string;
type enumeration {
enum subnet {
value 1;
description "Subnet (IP address and netmask)";
}
enum router {
value 3;
description "Default route(s)";
}
enum dns {
value 6;
description "DNS server";
}
enum hostname {
value 12;
description "Hostname";
}
enum domain {
value 15;
description "Domain name";
}
enum broadcast {
value 28;
description "Broadcast address";
}
enum ntpsrv {
value 42;
description "NTP server";
}
enum address {
value 50;
description "Requested (previously cached) address";
}
enum clientid {
value 61;
description "Client ID (default MAC, and option 12)";
}
enum fqdn {
value 81;
description "Request DNS update of client FQDN argument";
}
enum search {
value 119;
description "Domain search list";
}
enum staticroutes {
value 121;
description "Classless static routes";
}
enum msstaticroutes {
value 249;
description "Microsoft classless static routes";
}
enum subnet {
value 1;
description "Subnet (IP address and netmask)";
}
enum router {
value 3;
description "Default route(s)";
}
enum dns {
value 6;
description "DNS server";
}
enum hostname {
value 12;
description "Hostname";
}
enum domain {
value 15;
description "Domain name";
}
enum broadcast {
value 28;
description "Broadcast address";
}
enum ntpsrv {
value 42;
description "NTP server";
}
enum address {
value 50;
description "Requested (previously cached) address";
}
enum clientid {
value 61;
description "Client ID (default MAC, and option 12)";
}
enum fqdn {
value 81;
description "Request DNS update of client FQDN argument";
}
enum search {
value 119;
description "Domain search list";
}
enum staticroutes {
value 121;
description "Classless static routes";
}
enum msstaticroutes {
value 249;
description "Microsoft classless static routes";
}
}
}
description "Supported DHCP client request options";
Expand Down Expand Up @@ -111,41 +111,41 @@ module infix-dhcp-client {
description "Enable DHCP client for this interface.";
}
leaf client-id {
type string;
description "Optional Client ID, option 61, default: MAC address.";
type string;
description "Optional Client ID, option 61, default: MAC address.";
}
leaf arping {
type boolean;
default "true";
description "ARP for lease to check for IP address collisions (slow).";
}
list option {
key "name";
description
"List of DHCP options to request (and accept). The default is an
empty list, meaning all supported options. To restrict the
client to only get IP address and default route, set this to:
'subnet router'";
leaf name {
type dhcp-options;
description "DHCP option to request from, or inform server of.";
}
leaf value {
type string;
description "Optional value, only used for non-flag request options.
Example: option:hostname, value:xyzzy
option:clientid, value:01:02:03:04:05:06:07:08:09:0a
option:0x51, value:xyzzy.example.com";
}
key "name";
description
"List of DHCP options to request (and accept). The default is an
empty list, meaning all supported options. To restrict the
client to only get IP address and default route, set this to:
'subnet router'";
leaf name {
type dhcp-options;
description "DHCP option to request from, or inform server of.";
}
leaf value {
type string;
description "Optional value, only used for non-flag request options.
Example: option:hostname, value:xyzzy
option:clientid, value:01:02:03:04:05:06:07:08:09:0a
option:0x51, value:xyzzy.example.com";
}
}
leaf route-preference {
type route-preference;
default 100;
description
"The metric any route is installed with, both option 33 and 121.
The default (100) is based on a plain Ethernet interface, the
interface type determines this, e.g. a WiFi interface would be
metric 500.";
type route-preference;
default 100;
description
"The metric any route is installed with, both option 33 and 121.
The default (100) is based on a plain Ethernet interface, the
interface type determines this, e.g. a WiFi interface would be
metric 500.";
}
}
}
Expand Down
62 changes: 31 additions & 31 deletions src/confd/yang/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,25 @@ submodule infix-if-bridge {
typedef ieee-reserved-groups {
type union {
type uint8 {
range "0..15";
range "0..15";
}
type enumeration {
enum stp {
value 0;
description "Spanning Tree (STP/RSPT/MSTP).";
}
enum lacp {
value 2;
description "802.3 Slow Protocols, e.g., LACP.";
}
enum dot1x {
value 3;
description "802.1X Port-Based Network Access Control.";
}
enum lldp {
value 14;
description "802.1AB Link Layer Discovery Protocol (LLDP).";
}
enum stp {
value 0;
description "Spanning Tree (STP/RSPT/MSTP).";
}
enum lacp {
value 2;
description "802.3 Slow Protocols, e.g., LACP.";
}
enum dot1x {
value 3;
description "802.1X Port-Based Network Access Control.";
}
enum lldp {
value 14;
description "802.1AB Link Layer Discovery Protocol (LLDP).";
}
}
}
description
Expand All @@ -92,20 +92,20 @@ submodule infix-if-bridge {
description "IEEE 802.1Q style bridge.";

leaf-list ieee-group-forward {
type ieee-reserved-groups;
description
"List of IEEE link-local protocols to forward, e.g., STP, LLDP";
type ieee-reserved-groups;
description
"List of IEEE link-local protocols to forward, e.g., STP, LLDP";
}

container vlans {
if-feature "vlan-filtering";
description "A VLAN filtering bridge has at least one VLAN.";

leaf proto {
type dot1q-types:dot1q-tag-type;
default dot1q-types:c-vlan;
description "Standard (1Q/c-vlan) or provider (1ad/s-vlan) bridge.";
}
leaf proto {
type dot1q-types:dot1q-tag-type;
default dot1q-types:c-vlan;
description "Standard (1Q/c-vlan) or provider (1ad/s-vlan) bridge.";
}

list vlan {
key "vid";
Expand All @@ -123,9 +123,9 @@ submodule infix-if-bridge {

leaf-list tagged {
type if:interface-ref;
must "not(../untagged[contains(., current())])" {
error-message "Cannot be an untagged port at the same time.";
}
must "not(../untagged[contains(., current())])" {
error-message "Cannot be an untagged port at the same time.";
}
description "The set of ports in the tagged set for VLAN.";
}
}
Expand All @@ -147,7 +147,7 @@ submodule infix-if-bridge {
description "Extension of the IETF Interfaces model (RFC7223).";

container bridge-port {
description "Bridge association and port specific setttngs.";
description "Bridge association and port specific setttngs.";

leaf bridge {
type if:interface-ref;
Expand All @@ -159,14 +159,14 @@ submodule infix-if-bridge {
}

leaf pvid {
if-feature "vlan-filtering";
if-feature "vlan-filtering";
type dot1q-types:vlanid;
default "1";
description "The primary VID assigned to this bridge port.";
}

leaf default-priority {
if-feature "vlan-filtering";
if-feature "vlan-filtering";
type dot1q-types:priority-type;
default "0";
description "The default priority assigned to this bridge port.";
Expand Down
2 changes: 1 addition & 1 deletion src/confd/yang/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ submodule infix-if-veth {

augment "/if:interfaces/if:interface" {
when "derived-from-or-self(if:type, 'infixift:veth')" {
description "Only shown for if:type infixift:veth (ianaift:ilan)";
description "Only shown for if:type infixift:veth (ianaift:ilan)";
}

description "Augments the interface model with virtual Ethernet pairs.";
Expand Down
18 changes: 9 additions & 9 deletions src/confd/yang/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ submodule infix-if-vlan {
container vlan {
description "Configure 802.1q/802.1ad VLANs";
leaf tag-type {
type dot1q-types:dot1q-tag-type;
default dot1q-types:c-vlan;
description "VLAN type";
type dot1q-types:dot1q-tag-type;
default dot1q-types:c-vlan;
description "VLAN type";
}
leaf id {
type dot1q-types:vlanid;
mandatory true;
description "VLAN Id";
type dot1q-types:vlanid;
mandatory true;
description "VLAN Id";
}
leaf lower-layer-if {
type if:interface-ref;
mandatory true;
description "Base interface for VLAN";
type if:interface-ref;
mandatory true;
description "Base interface for VLAN";
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/confd/yang/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module infix-interfaces {
deviation "/if:interfaces/if:interface/if:type" {
deviate replace {
type identityref {
base infixift:infix-interface-type;
base infixift:infix-interface-type;
}
}
}
Expand Down
16 changes: 8 additions & 8 deletions src/confd/yang/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@ module infix-ip {
augment "/if:interfaces/if:interface/ip:ipv4" {
container autoconf {
description
"Parameters to control the autoconfiguration of IPv4 address.";
"Parameters to control the autoconfiguration of IPv4 address.";

leaf enabled {
type boolean;
default false;
description
"Use a ZeroConf/IPv4LL agent to retrieve an 169.254/16 address.";
reference
"RFC 3927: Dynamic Configuration of IPv4 Link-Local Addresses";
type boolean;
default false;
description
"Use a ZeroConf/IPv4LL agent to retrieve an 169.254/16 address.";
reference
"RFC 3927: Dynamic Configuration of IPv4 Link-Local Addresses";
}
}
}

deviation "/if:interfaces/if:interface/ip:ipv4/ip:address/ip:subnet/ip:netmask" {
deviate not-supported;
}

deviation "/if:interfaces/if:interface/ip:ipv4/ip:neighbor" {
deviate not-supported;
}
Expand Down
Loading

0 comments on commit 0549de0

Please sign in to comment.