Documentation ¶
Overview ¶
This set of code handles all functions required to configure networking on an vkcs_compute_instance 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 OpenStack 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
- func AddValueSpecs(body map[string]interface{}) map[string]interface{}
- func BuildRequest(opts interface{}, parent string) (map[string]interface{}, error)
- func ComputeInstanceReadTags(d *schema.ResourceData, tags []string)
- func ComputeInstanceTags(d *schema.ResourceData) []string
- func ComputeInstanceUpdateTags(d *schema.ResourceData) []string
- func ExtractDBs(page pagination.Page) ([]databases.Database, error)
- func ExtractUsers(r pagination.Page) ([]users.User, error)
- func MapValueSpecs(d *schema.ResourceData) map[string]string
- func Provider() *schema.Provider
- func ServerStateRefreshFunc(client *gophercloud.ServiceClient, instanceID string) resource.StateRefreshFunc
- type ComputeKeyPairV2CreateOpts
- type ComputeServerGroupCreateOpts
- type ContainerClient
- type ContainerClientFixture
- func (c *ContainerClientFixture) Delete(url string, opts *gophercloud.RequestOpts) (*http.Response, error)
- func (c *ContainerClientFixture) Get(url string, jsonResponse interface{}, opts *gophercloud.RequestOpts) (*http.Response, error)
- func (c *ContainerClientFixture) Head(url string, opts *gophercloud.RequestOpts) (*http.Response, error)
- func (c *ContainerClientFixture) Patch(url string, jsonBody interface{}, jsonResponse interface{}, ...) (*http.Response, error)
- func (c *ContainerClientFixture) Post(url string, jsonBody interface{}, jsonResponse interface{}, ...) (*http.Response, error)
- func (c *ContainerClientFixture) Put(url string, jsonBody interface{}, jsonResponse interface{}, ...) (*http.Response, error)
- func (c *ContainerClientFixture) ServiceURL(parts ...string) string
- type DBPage
- type DBUserPage
- type EndpointGroupCreateOpts
- type FakeBody
- type FloatingIPCreateOpts
- type IKEPolicyCreateOpts
- type IPSecPolicyCreateOpts
- type InstanceAddresses
- type InstanceNIC
- type InstanceNetwork
- type NetworkCreateOpts
- type NetworkUpdateOpts
- type PortCreateOpts
- type PrivateDNSDomainExt
- type RouterCreateOpts
- type ServiceCreateOpts
- type ServicesAccessExt
- type SiteConnectionCreateOpts
- type SubnetCreateOpts
Constants ¶
const ( Redis = "redis" MongoDB = "mongodb" PostgresPro = "postgrespro" Galera = "galera_mysql" Postgres = "postgresql" Clickhouse = "clickhouse" MySQL = "mysql" Tarantool = "tarantool" )
Datastore names
Variables ¶
This section is empty.
Functions ¶
func AddValueSpecs ¶
AddValueSpecs expands the 'value_specs' object and removes 'value_specs' from the reqeust body.
func BuildRequest ¶
BuildRequest takes an opts struct and builds a request body for Gophercloud to execute.
func ComputeInstanceReadTags ¶
func ComputeInstanceReadTags(d *schema.ResourceData, tags []string)
func ComputeInstanceTags ¶
func ComputeInstanceTags(d *schema.ResourceData) []string
func ComputeInstanceUpdateTags ¶
func ComputeInstanceUpdateTags(d *schema.ResourceData) []string
func ExtractDBs ¶ added in v0.1.1
func ExtractDBs(page pagination.Page) ([]databases.Database, error)
ExtractDBs will convert a generic pagination struct into a more relevant slice of DB structs.
func ExtractUsers ¶ added in v0.1.1
func ExtractUsers(r pagination.Page) ([]users.User, error)
ExtractUsers will convert a generic pagination struct into a more relevant slice of User structs.
func MapValueSpecs ¶
func MapValueSpecs(d *schema.ResourceData) map[string]string
MapValueSpecs converts ResourceData into a map.
func ServerStateRefreshFunc ¶
func ServerStateRefreshFunc(client *gophercloud.ServiceClient, instanceID string) resource.StateRefreshFunc
ServerStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch an VKCS instance.
Types ¶
type ComputeKeyPairV2CreateOpts ¶
type ComputeKeyPairV2CreateOpts struct { keypairs.CreateOpts ValueSpecs map[string]string `json:"value_specs,omitempty"` }
ComputeKeyPairV2CreateOpts is a custom KeyPair struct to include the ValueSpecs field.
func (ComputeKeyPairV2CreateOpts) ToKeyPairCreateMap ¶
func (opts ComputeKeyPairV2CreateOpts) ToKeyPairCreateMap() (map[string]interface{}, error)
ToKeyPairCreateMap casts a CreateOpts struct to a map. It overrides keypairs.ToKeyPairCreateMap to add the ValueSpecs field.
type ComputeServerGroupCreateOpts ¶
type ComputeServerGroupCreateOpts struct { servergroups.CreateOpts ValueSpecs map[string]string `json:"value_specs,omitempty"` }
ServerGroupCreateOpts is a custom ServerGroup struct to include the ValueSpecs field.
func (ComputeServerGroupCreateOpts) ToServerGroupCreateMap ¶
func (opts ComputeServerGroupCreateOpts) ToServerGroupCreateMap() (map[string]interface{}, error)
ToServerGroupCreateMap casts a CreateOpts struct to a map. It overrides routers.ToServerGroupCreateMap to add the ValueSpecs field.
type ContainerClient ¶
type ContainerClient interface { Get(url string, jsonResponse interface{}, opts *gophercloud.RequestOpts) (*http.Response, error) Post(url string, jsonBody interface{}, jsonResponse interface{}, opts *gophercloud.RequestOpts) (*http.Response, error) Patch(url string, jsonBody interface{}, jsonResponse interface{}, opts *gophercloud.RequestOpts) (*http.Response, error) Delete(url string, opts *gophercloud.RequestOpts) (*http.Response, error) Head(url string, opts *gophercloud.RequestOpts) (*http.Response, error) Put(url string, jsonBody interface{}, jsonResponse interface{}, opts *gophercloud.RequestOpts) (*http.Response, error) ServiceURL(parts ...string) string }
ContainerClient is interface to work with gophercloud requests
type ContainerClientFixture ¶
ContainerClientFixture ...
func (*ContainerClientFixture) Delete ¶
func (c *ContainerClientFixture) Delete(url string, opts *gophercloud.RequestOpts) (*http.Response, error)
Delete ...
func (*ContainerClientFixture) Get ¶
func (c *ContainerClientFixture) Get(url string, jsonResponse interface{}, opts *gophercloud.RequestOpts) (*http.Response, error)
Get ...
func (*ContainerClientFixture) Head ¶
func (c *ContainerClientFixture) Head(url string, opts *gophercloud.RequestOpts) (*http.Response, error)
Head ...
func (*ContainerClientFixture) Patch ¶
func (c *ContainerClientFixture) Patch(url string, jsonBody interface{}, jsonResponse interface{}, opts *gophercloud.RequestOpts) (*http.Response, error)
Patch ...
func (*ContainerClientFixture) Post ¶
func (c *ContainerClientFixture) Post(url string, jsonBody interface{}, jsonResponse interface{}, opts *gophercloud.RequestOpts) (*http.Response, error)
Post ...
func (*ContainerClientFixture) Put ¶
func (c *ContainerClientFixture) Put(url string, jsonBody interface{}, jsonResponse interface{}, opts *gophercloud.RequestOpts) (*http.Response, error)
Put ...
func (*ContainerClientFixture) ServiceURL ¶
func (c *ContainerClientFixture) ServiceURL(parts ...string) string
ServiceURL ...
type DBPage ¶ added in v0.1.1
type DBPage struct {
pagination.LinkedPageBase
}
Custom type implementation of gophercloud/database.DBPage
func (DBPage) NextPageURL ¶ added in v0.1.1
NextPageURL will retrieve the next page URL.
type DBUserPage ¶ added in v0.1.1
type DBUserPage struct {
pagination.LinkedPageBase
}
Custom type implementation of gophercloud/users.UserPage
func (DBUserPage) IsEmpty ¶ added in v0.1.1
func (page DBUserPage) IsEmpty() (bool, error)
IsEmpty checks to see whether the collection is empty.
func (DBUserPage) NextPageURL ¶ added in v0.1.1
func (page DBUserPage) NextPageURL() (string, error)
NextPageURL will retrieve the next page URL.
type EndpointGroupCreateOpts ¶
type EndpointGroupCreateOpts struct {
endpointgroups.CreateOpts
}
EndpointGroupCreateOpts represents the attributes used when creating a new endpoint group.
type FakeBody ¶
type FakeBody struct {
// contains filtered or unexported fields
}
FakeBody is struct that implements ReadCloser interface; use it for http.Response.Body mock
type FloatingIPCreateOpts ¶
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 ¶
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 IKEPolicyCreateOpts ¶
type IKEPolicyCreateOpts struct {
ikepolicies.CreateOpts
}
IKEPolicyCreateOpts represents the attributes used when creating a new IKE policy.
type IPSecPolicyCreateOpts ¶
type IPSecPolicyCreateOpts struct {
ipsecpolicies.CreateOpts
}
IPSecPolicyCreateOpts represents the attributes used when creating a new IPSec policy.
type InstanceAddresses ¶
type InstanceAddresses struct { NetworkName string InstanceNICs []InstanceNIC }
InstanceAddresses is a collection of InstanceNICs, 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 Gophercloud 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 NetworkCreateOpts ¶
type NetworkCreateOpts struct { networks.CreateOpts ValueSpecs map[string]string `json:"value_specs,omitempty"` PrivateDNSDomain string `json:"private_dns_domain,omitempty"` ServicesAccess bool `json:"enable_shadow_port,omitempty"` }
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 NetworkUpdateOpts ¶
type NetworkUpdateOpts struct { networks.UpdateOpts ServicesAccess *bool `json:"enable_shadow_port,omitempty"` }
NetworkUpdateOpts represents the attributes used when updating a network.
func (NetworkUpdateOpts) ToNetworkUpdateMap ¶
func (opts NetworkUpdateOpts) ToNetworkUpdateMap() (map[string]interface{}, error)
ToNetworkUpdateMap casts a UpdateOpts struct to a map. It overrides networks.ToNetworkUpdateMap to add the ServicesAccess field.
type PortCreateOpts ¶
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 ¶
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 PrivateDNSDomainExt ¶
type PrivateDNSDomainExt struct {
PrivateDNSDomain string `json:"private_dns_domain,omitempty"`
}
type RouterCreateOpts ¶
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 ¶
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 ServiceCreateOpts ¶
type ServiceCreateOpts struct {
services.CreateOpts
}
ServiceCreateOpts represents the attributes used when creating a new VPN service.
type ServicesAccessExt ¶
type ServicesAccessExt struct {
ServicesAccess *bool `json:"enable_shadow_port,omitempty"`
}
type SiteConnectionCreateOpts ¶
type SiteConnectionCreateOpts struct {
siteconnections.CreateOpts
}
SiteConnectionCreateOpts represents the attributes used when creating a new IPSec site connection.
type SubnetCreateOpts ¶
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 ¶
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.
Source Files ¶
- blockstorage_snapshot.go
- blockstorage_volume.go
- compute_floatingip_associate.go
- compute_instance.go
- compute_interface_attach.go
- compute_keypair.go
- compute_servergroup.go
- compute_volume_attach.go
- data_source_vkcs_blockstorage_snapshot.go
- data_source_vkcs_blockstorage_volume.go
- data_source_vkcs_compute_availability_zones.go
- data_source_vkcs_compute_flavor.go
- data_source_vkcs_compute_instance.go
- data_source_vkcs_compute_keypair.go
- data_source_vkcs_compute_quotaset.go
- data_source_vkcs_db_backup.go
- data_source_vkcs_db_config_group.go
- data_source_vkcs_db_database.go
- data_source_vkcs_db_instance.go
- data_source_vkcs_db_user.go
- data_source_vkcs_images_image.go
- data_source_vkcs_keymanager_container.go
- data_source_vkcs_keymanager_secret.go
- data_source_vkcs_kubernetes_cluster.go
- data_source_vkcs_kubernetes_cluster_template.go
- data_source_vkcs_kubernetes_cluster_templates.go
- data_source_vkcs_kubernetes_node_group.go
- data_source_vkcs_networking_floatingip.go
- data_source_vkcs_networking_network.go
- data_source_vkcs_networking_port.go
- data_source_vkcs_networking_router.go
- data_source_vkcs_networking_secgroup.go
- data_source_vkcs_networking_subnet.go
- data_source_vkcs_region.go
- data_source_vkcs_regions.go
- data_source_vkcs_sharedfilesystem_share.go
- data_source_vkcs_sharedfilesystem_sharenetwork.go
- db_backup.go
- db_backup_client.go
- db_cluster.go
- db_cluster_client.go
- db_config_group.go
- db_config_group_client.go
- db_database.go
- db_instance.go
- db_instance_client.go
- db_user.go
- images_image.go
- keymanager.go
- keymanager_container.go
- keymanager_secret.go
- kubernetes_cluster_client.go
- kubernetes_shared.go
- lb_shared.go
- networking_floatingip.go
- networking_network.go
- networking_port.go
- networking_router.go
- networking_router_interface.go
- networking_router_route.go
- networking_secgroup.go
- networking_secgroup_rule.go
- networking_shared.go
- networking_subnet.go
- networking_subnet_route.go
- provider.go
- resource_vkcs_blockstorage_volume.go
- resource_vkcs_blockstorage_volume_snapshot.go
- resource_vkcs_compute_floatingip_associate.go
- resource_vkcs_compute_instance.go
- resource_vkcs_compute_interface_attach.go
- resource_vkcs_compute_keypair.go
- resource_vkcs_compute_servergroup.go
- resource_vkcs_compute_volume_attach.go
- resource_vkcs_db_backup.go
- resource_vkcs_db_cluster.go
- resource_vkcs_db_cluster_with_shards.go
- resource_vkcs_db_config_group.go
- resource_vkcs_db_database.go
- resource_vkcs_db_instance.go
- resource_vkcs_db_user.go
- resource_vkcs_images_image.go
- resource_vkcs_keymanager_container.go
- resource_vkcs_keymanager_secret.go
- resource_vkcs_kubernetes_cluster.go
- resource_vkcs_kubernetes_node_group.go
- resource_vkcs_lb_l7policy.go
- resource_vkcs_lb_l7rule.go
- resource_vkcs_lb_listener.go
- resource_vkcs_lb_loadbalancer.go
- resource_vkcs_lb_member.go
- resource_vkcs_lb_members.go
- resource_vkcs_lb_monitor.go
- resource_vkcs_lb_pool.go
- resource_vkcs_networking_floatingip.go
- resource_vkcs_networking_floatingip_associate.go
- resource_vkcs_networking_network.go
- resource_vkcs_networking_port.go
- resource_vkcs_networking_port_secgroup_associate.go
- resource_vkcs_networking_router.go
- resource_vkcs_networking_router_interface.go
- resource_vkcs_networking_router_route.go
- resource_vkcs_networking_secgroup.go
- resource_vkcs_networking_secgroup_rule.go
- resource_vkcs_networking_subnet.go
- resource_vkcs_networking_subnet_route.go
- resource_vkcs_sharedfilesystem_securityservice.go
- resource_vkcs_sharedfilesystem_share.go
- resource_vkcs_sharedfilesystem_share_access.go
- resource_vkcs_sharedfilesystem_sharenetwork.go
- resource_vkcs_vpnaas_endpoint_group.go
- resource_vkcs_vpnaas_ike_policy.go
- resource_vkcs_vpnaas_ipsec_policy.go
- resource_vkcs_vpnaas_service.go
- resource_vkcs_vpnaas_site_connection.go
- sharedfilesystem_share_access.go
- sharedfilesystem_shared.go
- test_suite.go
- types.go
- urls.go
- util.go
- vkcs_common.go
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
pathorcontents
Helpers for dealing with file paths and their contents
|
Helpers for dealing with file paths and their contents |