openstack

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: May 25, 2017 License: MPL-2.0 Imports: 67 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContainerFormats = [9]string{"ami", "ari", "aki", "bare", "ovf"}
View Source
var DiskFormats = [9]string{"ami", "ari", "aki", "vhd", "vmdk", "raw", "qcow2", "vdi", "iso"}
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 BuildRequest added in v0.7.8

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

BuildRequest takes an opts struct and builds a request body for Gophercloud 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 GetRegion added in v0.8.0

func GetRegion(d *schema.ResourceData) string

GetRegion returns the region from either d.Get("region") or OS_REGION_NAME

func MapValueSpecs added in v0.7.8

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

MapValueSpecs converts ResourceData into a map

func Provider

func Provider() terraform.ResourceProvider

Provider returns a schema.Provider for OpenStack.

func RedactHeaders added in v0.9.4

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

RedactHeaders processes a headers object, returning a redacted list

func SecGroupV2StateRefreshFunc added in v0.6.7

func SecGroupV2StateRefreshFunc(computeClient *gophercloud.ServiceClient, d *schema.ResourceData) resource.StateRefreshFunc

func ServerV2StateRefreshFunc

func ServerV2StateRefreshFunc(client *gophercloud.ServiceClient, instanceID string) resource.StateRefreshFunc

ServerV2StateRefreshFunc returns a resource.StateRefreshFunc that is used to watch an OpenStack instance.

func VolumeV1StateRefreshFunc

func VolumeV1StateRefreshFunc(client *gophercloud.ServiceClient, volumeID string) resource.StateRefreshFunc

VolumeV1StateRefreshFunc returns a resource.StateRefreshFunc that is used to watch an OpenStack volume.

func VolumeV2StateRefreshFunc added in v0.7.0

func VolumeV2StateRefreshFunc(client *gophercloud.ServiceClient, volumeID string) resource.StateRefreshFunc

VolumeV2StateRefreshFunc returns a resource.StateRefreshFunc that is used to watch an OpenStack volume.

Types

type Config

type Config struct {
	CACertFile       string
	ClientCertFile   string
	ClientKeyFile    string
	DomainID         string
	DomainName       string
	EndpointType     string
	IdentityEndpoint string
	Insecure         bool
	Password         string
	Swauth           bool
	TenantID         string
	TenantName       string
	Token            string
	Username         string
	UserID           string
	// contains filtered or unexported fields
}

type FirewallCreateOpts added in v0.7.10

type FirewallCreateOpts struct {
	firewalls.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

FirewallCreateOpts represents the attributes used when creating a new firewall.

func (FirewallCreateOpts) ToFirewallCreateMap added in v0.7.10

func (opts FirewallCreateOpts) ToFirewallCreateMap() (map[string]interface{}, error)

ToFirewallCreateMap casts a CreateOpts struct to a map. It overrides firewalls.ToFirewallCreateMap to add the ValueSpecs field.

type FloatingIPCreateOpts added in v0.7.8

type FloatingIPCreateOpts struct {
	floatingips.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

FloatingIPCreateOpts represents the attributes used when creating a new floating ip.

func (FloatingIPCreateOpts) ToFloatingIPCreateMap added in v0.7.8

func (opts FloatingIPCreateOpts) ToFloatingIPCreateMap() (map[string]interface{}, error)

ToFloatingIPCreateMap casts a CreateOpts struct to a map. It overrides floatingips.ToFloatingIPCreateMap to add the ValueSpecs field.

type KeyPairCreateOpts added in v0.7.8

type KeyPairCreateOpts struct {
	keypairs.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

KeyPairCreateOpts represents the attributes used when creating a new keypair.

func (KeyPairCreateOpts) ToKeyPairCreateMap added in v0.7.8

func (opts KeyPairCreateOpts) ToKeyPairCreateMap() (map[string]interface{}, error)

ToKeyPairCreateMap casts a CreateOpts struct to a map. It overrides keypairs.ToKeyPairCreateMap to add the ValueSpecs field.

type LogRoundTripper added in v0.8.8

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 added in v0.8.8

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

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

type NetworkCreateOpts added in v0.7.1

type NetworkCreateOpts struct {
	networks.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

NetworkCreateOpts represents the attributes used when creating a new network.

func (NetworkCreateOpts) ToNetworkCreateMap added in v0.7.1

func (opts NetworkCreateOpts) ToNetworkCreateMap() (map[string]interface{}, error)

ToNetworkCreateMap casts a CreateOpts struct to a map. It overrides networks.ToNetworkCreateMap to add the ValueSpecs field.

type PolicyCreateOpts added in v0.7.10

type PolicyCreateOpts struct {
	policies.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

PolicyCreateOpts represents the attributes used when creating a new firewall policy.

func (PolicyCreateOpts) ToFirewallPolicyCreateMap added in v0.7.10

func (opts PolicyCreateOpts) ToFirewallPolicyCreateMap() (map[string]interface{}, error)

ToPolicyCreateMap casts a CreateOpts struct to a map. It overrides policies.ToFirewallPolicyCreateMap to add the ValueSpecs field.

type PortCreateOpts added in v0.7.8

type PortCreateOpts struct {
	ports.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

PortCreateOpts represents the attributes used when creating a new port.

func (PortCreateOpts) ToPortCreateMap added in v0.7.8

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.

type RecordSetCreateOpts added in v0.9.6

type RecordSetCreateOpts struct {
	recordsets.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

RecordSetCreateOpts represents the attributes used when creating a new DNS record set.

func (RecordSetCreateOpts) ToRecordSetCreateMap added in v0.9.6

func (opts RecordSetCreateOpts) ToRecordSetCreateMap() (map[string]interface{}, error)

ToRecordSetCreateMap casts a CreateOpts struct to a map. It overrides recordsets.ToRecordSetCreateMap to add the ValueSpecs field.

type RouterCreateOpts added in v0.6.15

type RouterCreateOpts struct {
	routers.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

RouterCreateOpts represents the attributes used when creating a new router.

func (RouterCreateOpts) ToRouterCreateMap added in v0.6.15

func (opts RouterCreateOpts) ToRouterCreateMap() (map[string]interface{}, error)

ToRouterCreateMap casts a CreateOpts struct to a map. It overrides routers.ToRouterCreateMap to add the ValueSpecs field.

type RuleCreateOpts added in v0.7.9

type RuleCreateOpts struct {
	rules.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

RuleCreateOpts represents the attributes used when creating a new firewall rule.

func (RuleCreateOpts) ToRuleCreateMap added in v0.7.9

func (opts RuleCreateOpts) ToRuleCreateMap() (map[string]interface{}, error)

ToRuleCreateMap casts a CreateOpts struct to a map. It overrides rules.ToRuleCreateMap to add the ValueSpecs field.

type ServerGroupCreateOpts added in v0.9.3

type ServerGroupCreateOpts struct {
	servergroups.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

ServerGroupCreateOpts represents the attributes used when creating a new router.

func (ServerGroupCreateOpts) ToServerGroupCreateMap added in v0.9.3

func (opts ServerGroupCreateOpts) ToServerGroupCreateMap() (map[string]interface{}, error)

ToServerGroupCreateMap casts a CreateOpts struct to a map. It overrides routers.ToServerGroupCreateMap to add the ValueSpecs field.

type SubnetCreateOpts added in v0.7.1

type SubnetCreateOpts struct {
	subnets.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

SubnetCreateOpts represents the attributes used when creating a new subnet.

func (SubnetCreateOpts) ToSubnetCreateMap added in v0.7.1

func (opts SubnetCreateOpts) ToSubnetCreateMap() (map[string]interface{}, error)

ToSubnetCreateMap casts a CreateOpts struct to a map. It overrides subnets.ToSubnetCreateMap to add the ValueSpecs field.

type ZoneCreateOpts added in v0.9.6

type ZoneCreateOpts struct {
	zones.CreateOpts
	ValueSpecs map[string]string `json:"value_specs,omitempty"`
}

ZoneCreateOpts represents the attributes used when creating a new DNS zone.

func (ZoneCreateOpts) ToZoneCreateMap added in v0.9.6

func (opts ZoneCreateOpts) ToZoneCreateMap() (map[string]interface{}, error)

ToZoneCreateMap casts a CreateOpts struct to a map. It overrides zones.ToZoneCreateMap to add the ValueSpecs field.

Source Files

Jump to

Keyboard shortcuts

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