Skip to content

Commit

Permalink
[ignore] Modify name of defaultValueOverwrite in generator. Add extra…
Browse files Browse the repository at this point in the history
… UI location for NetFlow Policies.
  • Loading branch information
gmicol committed May 14, 2024
1 parent f147a4d commit f9a524e
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 7 deletions.
4 changes: 3 additions & 1 deletion docs/data-sources/netflow_monitor_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ Data source for Netflow Monitor Policy

## GUI Information ##

* Location: `Tenants -> Policies -> NetFlow -> NetFlow Monitors`
* Locations:
- `Tenants -> Policies -> NetFlow -> NetFlow Monitors`
- `Fabric -> Access Policies -> Policies -> Interface -> NetFlow -> NetFlow Monitors`

## Example Usage ##

Expand Down
4 changes: 3 additions & 1 deletion docs/data-sources/relation_to_netflow_exporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ Data source for Relation To Netflow Exporter

## GUI Information ##

* Location: `Tenants -> Policies -> NetFlow -> NetFlow Monitors`
* Locations:
- `Tenants -> Policies -> NetFlow -> NetFlow Monitors`
- `Fabric -> Access Policies -> Policies -> Interface -> NetFlow -> NetFlow Monitors`

## Example Usage ##

Expand Down
4 changes: 3 additions & 1 deletion docs/resources/netflow_monitor_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ Manages ACI Netflow Monitor Policy

## GUI Information ##

* Location: `Tenants -> Policies -> NetFlow -> NetFlow Monitors`
* Locations:
- `Tenants -> Policies -> NetFlow -> NetFlow Monitors`
- `Fabric -> Access Policies -> Policies -> Interface -> NetFlow -> NetFlow Monitors`

## Example Usage ##

Expand Down
4 changes: 3 additions & 1 deletion docs/resources/relation_to_netflow_exporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ Manages ACI Relation To Netflow Exporter

## GUI Information ##

* Location: `Tenants -> Policies -> NetFlow -> NetFlow Monitors`
* Locations:
- `Tenants -> Policies -> NetFlow -> NetFlow Monitors`
- `Fabric -> Access Policies -> Policies -> Interface -> NetFlow -> NetFlow Monitors`

## Example Usage ##

Expand Down
5 changes: 5 additions & 0 deletions gen/definitions/classes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,28 +169,33 @@ netflowMonitorPol:
resource_name: "netflow_monitor_policy"
ui_locations:
- "Tenants -> Policies -> NetFlow -> NetFlow Monitors"
- "Fabric -> Access Policies -> Policies -> Interface -> NetFlow -> NetFlow Monitors"
sub_category: "Tenant Policies"

netflowRsMonitorToRecord:
resource_name: "relation_to_netflow_record"
ui_locations:
- "Tenants -> Policies -> NetFlow -> NetFlow Monitors"
- "Fabric -> Access Policies -> Policies -> Interface -> NetFlow -> NetFlow Monitors"
sub_category: "Tenant Policies"

netflowRsMonitorToExporter:
resource_name: "relation_to_netflow_exporter"
ui_locations:
- "Tenants -> Policies -> NetFlow -> NetFlow Monitors"
- "Fabric -> Access Policies -> Policies -> Interface -> NetFlow -> NetFlow Monitors"
sub_category: "Tenant Policies"

netflowExporterPol:
resource_name: "netflow_exporter_policy"
ui_locations:
- "Tenants -> Policies -> NetFlow -> NetFlow Exporters"
- "Fabric -> Access Policies -> Policies -> Interface -> NetFlow -> NetFlow Exporters"
sub_category: "Tenant Policies"

netflowRecordPol:
resource_name: "netflow_record_policy"
ui_locations:
- "Tenants -> Policies -> NetFlow -> NetFlow Records"
- "Fabric -> Access Policies -> Policies -> Interface -> NetFlow -> NetFlow Records"
sub_category: "Tenant Policies"
6 changes: 3 additions & 3 deletions gen/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1116,9 +1116,9 @@ func (m *Model) SetClassProperties(classDetails interface{}) {
}
}

DefaultValueOverwrite := GetDefaultValues(m.PkgName, propertyName, m.Definitions)
if DefaultValueOverwrite != "" {
property.DefaultValue = DefaultValueOverwrite
defaultValueOverwrite := GetDefaultValues(m.PkgName, propertyName, m.Definitions)
if defaultValueOverwrite != "" {
property.DefaultValue = defaultValueOverwrite
} else {
val, ok = propertyValue.(map[string]interface{})["default"]
if ok {
Expand Down

0 comments on commit f9a524e

Please sign in to comment.