feat(netconf/junos): add description
This commit is contained in:
parent
e4697fc809
commit
4dbd5ac6b1
1 changed files with 17 additions and 0 deletions
|
@ -25,6 +25,7 @@ let
|
|||
interface =
|
||||
{ name, config, ... }:
|
||||
let
|
||||
intf_cfg = config;
|
||||
unit =
|
||||
{ name, config, ... }:
|
||||
{
|
||||
|
@ -33,6 +34,13 @@ let
|
|||
default = true;
|
||||
example = false;
|
||||
};
|
||||
description = mkOption {
|
||||
type = str;
|
||||
default = intf_cfg.description + "." + name;
|
||||
description = ''
|
||||
Descriptive name of this interface unit.
|
||||
'';
|
||||
};
|
||||
family = {
|
||||
ethernet-switching = {
|
||||
enable = mkEnableOption "the ethernet switching on this logical interface";
|
||||
|
@ -115,6 +123,7 @@ let
|
|||
<unit>
|
||||
<name>${name}</name>
|
||||
${optionalString (!config.enable) "<disable/>"}
|
||||
${optionalString config.enable "<description>${config.description}</description>"}
|
||||
<family>
|
||||
${eth}${inet}${inet6}
|
||||
</family>
|
||||
|
@ -131,6 +140,13 @@ let
|
|||
Configuration of the logical interfaces on this physical interface.
|
||||
'';
|
||||
};
|
||||
description = mkOption {
|
||||
type = str;
|
||||
default = name;
|
||||
description = ''
|
||||
Descriptive name of this interface.
|
||||
'';
|
||||
};
|
||||
xml = mkOption {
|
||||
type = str;
|
||||
visible = false;
|
||||
|
@ -144,6 +160,7 @@ let
|
|||
''
|
||||
<interface>
|
||||
<name>${name}</name>
|
||||
${optionalString config.enable "<description>${config.description}</description>"}
|
||||
${optionalString (!config.enable) "<disable/>"}
|
||||
${builtins.concatStringsSep "" units}
|
||||
</interface>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue