From e64bea03ec05ebcc08030c224ee5442868dcc446 Mon Sep 17 00:00:00 2001 From: Github Action Date: Wed, 27 Nov 2024 23:56:39 +0000 Subject: [PATCH] ci: update to rolling release 2024-11-27T00:06:17Z --- data/vyos-1x-info.txt | 2 +- docs/resources/qos_policy_cake.md | 39 ++- docs/resources/service_ipoe_server.md | 7 + .../service_ipoe_server_interface.md | 7 + docs/resources/service_mdns_repeater.md | 8 + .../resources/vpn_ipsec_authentication_psk.md | 3 + .../resourcemodel/service-ipoe-server.go | 20 ++ .../resourcemodel/service-mdns-repeater.go | 25 ++ .../qos-policy-cake-flow-isolation.go | 186 ------------ .../resourcemodel/qos-policy-cake.go | 84 ++++-- .../qos-policy-shaper-hfsc-class-linkshare.go | 6 - .../qos-policy-shaper-hfsc-class-realtime.go | 6 - ...qos-policy-shaper-hfsc-class-upperlimit.go | 6 - ...os-policy-shaper-hfsc-default-linkshare.go | 6 - ...qos-policy-shaper-hfsc-default-realtime.go | 6 - ...s-policy-shaper-hfsc-default-upperlimit.go | 6 - .../service-ipoe-server-interface.go | 20 ++ .../vpn-ipsec-authentication-psk.go | 17 ++ internal/vyos/vyosinterfaces/autogen-qos.go | 281 ++++++------------ .../vyos/vyosinterfaces/autogen-service.go | 94 ++++++ internal/vyos/vyosinterfaces/autogen-vpn.go | 25 ++ 21 files changed, 402 insertions(+), 452 deletions(-) delete mode 100644 internal/terraform/resource/autogen/named/qos/policy-cake/resourcemodel/qos-policy-cake-flow-isolation.go diff --git a/data/vyos-1x-info.txt b/data/vyos-1x-info.txt index 2afe59374..347186c23 100644 --- a/data/vyos-1x-info.txt +++ b/data/vyos-1x-info.txt @@ -1 +1 @@ -2024-11-20T00:06:06Z +2024-11-27T00:06:17Z diff --git a/docs/resources/qos_policy_cake.md b/docs/resources/qos_policy_cake.md index bd6d81a30..71d39f8bd 100644 --- a/docs/resources/qos_policy_cake.md +++ b/docs/resources/qos_policy_cake.md @@ -32,12 +32,12 @@ Service Policy definitions - [bandwidth](#bandwidth) - [description](#description) - [flow_isolation](#flow_isolation) + - [flow_isolation_nat](#flow_isolation_nat) - [rtt](#rtt) - [timeouts](#timeouts) - [Read-Only](#read-only) - [id](#id) - [Nested Schema for `identifier`](#nested-schema-for-identifier) - - [Nested Schema for `flow_isolation`](#nested-schema-for-flow_isolation) - [Nested Schema for `timeouts`](#nested-schema-for-timeouts) - [Import](#import) @@ -72,13 +72,26 @@ Service Policy definitions |----------|---------------| | txt  | Description | #### flow_isolation -- `flow_isolation` (Attributes) Flow isolation settings (see [below for nested schema](#nestedatt--flow_isolation)) +- `flow_isolation` (String) Flow isolation settings + + | Format  | Description | + |------------------|----------------------------------------------------------------------------------------------------------------------------------------| + | blind  | Disables flow isolation, all traffic passes through a single queue | + | src-host  | Flows are defined only by source address | + | dst-host  | Flows are defined only by destination address | + | host  | Flows are defined by source-destination host pairs | + | flow  | Flows are defined by the entire 5-tuple | + | dual-src-host  | Flows are defined by the 5-tuple, fairness is applied first over source addresses, then over individual flows | + | dual-dst-host  | Flows are defined by the 5-tuple, fairness is applied first over destination addresses, then over individual flows | + | triple-isolate  | Flows are defined by the 5-tuple, fairness is applied over source and destination addresses and also over individual flows (default) | +#### flow_isolation_nat +- `flow_isolation_nat` (Boolean) Perform NAT lookup before applying flow-isolation rules #### rtt - `rtt` (Number) Round-Trip-Time for Active Queue Management (AQM) - | Format  | Description | - |-------------|---------------| - | 1-3600000  | RTT in ms | + | Format  | Description | + |----------------|---------------| + | 1-1000000000  | RTT in ms | #### timeouts - `timeouts` (Attributes) (see [below for nested schema](#nestedatt--timeouts)) @@ -99,22 +112,6 @@ Required: | txt  | Policy name | - -### Nested Schema for `flow_isolation` - -Optional: - -- `blind` (Boolean) Disables flow isolation, all traffic passes through a single queue -- `dst_host` (Boolean) Flows are defined only by destination address -- `dual_dst_host` (Boolean) Flows are defined by the 5-tuple, fairness is applied first over destination addresses, then over individual flows -- `dual_src_host` (Boolean) Flows are defined by the 5-tuple, fairness is applied first over source addresses, then over individual flows -- `flow` (Boolean) Flows are defined by the entire 5-tuple -- `host` (Boolean) Flows are defined by source-destination host pairs -- `nat` (Boolean) Perform NAT lookup before applying flow-isolation rules -- `src_host` (Boolean) Flows are defined only by source address -- `triple_isolate` (Boolean) Flows are defined by the 5-tuple, fairness is applied over source and destination addresses and also over individual flows (default) - - ### Nested Schema for `timeouts` diff --git a/docs/resources/service_ipoe_server.md b/docs/resources/service_ipoe_server.md index 9629b1de9..176447c3d 100644 --- a/docs/resources/service_ipoe_server.md +++ b/docs/resources/service_ipoe_server.md @@ -31,6 +31,7 @@ description: |- - [default_pool](#default_pool) - [description](#description) - [gateway_address](#gateway_address) + - [lua_file](#lua_file) - [max_concurrent_sessions](#max_concurrent_sessions) - [name_server](#name_server) - [timeouts](#timeouts) @@ -70,6 +71,12 @@ description: |- | Format  | Description | |-----------|--------------------------------------------| | ipv4net  | Default Gateway, mask send to the client | +#### lua_file +- `lua_file` (String) Lua script file for constructing user names + + | Format  | Description | + |------------|-----------------------------------------------------| + | filename  | File with Lua script in /config/scripts directory | #### max_concurrent_sessions - `max_concurrent_sessions` (Number) Maximum number of concurrent session start attempts diff --git a/docs/resources/service_ipoe_server_interface.md b/docs/resources/service_ipoe_server_interface.md index 3d4a3db05..fe713666e 100644 --- a/docs/resources/service_ipoe_server_interface.md +++ b/docs/resources/service_ipoe_server_interface.md @@ -31,6 +31,7 @@ Internet Protocol over Ethernet (IPoE) Server - [Optional](#optional) - [client_subnet](#client_subnet) - [external_dhcp](#external_dhcp) + - [lua_username](#lua_username) - [mode](#mode) - [network](#network) - [timeouts](#timeouts) @@ -63,6 +64,12 @@ Internet Protocol over Ethernet (IPoE) Server | ipv4net  | IPv4 address and prefix length | #### external_dhcp - `external_dhcp` (Attributes) DHCP requests will be forwarded (see [below for nested schema](#nestedatt--external_dhcp)) +#### lua_username +- `lua_username` (String) Username function + + | Format  | Description | + |----------|--------------------------------------------------------------------| + | txt  | Name of the function in the Lua file to construct usernames with | #### mode - `mode` (String) Client connectivity mode diff --git a/docs/resources/service_mdns_repeater.md b/docs/resources/service_mdns_repeater.md index 10e25b0c8..7cd6fa4fe 100644 --- a/docs/resources/service_mdns_repeater.md +++ b/docs/resources/service_mdns_repeater.md @@ -31,6 +31,7 @@ Multicast DNS (mDNS) parameters - [Optional](#optional) - [allow_service](#allow_service) - [browse_domain](#browse_domain) + - [cache_entries](#cache_entries) - [disable](#disable) - [interface](#interface) - [ip_version](#ip_version) @@ -60,6 +61,13 @@ Multicast DNS (mDNS) parameters | Format  | Description | |----------|------------------------| | txt  | mDNS browsing domain | +#### cache_entries +- `cache_entries` (Number) Number of resource records cached per interface + + | Format  | Description | + |-----------|-------------------------------------------| + | 0  | Disable caching | + | 1-65535  | Resource records to cache per interface | #### disable - `disable` (Boolean) Disable instance #### interface diff --git a/docs/resources/vpn_ipsec_authentication_psk.md b/docs/resources/vpn_ipsec_authentication_psk.md index 2db067895..01daed18a 100644 --- a/docs/resources/vpn_ipsec_authentication_psk.md +++ b/docs/resources/vpn_ipsec_authentication_psk.md @@ -34,6 +34,7 @@ Authentication - [dhcp_interface](#dhcp_interface) - [id_param](#id_param) - [secret](#secret) + - [secret_type](#secret_type) - [timeouts](#timeouts) - [Read-Only](#read-only) - [id](#id) @@ -71,6 +72,8 @@ Authentication | Format  | Description | |----------|-----------------------------| | txt  | IKE pre-shared secret key | +#### secret_type +- `secret_type` (String) Secret type #### timeouts - `timeouts` (Attributes) (see [below for nested schema](#nestedatt--timeouts)) diff --git a/internal/terraform/resource/autogen/global/service/ipoe-server/resourcemodel/service-ipoe-server.go b/internal/terraform/resource/autogen/global/service/ipoe-server/resourcemodel/service-ipoe-server.go index 0935e2a7a..941a5ec3e 100644 --- a/internal/terraform/resource/autogen/global/service/ipoe-server/resourcemodel/service-ipoe-server.go +++ b/internal/terraform/resource/autogen/global/service/ipoe-server/resourcemodel/service-ipoe-server.go @@ -28,6 +28,7 @@ type ServiceIPoeServer struct { Timeouts timeouts.Value `tfsdk:"timeouts" vyos:"-,timeout"` // LeafNodes + LeafServiceIPoeServerLuaFile types.String `tfsdk:"lua_file" vyos:"lua-file,omitempty"` LeafServiceIPoeServerDefaultPool types.String `tfsdk:"default_pool" vyos:"default-pool,omitempty"` LeafServiceIPoeServerDefaultIPvsixPool types.String `tfsdk:"default_ipv6_pool" vyos:"default-ipv6-pool,omitempty"` LeafServiceIPoeServerGatewayAddress types.List `tfsdk:"gateway_address" vyos:"gateway-address,omitempty"` @@ -119,6 +120,25 @@ func (o ServiceIPoeServer) ResourceSchemaAttributes(ctx context.Context) map[str // LeafNodes + "lua_file": + + /* tools/generate-terraform-resource-full/templates/resources/common/resource-model-schema-attrtype.gotmpl #resource-model-schema-attrtype */ + schema.StringAttribute{ + Optional: true, + MarkdownDescription: `Lua script file for constructing user names + + | Format | Description | + |------------|-----------------------------------------------------| + | filename | File with Lua script in /config/scripts directory | +`, + Description: `Lua script file for constructing user names + + | Format | Description | + |------------|-----------------------------------------------------| + | filename | File with Lua script in /config/scripts directory | +`, + }, + "default_pool": /* tools/generate-terraform-resource-full/templates/resources/common/resource-model-schema-attrtype.gotmpl #resource-model-schema-attrtype */ diff --git a/internal/terraform/resource/autogen/global/service/mdns-repeater/resourcemodel/service-mdns-repeater.go b/internal/terraform/resource/autogen/global/service/mdns-repeater/resourcemodel/service-mdns-repeater.go index 5a1f7d6f6..538eff18b 100644 --- a/internal/terraform/resource/autogen/global/service/mdns-repeater/resourcemodel/service-mdns-repeater.go +++ b/internal/terraform/resource/autogen/global/service/mdns-repeater/resourcemodel/service-mdns-repeater.go @@ -34,6 +34,7 @@ type ServiceMDNSRepeater struct { LeafServiceMDNSRepeaterIPVersion types.String `tfsdk:"ip_version" vyos:"ip-version,omitempty"` LeafServiceMDNSRepeaterBrowseDomain types.List `tfsdk:"browse_domain" vyos:"browse-domain,omitempty"` LeafServiceMDNSRepeaterAllowService types.List `tfsdk:"allow_service" vyos:"allow-service,omitempty"` + LeafServiceMDNSRepeaterCacheEntries types.Number `tfsdk:"cache_entries" vyos:"cache-entries,omitempty"` LeafServiceMDNSRepeaterVrrpDisable types.Bool `tfsdk:"vrrp_disable" vyos:"vrrp-disable,omitempty"` // TagNodes @@ -206,6 +207,30 @@ func (o ServiceMDNSRepeater) ResourceSchemaAttributes(ctx context.Context) map[s `, }, + "cache_entries": + + /* tools/generate-terraform-resource-full/templates/resources/common/resource-model-schema-attrtype.gotmpl #resource-model-schema-attrtype */ + schema.NumberAttribute{ + Optional: true, + MarkdownDescription: `Number of resource records cached per interface + + | Format | Description | + |-----------|-------------------------------------------| + | 0 | Disable caching | + | 1-65535 | Resource records to cache per interface | +`, + Description: `Number of resource records cached per interface + + | Format | Description | + |-----------|-------------------------------------------| + | 0 | Disable caching | + | 1-65535 | Resource records to cache per interface | +`, + + // Default: stringdefault.StaticString(`4096`), + Computed: true, + }, + "vrrp_disable": /* tools/generate-terraform-resource-full/templates/resources/common/resource-model-schema-attrtype.gotmpl #resource-model-schema-attrtype */ diff --git a/internal/terraform/resource/autogen/named/qos/policy-cake/resourcemodel/qos-policy-cake-flow-isolation.go b/internal/terraform/resource/autogen/named/qos/policy-cake/resourcemodel/qos-policy-cake-flow-isolation.go deleted file mode 100644 index 37b74bff2..000000000 --- a/internal/terraform/resource/autogen/named/qos/policy-cake/resourcemodel/qos-policy-cake-flow-isolation.go +++ /dev/null @@ -1,186 +0,0 @@ -/* tools/generate-terraform-resource-full/templates/resources/common/package.gotmpl */ -// Package resourcemodel code generated by tools/generate-terraform-resource-full/main.go. DO NOT EDIT. -package resourcemodel - -/* tools/generate-terraform-resource-full/templates/resources/common/imports.gotmpl */ -import ( - "context" - - "github.com/hashicorp/terraform-plugin-framework/resource/schema" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault" - "github.com/hashicorp/terraform-plugin-framework/types" - - "github.com/thomasfinstad/terraform-provider-vyos-rolling/internal/terraform/helpers" -) - -/* tools/generate-terraform-resource-full/templates/resources/common/resource-model.gotmpl */ -// Validate compliance - -var _ helpers.VyosResourceDataModel = &QosPolicyCakeFlowIsolation{} - -// QosPolicyCakeFlowIsolation describes the resource data model. -// This is not a basenode! -// Top level basenode type: `N/A` -type QosPolicyCakeFlowIsolation struct { - // LeafNodes - LeafQosPolicyCakeFlowIsolationBlind types.Bool `tfsdk:"blind" vyos:"blind,omitempty"` - LeafQosPolicyCakeFlowIsolationSrcHost types.Bool `tfsdk:"src_host" vyos:"src-host,omitempty"` - LeafQosPolicyCakeFlowIsolationDstHost types.Bool `tfsdk:"dst_host" vyos:"dst-host,omitempty"` - LeafQosPolicyCakeFlowIsolationHost types.Bool `tfsdk:"host" vyos:"host,omitempty"` - LeafQosPolicyCakeFlowIsolationFlow types.Bool `tfsdk:"flow" vyos:"flow,omitempty"` - LeafQosPolicyCakeFlowIsolationDualSrcHost types.Bool `tfsdk:"dual_src_host" vyos:"dual-src-host,omitempty"` - LeafQosPolicyCakeFlowIsolationDualDstHost types.Bool `tfsdk:"dual_dst_host" vyos:"dual-dst-host,omitempty"` - LeafQosPolicyCakeFlowIsolationTrIPleIsolate types.Bool `tfsdk:"triple_isolate" vyos:"triple-isolate,omitempty"` - LeafQosPolicyCakeFlowIsolationNat types.Bool `tfsdk:"nat" vyos:"nat,omitempty"` - - // TagNodes - - // Nodes -} - -// ResourceSchemaAttributes generates the schema attributes for the resource at this level -func (o QosPolicyCakeFlowIsolation) ResourceSchemaAttributes(ctx context.Context) map[string]schema.Attribute { - return map[string]schema.Attribute{ - // LeafNodes - - "blind": - - /* tools/generate-terraform-resource-full/templates/resources/common/resource-model-schema-attrtype.gotmpl #resource-model-schema-attrtype */ - schema.BoolAttribute{ - Optional: true, - MarkdownDescription: `Disables flow isolation, all traffic passes through a single queue - -`, - Description: `Disables flow isolation, all traffic passes through a single queue - -`, - Default: booldefault.StaticBool(false), - Computed: true, - }, - - "src_host": - - /* tools/generate-terraform-resource-full/templates/resources/common/resource-model-schema-attrtype.gotmpl #resource-model-schema-attrtype */ - schema.BoolAttribute{ - Optional: true, - MarkdownDescription: `Flows are defined only by source address - -`, - Description: `Flows are defined only by source address - -`, - Default: booldefault.StaticBool(false), - Computed: true, - }, - - "dst_host": - - /* tools/generate-terraform-resource-full/templates/resources/common/resource-model-schema-attrtype.gotmpl #resource-model-schema-attrtype */ - schema.BoolAttribute{ - Optional: true, - MarkdownDescription: `Flows are defined only by destination address - -`, - Description: `Flows are defined only by destination address - -`, - Default: booldefault.StaticBool(false), - Computed: true, - }, - - "host": - - /* tools/generate-terraform-resource-full/templates/resources/common/resource-model-schema-attrtype.gotmpl #resource-model-schema-attrtype */ - schema.BoolAttribute{ - Optional: true, - MarkdownDescription: `Flows are defined by source-destination host pairs - -`, - Description: `Flows are defined by source-destination host pairs - -`, - Default: booldefault.StaticBool(false), - Computed: true, - }, - - "flow": - - /* tools/generate-terraform-resource-full/templates/resources/common/resource-model-schema-attrtype.gotmpl #resource-model-schema-attrtype */ - schema.BoolAttribute{ - Optional: true, - MarkdownDescription: `Flows are defined by the entire 5-tuple - -`, - Description: `Flows are defined by the entire 5-tuple - -`, - Default: booldefault.StaticBool(false), - Computed: true, - }, - - "dual_src_host": - - /* tools/generate-terraform-resource-full/templates/resources/common/resource-model-schema-attrtype.gotmpl #resource-model-schema-attrtype */ - schema.BoolAttribute{ - Optional: true, - MarkdownDescription: `Flows are defined by the 5-tuple, fairness is applied first over source addresses, then over individual flows - -`, - Description: `Flows are defined by the 5-tuple, fairness is applied first over source addresses, then over individual flows - -`, - Default: booldefault.StaticBool(false), - Computed: true, - }, - - "dual_dst_host": - - /* tools/generate-terraform-resource-full/templates/resources/common/resource-model-schema-attrtype.gotmpl #resource-model-schema-attrtype */ - schema.BoolAttribute{ - Optional: true, - MarkdownDescription: `Flows are defined by the 5-tuple, fairness is applied first over destination addresses, then over individual flows - -`, - Description: `Flows are defined by the 5-tuple, fairness is applied first over destination addresses, then over individual flows - -`, - Default: booldefault.StaticBool(false), - Computed: true, - }, - - "triple_isolate": - - /* tools/generate-terraform-resource-full/templates/resources/common/resource-model-schema-attrtype.gotmpl #resource-model-schema-attrtype */ - schema.BoolAttribute{ - Optional: true, - MarkdownDescription: `Flows are defined by the 5-tuple, fairness is applied over source and destination addresses and also over individual flows (default) - -`, - Description: `Flows are defined by the 5-tuple, fairness is applied over source and destination addresses and also over individual flows (default) - -`, - Default: booldefault.StaticBool(false), - Computed: true, - }, - - "nat": - - /* tools/generate-terraform-resource-full/templates/resources/common/resource-model-schema-attrtype.gotmpl #resource-model-schema-attrtype */ - schema.BoolAttribute{ - Optional: true, - MarkdownDescription: `Perform NAT lookup before applying flow-isolation rules - -`, - Description: `Perform NAT lookup before applying flow-isolation rules - -`, - Default: booldefault.StaticBool(false), - Computed: true, - }, - - // TagNodes - - // Nodes - - } -} diff --git a/internal/terraform/resource/autogen/named/qos/policy-cake/resourcemodel/qos-policy-cake.go b/internal/terraform/resource/autogen/named/qos/policy-cake/resourcemodel/qos-policy-cake.go index 6fdc2cfe6..02fcefd01 100644 --- a/internal/terraform/resource/autogen/named/qos/policy-cake/resourcemodel/qos-policy-cake.go +++ b/internal/terraform/resource/autogen/named/qos/policy-cake/resourcemodel/qos-policy-cake.go @@ -11,6 +11,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault" "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" "github.com/hashicorp/terraform-plugin-framework/schema/validator" @@ -37,15 +38,15 @@ type QosPolicyCake struct { Timeouts timeouts.Value `tfsdk:"timeouts" vyos:"-,timeout"` // LeafNodes - LeafQosPolicyCakeDescrIPtion types.String `tfsdk:"description" vyos:"description,omitempty"` - LeafQosPolicyCakeBandwIDth types.String `tfsdk:"bandwidth" vyos:"bandwidth,omitempty"` - LeafQosPolicyCakeRtt types.Number `tfsdk:"rtt" vyos:"rtt,omitempty"` + LeafQosPolicyCakeDescrIPtion types.String `tfsdk:"description" vyos:"description,omitempty"` + LeafQosPolicyCakeBandwIDth types.String `tfsdk:"bandwidth" vyos:"bandwidth,omitempty"` + LeafQosPolicyCakeFlowIsolation types.String `tfsdk:"flow_isolation" vyos:"flow-isolation,omitempty"` + LeafQosPolicyCakeFlowIsolationNat types.Bool `tfsdk:"flow_isolation_nat" vyos:"flow-isolation-nat,omitempty"` + LeafQosPolicyCakeRtt types.Number `tfsdk:"rtt" vyos:"rtt,omitempty"` // TagNodes // Nodes - - NodeQosPolicyCakeFlowIsolation *QosPolicyCakeFlowIsolation `tfsdk:"flow_isolation" vyos:"flow-isolation,omitempty"` } // SetID configures the resource ID @@ -211,6 +212,57 @@ func (o QosPolicyCake) ResourceSchemaAttributes(ctx context.Context) map[string] `, }, + "flow_isolation": + + /* tools/generate-terraform-resource-full/templates/resources/common/resource-model-schema-attrtype.gotmpl #resource-model-schema-attrtype */ + schema.StringAttribute{ + Optional: true, + MarkdownDescription: `Flow isolation settings + + | Format | Description | + |------------------|----------------------------------------------------------------------------------------------------------------------------------------| + | blind | Disables flow isolation, all traffic passes through a single queue | + | src-host | Flows are defined only by source address | + | dst-host | Flows are defined only by destination address | + | host | Flows are defined by source-destination host pairs | + | flow | Flows are defined by the entire 5-tuple | + | dual-src-host | Flows are defined by the 5-tuple, fairness is applied first over source addresses, then over individual flows | + | dual-dst-host | Flows are defined by the 5-tuple, fairness is applied first over destination addresses, then over individual flows | + | triple-isolate | Flows are defined by the 5-tuple, fairness is applied over source and destination addresses and also over individual flows (default) | +`, + Description: `Flow isolation settings + + | Format | Description | + |------------------|----------------------------------------------------------------------------------------------------------------------------------------| + | blind | Disables flow isolation, all traffic passes through a single queue | + | src-host | Flows are defined only by source address | + | dst-host | Flows are defined only by destination address | + | host | Flows are defined by source-destination host pairs | + | flow | Flows are defined by the entire 5-tuple | + | dual-src-host | Flows are defined by the 5-tuple, fairness is applied first over source addresses, then over individual flows | + | dual-dst-host | Flows are defined by the 5-tuple, fairness is applied first over destination addresses, then over individual flows | + | triple-isolate | Flows are defined by the 5-tuple, fairness is applied over source and destination addresses and also over individual flows (default) | +`, + + // Default: stringdefault.StaticString(`triple-isolate`), + Computed: true, + }, + + "flow_isolation_nat": + + /* tools/generate-terraform-resource-full/templates/resources/common/resource-model-schema-attrtype.gotmpl #resource-model-schema-attrtype */ + schema.BoolAttribute{ + Optional: true, + MarkdownDescription: `Perform NAT lookup before applying flow-isolation rules + +`, + Description: `Perform NAT lookup before applying flow-isolation rules + +`, + Default: booldefault.StaticBool(false), + Computed: true, + }, + "rtt": /* tools/generate-terraform-resource-full/templates/resources/common/resource-model-schema-attrtype.gotmpl #resource-model-schema-attrtype */ @@ -218,15 +270,15 @@ func (o QosPolicyCake) ResourceSchemaAttributes(ctx context.Context) map[string] Optional: true, MarkdownDescription: `Round-Trip-Time for Active Queue Management (AQM) - | Format | Description | - |-------------|---------------| - | 1-3600000 | RTT in ms | + | Format | Description | + |----------------|---------------| + | 1-1000000000 | RTT in ms | `, Description: `Round-Trip-Time for Active Queue Management (AQM) - | Format | Description | - |-------------|---------------| - | 1-3600000 | RTT in ms | + | Format | Description | + |----------------|---------------| + | 1-1000000000 | RTT in ms | `, // Default: stringdefault.StaticString(`100`), @@ -237,15 +289,5 @@ func (o QosPolicyCake) ResourceSchemaAttributes(ctx context.Context) map[string] // Nodes - "flow_isolation": schema.SingleNestedAttribute{ - Attributes: QosPolicyCakeFlowIsolation{}.ResourceSchemaAttributes(ctx), - Optional: true, - MarkdownDescription: `Flow isolation settings - -`, - Description: `Flow isolation settings - -`, - }, } } diff --git a/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc-class/resourcemodel/qos-policy-shaper-hfsc-class-linkshare.go b/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc-class/resourcemodel/qos-policy-shaper-hfsc-class-linkshare.go index 3f27d27de..c41e3b1e8 100644 --- a/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc-class/resourcemodel/qos-policy-shaper-hfsc-class-linkshare.go +++ b/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc-class/resourcemodel/qos-policy-shaper-hfsc-class-linkshare.go @@ -82,9 +82,6 @@ func (o QosPolicyShaperHfscClassLinkshare) ResourceSchemaAttributes(ctx context. | ibps | kibps(1024&8), mibps(1024^2&8), gibps, tibps - Byte/sec | | bps | bps(8),kbps(8&10^3),mbps(8&10^6), gbps, tbps - Byte/sec | `, - - // Default: stringdefault.StaticString(`0bit`), - Computed: true, }, "m2": @@ -114,9 +111,6 @@ func (o QosPolicyShaperHfscClassLinkshare) ResourceSchemaAttributes(ctx context. | ibps | kibps(1024&8), mibps(1024^2&8), gibps, tibps - Byte/sec | | bps | bps(8),kbps(8&10^3),mbps(8&10^6), gbps, tbps - Byte/sec | `, - - // Default: stringdefault.StaticString(`100%`), - Computed: true, }, // TagNodes diff --git a/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc-class/resourcemodel/qos-policy-shaper-hfsc-class-realtime.go b/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc-class/resourcemodel/qos-policy-shaper-hfsc-class-realtime.go index 06e1e87c4..b47ea47c2 100644 --- a/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc-class/resourcemodel/qos-policy-shaper-hfsc-class-realtime.go +++ b/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc-class/resourcemodel/qos-policy-shaper-hfsc-class-realtime.go @@ -82,9 +82,6 @@ func (o QosPolicyShaperHfscClassRealtime) ResourceSchemaAttributes(ctx context.C | ibps | kibps(1024&8), mibps(1024^2&8), gibps, tibps - Byte/sec | | bps | bps(8),kbps(8&10^3),mbps(8&10^6), gbps, tbps - Byte/sec | `, - - // Default: stringdefault.StaticString(`0bit`), - Computed: true, }, "m2": @@ -114,9 +111,6 @@ func (o QosPolicyShaperHfscClassRealtime) ResourceSchemaAttributes(ctx context.C | ibps | kibps(1024&8), mibps(1024^2&8), gibps, tibps - Byte/sec | | bps | bps(8),kbps(8&10^3),mbps(8&10^6), gbps, tbps - Byte/sec | `, - - // Default: stringdefault.StaticString(`100%`), - Computed: true, }, // TagNodes diff --git a/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc-class/resourcemodel/qos-policy-shaper-hfsc-class-upperlimit.go b/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc-class/resourcemodel/qos-policy-shaper-hfsc-class-upperlimit.go index f3fe697cc..bbdfa0971 100644 --- a/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc-class/resourcemodel/qos-policy-shaper-hfsc-class-upperlimit.go +++ b/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc-class/resourcemodel/qos-policy-shaper-hfsc-class-upperlimit.go @@ -82,9 +82,6 @@ func (o QosPolicyShaperHfscClassUpperlimit) ResourceSchemaAttributes(ctx context | ibps | kibps(1024&8), mibps(1024^2&8), gibps, tibps - Byte/sec | | bps | bps(8),kbps(8&10^3),mbps(8&10^6), gbps, tbps - Byte/sec | `, - - // Default: stringdefault.StaticString(`0bit`), - Computed: true, }, "m2": @@ -114,9 +111,6 @@ func (o QosPolicyShaperHfscClassUpperlimit) ResourceSchemaAttributes(ctx context | ibps | kibps(1024&8), mibps(1024^2&8), gibps, tibps - Byte/sec | | bps | bps(8),kbps(8&10^3),mbps(8&10^6), gbps, tbps - Byte/sec | `, - - // Default: stringdefault.StaticString(`100%`), - Computed: true, }, // TagNodes diff --git a/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc/resourcemodel/qos-policy-shaper-hfsc-default-linkshare.go b/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc/resourcemodel/qos-policy-shaper-hfsc-default-linkshare.go index f1dba9cc8..46206f50f 100644 --- a/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc/resourcemodel/qos-policy-shaper-hfsc-default-linkshare.go +++ b/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc/resourcemodel/qos-policy-shaper-hfsc-default-linkshare.go @@ -82,9 +82,6 @@ func (o QosPolicyShaperHfscDefaultLinkshare) ResourceSchemaAttributes(ctx contex | ibps | kibps(1024&8), mibps(1024^2&8), gibps, tibps - Byte/sec | | bps | bps(8),kbps(8&10^3),mbps(8&10^6), gbps, tbps - Byte/sec | `, - - // Default: stringdefault.StaticString(`0bit`), - Computed: true, }, "m2": @@ -114,9 +111,6 @@ func (o QosPolicyShaperHfscDefaultLinkshare) ResourceSchemaAttributes(ctx contex | ibps | kibps(1024&8), mibps(1024^2&8), gibps, tibps - Byte/sec | | bps | bps(8),kbps(8&10^3),mbps(8&10^6), gbps, tbps - Byte/sec | `, - - // Default: stringdefault.StaticString(`100%`), - Computed: true, }, // TagNodes diff --git a/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc/resourcemodel/qos-policy-shaper-hfsc-default-realtime.go b/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc/resourcemodel/qos-policy-shaper-hfsc-default-realtime.go index 19cb82d11..bd5ad0cbf 100644 --- a/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc/resourcemodel/qos-policy-shaper-hfsc-default-realtime.go +++ b/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc/resourcemodel/qos-policy-shaper-hfsc-default-realtime.go @@ -82,9 +82,6 @@ func (o QosPolicyShaperHfscDefaultRealtime) ResourceSchemaAttributes(ctx context | ibps | kibps(1024&8), mibps(1024^2&8), gibps, tibps - Byte/sec | | bps | bps(8),kbps(8&10^3),mbps(8&10^6), gbps, tbps - Byte/sec | `, - - // Default: stringdefault.StaticString(`0bit`), - Computed: true, }, "m2": @@ -114,9 +111,6 @@ func (o QosPolicyShaperHfscDefaultRealtime) ResourceSchemaAttributes(ctx context | ibps | kibps(1024&8), mibps(1024^2&8), gibps, tibps - Byte/sec | | bps | bps(8),kbps(8&10^3),mbps(8&10^6), gbps, tbps - Byte/sec | `, - - // Default: stringdefault.StaticString(`100%`), - Computed: true, }, // TagNodes diff --git a/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc/resourcemodel/qos-policy-shaper-hfsc-default-upperlimit.go b/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc/resourcemodel/qos-policy-shaper-hfsc-default-upperlimit.go index f82668b7a..5da7d5e47 100644 --- a/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc/resourcemodel/qos-policy-shaper-hfsc-default-upperlimit.go +++ b/internal/terraform/resource/autogen/named/qos/policy-shaper-hfsc/resourcemodel/qos-policy-shaper-hfsc-default-upperlimit.go @@ -82,9 +82,6 @@ func (o QosPolicyShaperHfscDefaultUpperlimit) ResourceSchemaAttributes(ctx conte | ibps | kibps(1024&8), mibps(1024^2&8), gibps, tibps - Byte/sec | | bps | bps(8),kbps(8&10^3),mbps(8&10^6), gbps, tbps - Byte/sec | `, - - // Default: stringdefault.StaticString(`0bit`), - Computed: true, }, "m2": @@ -114,9 +111,6 @@ func (o QosPolicyShaperHfscDefaultUpperlimit) ResourceSchemaAttributes(ctx conte | ibps | kibps(1024&8), mibps(1024^2&8), gibps, tibps - Byte/sec | | bps | bps(8),kbps(8&10^3),mbps(8&10^6), gbps, tbps - Byte/sec | `, - - // Default: stringdefault.StaticString(`100%`), - Computed: true, }, // TagNodes diff --git a/internal/terraform/resource/autogen/named/service/ipoe-server-interface/resourcemodel/service-ipoe-server-interface.go b/internal/terraform/resource/autogen/named/service/ipoe-server-interface/resourcemodel/service-ipoe-server-interface.go index aa8b37c09..996a4ba35 100644 --- a/internal/terraform/resource/autogen/named/service/ipoe-server-interface/resourcemodel/service-ipoe-server-interface.go +++ b/internal/terraform/resource/autogen/named/service/ipoe-server-interface/resourcemodel/service-ipoe-server-interface.go @@ -41,6 +41,7 @@ type ServiceIPoeServerInterface struct { LeafServiceIPoeServerInterfaceMode types.String `tfsdk:"mode" vyos:"mode,omitempty"` LeafServiceIPoeServerInterfaceNetwork types.String `tfsdk:"network" vyos:"network,omitempty"` LeafServiceIPoeServerInterfaceClientSubnet types.String `tfsdk:"client_subnet" vyos:"client-subnet,omitempty"` + LeafServiceIPoeServerInterfaceLuaUsername types.String `tfsdk:"lua_username" vyos:"lua-username,omitempty"` LeafServiceIPoeServerInterfaceVlan types.List `tfsdk:"vlan" vyos:"vlan,omitempty"` LeafServiceIPoeServerInterfaceVlanMon types.Bool `tfsdk:"vlan_mon" vyos:"vlan-mon,omitempty"` @@ -225,6 +226,25 @@ func (o ServiceIPoeServerInterface) ResourceSchemaAttributes(ctx context.Context `, }, + "lua_username": + + /* tools/generate-terraform-resource-full/templates/resources/common/resource-model-schema-attrtype.gotmpl #resource-model-schema-attrtype */ + schema.StringAttribute{ + Optional: true, + MarkdownDescription: `Username function + + | Format | Description | + |----------|--------------------------------------------------------------------| + | txt | Name of the function in the Lua file to construct usernames with | +`, + Description: `Username function + + | Format | Description | + |----------|--------------------------------------------------------------------| + | txt | Name of the function in the Lua file to construct usernames with | +`, + }, + "vlan": /* tools/generate-terraform-resource-full/templates/resources/common/resource-model-schema-attrtype.gotmpl #resource-model-schema-attrtype-multi */ schema.ListAttribute{ diff --git a/internal/terraform/resource/autogen/named/vpn/ipsec-authentication-psk/resourcemodel/vpn-ipsec-authentication-psk.go b/internal/terraform/resource/autogen/named/vpn/ipsec-authentication-psk/resourcemodel/vpn-ipsec-authentication-psk.go index dc34d8bcf..2ed4a5801 100644 --- a/internal/terraform/resource/autogen/named/vpn/ipsec-authentication-psk/resourcemodel/vpn-ipsec-authentication-psk.go +++ b/internal/terraform/resource/autogen/named/vpn/ipsec-authentication-psk/resourcemodel/vpn-ipsec-authentication-psk.go @@ -40,6 +40,7 @@ type VpnIPsecAuthenticationPsk struct { LeafVpnIPsecAuthenticationPskDhcpInterface types.List `tfsdk:"dhcp_interface" vyos:"dhcp-interface,omitempty"` LeafVpnIPsecAuthenticationPskID types.List `tfsdk:"id_param" vyos:"id,omitempty"` LeafVpnIPsecAuthenticationPskSecret types.String `tfsdk:"secret" vyos:"secret,omitempty"` + LeafVpnIPsecAuthenticationPskSecretType types.String `tfsdk:"secret_type" vyos:"secret-type,omitempty"` // TagNodes @@ -218,6 +219,22 @@ func (o VpnIPsecAuthenticationPsk) ResourceSchemaAttributes(ctx context.Context) `, }, + "secret_type": + + /* tools/generate-terraform-resource-full/templates/resources/common/resource-model-schema-attrtype.gotmpl #resource-model-schema-attrtype */ + schema.StringAttribute{ + Optional: true, + MarkdownDescription: `Secret type + +`, + Description: `Secret type + +`, + + // Default: stringdefault.StaticString(`plaintext`), + Computed: true, + }, + // TagNodes // Nodes diff --git a/internal/vyos/vyosinterfaces/autogen-qos.go b/internal/vyos/vyosinterfaces/autogen-qos.go index 3ba79456d..09c1d6839 100644 --- a/internal/vyos/vyosinterfaces/autogen-qos.go +++ b/internal/vyos/vyosinterfaces/autogen-qos.go @@ -77,178 +77,6 @@ func qos() schemadefinition.InterfaceDefinition { XMLName: xml.Name{ Local: "children", }, - Node: []*schemadefinition.Node{{ - IsBaseNode: false, - XMLName: xml.Name{ - Local: "node", - }, - NodeNameAttr: "flow-isolation", - Properties: []*schemadefinition.Properties{{ - XMLName: xml.Name{ - Local: "properties", - }, - Help: []string{"Flow isolation settings"}, - }}, - Children: []*schemadefinition.Children{{ - XMLName: xml.Name{ - Local: "children", - }, - LeafNode: []*schemadefinition.LeafNode{{ - IsBaseNode: false, - XMLName: xml.Name{ - Local: "leafNode", - }, - NodeNameAttr: "blind", - Properties: []*schemadefinition.Properties{{ - XMLName: xml.Name{ - Local: "properties", - }, - Help: []string{"Disables flow isolation, all traffic passes through a single queue"}, - Valueless: []*schemadefinition.Valueless{{ - XMLName: xml.Name{ - Local: "valueless", - }, - }}, - }}, - }, { - IsBaseNode: false, - XMLName: xml.Name{ - Local: "leafNode", - }, - NodeNameAttr: "src-host", - Properties: []*schemadefinition.Properties{{ - XMLName: xml.Name{ - Local: "properties", - }, - Help: []string{"Flows are defined only by source address"}, - Valueless: []*schemadefinition.Valueless{{ - XMLName: xml.Name{ - Local: "valueless", - }, - }}, - }}, - }, { - IsBaseNode: false, - XMLName: xml.Name{ - Local: "leafNode", - }, - NodeNameAttr: "dst-host", - Properties: []*schemadefinition.Properties{{ - XMLName: xml.Name{ - Local: "properties", - }, - Help: []string{"Flows are defined only by destination address"}, - Valueless: []*schemadefinition.Valueless{{ - XMLName: xml.Name{ - Local: "valueless", - }, - }}, - }}, - }, { - IsBaseNode: false, - XMLName: xml.Name{ - Local: "leafNode", - }, - NodeNameAttr: "host", - Properties: []*schemadefinition.Properties{{ - XMLName: xml.Name{ - Local: "properties", - }, - Help: []string{"Flows are defined by source-destination host pairs"}, - Valueless: []*schemadefinition.Valueless{{ - XMLName: xml.Name{ - Local: "valueless", - }, - }}, - }}, - }, { - IsBaseNode: false, - XMLName: xml.Name{ - Local: "leafNode", - }, - NodeNameAttr: "flow", - Properties: []*schemadefinition.Properties{{ - XMLName: xml.Name{ - Local: "properties", - }, - Help: []string{"Flows are defined by the entire 5-tuple"}, - Valueless: []*schemadefinition.Valueless{{ - XMLName: xml.Name{ - Local: "valueless", - }, - }}, - }}, - }, { - IsBaseNode: false, - XMLName: xml.Name{ - Local: "leafNode", - }, - NodeNameAttr: "dual-src-host", - Properties: []*schemadefinition.Properties{{ - XMLName: xml.Name{ - Local: "properties", - }, - Help: []string{"Flows are defined by the 5-tuple, fairness is applied first over source addresses, then over individual flows"}, - Valueless: []*schemadefinition.Valueless{{ - XMLName: xml.Name{ - Local: "valueless", - }, - }}, - }}, - }, { - IsBaseNode: false, - XMLName: xml.Name{ - Local: "leafNode", - }, - NodeNameAttr: "dual-dst-host", - Properties: []*schemadefinition.Properties{{ - XMLName: xml.Name{ - Local: "properties", - }, - Help: []string{"Flows are defined by the 5-tuple, fairness is applied first over destination addresses, then over individual flows"}, - Valueless: []*schemadefinition.Valueless{{ - XMLName: xml.Name{ - Local: "valueless", - }, - }}, - }}, - }, { - IsBaseNode: false, - XMLName: xml.Name{ - Local: "leafNode", - }, - NodeNameAttr: "triple-isolate", - Properties: []*schemadefinition.Properties{{ - XMLName: xml.Name{ - Local: "properties", - }, - Help: []string{"Flows are defined by the 5-tuple, fairness is applied over source and destination addresses and also over individual flows (default)"}, - Valueless: []*schemadefinition.Valueless{{ - XMLName: xml.Name{ - Local: "valueless", - }, - }}, - }}, - }, { - IsBaseNode: false, - XMLName: xml.Name{ - Local: "leafNode", - }, - NodeNameAttr: "nat", - Properties: []*schemadefinition.Properties{{ - XMLName: xml.Name{ - Local: "properties", - }, - Help: []string{"Perform NAT lookup before applying flow-isolation rules"}, - Valueless: []*schemadefinition.Valueless{{ - XMLName: xml.Name{ - Local: "valueless", - }, - }}, - }}, - }}, - }}, - }}, LeafNode: []*schemadefinition.LeafNode{{ IsBaseNode: false, XMLName: xml.Name{ @@ -343,6 +171,97 @@ func qos() schemadefinition.InterfaceDefinition { Description: "Percentage of interface link speed", }}, }}, + }, { + IsBaseNode: false, + XMLName: xml.Name{ + Local: "leafNode", + }, + NodeNameAttr: "flow-isolation", + DefaultValue: []string{"triple-isolate"}, + Properties: []*schemadefinition.Properties{{ + XMLName: xml.Name{ + Local: "properties", + }, + Help: []string{"Flow isolation settings"}, + Constraint: []*schemadefinition.Constraint{{ + XMLName: xml.Name{ + Local: "constraint", + }, + Regex: []string{"(blind|src-host|dst-host|host|flow|dual-src-host|dual-dst-host|triple-isolate)"}, + }}, + ValueHelp: []*schemadefinition.ValueHelp{{ + XMLName: xml.Name{ + Local: "valueHelp", + }, + Format: "blind", + Description: "Disables flow isolation, all traffic passes through a single queue", + }, { + XMLName: xml.Name{ + Local: "valueHelp", + }, + Format: "src-host", + Description: "Flows are defined only by source address", + }, { + XMLName: xml.Name{ + Local: "valueHelp", + }, + Format: "dst-host", + Description: "Flows are defined only by destination address", + }, { + XMLName: xml.Name{ + Local: "valueHelp", + }, + Format: "host", + Description: "Flows are defined by source-destination host pairs", + }, { + XMLName: xml.Name{ + Local: "valueHelp", + }, + Format: "flow", + Description: "Flows are defined by the entire 5-tuple", + }, { + XMLName: xml.Name{ + Local: "valueHelp", + }, + Format: "dual-src-host", + Description: "Flows are defined by the 5-tuple, fairness is applied first over source addresses, then over individual flows", + }, { + XMLName: xml.Name{ + Local: "valueHelp", + }, + Format: "dual-dst-host", + Description: "Flows are defined by the 5-tuple, fairness is applied first over destination addresses, then over individual flows", + }, { + XMLName: xml.Name{ + Local: "valueHelp", + }, + Format: "triple-isolate", + Description: "Flows are defined by the 5-tuple, fairness is applied over source and destination addresses and also over individual flows (default)", + }}, + CompletionHelp: []*schemadefinition.CompletionHelp{{ + XMLName: xml.Name{ + Local: "completionHelp", + }, + List: []string{"blind src-host dst-host host flow dual-src-host dual-dst-host triple-isolate"}, + }}, + }}, + }, { + IsBaseNode: false, + XMLName: xml.Name{ + Local: "leafNode", + }, + NodeNameAttr: "flow-isolation-nat", + Properties: []*schemadefinition.Properties{{ + XMLName: xml.Name{ + Local: "properties", + }, + Help: []string{"Perform NAT lookup before applying flow-isolation rules"}, + Valueless: []*schemadefinition.Valueless{{ + XMLName: xml.Name{ + Local: "valueless", + }, + }}, + }}, }, { IsBaseNode: false, XMLName: xml.Name{ @@ -364,17 +283,17 @@ func qos() schemadefinition.InterfaceDefinition { Local: "validator", }, NameAttr: "numeric", - ArgumentAttr: "--range 1-3600000", + ArgumentAttr: "--range 1-1000000000", }}, }}, ValueHelp: []*schemadefinition.ValueHelp{{ XMLName: xml.Name{ Local: "valueHelp", }, - Format: "u32:1-3600000", + Format: "u32:1-1000000000", Description: "RTT in ms", }}, - ConstraintErrorMessage: []string{"RTT must be in range 1 to 3600000 milli-seconds"}, + ConstraintErrorMessage: []string{"RTT must be in range 1 to 1000000000 milli-seconds"}, }}, }}, }}, @@ -10991,7 +10910,6 @@ func qos() schemadefinition.InterfaceDefinition { Local: "leafNode", }, NodeNameAttr: "m1", - DefaultValue: []string{"0bit"}, Properties: []*schemadefinition.Properties{{ XMLName: xml.Name{ Local: "properties", @@ -11041,7 +10959,6 @@ func qos() schemadefinition.InterfaceDefinition { Local: "leafNode", }, NodeNameAttr: "m2", - DefaultValue: []string{"100%"}, Properties: []*schemadefinition.Properties{{ XMLName: xml.Name{ Local: "properties", @@ -11141,7 +11058,6 @@ func qos() schemadefinition.InterfaceDefinition { Local: "leafNode", }, NodeNameAttr: "m1", - DefaultValue: []string{"0bit"}, Properties: []*schemadefinition.Properties{{ XMLName: xml.Name{ Local: "properties", @@ -11191,7 +11107,6 @@ func qos() schemadefinition.InterfaceDefinition { Local: "leafNode", }, NodeNameAttr: "m2", - DefaultValue: []string{"100%"}, Properties: []*schemadefinition.Properties{{ XMLName: xml.Name{ Local: "properties", @@ -11291,7 +11206,6 @@ func qos() schemadefinition.InterfaceDefinition { Local: "leafNode", }, NodeNameAttr: "m1", - DefaultValue: []string{"0bit"}, Properties: []*schemadefinition.Properties{{ XMLName: xml.Name{ Local: "properties", @@ -11341,7 +11255,6 @@ func qos() schemadefinition.InterfaceDefinition { Local: "leafNode", }, NodeNameAttr: "m2", - DefaultValue: []string{"100%"}, Properties: []*schemadefinition.Properties{{ XMLName: xml.Name{ Local: "properties", @@ -11480,7 +11393,6 @@ func qos() schemadefinition.InterfaceDefinition { Local: "leafNode", }, NodeNameAttr: "m1", - DefaultValue: []string{"0bit"}, Properties: []*schemadefinition.Properties{{ XMLName: xml.Name{ Local: "properties", @@ -11530,7 +11442,6 @@ func qos() schemadefinition.InterfaceDefinition { Local: "leafNode", }, NodeNameAttr: "m2", - DefaultValue: []string{"100%"}, Properties: []*schemadefinition.Properties{{ XMLName: xml.Name{ Local: "properties", @@ -11630,7 +11541,6 @@ func qos() schemadefinition.InterfaceDefinition { Local: "leafNode", }, NodeNameAttr: "m1", - DefaultValue: []string{"0bit"}, Properties: []*schemadefinition.Properties{{ XMLName: xml.Name{ Local: "properties", @@ -11680,7 +11590,6 @@ func qos() schemadefinition.InterfaceDefinition { Local: "leafNode", }, NodeNameAttr: "m2", - DefaultValue: []string{"100%"}, Properties: []*schemadefinition.Properties{{ XMLName: xml.Name{ Local: "properties", @@ -11780,7 +11689,6 @@ func qos() schemadefinition.InterfaceDefinition { Local: "leafNode", }, NodeNameAttr: "m1", - DefaultValue: []string{"0bit"}, Properties: []*schemadefinition.Properties{{ XMLName: xml.Name{ Local: "properties", @@ -11830,7 +11738,6 @@ func qos() schemadefinition.InterfaceDefinition { Local: "leafNode", }, NodeNameAttr: "m2", - DefaultValue: []string{"100%"}, Properties: []*schemadefinition.Properties{{ XMLName: xml.Name{ Local: "properties", diff --git a/internal/vyos/vyosinterfaces/autogen-service.go b/internal/vyos/vyosinterfaces/autogen-service.go index db6b0c48b..2bef7d1da 100644 --- a/internal/vyos/vyosinterfaces/autogen-service.go +++ b/internal/vyos/vyosinterfaces/autogen-service.go @@ -16536,6 +16536,31 @@ func service() schemadefinition.InterfaceDefinition { Description: "IPv4 address and prefix length", }}, }}, + }, { + IsBaseNode: false, + XMLName: xml.Name{ + Local: "leafNode", + }, + NodeNameAttr: "lua-username", + Properties: []*schemadefinition.Properties{{ + XMLName: xml.Name{ + Local: "properties", + }, + Help: []string{"Username function"}, + Constraint: []*schemadefinition.Constraint{{ + XMLName: xml.Name{ + Local: "constraint", + }, + Regex: []string{"[-_a-zA-Z0-9]+"}, + }}, + ValueHelp: []*schemadefinition.ValueHelp{{ + XMLName: xml.Name{ + Local: "valueHelp", + }, + Format: "txt", + Description: "Name of the function in the Lua file to construct usernames with", + }}, + }}, }, { IsBaseNode: false, XMLName: xml.Name{ @@ -16880,6 +16905,37 @@ func service() schemadefinition.InterfaceDefinition { }}, }}, LeafNode: []*schemadefinition.LeafNode{{ + IsBaseNode: false, + XMLName: xml.Name{ + Local: "leafNode", + }, + NodeNameAttr: "lua-file", + Properties: []*schemadefinition.Properties{{ + XMLName: xml.Name{ + Local: "properties", + }, + Help: []string{"Lua script file for constructing user names"}, + Constraint: []*schemadefinition.Constraint{{ + XMLName: xml.Name{ + Local: "constraint", + }, + Validator: []*schemadefinition.Validator{{ + XMLName: xml.Name{ + Local: "validator", + }, + NameAttr: "file-path", + ArgumentAttr: "--strict --parent-dir /config/scripts", + }}, + }}, + ValueHelp: []*schemadefinition.ValueHelp{{ + XMLName: xml.Name{ + Local: "valueHelp", + }, + Format: "filename", + Description: "File with Lua script in /config/scripts directory", + }}, + }}, + }, { IsBaseNode: false, XMLName: xml.Name{ Local: "leafNode", @@ -17725,6 +17781,44 @@ func service() schemadefinition.InterfaceDefinition { }, }}, }}, + }, { + IsBaseNode: false, + XMLName: xml.Name{ + Local: "leafNode", + }, + NodeNameAttr: "cache-entries", + DefaultValue: []string{"4096"}, + Properties: []*schemadefinition.Properties{{ + XMLName: xml.Name{ + Local: "properties", + }, + Help: []string{"Number of resource records cached per interface"}, + Constraint: []*schemadefinition.Constraint{{ + XMLName: xml.Name{ + Local: "constraint", + }, + Validator: []*schemadefinition.Validator{{ + XMLName: xml.Name{ + Local: "validator", + }, + NameAttr: "numeric", + ArgumentAttr: "--range 0-65535", + }}, + }}, + ValueHelp: []*schemadefinition.ValueHelp{{ + XMLName: xml.Name{ + Local: "valueHelp", + }, + Format: "u32:0", + Description: "Disable caching", + }, { + XMLName: xml.Name{ + Local: "valueHelp", + }, + Format: "u32:1-65535", + Description: "Resource records to cache per interface", + }}, + }}, }, { IsBaseNode: false, XMLName: xml.Name{ diff --git a/internal/vyos/vyosinterfaces/autogen-vpn.go b/internal/vyos/vyosinterfaces/autogen-vpn.go index 06af93aee..7b557b714 100644 --- a/internal/vyos/vyosinterfaces/autogen-vpn.go +++ b/internal/vyos/vyosinterfaces/autogen-vpn.go @@ -164,6 +164,31 @@ func vpn() schemadefinition.InterfaceDefinition { Description: "IKE pre-shared secret key", }}, }}, + }, { + IsBaseNode: false, + XMLName: xml.Name{ + Local: "leafNode", + }, + NodeNameAttr: "secret-type", + DefaultValue: []string{"plaintext"}, + Properties: []*schemadefinition.Properties{{ + XMLName: xml.Name{ + Local: "properties", + }, + Help: []string{"Secret type"}, + Constraint: []*schemadefinition.Constraint{{ + XMLName: xml.Name{ + Local: "constraint", + }, + Regex: []string{"(base64|plaintext)"}, + }}, + CompletionHelp: []*schemadefinition.CompletionHelp{{ + XMLName: xml.Name{ + Local: "completionHelp", + }, + List: []string{"base64 plaintext"}, + }}, + }}, }}, }}, }},