Documentation ¶
Index ¶
- type NetworkClient
- type Service
- func (s *Service) AssociateFloatingIP(openStackCluster *infrav1.OpenStackCluster, fp *floatingips.FloatingIP, ...) error
- func (s *Service) DeleteBastionSecurityGroup(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
- func (s *Service) DeleteFloatingIP(openStackCluster *infrav1.OpenStackCluster, ip string) error
- func (s *Service) DeleteNetwork(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
- func (s *Service) DeletePort(eventObject runtime.Object, portID string) error
- func (s *Service) DeleteRouter(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
- func (s *Service) DeleteSecurityGroups(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
- func (s *Service) DeleteTrunk(eventObject runtime.Object, portID string) error
- func (s *Service) DisassociateFloatingIP(openStackCluster *infrav1.OpenStackCluster, ip string) error
- func (s *Service) GarbageCollectErrorInstancesPort(eventObject runtime.Object, instanceName string) error
- func (s *Service) GetFloatingIPByPortID(portID string) (*floatingips.FloatingIP, error)
- func (s *Service) GetNetworkIDsByFilter(opts networks.ListOptsBuilder) ([]string, error)
- func (s *Service) GetNetworksByFilter(opts networks.ListOptsBuilder) ([]networks.Network, error)
- func (s *Service) GetOrCreateFloatingIP(openStackCluster *infrav1.OpenStackCluster, clusterName, ip string) (*floatingips.FloatingIP, error)
- func (s *Service) GetOrCreatePort(eventObject runtime.Object, clusterName string, portName string, ...) (*ports.Port, error)
- func (s *Service) GetPortFromInstanceIP(instanceID string, ip string) ([]ports.Port, error)
- func (s *Service) GetSecurityGroups(securityGroupParams []infrav1.SecurityGroupParam) ([]string, error)
- func (s *Service) GetSubnetsByFilter(opts subnets.ListOptsBuilder) ([]subnets.Subnet, error)
- func (s *Service) GetTrunkSupport() (bool, error)
- func (s *Service) ReconcileExternalNetwork(openStackCluster *infrav1.OpenStackCluster) error
- func (s *Service) ReconcileNetwork(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
- func (s *Service) ReconcileRouter(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
- func (s *Service) ReconcileSecurityGroups(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
- func (s *Service) ReconcileSubnet(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetworkClient ¶ added in v0.5.0
type NetworkClient interface { ListFloatingIP(opts floatingips.ListOptsBuilder) ([]floatingips.FloatingIP, error) CreateFloatingIP(opts floatingips.CreateOptsBuilder) (*floatingips.FloatingIP, error) DeleteFloatingIP(id string) error GetFloatingIP(id string) (*floatingips.FloatingIP, error) UpdateFloatingIP(id string, opts floatingips.UpdateOptsBuilder) (*floatingips.FloatingIP, error) ListPort(opts ports.ListOptsBuilder) ([]ports.Port, error) CreatePort(opts ports.CreateOptsBuilder) (*ports.Port, error) DeletePort(id string) error GetPort(id string) (*ports.Port, error) UpdatePort(id string, opts ports.UpdateOptsBuilder) (*ports.Port, error) ListTrunk(opts trunks.ListOptsBuilder) ([]trunks.Trunk, error) CreateTrunk(opts trunks.CreateOptsBuilder) (*trunks.Trunk, error) DeleteTrunk(id string) error ListRouter(opts routers.ListOpts) ([]routers.Router, error) CreateRouter(opts routers.CreateOptsBuilder) (*routers.Router, error) DeleteRouter(id string) error GetRouter(id string) (*routers.Router, error) UpdateRouter(id string, opts routers.UpdateOptsBuilder) (*routers.Router, error) AddRouterInterface(id string, opts routers.AddInterfaceOptsBuilder) (*routers.InterfaceInfo, error) RemoveRouterInterface(id string, opts routers.RemoveInterfaceOptsBuilder) (*routers.InterfaceInfo, error) ListSecGroup(opts groups.ListOpts) ([]groups.SecGroup, error) CreateSecGroup(opts groups.CreateOptsBuilder) (*groups.SecGroup, error) DeleteSecGroup(id string) error GetSecGroup(id string) (*groups.SecGroup, error) UpdateSecGroup(id string, opts groups.UpdateOptsBuilder) (*groups.SecGroup, error) ListSecGroupRule(opts rules.ListOpts) ([]rules.SecGroupRule, error) CreateSecGroupRule(opts rules.CreateOptsBuilder) (*rules.SecGroupRule, error) DeleteSecGroupRule(id string) error GetSecGroupRule(id string) (*rules.SecGroupRule, error) ListNetwork(opts networks.ListOptsBuilder) ([]networks.Network, error) CreateNetwork(opts networks.CreateOptsBuilder) (*networks.Network, error) DeleteNetwork(id string) error GetNetwork(id string) (*networks.Network, error) UpdateNetwork(id string, opts networks.UpdateOptsBuilder) (*networks.Network, error) ListSubnet(opts subnets.ListOptsBuilder) ([]subnets.Subnet, error) CreateSubnet(opts subnets.CreateOptsBuilder) (*subnets.Subnet, error) DeleteSubnet(id string) error GetSubnet(id string) (*subnets.Subnet, error) UpdateSubnet(id string, opts subnets.UpdateOptsBuilder) (*subnets.Subnet, error) ListExtensions() ([]extensions.Extension, error) ReplaceAllAttributesTags(resourceType string, resourceID string, opts attributestags.ReplaceAllOptsBuilder) ([]string, error) }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service interfaces with the OpenStack Networking API. It will create a network related infrastructure for the cluster, like network, subnet, router, security groups.
func NewService ¶
func NewService(providerClient *gophercloud.ProviderClient, clientOpts *clientconfig.ClientOpts, logger logr.Logger) (*Service, error)
NewService returns an instance of the networking service.
func NewTestService ¶ added in v0.5.0
func NewTestService(projectID string, client NetworkClient, logger logr.Logger) *Service
NewTestService returns a Service with no initialisation. It should only be used by tests.
func (*Service) AssociateFloatingIP ¶ added in v0.3.4
func (s *Service) AssociateFloatingIP(openStackCluster *infrav1.OpenStackCluster, fp *floatingips.FloatingIP, portID string) error
func (*Service) DeleteBastionSecurityGroup ¶ added in v0.3.5
func (s *Service) DeleteBastionSecurityGroup(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
func (*Service) DeleteFloatingIP ¶ added in v0.3.3
func (s *Service) DeleteFloatingIP(openStackCluster *infrav1.OpenStackCluster, ip string) error
func (*Service) DeleteNetwork ¶ added in v0.3.1
func (s *Service) DeleteNetwork(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
func (*Service) DeletePort ¶ added in v0.5.0
func (*Service) DeleteRouter ¶ added in v0.3.1
func (s *Service) DeleteRouter(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
func (*Service) DeleteSecurityGroups ¶
func (s *Service) DeleteSecurityGroups(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
func (*Service) DeleteTrunk ¶ added in v0.5.0
func (*Service) DisassociateFloatingIP ¶ added in v0.3.5
func (s *Service) DisassociateFloatingIP(openStackCluster *infrav1.OpenStackCluster, ip string) error
func (*Service) GarbageCollectErrorInstancesPort ¶ added in v0.5.0
func (*Service) GetFloatingIPByPortID ¶ added in v0.3.5
func (s *Service) GetFloatingIPByPortID(portID string) (*floatingips.FloatingIP, error)
func (*Service) GetNetworkIDsByFilter ¶ added in v0.3.5
func (s *Service) GetNetworkIDsByFilter(opts networks.ListOptsBuilder) ([]string, error)
GetNetworkIDsByFilter retrieves network ids by querying openstack with filters.
func (*Service) GetNetworksByFilter ¶
GetNetworksByFilter retrieves networks by querying openstack with filters.
func (*Service) GetOrCreateFloatingIP ¶ added in v0.3.2
func (s *Service) GetOrCreateFloatingIP(openStackCluster *infrav1.OpenStackCluster, clusterName, ip string) (*floatingips.FloatingIP, error)
func (*Service) GetOrCreatePort ¶ added in v0.5.0
func (*Service) GetPortFromInstanceIP ¶ added in v0.5.0
GetPortFromInstanceIP returns at most one port attached to the instance with given ID and with the IP address provided.
func (*Service) GetSecurityGroups ¶ added in v0.5.0
func (s *Service) GetSecurityGroups(securityGroupParams []infrav1.SecurityGroupParam) ([]string, error)
func (*Service) GetSubnetsByFilter ¶
GetSubnetsByFilter gets the id of a subnet by querying openstack with filters.
func (*Service) GetTrunkSupport ¶ added in v0.5.0
func (*Service) ReconcileExternalNetwork ¶ added in v0.3.2
func (s *Service) ReconcileExternalNetwork(openStackCluster *infrav1.OpenStackCluster) error
func (*Service) ReconcileNetwork ¶
func (s *Service) ReconcileNetwork(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
func (*Service) ReconcileRouter ¶
func (s *Service) ReconcileRouter(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
func (*Service) ReconcileSecurityGroups ¶
func (s *Service) ReconcileSecurityGroups(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
ReconcileSecurityGroups reconcile the security groups.
func (*Service) ReconcileSubnet ¶
func (s *Service) ReconcileSubnet(openStackCluster *infrav1.OpenStackCluster, clusterName string) error
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock_networking is a generated GoMock package.
|
Package mock_networking is a generated GoMock package. |