From 479d8ac77e72e0944a413ca43bc4b8e6bcd32a90 Mon Sep 17 00:00:00 2001 From: danischm Date: Fri, 20 Dec 2024 08:28:55 +0100 Subject: [PATCH] Add free space option to tf model attribute of floor resource --- CHANGELOG.md | 1 + docs/guides/changelog.md | 1 + docs/resources/floor.md | 2 +- gen/definitions/floor.yaml | 10 ++++++++-- internal/provider/resource_catalystcenter_floor.go | 4 ++-- templates/guides/changelog.md.tmpl | 1 + 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 102e78d1..436c179e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.1.18 (unreleased) - Add `catalystcenter_fabric_l3_virtual_network` resource and data source +- Add `Free Space` allowed value to `rf_model` attribute of `catalystcenter_floor` resource ## 0.1.17 diff --git a/docs/guides/changelog.md b/docs/guides/changelog.md index e30e59c9..65943d16 100644 --- a/docs/guides/changelog.md +++ b/docs/guides/changelog.md @@ -10,6 +10,7 @@ description: |- ## 0.1.18 (unreleased) - Add `catalystcenter_fabric_l3_virtual_network` resource and data source +- Add `Free Space` allowed value to `rf_model` attribute of `catalystcenter_floor` resource ## 0.1.17 diff --git a/docs/resources/floor.md b/docs/resources/floor.md index a9319078..3dd1a607 100644 --- a/docs/resources/floor.md +++ b/docs/resources/floor.md @@ -34,7 +34,7 @@ resource "catalystcenter_floor" "example" { - `name` (String) The name of the floor - `parent_name` (String) The path of the parent building, e.g. `Global/Building1` - `rf_model` (String) The RF model - - Choices: `Cubes And Walled Offices`, `Drywall Office Only`, `Indoor High Ceiling`, `Outdoor Open Space` + - Choices: `Cubes And Walled Offices`, `Drywall Office Only`, `Indoor High Ceiling`, `Outdoor Open Space`, `Free Space` - `width` (Number) Width ### Optional diff --git a/gen/definitions/floor.yaml b/gen/definitions/floor.yaml index 2d60e330..eb69c846 100644 --- a/gen/definitions/floor.yaml +++ b/gen/definitions/floor.yaml @@ -33,7 +33,14 @@ attributes: - model_name: rfModel data_path: site.floor type: String - enum_values: ["Cubes And Walled Offices", "Drywall Office Only", "Indoor High Ceiling", "Outdoor Open Space"] + enum_values: + [ + "Cubes And Walled Offices", + "Drywall Office Only", + "Indoor High Ceiling", + "Outdoor Open Space", + "Free Space", + ] mandatory: true write_only: true description: The RF model @@ -68,4 +75,3 @@ test_prerequisites: | latitude = 37.338 longitude = -121.832 } - \ No newline at end of file diff --git a/internal/provider/resource_catalystcenter_floor.go b/internal/provider/resource_catalystcenter_floor.go index 7ddbea0b..6f35882e 100644 --- a/internal/provider/resource_catalystcenter_floor.go +++ b/internal/provider/resource_catalystcenter_floor.go @@ -87,10 +87,10 @@ func (r *FloorResource) Schema(ctx context.Context, req resource.SchemaRequest, }, }, "rf_model": schema.StringAttribute{ - MarkdownDescription: helpers.NewAttributeDescription("The RF model").AddStringEnumDescription("Cubes And Walled Offices", "Drywall Office Only", "Indoor High Ceiling", "Outdoor Open Space").String, + MarkdownDescription: helpers.NewAttributeDescription("The RF model").AddStringEnumDescription("Cubes And Walled Offices", "Drywall Office Only", "Indoor High Ceiling", "Outdoor Open Space", "Free Space").String, Required: true, Validators: []validator.String{ - stringvalidator.OneOf("Cubes And Walled Offices", "Drywall Office Only", "Indoor High Ceiling", "Outdoor Open Space"), + stringvalidator.OneOf("Cubes And Walled Offices", "Drywall Office Only", "Indoor High Ceiling", "Outdoor Open Space", "Free Space"), }, }, "width": schema.Float64Attribute{ diff --git a/templates/guides/changelog.md.tmpl b/templates/guides/changelog.md.tmpl index e30e59c9..65943d16 100644 --- a/templates/guides/changelog.md.tmpl +++ b/templates/guides/changelog.md.tmpl @@ -10,6 +10,7 @@ description: |- ## 0.1.18 (unreleased) - Add `catalystcenter_fabric_l3_virtual_network` resource and data source +- Add `Free Space` allowed value to `rf_model` attribute of `catalystcenter_floor` resource ## 0.1.17