Skip to content

Commit bd0e3cb

Browse files
committed
Refactor all networking into networking package
This refactors all networking client behavior into the networking package. The network client has been removed from the compute Service struct, instead, we use the networking Service. Ports and trunking logic have been moved out of instance.go in the compute package into port.go and trunk.go in the networking package. The process for refactoring is simple enough: 1. Delete network client from compute package 2. Move any functions using the network client to the networking package 3. Refactor the functions to call the networking client interface instead of gophercloud directly
1 parent 1576e9c commit bd0e3cb

File tree

8 files changed

+547
-419
lines changed

8 files changed

+547
-419
lines changed

pkg/cloud/services/compute/bastion.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func (s *Service) CreateBastion(openStackCluster *infrav1.OpenStackCluster, clus
3333
RootVolume: openStackCluster.Spec.Bastion.Instance.RootVolume,
3434
}
3535

36-
securityGroups, err := s.getSecurityGroups(openStackCluster.Spec.Bastion.Instance.SecurityGroups)
36+
securityGroups, err := s.networkingService.GetSecurityGroups(openStackCluster.Spec.Bastion.Instance.SecurityGroups)
3737
if err != nil {
3838
return nil, err
3939
}

0 commit comments

Comments
 (0)