Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions pkg/cloud/services/networking/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,19 @@ func (s *Service) ReconcileNetwork(clusterName string, openStackCluster *infrav1
}

var portSecurityEnabled gophercloud.EnabledState
var opts createOpts
if openStackCluster.Spec.DisablePortSecurity {
portSecurityEnabled = gophercloud.Disabled
opts = createOpts{
AdminStateUp: gophercloud.Enabled,
Name: networkName,
PortSecurityEnabled: portSecurityEnabled,
}
} else {
portSecurityEnabled = gophercloud.Enabled
}
opts := createOpts{
AdminStateUp: gophercloud.Enabled,
Name: networkName,
PortSecurityEnabled: portSecurityEnabled,
opts = createOpts{
AdminStateUp: gophercloud.Enabled,
Name: networkName,
}
}
network, err := networks.Create(s.client, opts).Extract()
if err != nil {
Expand Down