fic

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: MPL-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var REDACT_HEADERS = []string{"x-auth-token", "x-auth-key", "x-service-token",
	"x-storage-token", "x-account-meta-temp-url-key", "x-account-meta-temp-url-key-2",
	"x-container-meta-temp-url-key", "x-container-meta-temp-url-key-2", "set-cookie",
	"x-subject-token"}

List of headers that need to be redacted

Functions

func AddValueSpecs

func AddValueSpecs(body map[string]interface{}) map[string]interface{}

AddValueSpecs expands the 'value_specs' object and removes 'value_specs' from the request body.

func BuildRequest

func BuildRequest(opts interface{}, parent string) (map[string]interface{}, error)

BuildRequest takes an opts struct and builds a request body for GO-FIC to execute

func CheckDeleted

func CheckDeleted(d *schema.ResourceData, err error, msg string) error

CheckDeleted checks the error to see if it's a 404 (Not Found) and, if so, sets the resource ID to the empty string instead of throwing an error.

func FirewallComponentV1StateRefreshFunc

func FirewallComponentV1StateRefreshFunc(client *fic.ServiceClient, id string) resource.StateRefreshFunc

func FormatHeaders

func FormatHeaders(headers http.Header, seperator string) string

FormatHeaders processes a headers object plus a deliminator, returning a string

func GetRegion

func GetRegion(d *schema.ResourceData, config *Config) string

GetRegion returns the region that was specified in the resource. If a region was not set, the provider-level region is checked. The provider-level region can either be set by the region argument or by OS_REGION_NAME.

func IntInSlice

func IntInSlice(valid []int) schema.SchemaValidateFunc

IntInSlice returns a SchemaValidateFunc which tests if the provided value is of type int and matches the value of an element in the valid slice

func MapValueSpecs

func MapValueSpecs(d *schema.ResourceData) map[string]string

MapValueSpecs converts ResourceData into a map

func NATComponentV1StateRefreshFunc

func NATComponentV1StateRefreshFunc(client *fic.ServiceClient, id string) resource.StateRefreshFunc

func NATGlobalIPAddressSetV1StateRefreshFunc

func NATGlobalIPAddressSetV1StateRefreshFunc(client *fic.ServiceClient, id string) resource.StateRefreshFunc

func PortToPortConnectionV1StateRefreshFunc

func PortToPortConnectionV1StateRefreshFunc(client *fic.ServiceClient, connectionID string) resource.StateRefreshFunc

func PortV1StateRefreshFunc

func PortV1StateRefreshFunc(client *fic.ServiceClient, portID string) resource.StateRefreshFunc

func Provider

func Provider() terraform.ResourceProvider

Provider returns a schema.Provider for Flexible InterConnect.

func RedactHeaders

func RedactHeaders(headers http.Header) (processedHeaders []string)

RedactHeaders processes a headers object, returning a redacted list

func RouterToECLConnectionV1StateRefreshFunc

func RouterToECLConnectionV1StateRefreshFunc(client *fic.ServiceClient, connectionID string) resource.StateRefreshFunc

func RouterToPortConnectionV1StateRefreshFunc

func RouterToPortConnectionV1StateRefreshFunc(client *fic.ServiceClient, connectionID string) resource.StateRefreshFunc

func RouterToUNOConnectionV1StateRefreshFunc

func RouterToUNOConnectionV1StateRefreshFunc(client *fic.ServiceClient, connectionID string) resource.StateRefreshFunc

func RouterV1StateRefreshFunc

func RouterV1StateRefreshFunc(client *fic.ServiceClient, portID string) resource.StateRefreshFunc

func ValidateVRID

func ValidateVRID() schema.SchemaValidateFunc

ValidateVRID returns a SchemaValidateFunc which tests if the provided value is "null" or integer corresponding value in the range from 0 to 255

Types

type Config

type Config struct {
	CACertFile        string
	ClientCertFile    string
	ClientKeyFile     string
	Cloud             string
	DefaultDomain     string
	DomainID          string
	DomainName        string
	EndpointType      string
	ForceSSSEndpoint  string
	IdentityEndpoint  string
	Insecure          *bool
	Password          string
	ProjectDomainName string
	ProjectDomainID   string
	Region            string
	TenantID          string
	TenantName        string
	Token             string
	UserDomainName    string
	UserDomainID      string
	Username          string
	UserID            string

	OsClient *fic.ProviderClient
	// contains filtered or unexported fields
}

func (*Config) LoadAndValidate

func (c *Config) LoadAndValidate() error

type LogRoundTripper

type LogRoundTripper struct {
	Rt      http.RoundTripper
	OsDebug bool
}

LogRoundTripper satisfies the http.RoundTripper interface and is used to customize the default http client RoundTripper to allow for logging.

func (*LogRoundTripper) RoundTrip

func (lrt *LogRoundTripper) RoundTrip(request *http.Request) (*http.Response, error)

RoundTrip performs a round-trip HTTP request and logs relevant information about it.

type PortCreateOpts

type PortCreateOpts struct {
	ports.CreateOpts
}

PortCreateOpts represents the attributes used when creating a new port.

func (PortCreateOpts) ToPortCreateMap

func (opts PortCreateOpts) ToPortCreateMap() (map[string]interface{}, error)

ToPortCreateMap casts a CreateOpts struct to a map. It overrides ports.ToPortCreateMap to add the ValueSpecs field.

Directories

Path Synopsis
Package clientconfig provides convenient functions for creating Flexible InterConnect clients.
Package clientconfig provides convenient functions for creating Flexible InterConnect clients.
testhelper

Jump to

Keyboard shortcuts

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