types

package
v0.0.0-...-847af40 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessConfigSettings

func ProcessConfigSettings(cdl *ConfigDownload) error

Types

type AllocationPool

type AllocationPool struct {
	Start string `yaml:"start"`
	End   string `yaml:"end"`
}

type ArgDef

type ArgDef struct {
	Name         string      `yaml:"name"`
	Role         string      `yaml:"role,omitempty"`
	Type         string      `yaml:"type"`
	Required     bool        `yaml:"required,omitempty"`
	Default      interface{} `yaml:"default,omitempty"`
	Description  string      `yaml:"description,omitempty"`
	Elements     string      `yaml:"elements,omitempty"`
	VersionAdded string      `yaml:"version_added,omitempty"`
}

func (*ArgDef) ParseArgDef

func (ac *ArgDef) ParseArgDef(obj map[string]interface{}) error

type ArgDefs

type ArgDefs map[string]ArgDef

func (*ArgDefs) ParseArgDefFile

func (args *ArgDefs) ParseArgDefFile(path string) error

type ArgsType

type ArgsType interface {
	int | bool | string
}

type ConfigDownload

type ConfigDownload struct {
	Networks        map[string]*OSPNetwork
	EnabledServices map[string]*OSPService
	Hosts           map[string]*TripleoHost
	Roles           []TripleoRole
	PrimaryRoleName string
	Passwords       map[string]string
	ConfigSettings  ConfigSettings
}

func NewConfigDownload

func NewConfigDownload() *ConfigDownload

func (*ConfigDownload) GetNetwork

func (cdl *ConfigDownload) GetNetwork(name string) *OSPNetwork

func (*ConfigDownload) Process

func (cdl *ConfigDownload) Process(mappingYaml string, serviceMap string) error

func (*ConfigDownload) ProcessConfigSettings

func (cdl *ConfigDownload) ProcessConfigSettings(cfgSet map[string]interface{}, serviceMap string) error

func (*ConfigDownload) ProcessDeployStepsOne

func (cdl *ConfigDownload) ProcessDeployStepsOne() error

func (*ConfigDownload) ProcessGlobalVars

func (cdl *ConfigDownload) ProcessGlobalVars(globalVars *GlobalVars) error

Must be run first

func (*ConfigDownload) ProcessGroupVars

func (cdl *ConfigDownload) ProcessGroupVars(primaryRole string) (map[string]interface{}, error)

func (*ConfigDownload) ProcessPasswords

func (cdl *ConfigDownload) ProcessPasswords(mappingYaml string, globalVars map[string]interface{}) error

func (*ConfigDownload) ProcessTripleoAnsibleInventory

func (cdl *ConfigDownload) ProcessTripleoAnsibleInventory(data map[string]interface{}) error

func (*ConfigDownload) ProcessTripleoOvercloudEnvironment

func (cdl *ConfigDownload) ProcessTripleoOvercloudEnvironment() error

Extract Control Plane information from the TripleoOvercloudEnvironment The Control Plane network is defined as part of the undercloud

func (*ConfigDownload) ProcessTripleoOvercloudNetworkData

func (cdl *ConfigDownload) ProcessTripleoOvercloudNetworkData(networkData *TripleoOvercloudNetworkData) error

func (*ConfigDownload) ProcessTripleoOvercloudRoles

func (cdl *ConfigDownload) ProcessTripleoOvercloudRoles(tord *TripleoOvercloudRolesData) error

type ConfigSettings

type ConfigSettings struct {
	MechanismDrivers  []string
	NetworkVlanRanges []string
	GlobalPhysnetMtu  int
}

type ControlPlaneVipData

type ControlPlaneVipData struct {
	FixedIPS []ControlPlaneVipDataFixedIP `json:"fixed_ips"`
	Name     string                       `json:"name"`
	Network  ControlPlaneVipDataNetwork   `json:"network"`
	Subnets  []ControlPlaneVipDataSubnet  `json:"subnets"`
}

type ControlPlaneVipDataFixedIP

type ControlPlaneVipDataFixedIP struct {
	IPAddress string `json:"ip_address"`
}

type ControlPlaneVipDataNetwork

type ControlPlaneVipDataNetwork struct {
	Tags []string `json:"tags"`
}

type ControlPlaneVipDataSubnet

type ControlPlaneVipDataSubnet struct {
	IPVersion int64 `json:"ip_version"`
}

type CtlplaneHostRoute

type CtlplaneHostRoute struct {
	Destination string `yaml:"destination"`
	Nexthop     string `yaml:"nexthop"`
}

type CtlplaneNetwork

type CtlplaneNetwork struct {
	DNSDomain string   `yaml:"dns_domain"`
	MTU       int64    `yaml:"mtu"`
	Name      string   `yaml:"name"`
	Tags      []string `yaml:"tags"`
}

type CtlplaneNetworkAttributes

type CtlplaneNetworkAttributes struct {
	Network CtlplaneNetwork           `yaml:"network"`
	Subnets map[string]CtlplaneSubnet `yaml:"subnets"`
}

type CtlplaneSubnet

type CtlplaneSubnet struct {
	CIDR           string              `yaml:"cidr"`
	DNSNameservers []interface{}       `yaml:"dns_nameservers"`
	GatewayIP      string              `yaml:"gateway_ip"`
	HostRoutes     []CtlplaneHostRoute `yaml:"host_routes"`
	IPVersion      int64               `yaml:"ip_version"`
	Name           string              `yaml:"name"`
}

type DeployedNetworkEnvironment

type DeployedNetworkEnvironment struct {
	NetAttributesMap map[string]DeployedNetworkEnvironmentNetAttributes `yaml:"net_attributes_map"`
	NetCIDRMap       map[string][]string                                `yaml:"net_cidr_map"`
	NetIPVersionMap  map[string]int64                                   `yaml:"net_ip_version_map"`
}

type DeployedNetworkEnvironmentHostRoute

type DeployedNetworkEnvironmentHostRoute struct {
	Destination string `yaml:"destination"`
	Nexthop     string `yaml:"nexthop"`
}

type DeployedNetworkEnvironmentNetAttributes

type DeployedNetworkEnvironmentNetAttributes struct {
	Network DeployedNetworkEnvironmentNetwork           `yaml:"network"`
	Subnets map[string]DeployedNetworkEnvironmentSubnet `yaml:"subnets"`
}

type DeployedNetworkEnvironmentNetwork

type DeployedNetworkEnvironmentNetwork struct {
	DNSDomain string   `yaml:"dns_domain"`
	MTU       int64    `yaml:"mtu"`
	Name      string   `yaml:"name"`
	Tags      []string `yaml:"tags"`
}

type DeployedNetworkEnvironmentSubnet

type DeployedNetworkEnvironmentSubnet struct {
	CIDR           string                                `yaml:"cidr"`
	DNSNameservers []interface{}                         `yaml:"dns_nameservers"`
	GatewayIP      interface{}                           `yaml:"gateway_ip"`
	HostRoutes     []DeployedNetworkEnvironmentHostRoute `yaml:"host_routes"`
	IPVersion      int64                                 `yaml:"ip_version"`
	Name           string                                `yaml:"name"`
	Tags           []string                              `yaml:"tags"`
}

type DownloadMap

type DownloadMap map[string]interface{}

func NewDownloadMap

func NewDownloadMap() DownloadMap

func (*DownloadMap) ParseDownloadFile

func (dm *DownloadMap) ParseDownloadFile(path string) error

func (*DownloadMap) ProcessDir

func (dm *DownloadMap) ProcessDir(baseDir string)

type Endpoints

type Endpoints struct {
	Admin    string `yaml:"admin"`
	Internal string `yaml:"internal"`
	Public   string `yaml:"public"`
}

type GlobalVars

type GlobalVars struct {
	AllNodesExtraMapData    map[string]interface{}       `yaml:"all_nodes_extra_map_data"`
	CloudDomain             string                       `yaml:"cloud_domain"`
	CloudNames              map[string]string            `yaml:"cloud_names"`
	ContainerCLI            string                       `yaml:"container_cli"`
	ControlVirtualIP        string                       `yaml:"control_virtual_ip"`
	DeployArtifactFiles     []interface{}                `yaml:"deploy_artifact_files"`
	DeployArtifactUrls      []interface{}                `yaml:"deploy_artifact_urls"`
	DeployIdentifier        string                       `yaml:"deploy_identifier"`
	DeployStepsMax          int64                        `yaml:"deploy_steps_max"`
	EnableInternalTLS       bool                         `yaml:"enable_internal_tls"`
	EnabledNetworks         []string                     `yaml:"enabled_networks"`
	EnabledServices         []string                     `yaml:"enabled_services"`
	ExtraHostsEntries       []string                     `yaml:"extra_hosts_entries"`
	HideSensitiveLogs       bool                         `yaml:"hide_sensitive_logs"`
	HostsEntry              []string                     `yaml:"hosts_entry"`
	KeystoneResources       map[string]KeystoneResources `yaml:"keystone_resources"`
	NetCIDRMap              map[string][]string          `yaml:"net_cidr_map"`
	NetVipMap               map[string]string            `yaml:"net_vip_map"`
	NetworkSafeDefaults     bool                         `yaml:"network_safe_defaults"`
	NetworkVirtualIPS       map[string]NetworkVirtualIP  `yaml:"network_virtual_ips"`
	Networks                map[string]Networks          `yaml:"networks"`
	NovaAdditionalCell      bool                         `yaml:"nova_additional_cell"`
	PingTestGatewayIPS      map[string][]string          `yaml:"ping_test_gateway_ips"`
	PingTestIPS             map[string]string            `yaml:"ping_test_ips"`
	PrimaryRoleName         string                       `yaml:"primary_role_name"`
	ServiceNetMap           map[string]string            `yaml:"service_net_map"`
	UndercloudHostsEntries  []string                     `yaml:"undercloud_hosts_entries"`
	ValidateControllersICMP bool                         `yaml:"validate_controllers_icmp"`
	ValidateFQDN            bool                         `yaml:"validate_fqdn"`
	ValidateGatewaysICMP    bool                         `yaml:"validate_gateways_icmp"`
	VipHostsEntries         []string                     `yaml:"vip_hosts_entries"`
}

func GetGlobalVars

func GetGlobalVars() (*GlobalVars, error)

type InternalAPISubnet1

type InternalAPISubnet1 struct {
	Ipv6Subnet          string        `yaml:"ipv6_subnet"`
	Ipv6AllocationPools []interface{} `yaml:"ipv6_allocation_pools"`
}

type KeystoneResources

type KeystoneResources struct {
	Domains   []string               `yaml:"domains"`
	Endpoints Endpoints              `yaml:"endpoints"`
	Project   string                 `yaml:"project"`
	Region    string                 `yaml:"region"`
	Roles     []string               `yaml:"roles"`
	Service   string                 `yaml:"service"`
	Users     map[string]interface{} `yaml:"users"`
}

type Kustomize

type Kustomize struct {
	APIVersion   string         `yaml:"apiVersion"`
	Kind         string         `yaml:"kind"`
	Components   []string       `yaml:"components"`
	Resources    []string       `yaml:"resources"`
	Patches      []Patches      `yaml:"patches"`
	Replacements []Replacements `yaml:"replacements"`
}

type KustomizeFile

type KustomizeFile struct {
	Path      string                 `yaml:"path"`
	Data      Kustomize              `yaml:"data"`
	Resources map[string]interface{} `yaml:"resources"`
}

func NewKustomizeFile

func NewKustomizeFile() *KustomizeFile

type NetworkVirtualIP

type NetworkVirtualIP struct {
	Index     int64  `yaml:"index"`
	IpAddress string `yaml:"ip_address"`
}

type Networks

type Networks struct {
	Name      string `yaml:"name"`
	NameLower string `yaml:"name_lower"`
}

type OSPNetwork

type OSPNetwork struct {
	Name       string             `json:"name"`
	NameLower  string             `json:"name_lower"`
	DnsDomain  string             `json:"domain,omitempty"`
	CloudName  string             `json:"cloud_name,omitempty"`
	Mtu        int                `json:"mtu"`
	IpV6       bool               `json:"ipv6"`
	Vip        netip.Addr         `json:"vip"`
	Subnets    []OSPNetworkSubnet `json:"subnets,omitempty"`
	PrefixLen  int                `json:"prefix_len"`
	VlanId     int                `json:"vlan_id"`
	HostRoutes []TripleoRoutes    `json:"host_routes"`
}

type OSPNetworkSubnet

type OSPNetworkSubnet struct {
	Name                string                 `json:"name"`
	IpSubnet            netip.Prefix           `json:"ip_subnet"`
	Ipv6Subnet          netip.Prefix           `json:"ipv6_subnet,omitempty"`
	GatewayIp           netip.Addr             `json:"gateway_ip,omitempty"`
	GatewayIpV6         netip.Addr             `json:"gateway_ip_v6,omitempty"`
	AllocationPools     []OSPNetworkSubnetPool `json:"allocationRanges,omitempty"`
	Ipv6AllocationPools []OSPNetworkSubnetPool `json:"ipv6_allocationRanges,omitempty"`
	Routes              []TripleoRoutes        `json:"routes,omitempty"`
	RoutesIpv6          []TripleoRoutes        `json:"routes_ipv6,omitempty"`
	Vlan                int                    `json:"vlan,omitempty"`
}

type OSPNetworkSubnetPool

type OSPNetworkSubnetPool struct {
	Start string `yaml:"start"`
	End   string `yaml:"end"`
}

type OSPService

type OSPService struct {
	Name       string
	Network    string
	Password   string
	DbPassword string
}

type OSPServicePasswords

type OSPServicePasswords struct {
	Password   string
	DbPassword string
}

type PasswordMapping

type PasswordMapping struct {
	File    string `yaml:"file"`
	Address string `yaml:"address"`
	Role    string `yaml:"role"`
}

type Patches

type Patches struct {
	Target Target `yaml:"target"`
	Path   string `yaml:"path"`
}

type Replacements

type Replacements struct {
	Source  Source    `yaml:"source"`
	Targets []Targets `yaml:"targets"`
}

type RoleType

type RoleType string
const (
	RoleTypeController    RoleType = "controller"
	RoleTypeCompute       RoleType = "compute"
	RoleTypeCephStorage   RoleType = "ceph-storage"
	RoleTypeBlockStorage  RoleType = "block-storage"
	RoleTypeObjectStorage RoleType = "object-storage"
	RoleTypeNetworker     RoleType = "networker"
	Unknown               RoleType = "unknown"
)

type RoutesIpv6

type RoutesIpv6 struct {
	Default     bool   `yaml:"default"`
	Destination string `yaml:"destination"`
	NextHop     string `yaml:"nexthop"`
}

type Select

type Select struct {
	Kind string `yaml:"kind"`
	Name string `yaml:"name"`
}

type ServiceMapping

type ServiceMapping struct {
	Setting       string `yaml:"setting"`
	ConfigVarName string `yaml:"config_var_name"`
	Service       string `yaml:"service"`
	Section       string `yaml:"section"`
}

type Source

type Source struct {
	Kind      string `yaml:"kind"`
	Name      string `yaml:"name"`
	FieldPath string `yaml:"fieldPath"`
}

type Target

type Target struct {
	Kind          string `yaml:"kind"`
	LabelSelector string `yaml:"labelSelector"`
}

type Targets

type Targets struct {
	Select     Select   `yaml:"select"`
	FieldPaths []string `yaml:"fieldPaths"`
}

type TripleoHost

type TripleoHost struct {
	Name                string
	CanonicalName       string
	AnsibleHost         string
	DefaultRouteNetwork []string
	Networks            map[string]*TripleoHostNetwork
	TripleoRole         *TripleoRole
	Vars                map[string]interface{}
}

type TripleoHostNetwork

type TripleoHostNetwork struct {
	Name     string
	IP       netip.Addr
	Hostname string
	Subnet   *OSPNetworkSubnet
}

type TripleoOvercloudEnvironment

type TripleoOvercloudEnvironment struct {
	ParmaterDefaults TripleoOvercloudEnvironmentParameterDefaults `yaml:"parameter_defaults"`
}

func GetTripleoOvercloudEnvironment

func GetTripleoOvercloudEnvironment() (*TripleoOvercloudEnvironment, error)

type TripleoOvercloudEnvironmentParameterDefaults

type TripleoOvercloudEnvironmentParameterDefaults struct {
	CtlplaneNetworkAttributes  CtlplaneNetworkAttributes  `yaml:"CtlplaneNetworkAttributes"`
	DeployedNetworkEnvironment DeployedNetworkEnvironment `yaml:"DeployedNetworkEnvironment"`
	ControlPlaneVipData        ControlPlaneVipData        `yaml:"ControlPlaneVipData"`
}

type TripleoOvercloudNetworkData

type TripleoOvercloudNetworkData []TripleoOvercloudNetworkDataEntry

func GetTripleoOvercloudNetworkData

func GetTripleoOvercloudNetworkData() (*TripleoOvercloudNetworkData, error)

type TripleoOvercloudNetworkDataEntry

type TripleoOvercloudNetworkDataEntry struct {
	Name      string                                       `yaml:"name"`
	NameLower string                                       `yaml:"name_lower"`
	Vip       bool                                         `yaml:"vip"`
	DNSDomain string                                       `yaml:"dns_domain,omitempty"`
	MTU       int                                          `yaml:"mtu"`
	Ipv6      bool                                         `yaml:"ipv6"`
	Subnets   map[string]TripleoOvercloudNetworkDataSubnet `yaml:"subnets"`
	Enabled   bool                                         `yaml:"enabled"`
}

type TripleoOvercloudNetworkDataSubnet

type TripleoOvercloudNetworkDataSubnet struct {
	Enabled             bool             `yaml:"enabled"`
	VLAN                int64            `yaml:"vlan"`
	AllocationPools     []AllocationPool `yaml:"allocation_pools"`
	GatewayIp           string           `yaml:"gateway_ip"`
	GatewayIpV6         string           `yaml:"gateway_ipv6"`
	Routes              []RoutesIpv6     `yaml:"routes,omitempty"`
	IpSubnet            string           `yaml:"ip_subnet"`
	Ipv6Subnet          string           `yaml:"ipv6_subnet"`
	Ipv6AllocationPools []AllocationPool `yaml:"ipv6_allocation_pools"`
	RoutesIpv6          []RoutesIpv6     `yaml:"routes_ipv6,omitempty"`
}

type TripleoOvercloudRolesData

type TripleoOvercloudRolesData []TripleoOvercloudRolesDataEntry

func GetTripleoOvercloudRolesData

func GetTripleoOvercloudRolesData() (*TripleoOvercloudRolesData, error)

type TripleoOvercloudRolesDataEntry

type TripleoOvercloudRolesDataEntry struct {
	HostnameFormatDefault   *string                `json:"HostnameFormatDefault,omitempty"`
	RoleParametersDefault   map[string]interface{} `json:"RoleParametersDefault"`
	ServicesDefault         []string               `json:"ServicesDefault"`
	DefaultRouteNetworks    []string               `json:"default_route_networks,omitempty"`
	DeprecatedNICConfigName *string                `json:"deprecated_nic_config_name,omitempty"`
	DeprecatedParamFlavor   *string                `json:"deprecated_param_flavor,omitempty"`
	DeprecatedParamImage    *string                `json:"deprecated_param_image,omitempty"`
	Description             string                 `json:"description"`
	Name                    string                 `json:"name"`
	Networks                map[string]interface{} `json:"networks"`
	Tags                    []string               `json:"tags"`
	UpdateSerial            int64                  `json:"update_serial"`
	UsesDeprecatedParams    *bool                  `json:"uses_deprecated_params,omitempty"`
}

type TripleoRole

type TripleoRole struct {
	Name string

	ConfigSettings map[string][]TripleoRoleConfigSetting

	RoleTags []string
	Hosts    []*TripleoHost
	Networks map[string]*TripleoRoleNetwork
	Vars     map[string]interface{}
}

type TripleoRoleConfigSetting

type TripleoRoleConfigSetting struct {
	Service string
	Section string
	Path    string
	Value   interface{}
}

type TripleoRoleNetwork

type TripleoRoleNetwork struct {
	Name       string             `json:"name"`
	NameLower  string             `json:"name_lower"`
	DnsDomain  string             `json:"domain,omitempty"`
	CloudName  string             `json:"cloud_name,omitempty"`
	Mtu        int                `json:"mtu"`
	IpV6       bool               `json:"ipv6"`
	Vip        netip.Addr         `json:"vip"`
	GatewayIp  netip.Addr         `json:"gateway_ip"`
	Subnets    []OSPNetworkSubnet `json:"subnets,omitempty"`
	PrefixLen  int                `json:"prefix_len"`
	VlanId     int                `json:"vlan_id"`
	HostRoutes []TripleoRoutes    `json:"host_routes"`
	IsRoleNet  bool               `json:"is_role_net"`
}

type TripleoRoutes

type TripleoRoutes struct {
	Default     bool   `yaml:"default"`
	Destination string `yaml:"destination"`
	NextHop     string `yaml:"nexthop"`
}

Directories

Path Synopsis
nad

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL