Skip to content

Commit 98d640d

Browse files
author
Rajat Chopra
committed
policy urls should support partitions
1 parent de4ca18 commit 98d640d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pkg/router/f5/f5.go

+6-4
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ func (f5 *f5LTM) ensureVxLANTunnel() error {
576576
AddressSource: "from-user",
577577
Floating: "disabled",
578578
InheritedTrafficGroup: "false",
579-
TrafficGroup: path.Join(f5.partitionPath, "traffic-group-local-only"),
579+
TrafficGroup: path.Join("/Common", "traffic-group-local-only"), // Traffic group is global
580580
Unit: 0,
581581
Vlan: path.Join(f5.partitionPath, F5VxLANTunnelName),
582582
AllowService: "all",
@@ -615,11 +615,13 @@ func (f5 *f5LTM) ensurePolicyExists(policyName string) error {
615615

616616
policiesUrl := fmt.Sprintf("https://%s/mgmt/tm/ltm/policy", f5.host)
617617

618+
policyPath := path.Join(f5.partitionPath, policyName)
619+
618620
if f5.setupOSDNVxLAN {
619621
// if vxlan needs to be setup, it will only happen
620622
// with ver12, for which we need to use a different payload
621623
policyPayload := f5Ver12Policy{
622-
Name: policyName,
624+
Name: policyPath,
623625
TmPartition: f5.partitionPath,
624626
Controls: []string{"forwarding"},
625627
Requires: []string{"http"},
@@ -629,7 +631,7 @@ func (f5 *f5LTM) ensurePolicyExists(policyName string) error {
629631
err = f5.post(policiesUrl, policyPayload, nil)
630632
} else {
631633
policyPayload := f5Policy{
632-
Name: policyName,
634+
Name: policyPath,
633635
Partition: f5.partitionPath,
634636
Controls: []string{"forwarding"},
635637
Requires: []string{"http"},
@@ -698,7 +700,7 @@ func (f5 *f5LTM) ensureVserverHasPolicy(vserverName, policyName string) error {
698700
glog.V(4).Infof("Adding policy %s to vserver %s...", policyName, vserverName)
699701

700702
vserverPoliciesPayload := f5VserverPolicy{
701-
Name: policyName,
703+
Name: policyPath,
702704
Partition: f5.partitionPath,
703705
}
704706

0 commit comments

Comments
 (0)