Skip to content

Commit

Permalink
[minor_change] Add support for dpc path_type input with fex for resou…
Browse files Browse the repository at this point in the history
…rce_mso_schema_site_anp_epg_staticport and resource_mso_schema_site_anp_epg_bulk_staticport
  • Loading branch information
akinross authored and lhercot committed Jan 21, 2025
1 parent 280a808 commit ad13fb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mso/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,12 @@ func setValuesFromPortPath(staticPortMap map[string]interface{}, pathValue strin

func createPortPath(path_type, static_port_pod, static_port_leaf, static_port_fex, static_port_path string) string {

if path_type == "port" && static_port_fex != "" {
return fmt.Sprintf("topology/%s/paths-%s/extpaths-%s/pathep-[%s]", static_port_pod, static_port_leaf, static_port_fex, static_port_path)
} else if path_type == "vpc" && static_port_fex != "" {
if path_type == "vpc" && static_port_fex != "" {
return fmt.Sprintf("topology/%s/protpaths-%s/extprotpaths-%s/pathep-[%s]", static_port_pod, static_port_leaf, static_port_fex, static_port_path)
} else if path_type == "vpc" {
return fmt.Sprintf("topology/%s/protpaths-%s/pathep-[%s]", static_port_pod, static_port_leaf, static_port_path)
} else if static_port_fex != "" {
return fmt.Sprintf("topology/%s/paths-%s/extpaths-%s/pathep-[%s]", static_port_pod, static_port_leaf, static_port_fex, static_port_path)
} else {
return fmt.Sprintf("topology/%s/paths-%s/pathep-[%s]", static_port_pod, static_port_leaf, static_port_path)
}
Expand Down

0 comments on commit ad13fb9

Please sign in to comment.