oracle

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package oracle provides the Oracle platform implementation.

Index

Constants

View Source
const (
	// OracleMetadataEndpoint is the local metadata endpoint for the hostname.
	OracleMetadataEndpoint = "http://169.254.169.254/opc/v2/instance/"
	// OracleUserDataEndpoint is the local metadata endpoint inside of Oracle Cloud.
	OracleUserDataEndpoint = "http://169.254.169.254/opc/v2/instance/metadata/user_data"
	// OracleNetworkEndpoint is the local network metadata endpoint inside of Oracle Cloud.
	OracleNetworkEndpoint = "http://169.254.169.254/opc/v2/vnics/"
)

Ref: https://docs.oracle.com/en-us/iaas/Content/Compute/Tasks/gettingmetadata.htm

Variables

This section is empty.

Functions

This section is empty.

Types

type MetadataConfig

type MetadataConfig struct {
	Hostname           string `json:"hostname,omitempty"`
	ID                 string `json:"id,omitempty"`
	Region             string `json:"region,omitempty"`
	AvailabilityDomain string `json:"availabilityDomain,omitempty"`
	FaultDomain        string `json:"faultDomain,omitempty"`
	Shape              string `json:"shape,omitempty"`
}

MetadataConfig represents a metadata Oracle instance.

type NetworkConfig

type NetworkConfig struct {
	HWAddr              string   `json:"macAddr"`
	PrivateIP           string   `json:"privateIp"`
	VirtualRouterIP     string   `json:"virtualRouterIp"`
	SubnetCidrBlock     string   `json:"subnetCidrBlock"`
	Ipv6SubnetCidrBlock string   `json:"ipv6SubnetCidrBlock,omitempty"`
	Ipv6VirtualRouterIP string   `json:"ipv6VirtualRouterIp,omitempty"`
	Ipv6Addresses       []string `json:"ipv6Addresses,omitempty"`
}

NetworkConfig holds network interface meta config.

type Oracle

type Oracle struct{}

Oracle is the concrete type that implements the platform.Platform interface.

func (*Oracle) Configuration

func (o *Oracle) Configuration(ctx context.Context, r state.State) ([]byte, error)

Configuration implements the platform.Platform interface.

func (*Oracle) KernelArgs

func (o *Oracle) KernelArgs(string) procfs.Parameters

KernelArgs implements the runtime.Platform interface.

func (*Oracle) Mode

func (o *Oracle) Mode() runtime.Mode

Mode implements the platform.Platform interface.

func (*Oracle) Name

func (o *Oracle) Name() string

Name implements the platform.Platform interface.

func (*Oracle) NetworkConfiguration

func (o *Oracle) NetworkConfiguration(ctx context.Context, _ state.State, ch chan<- *runtime.PlatformNetworkConfig) error

NetworkConfiguration implements the runtime.Platform interface.

func (*Oracle) ParseMetadata

func (o *Oracle) ParseMetadata(interfaceAddresses []NetworkConfig, metadata *MetadataConfig) (*runtime.PlatformNetworkConfig, error)

ParseMetadata converts Oracle Cloud metadata into platform network configuration.

Jump to

Keyboard shortcuts

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