Skip to content

Commit

Permalink
[ignore] Modify resource and datasource doc templates to render prope…
Browse files Browse the repository at this point in the history
…rly multi relationship target/classes for Rs children.
  • Loading branch information
gmicol committed Sep 4, 2024
1 parent 1913417 commit db73c86
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 5 deletions.
7 changes: 6 additions & 1 deletion docs/data-sources/application_epg.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ data "aci_application_epg" "example_application_profile" {
* `annotation` (annotation) - (string) The annotation of the Relation To Custom Qos Policy object.
* `custom_qos_policy_name` (tnQosCustomPolName) - (string) The Custom QoS traffic policy name.

* `relation_to_domains` - (list) A list of Relation To Domains (ACI object [fvRsDomAtt](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/fvRsDomAtt/overview)) pointing to .
* `relation_to_domains` - (list) A list of Relation To Domains (ACI object [fvRsDomAtt](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/fvRsDomAtt/overview)). This relation can point to multiple ACI objects:
- [vmmDomP](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/vmmDomP/overview).
- [physDomP](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/physDomP/overview).
- [fcDomP](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/fcDomP/overview).
- [l2extDomP](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/l2extDomP/overview).
* `annotation` (annotation) - (string) The annotation of the Relation To Domain object.
* `binding_type` (bindingType) - (string) The binding type of the Relation To Domain object.
* `class_preference` (classPref) - (string) The class preference of the Relation To Domain object. Set 'useg' to allow microsegmentation.
Expand Down
6 changes: 5 additions & 1 deletion docs/data-sources/netflow_exporter_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ data "aci_netflow_exporter_policy" "example_tenant" {
* `annotation` (annotation) - (string) The annotation of the Relation To VRF object.
* `target_dn` (tDn) - (string) The distinguished name of the target.

* `relation_to_epg` - (list) A list of Relation To EPG (ACI object [netflowRsExporterToEPg](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/netflowRsExporterToEPg/overview)) pointing to .
* `relation_to_epg` - (list) A list of Relation To EPG (ACI object [netflowRsExporterToEPg](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/netflowRsExporterToEPg/overview)). This relation can point to multiple ACI objects:
- [fvAEPg](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/fvAEPg/overview).
- [l3extInstP](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/l3extInstP/overview).
- [l2extInstP](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/l2extInstP/overview).
* `annotation` (annotation) - (string) The annotation of the Relation To EPG object.
* `target_dn` (tDn) - (string) The distinguished name of the target.

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/application_epg.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ All examples for the Application EPG resource can be found in the [examples](htt
* `custom_qos_policy_name` (tnQosCustomPolName) - (string) The Custom QoS traffic policy name.

* `relation_to_domains` - (list) A list of Relation To Domains. This relation can point to multiple ACI objects:
* `relation_to_domains` - (list) A list of Relation To Domains (ACI object [fvRsDomAtt](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/fvRsDomAtt/overview)). This relation can point to multiple ACI objects:
- [vmmDomP](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/vmmDomP/overview) which can be configured using the [aci_vmm_domain](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/vmm_domain) resource.
- [physDomP](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/physDomP/overview) which can be configured using the [aci_physical_domain](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/physical_domain) resource.
- [fcDomP](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/fcDomP/overview). Currently there is no resource available to configure this ACI object.
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/netflow_exporter_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ All examples for the Netflow Exporter Policy resource can be found in the [examp
* `target_dn` (tDn) - (string) The distinguished name of the target.

* `relation_to_epg` - (list) A list of Relation To EPG. This relation can point to multiple ACI objects:
* `relation_to_epg` - (list) A list of Relation To EPG (ACI object [netflowRsExporterToEPg](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/netflowRsExporterToEPg/overview)). This relation can point to multiple ACI objects:
- [fvAEPg](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/fvAEPg/overview) which can be configured using the [aci_application_epg](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/application_epg) resource.
- [l3extInstP](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/l3extInstP/overview) which can be configured using the [aci_external_network_instance_profile](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/external_network_instance_profile) resource.
- [l2extInstP](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/l2extInstP/overview) which can be configured using the [aci_l2out_extepg](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/l2out_extepg) resource.
Expand Down
10 changes: 10 additions & 0 deletions gen/templates/datasource.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,17 @@ Data source for ACI {{.ResourceNameAsDescription}}
{{- end}}
{{ range .Children }}{{$childVersion := .Versions}}{{$RelationshipClasses := .RelationshipClasses}}{{$length := len .RelationshipClasses}}
{{- if ge $length 1}}
{{- if .MultiRelationshipClass}}
{{$RelationshipResourceNames := .RelationshipResourceNames}}
* `{{- .ResourceName}}` - (list) A list of {{getResourceNameAsDescription .ResourceName $.Definitions}} (ACI object {{getDevnetDocForClass .PkgName}}). This relation{{if and (ne $.Versions .Versions) (ne .Versions "")}} This attribute is supported in ACI versions: {{ .Versions}} and{{- end}} can point to multiple ACI objects:
{{- range $index, $value := .RelationshipClasses}}
{{- if le $index (len $RelationshipResourceNames)}}
- {{getDevnetDocForClass $value}}.
{{- end}}
{{- end}}
{{- else}}
* `{{- .ResourceName}}` - (list) A list of {{getResourceNameAsDescription .ResourceName $.Definitions}} (ACI object {{getDevnetDocForClass .PkgName}}) pointing to {{range $index, $value := .RelationshipResourceNames}}{{- if or (eq $length 1) (eq $.PkgName (index $RelationshipClasses $index))}}{{getResourceNameAsDescription $value $.Definitions}} (ACI Object {{getDevnetDocForClass (index $RelationshipClasses $index)}}){{end}}{{end}}.{{if and (ne $.Versions .Versions) (ne .Versions "")}} This attribute is supported in ACI versions: {{ .Versions}}{{- end}}
{{- end}}
{{- else}}
* `{{- .ResourceName}}` - (list) A list of {{getResourceNameAsDescription .ResourceName $.Definitions}} (ACI object {{getDevnetDocForClass .PkgName}}).{{if and (ne $.Versions .Versions) (ne .Versions "")}} This attribute is supported in ACI versions: {{ .Versions}}{{- end}}
{{- end}}
Expand Down
2 changes: 1 addition & 1 deletion gen/templates/resource.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ All examples for the {{.ResourceNameAsDescription}} resource can be found in the
{{- if ge $length 1}}
{{- if .MultiRelationshipClass}}
{{$RelationshipResourceNames := .RelationshipResourceNames}}
* `{{- .ResourceName}}` - (list) A list of {{getResourceNameAsDescription .ResourceName $.Definitions}}. This relation{{if and (ne $.Versions .Versions) (ne .Versions "")}} This attribute is supported in ACI versions: {{ .Versions}} and{{- end}} can point to multiple ACI objects:
* `{{- .ResourceName}}` - (list) A list of {{getResourceNameAsDescription .ResourceName $.Definitions}} (ACI object {{getDevnetDocForClass .PkgName}}). This relation{{if and (ne $.Versions .Versions) (ne .Versions "")}} This attribute is supported in ACI versions: {{ .Versions}} and{{- end}} can point to multiple ACI objects:
{{- range $index, $value := .RelationshipClasses}}
{{- if le $index (len $RelationshipResourceNames)}}
- {{getDevnetDocForClass $value}}{{- if ne (index $RelationshipResourceNames $index) ""}} which can be configured using the [aci_{{(index $RelationshipResourceNames $index)}}](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/{{(index $RelationshipResourceNames $index)}}) resource.{{- else}}. Currently there is no resource available to configure this ACI object.{{- end}}
Expand Down

0 comments on commit db73c86

Please sign in to comment.