Skip to content

Commit

Permalink
fix(serialize): Fix PropTransformSet
Browse files Browse the repository at this point in the history
  • Loading branch information
vaerh committed Sep 27, 2024
1 parent eb53e45 commit 8baebae
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion routeros/provider_schema_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions routeros/resource_capsman_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions routeros/resource_capsman_configuration_v0.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions routeros/resource_capsman_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions routeros/resource_wifi.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions routeros/resource_wifi_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8baebae

Please sign in to comment.