From 8baebae070e047a3dad3f86aa72cf502f053d781 Mon Sep 17 00:00:00 2001 From: Vaerh Date: Fri, 27 Sep 2024 20:37:37 +0300 Subject: [PATCH] fix(serialize): Fix `PropTransformSet` --- routeros/provider_schema_helpers.go | 2 +- routeros/resource_capsman_configuration.go | 4 ++-- routeros/resource_capsman_configuration_v0.go | 4 ++-- routeros/resource_capsman_interface.go | 4 ++-- routeros/resource_wifi.go | 4 ++-- routeros/resource_wifi_configuration.go | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/routeros/provider_schema_helpers.go b/routeros/provider_schema_helpers.go index 7078a5b1..e9bcd30c 100644 --- a/routeros/provider_schema_helpers.go +++ b/routeros/provider_schema_helpers.go @@ -109,7 +109,7 @@ func PropDropByValue(s ...string) *schema.Schema { } } -// PropTransformSet List of []string{"TF", "MT"} string pairs. +// PropTransformSet List of []string{"TF : MT", "TF : MT", ...} string pairs. func PropTransformSet(s ...string) *schema.Schema { return &schema.Schema{ Type: schema.TypeString, diff --git a/routeros/resource_capsman_configuration.go b/routeros/resource_capsman_configuration.go index 4283a6d8..7980b638 100644 --- a/routeros/resource_capsman_configuration.go +++ b/routeros/resource_capsman_configuration.go @@ -39,8 +39,8 @@ func ResourceCapsManConfiguration() *schema.Resource { resSchema := map[string]*schema.Schema{ MetaResourcePath: PropResourcePath("/caps-man/configuration"), MetaId: PropId(Id), - MetaTransformSet: PropTransformSet("channel: channel.config", "datapath: datapath.config", - "rates: rates.config", "security: security.config"), + MetaTransformSet: PropTransformSet("channel.config: channel", "datapath.config: datapath", + "rates.config: rates", "security.config: security"), "channel": { Type: schema.TypeMap, diff --git a/routeros/resource_capsman_configuration_v0.go b/routeros/resource_capsman_configuration_v0.go index 606bd32c..0e13cd8e 100644 --- a/routeros/resource_capsman_configuration_v0.go +++ b/routeros/resource_capsman_configuration_v0.go @@ -10,8 +10,8 @@ func ResourceCapsManConfigurationV0() *schema.Resource { Schema: map[string]*schema.Schema{ MetaResourcePath: PropResourcePath("/caps-man/configuration"), MetaId: PropId(Name), - MetaTransformSet: PropTransformSet("channel: channel.config", "datapath: datapath.config", - "rates: rates.config", "security: security.config"), + MetaTransformSet: PropTransformSet("channel.config: channel", "datapath.config: datapath", + "rates.config: rates", "security.config: security"), "channel": { Type: schema.TypeMap, diff --git a/routeros/resource_capsman_interface.go b/routeros/resource_capsman_interface.go index 135445cd..485afff6 100644 --- a/routeros/resource_capsman_interface.go +++ b/routeros/resource_capsman_interface.go @@ -36,8 +36,8 @@ func ResourceCapsManInterface() *schema.Resource { MetaId: PropId(Id), MetaSkipFields: PropSkipFields("current_authorized_clients", "current_basic_rate_set", "current_channel", "current_rate_set", "current_registered_clients", "current_state"), - MetaTransformSet: PropTransformSet("channel: channel.config", "configuration: configuration.config", - "datapath: datapath.config", "rates: rates.config", "security: security.config"), + MetaTransformSet: PropTransformSet("channel.config: channel", "datapath.config: datapath", + "rates.config: rates", "security.config: security"), KeyArpTimeout: PropArpTimeoutRw, "bound": { diff --git a/routeros/resource_wifi.go b/routeros/resource_wifi.go index 8a9e979b..5099d2ec 100644 --- a/routeros/resource_wifi.go +++ b/routeros/resource_wifi.go @@ -34,8 +34,8 @@ func ResourceWifi() *schema.Resource { resSchema := map[string]*schema.Schema{ MetaResourcePath: PropResourcePath("/interface/wifi"), MetaId: PropId(Id), - MetaTransformSet: PropTransformSet("aaa: aaa.config", "channel: channel.config", "configuration: configuration.config", - "datapath: datapath.config", "interworking: interworking.config", "security: security.config", "steering: steering.config"), + MetaTransformSet: PropTransformSet("aaa.config: aaa", "channel.config: channel", "configuration.config: configuration", + "datapath.config: datapath", "interworking.config: interworking", "security.config: security", "steering.config: steering"), "aaa": { Type: schema.TypeMap, diff --git a/routeros/resource_wifi_configuration.go b/routeros/resource_wifi_configuration.go index a0be3e37..27065fa2 100644 --- a/routeros/resource_wifi_configuration.go +++ b/routeros/resource_wifi_configuration.go @@ -38,8 +38,8 @@ func ResourceWifiConfiguration() *schema.Resource { resSchema := map[string]*schema.Schema{ MetaResourcePath: PropResourcePath("/interface/wifi/configuration"), MetaId: PropId(Id), - MetaTransformSet: PropTransformSet("aaa: aaa.config", "channel: channel.config", "datapath: datapath.config", - "interworking: interworking.config", "security: security.config", "steering: steering.config"), + MetaTransformSet: PropTransformSet("aaa.config: aaa", "channel.config: channel", "datapath.config: datapath", + "interworking.config: interworking", "security.config: security", "steering.config: steering"), "aaa": { Type: schema.TypeMap,