Documentation ¶
Overview ¶
Package ecl is set of code handles all functions required to configure networking on an ecl_compute_instance_v2 resource.
This is a complicated task because it's not possible to obtain all information in a single API call. In fact, it even traverses multiple ECL services.
The end result, from the user's point of view, is a structured set of understandable network information within the instance resource.
Index ¶
- Constants
- Variables
- func AddValueSpecs(body map[string]interface{}) map[string]interface{}
- func BuildRequest(opts interface{}, parent string) (map[string]interface{}, error)
- func CheckDeleted(d *schema.ResourceData, err error, msg string) error
- func DatabaseConfigurationV1StateRefreshFunc(client *eclcloud.ServiceClient, cgroupID string) resource.StateRefreshFunc
- func DatabaseDatabaseV1State(client *eclcloud.ServiceClient, instanceID string, dbName string) (exists bool, err error)
- func DatabaseDatabaseV1StateRefreshFunc(client *eclcloud.ServiceClient, instanceID string, dbName string) resource.StateRefreshFunc
- func DatabaseInstanceV1StateRefreshFunc(client *eclcloud.ServiceClient, instanceID string) resource.StateRefreshFunc
- func DatabaseUserV1State(client *eclcloud.ServiceClient, instanceID string, userName string) (exists bool, userObj users.User, err error)
- func DatabaseUserV1StateRefreshFunc(client *eclcloud.ServiceClient, instanceID string, userName string) resource.StateRefreshFunc
- func FormatHeaders(headers http.Header, seperator string) string
- func GetRegion(d *schema.ResourceData, config *Config) string
- func IntInSlice(valid []int) schema.SchemaValidateFunc
- func MapValueSpecs(d *schema.ResourceData) map[string]string
- func Provider() terraform.ResourceProvider
- func RedactHeaders(headers http.Header) (processedHeaders []string)
- func ServerV2StateRefreshFunc(client *eclcloud.ServiceClient, instanceID string) resource.StateRefreshFunc
- func ValidateVRID() schema.SchemaValidateFunc
- func VirtualStorageV1RefreshFunc(client *eclcloud.ServiceClient, virtualStorageID string) resource.StateRefreshFunc
- func VolumeV1RefreshFunc(client *eclcloud.ServiceClient, virtualStorageID string) resource.StateRefreshFunc
- func VolumeV2StateRefreshFunc(client *eclcloud.ServiceClient, volumeID string) resource.StateRefreshFunc
- type CommonFunctionGatewayCreateOpts
- type Config
- type GatewayInterfaceCreateOpts
- type InstanceAddresses
- type InstanceNIC
- type InstanceNetwork
- type InternetGatewayCreateOpts
- type KeyPairCreateOpts
- type LogRoundTripper
- type NetworkCreateOpts
- type PortCreateOpts
- type PublicIPCreateOpts
- type RecordSetCreateOpts
- type StaticRouteCreateOpts
- type SubnetCreateOpts
- type VirtualNetworkApplianceCreateOpts
- type ZoneCreateOpts
Constants ¶
const StorageRetryMaxCount int = 30
StorageRetryMaxCount is a integer value that means retry maximum count for request against storage SDP
const StorageRetryWaitMinute int = 1
StorageRetryWaitMinute is a integer value that means time for waiting between each request defined as minute.
Variables ¶
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 ¶
AddValueSpecs expands the 'value_specs' object and removes 'value_specs' from the request body.
func BuildRequest ¶
BuildRequest takes an opts struct and builds a request body for Eclcloud 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 DatabaseConfigurationV1StateRefreshFunc ¶
func DatabaseConfigurationV1StateRefreshFunc(client *eclcloud.ServiceClient, cgroupID string) resource.StateRefreshFunc
DatabaseConfigurationV1StateRefreshFunc returns a resource.StateRefreshFunc that is used to watch an cloud database instance.
func DatabaseDatabaseV1State ¶
func DatabaseDatabaseV1StateRefreshFunc ¶
func DatabaseDatabaseV1StateRefreshFunc(client *eclcloud.ServiceClient, instanceID string, dbName string) resource.StateRefreshFunc
DatabaseDatabaseV1StateRefreshFunc returns a resource.StateRefreshFunc that is used to watch a database.
func DatabaseInstanceV1StateRefreshFunc ¶
func DatabaseInstanceV1StateRefreshFunc(client *eclcloud.ServiceClient, instanceID string) resource.StateRefreshFunc
DatabaseInstanceV1StateRefreshFunc returns a resource.StateRefreshFunc that is used to watch a database instance.
func DatabaseUserV1State ¶
func DatabaseUserV1State(client *eclcloud.ServiceClient, instanceID string, userName string) (exists bool, userObj users.User, err error)
DatabaseUserV1State is used to check whether user exists on particular database instance
func DatabaseUserV1StateRefreshFunc ¶
func DatabaseUserV1StateRefreshFunc(client *eclcloud.ServiceClient, instanceID string, userName string) resource.StateRefreshFunc
DatabaseUserV1StateRefreshFunc returns a resource.StateRefreshFunc that is used to watch db user.
func FormatHeaders ¶
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 Provider ¶
func Provider() terraform.ResourceProvider
Provider returns a schema.Provider for Enterprise Cloud.
func RedactHeaders ¶
RedactHeaders processes a headers object, returning a redacted list
func ServerV2StateRefreshFunc ¶
func ServerV2StateRefreshFunc(client *eclcloud.ServiceClient, instanceID string) resource.StateRefreshFunc
ServerV2StateRefreshFunc returns a resource.StateRefreshFunc that is used to watch an Enterprise Cloud instance.
func ValidateVRID ¶ added in v1.2.0
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
func VirtualStorageV1RefreshFunc ¶
func VirtualStorageV1RefreshFunc(client *eclcloud.ServiceClient, virtualStorageID string) resource.StateRefreshFunc
VirtualStorageV1RefreshFunc returns a resource.StateRefreshFunc that is used to watch an ECL virtual storage.
func VolumeV1RefreshFunc ¶
func VolumeV1RefreshFunc(client *eclcloud.ServiceClient, virtualStorageID string) resource.StateRefreshFunc
VolumeV1RefreshFunc returns a resource.StateRefreshFunc that is used to watch an storage service volume.
func VolumeV2StateRefreshFunc ¶
func VolumeV2StateRefreshFunc(client *eclcloud.ServiceClient, volumeID string) resource.StateRefreshFunc
VolumeV2StateRefreshFunc returns a resource.StateRefreshFunc that is used to watch an ECL volume.
Types ¶
type CommonFunctionGatewayCreateOpts ¶
type CommonFunctionGatewayCreateOpts struct {
common_function_gateways.CreateOpts
}
CommonFunctionGatewayCreateOpts represents the attributes used when creating a new common function gateway.
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 *eclcloud.ProviderClient }
func (*Config) LoadAndValidate ¶
type GatewayInterfaceCreateOpts ¶
type GatewayInterfaceCreateOpts struct {
gateway_interfaces.CreateOpts
}
GatewayInterfaceCreateOpts represents the attributes used when creating a new gateway interface.
type InstanceAddresses ¶
type InstanceAddresses struct { NetworkName string InstanceNICs []InstanceNIC }
InstanceAddresses is a collection of Instance NICs, grouped by the network name. An instance/server could have multiple NICs on the same network.
type InstanceNIC ¶
InstanceNIC is a structured representation of a Eclcloud servers.Server virtual NIC.
type InstanceNetwork ¶
type InstanceNetwork struct { UUID string Name string Port string FixedIP string AccessNetwork bool }
InstanceNetwork represents a collection of network information that a Terraform instance needs to satisfy all network information requirements.
type InternetGatewayCreateOpts ¶
type InternetGatewayCreateOpts struct {
internet_gateways.CreateOpts
}
InternetGatewayCreateOpts represents the attributes used when creating a new Internet Gateway.
type KeyPairCreateOpts ¶
type KeyPairCreateOpts struct {
keypairs.CreateOpts
}
KeyPairCreateOpts represents the attributes used when creating a new keypair.
func (KeyPairCreateOpts) ToKeyPairCreateMap ¶
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 ¶
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.
type NetworkCreateOpts ¶
type NetworkCreateOpts struct {
networks.CreateOpts
}
NetworkCreateOpts represents the attributes used when creating a new network.
func (NetworkCreateOpts) ToNetworkCreateMap ¶
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 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.
type PublicIPCreateOpts ¶
type PublicIPCreateOpts struct {
public_ips.CreateOpts
}
PublicIPCreateOpts represents the attributes used when creating a new Public IP.
type RecordSetCreateOpts ¶
type RecordSetCreateOpts struct {
recordsets.CreateOpts
}
RecordSetCreateOpts represents the attributes used when creating a new DNS record set.
func (RecordSetCreateOpts) ToRecordSetCreateMap ¶
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 StaticRouteCreateOpts ¶
type StaticRouteCreateOpts struct {
static_routes.CreateOpts
}
StaticRouteCreateOpts represents the attributes used when creating a new static route.
type SubnetCreateOpts ¶
type SubnetCreateOpts struct {
subnets.CreateOpts
}
SubnetCreateOpts represents the attributes used when creating a new subnet.
func (SubnetCreateOpts) ToSubnetCreateMap ¶
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 VirtualNetworkApplianceCreateOpts ¶ added in v1.2.0
type VirtualNetworkApplianceCreateOpts struct {
appliances.CreateOpts
}
VirtualNetworkApplianceCreateOpts represents the attributes used when creating a new VNA appliance.
func (VirtualNetworkApplianceCreateOpts) ToVirtualNetworkApplianceCreateMap ¶ added in v1.2.0
func (opts VirtualNetworkApplianceCreateOpts) ToVirtualNetworkApplianceCreateMap() (map[string]interface{}, error)
ToVirtualNetworkApplianceCreateMap casts a CreateOpts struct to a map.
type ZoneCreateOpts ¶
type ZoneCreateOpts struct {
zones.CreateOpts
}
ZoneCreateOpts represents the attributes used when creating a new DNS zone.
func (ZoneCreateOpts) ToZoneCreateMap ¶
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 ¶
- compute_instance_v2_networking.go
- config.go
- data_source_ecl_compute_flavor_v2.go
- data_source_ecl_compute_keypair_v2.go
- data_source_ecl_dns_zone_v2.go
- data_source_ecl_identity_auth_scope_v3.go
- data_source_ecl_identity_endpoint_v3.go
- data_source_ecl_imagestorages_image_v2.go
- data_source_ecl_network_common_function_gateway_v2.go
- data_source_ecl_network_gateway_interface_v2.go
- data_source_ecl_network_internet_gateway_v2.go
- data_source_ecl_network_internet_service_v2.go
- data_source_ecl_network_network_v2.go
- data_source_ecl_network_port_v2.go
- data_source_ecl_network_public_ip_v2.go
- data_source_ecl_network_static_route_v2.go
- data_source_ecl_network_subnet_v2.go
- data_source_ecl_sss_tenant_v1.go
- data_source_ecl_storage_virtualstorage_v1.go
- data_source_ecl_storage_volume_v1.go
- data_source_ecl_storage_volumetype_v1.go
- data_source_ecl_vna_appliance_v1.go
- fixtures.go
- provider.go
- resource_ecl_compute_instance_v2.go
- resource_ecl_compute_keypair_v2.go
- resource_ecl_compute_volume_attach_v2.go
- resource_ecl_compute_volume_v2.go
- resource_ecl_db_configuration_v1.go
- resource_ecl_db_database_v1.go
- resource_ecl_db_instance_v1.go
- resource_ecl_db_user_v1.go
- resource_ecl_dns_recordset_v2.go
- resource_ecl_dns_zone_v2.go
- resource_ecl_imagestorages_image_v2.go
- resource_ecl_imagestorages_member_accepter_v2.go
- resource_ecl_imagestorages_member_v2.go
- resource_ecl_network_common_function_gateway_v2.go
- resource_ecl_network_gateway_interface_v2.go
- resource_ecl_network_internet_gateway_v2.go
- resource_ecl_network_network_v2.go
- resource_ecl_network_port_v2.go
- resource_ecl_network_public_ip_v2.go
- resource_ecl_network_static_route_v2.go
- resource_ecl_network_subnet_v2.go
- resource_ecl_security_network_based_device_single_v1.go
- resource_ecl_security_network_based_waf_single_v1.go
- resource_ecl_sss_tenant_v1.go
- resource_ecl_sss_user_v1.go
- resource_ecl_storage_virtualstorage_v1.go
- resource_ecl_storage_volume_v1.go
- resource_ecl_vna_appliance_v1.go
- security.go
- types.go
- util.go
- validation.go
- vna.go
Directories ¶
Path | Synopsis |
---|---|
Package clientconfig provides convenient functions for creating Enterprise Cloud clients.
|
Package clientconfig provides convenient functions for creating Enterprise Cloud clients. |
testhelper
|
|