Documentation ¶
Index ¶
- Constants
- type FlowContext
- type PersistentState
- func (s *PersistentState) HasValidVersion() (valid bool, err error)
- func (s *PersistentState) MigratedFromTerraform() bool
- func (s *PersistentState) SetMigratedFromTerraform()
- func (s *PersistentState) SetTerraformCleanedUp()
- func (s *PersistentState) TerraformCleanedUp() bool
- func (s *PersistentState) ToFlatMap() shared.FlatMap
- func (s *PersistentState) ToJSON() ([]byte, error)
Constants ¶
const ( // IdentifierRouter is the key for the router id IdentifierRouter = "Router" // IdentifierNetwork is the key for the network id IdentifierNetwork = "Network" // IdentifierSubnet is the key for the subnet id IdentifierSubnet = "Subnet" // IdentifierFloatingNetwork is the key for the floating network id IdentifierFloatingNetwork = "FloatingNetwork" // IdentifierSecGroup is the key for the security group id IdentifierSecGroup = "SecurityGroup" IdentifierShareNetwork = "ShareNetwork" // NameFloatingNetwork is the key for the floating network name NameFloatingNetwork = "FloatingNetworkName" // NameFloatingPoolSubnet is the name/regex for the floating pool subnets NameFloatingPoolSubnet = "FloatingPoolSubnetName" // NameNetwork is the name of the network NameNetwork = "NetworkName" // NameKeyPair is the key for the name of the EC2 key pair resource NameKeyPair = "KeyPair" // NameSecGroup is the name of the security group NameSecGroup = "SecurityGroupName" NameShareNetwork = "ShareNetworkName" // RouterIP is the key for the router IP address RouterIP = "RouterIP" // ObjectSecGroup is the key for the cached security group ObjectSecGroup = "SecurityGroup" // MarkerMigratedFromTerraform is the key for marking the state for successful state migration from Terraformer MarkerMigratedFromTerraform = "MigratedFromTerraform" // MarkerTerraformCleanedUp is the key for marking the state for successful cleanup of Terraformer resources. MarkerTerraformCleanedUp = "TerraformCleanedUp" )
const ( // PersistentStateVersion is the current version used for persisting the state. PersistentStateVersion = "v1alpha1" // PersistentStateAPIVersion is the APIVersion used for the persistent state PersistentStateAPIVersion = openstack.GroupName + "/" + PersistentStateVersion // PersistentStateKind is the kind name for the persistent state PersistentStateKind = "FlowState" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FlowContext ¶
type FlowContext struct { shared.BasicFlowContext // contains filtered or unexported fields }
FlowContext contains the logic to reconcile or delete the AWS infrastructure.
func NewFlowContext ¶
func NewFlowContext(log logr.Logger, clientFactory osclient.Factory, infra *extensionsv1alpha1.Infrastructure, config *openstackapi.InfrastructureConfig, cloudProfileConfig *openstackapi.CloudProfileConfig, oldState shared.FlatMap, persistor shared.FlowStatePersistor) (*FlowContext, error)
NewFlowContext creates a new FlowContext object
func (*FlowContext) Delete ¶
func (c *FlowContext) Delete(ctx context.Context) error
Delete creates and runs the flow to delete the AWS infrastructure.
func (*FlowContext) GetInfrastructureConfig ¶
func (c *FlowContext) GetInfrastructureConfig() *openstackapi.InfrastructureConfig
GetInfrastructureConfig returns the InfrastructureConfig object
type PersistentState ¶
PersistentState is the state which is persisted as part of the infrastructure status.
func NewPersistentState ¶
func NewPersistentState() *PersistentState
NewPersistentState creates empty PersistentState
func NewPersistentStateFromFlatMap ¶
func NewPersistentStateFromFlatMap(flatState shared.FlatMap) *PersistentState
NewPersistentStateFromFlatMap create new PersistentState and initialises data from input.
func NewPersistentStateFromJSON ¶
func NewPersistentStateFromJSON(raw []byte) (*PersistentState, error)
NewPersistentStateFromJSON unmarshals PersistentState from JSON or YAML. Returns nil if input contains no kind field with value "FlowState".
func (*PersistentState) HasValidVersion ¶
func (s *PersistentState) HasValidVersion() (valid bool, err error)
HasValidVersion checks if flow version is supported.
func (*PersistentState) MigratedFromTerraform ¶
func (s *PersistentState) MigratedFromTerraform() bool
MigratedFromTerraform returns trus if marker MarkerMigratedFromTerraform is set.
func (*PersistentState) SetMigratedFromTerraform ¶
func (s *PersistentState) SetMigratedFromTerraform()
SetMigratedFromTerraform sets the marker MarkerMigratedFromTerraform
func (*PersistentState) SetTerraformCleanedUp ¶
func (s *PersistentState) SetTerraformCleanedUp()
SetTerraformCleanedUp sets the marker MarkerTerraformCleanedUp
func (*PersistentState) TerraformCleanedUp ¶
func (s *PersistentState) TerraformCleanedUp() bool
TerraformCleanedUp returns trus if marker MarkerTerraformCleanedUp is set.
func (*PersistentState) ToFlatMap ¶
func (s *PersistentState) ToFlatMap() shared.FlatMap
ToFlatMap returns a copy of state as FlatMap
func (*PersistentState) ToJSON ¶
func (s *PersistentState) ToJSON() ([]byte, error)
ToJSON marshals state as JSON