Skip to content

Commit

Permalink
[ignore] fixed unecessary validators for resource
Browse files Browse the repository at this point in the history
  • Loading branch information
abrahammughal committed Jun 24, 2024
1 parent 886cbdf commit 90dfeb1
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 17 deletions.
2 changes: 0 additions & 2 deletions docs/resources/remote_site_id_mappings.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ All examples for the Remote Site Id Mappings resource can be found in the [examp
* `owner_key` (ownerKey) - (string) The key for enabling clients to own their data for entity correlation.
* `owner_tag` (ownerTag) - (string) A tag for enabling clients to add their own data. For example, to indicate who created this object.
* `remote_vrf_pc_tag` (remoteCtxPcTag) - (string) Remote context's *pcTag*, mapping required for default route case.
- Valid Values: `any`.
* `remote_pc_tag` (remotePcTag) - (string) Remote Class ID.
- Valid Values: `any`.

* `annotations` - (list) A list of Annotations (ACI object [tagAnnotation](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/tagAnnotation/overview)). Annotations can also be configured using a separate [aci_annotation](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/annotation) resource. This attribute is supported in ACI versions: 3.2(1l) and later.

Expand Down
8 changes: 4 additions & 4 deletions gen/definitions/properties.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ fvSiteAssociated:
default_values:
site_id: "0"
resource_required:
site_id: "0"
- "site_id"
test_values:
all:
site_id: "0"
Expand All @@ -224,7 +224,7 @@ fvRemoteId:
siteId: "A number between 0 and 1000 to identify the remote site being associated with the primary site"
test_values:
all:
site_id: "0"
site_id: "102"
remote_vrf_pc_tag: "16386"
remote_pc_tag: "2818057"
default:
Expand All @@ -234,9 +234,9 @@ fvRemoteId:
resource_required:
site_id: "0"
resource_required:
siteId: "0"
- "site_id"
default_values:
siteId: "0"
siteId: "102"
parents:
- class_name: "fvSiteAssociated"
parent_dependency: "fvCtx"
Expand Down
3 changes: 3 additions & 0 deletions gen/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,9 @@ func (m *Model) SetClassProperties(classDetails interface{}) {
if propertyValue.(map[string]interface{})["validValues"] != nil {
for _, details := range propertyValue.(map[string]interface{})["validValues"].([]interface{}) {
validValue := details.(map[string]interface{})["localName"].(string)
if propertyName == "remoteCtxPcTag" || propertyName == "remotePcTag" {
validValue = "defaultValue"
}
if validValue != "defaultValue" {
property.ValidValues = append(property.ValidValues, validValue)
}
Expand Down
2 changes: 1 addition & 1 deletion gen/testvars/fvRemoteId.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ all:
owner_tag: "owner_tag"
remote_vrf_pc_tag: "16386"
remote_pc_tag: "2818057"
site_id: "0"
site_id: "102"

children:
annotations:
Expand Down
8 changes: 0 additions & 8 deletions internal/provider/resource_aci_remote_site_id_mappings.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 90dfeb1

Please sign in to comment.