diff --git a/apstra/design/template_pod_based.go b/apstra/design/template_pod_based.go index 844f7fb6..54be7f0d 100644 --- a/apstra/design/template_pod_based.go +++ b/apstra/design/template_pod_based.go @@ -4,7 +4,6 @@ import ( "context" "github.com/Juniper/apstra-go-sdk/apstra" - apstravalidator "github.com/Juniper/terraform-provider-apstra/apstra/apstra_validator" "github.com/Juniper/terraform-provider-apstra/apstra/utils" "github.com/hashicorp/terraform-plugin-framework-validators/mapvalidator" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" @@ -21,11 +20,10 @@ import ( ) type TemplatePodBased struct { - Id types.String `tfsdk:"id"` - Name types.String `tfsdk:"name"` - SuperSpine types.Object `tfsdk:"super_spine"` - FabricAddressing types.String `tfsdk:"fabric_link_addressing"` - PodInfos types.Map `tfsdk:"pod_infos"` + Id types.String `tfsdk:"id"` + Name types.String `tfsdk:"name"` + SuperSpine types.Object `tfsdk:"super_spine"` + PodInfos types.Map `tfsdk:"pod_infos"` } func (o TemplatePodBased) AttrTypes() map[string]attr.Type { @@ -63,11 +61,6 @@ func (o TemplatePodBased) DataSourceAttributes() map[string]dataSourceSchema.Att Computed: true, Attributes: SuperSpine{}.DataSourceAttributes(), }, - "fabric_link_addressing": dataSourceSchema.StringAttribute{ - DeprecationMessage: "Apstra 4.1.0 is not supported by this release. This field must not be used.", - MarkdownDescription: "Fabric addressing scheme for Spine/Superspine links.", - Computed: true, - }, "pod_infos": dataSourceSchema.MapNestedAttribute{ MarkdownDescription: "Map of Pod Type info (count + details)", Computed: true, @@ -95,13 +88,6 @@ func (o TemplatePodBased) ResourceAttributes() map[string]resourceSchema.Attribu Required: true, Attributes: SuperSpine{}.ResourceAttributes(), }, - "fabric_link_addressing": resourceSchema.StringAttribute{ - DeprecationMessage: "Apstra 4.1.0 is not supported by this release. This field must not be used.", - MarkdownDescription: "Fabric addressing scheme for Spine/SuperSpine links.", - Optional: true, - Computed: true, - Validators: []validator.String{apstravalidator.MustBeOneOf([]attr.Value{types.StringNull()})}, - }, "pod_infos": resourceSchema.MapNestedAttribute{ MarkdownDescription: "Map of Pod Type info (count + details) keyed by Pod Based Template ID.", Required: true, @@ -154,7 +140,6 @@ func (o *TemplatePodBased) LoadApiData(ctx context.Context, in *apstra.TemplateP o.Name = types.StringValue(in.DisplayName) o.SuperSpine = NewDesignTemplateSuperSpineObject(ctx, &in.Superspine, diags) o.PodInfos = NewPodInfoMap(ctx, in, diags) - o.FabricAddressing = types.StringNull() } func (o *TemplatePodBased) CopyWriteOnlyElements(ctx context.Context, src *TemplatePodBased, diags *diag.Diagnostics) { diff --git a/apstra/design/template_rack_based.go b/apstra/design/template_rack_based.go index 55ebc311..00346bd6 100644 --- a/apstra/design/template_rack_based.go +++ b/apstra/design/template_rack_based.go @@ -27,7 +27,6 @@ type TemplateRackBased struct { Spine types.Object `tfsdk:"spine"` AsnAllocation types.String `tfsdk:"asn_allocation_scheme"` OverlayControlProtocol types.String `tfsdk:"overlay_control_protocol"` - FabricAddressing types.String `tfsdk:"fabric_link_addressing"` RackInfos types.Map `tfsdk:"rack_infos"` } @@ -38,7 +37,6 @@ func (o TemplateRackBased) AttrTypes() map[string]attr.Type { "spine": types.ObjectType{AttrTypes: Spine{}.AttrTypes()}, "asn_allocation_scheme": types.StringType, "overlay_control_protocol": types.StringType, - "fabric_link_addressing": types.StringType, "rack_infos": types.MapType{ElemType: types.ObjectType{AttrTypes: TemplateRackInfo{}.AttrTypes()}}, } } @@ -77,11 +75,6 @@ func (o TemplateRackBased) DataSourceAttributes() map[string]dataSourceSchema.At MarkdownDescription: "Defines the inter-rack virtual network overlay protocol in the fabric.", Computed: true, }, - "fabric_link_addressing": dataSourceSchema.StringAttribute{ - DeprecationMessage: "Apstra 4.1.0 is not supported by this release. This field must not be used.", - MarkdownDescription: "Fabric addressing scheme for Spine/Leaf links.", - Computed: true, - }, "rack_infos": dataSourceSchema.MapNestedAttribute{ MarkdownDescription: "Map of Rack Type info (count + details)", Computed: true, @@ -116,11 +109,6 @@ func (o TemplateRackBased) DataSourceAttributesNested() map[string]dataSourceSch MarkdownDescription: "Defines the inter-rack virtual network overlay protocol in the fabric.", Computed: true, }, - "fabric_link_addressing": dataSourceSchema.StringAttribute{ - DeprecationMessage: "Apstra 4.1.0 is not supported by this release. This field must not be used.", - MarkdownDescription: "Fabric addressing scheme for Spine/Leaf links.", - Computed: true, - }, "rack_infos": dataSourceSchema.MapNestedAttribute{ MarkdownDescription: "Map of Rack Type info (count + details)", Computed: true, @@ -292,7 +280,6 @@ func (o *TemplateRackBased) LoadApiData(ctx context.Context, in *apstra.Template o.AsnAllocation = types.StringValue(utils.StringersToFriendlyString(in.AsnAllocationPolicy.SpineAsnScheme)) o.OverlayControlProtocol = types.StringValue(utils.StringersToFriendlyString(in.VirtualNetworkPolicy.OverlayControlProtocol)) o.RackInfos = NewRackInfoMap(ctx, in, diags) - o.FabricAddressing = types.StringNull() } func (o *TemplateRackBased) CopyWriteOnlyElements(ctx context.Context, src *TemplateRackBased, diags *diag.Diagnostics) { diff --git a/apstra/resource_template_pod_based_integration_test.go b/apstra/resource_template_pod_based_integration_test.go index 96b9eff6..3125fb36 100644 --- a/apstra/resource_template_pod_based_integration_test.go +++ b/apstra/resource_template_pod_based_integration_test.go @@ -21,7 +21,6 @@ const ( resourceTemplatePodBasedHCL = ` resource %q %q { name = %q - fabric_link_addressing = %s super_spine = { logical_device_id = %q per_plane_count = %d @@ -35,12 +34,11 @@ resource %q %q { ) type resourceTestPodTemplate struct { - name string - fabricLinkAddressing *string - ssLd string - perPlaneCount int - planeCount *int - podInfo map[string]int + name string + ssLd string + perPlaneCount int + planeCount *int + podInfo map[string]int } func (o resourceTestPodTemplate) render(rType, rName string) string { @@ -51,7 +49,6 @@ func (o resourceTestPodTemplate) render(rType, rName string) string { return fmt.Sprintf(resourceTemplatePodBasedHCL, rType, rName, o.name, - stringPtrOrNull(o.fabricLinkAddressing), o.ssLd, o.perPlaneCount, intPtrOrNull(o.planeCount), @@ -66,10 +63,6 @@ func (o resourceTestPodTemplate) testChecks(t testing.TB, rType, rName string) t result.append(t, "TestCheckResourceAttrSet", "id") result.append(t, "TestCheckResourceAttr", "name", o.name) - if o.fabricLinkAddressing != nil { - result.append(t, "TestCheckResourceAttr", "fabric_link_addressing", *o.fabricLinkAddressing) - } - result.append(t, "TestCheckResourceAttr", "super_spine.logical_device_id", o.ssLd) result.append(t, "TestCheckResourceAttr", "super_spine.per_plane_count", strconv.Itoa(o.perPlaneCount)) diff --git a/apstra/resource_template_rack_based_test.go b/apstra/resource_template_rack_based_test.go index d47d6cd2..ba2f3053 100644 --- a/apstra/resource_template_rack_based_test.go +++ b/apstra/resource_template_rack_based_test.go @@ -23,7 +23,6 @@ resource "apstra_template_rack_based" "test" { overlay_control_protocol = %q // mandatory field rack_infos = %s // mandatory field spine = %s // mandatory field - fabric_link_addressing = %s } ` resourceTemplateRackBasedRackInfoHcl = ` @@ -68,7 +67,6 @@ func TestResourceTemplateRackBased(t *testing.T) { overlayControlProtocol string rackInfos map[string]int spine spine - fabricLinkAddressing string } renderConfig := func(config config) string { @@ -78,7 +76,6 @@ func TestResourceTemplateRackBased(t *testing.T) { config.overlayControlProtocol, renderRackInfos(config.rackInfos), renderSpine(config.spine), - stringOrNull(config.fabricLinkAddressing), ) } diff --git a/docs/data-sources/template_pod_based.md b/docs/data-sources/template_pod_based.md index b76fa8ee..5bc76ad0 100644 --- a/docs/data-sources/template_pod_based.md +++ b/docs/data-sources/template_pod_based.md @@ -35,7 +35,6 @@ resource "apstra_template_pod_based" "example" { ### Read-Only -- `fabric_link_addressing` (String, Deprecated) Fabric addressing scheme for Spine/Superspine links. - `pod_infos` (Attributes Map) Map of Pod Type info (count + details) (see [below for nested schema](#nestedatt--pod_infos)) - `super_spine` (Attributes) Super Spine layer details (see [below for nested schema](#nestedatt--super_spine)) @@ -53,7 +52,6 @@ Read-Only: Read-Only: - `asn_allocation_scheme` (String) "unique" is for 3-stage designs; "single" is for 5-stage designs. -- `fabric_link_addressing` (String, Deprecated) Fabric addressing scheme for Spine/Leaf links. - `id` (String) ID of the pod inside the 5 stage template. - `name` (String) Name of the pod inside the 5 stage template. - `overlay_control_protocol` (String) Defines the inter-rack virtual network overlay protocol in the fabric. diff --git a/docs/data-sources/template_rack_based.md b/docs/data-sources/template_rack_based.md index cf17f046..dd336efb 100644 --- a/docs/data-sources/template_rack_based.md +++ b/docs/data-sources/template_rack_based.md @@ -48,7 +48,6 @@ output "rack_based_template_id_to_name" { ### Read-Only - `asn_allocation_scheme` (String) "unique" is for 3-stage designs; "single" is for 5-stage designs. -- `fabric_link_addressing` (String, Deprecated) Fabric addressing scheme for Spine/Leaf links. - `overlay_control_protocol` (String) Defines the inter-rack virtual network overlay protocol in the fabric. - `rack_infos` (Attributes Map) Map of Rack Type info (count + details) (see [below for nested schema](#nestedatt--rack_infos)) - `spine` (Attributes) Spine layer details (see [below for nested schema](#nestedatt--spine)) diff --git a/docs/resources/template_pod_based.md b/docs/resources/template_pod_based.md index e66ebcd0..5be8bc14 100644 --- a/docs/resources/template_pod_based.md +++ b/docs/resources/template_pod_based.md @@ -39,10 +39,6 @@ resource "apstra_template_pod_based" "example" { - `pod_infos` (Attributes Map) Map of Pod Type info (count + details) keyed by Pod Based Template ID. (see [below for nested schema](#nestedatt--pod_infos)) - `super_spine` (Attributes) SuperSpine layer details (see [below for nested schema](#nestedatt--super_spine)) -### Optional - -- `fabric_link_addressing` (String, Deprecated) Fabric addressing scheme for Spine/SuperSpine links. - ### Read-Only - `id` (String) Apstra ID of the Pod Based Template.