Documentation ¶
Index ¶
- func AggregateHosts() *schema.Table
- func Aggregates() *schema.Table
- func AttachmentHosts() *schema.Table
- func Attachments() *schema.Table
- func ExtractFlavorAccessInto(r pagination.Page, v interface{}) error
- func ExtractFlavorsExtraSpecsAsMap(r flavors.ListExtraSpecsResult) (*map[string]string, error)
- func ExtractFlavorsInto(r pagination.Page, v interface{}) error
- func ExtractUsersInto(r pagination.Page, v interface{}) error
- func FlavorAccesses() *schema.Table
- func FlavorExtraSpecs() *schema.Table
- func Flavors() *schema.Table
- func Hypervisors() *schema.Table
- func ImageMetadata() *schema.Table
- func ImageProperties() *schema.Table
- func ImageTags() *schema.Table
- func Images() *schema.Table
- func InstanceAddresses() *schema.Table
- func InstanceAttachedVolumes() *schema.Table
- func InstanceFlavorExtraSpecs() *schema.Table
- func InstanceFlavors() *schema.Table
- func InstanceMetadata() *schema.Table
- func InstanceSecurityGroups() *schema.Table
- func InstanceTags() *schema.Table
- func Instances() *schema.Table
- func NetworkSubnets() *schema.Table
- func NetworkTags() *schema.Table
- func Networks() *schema.Table
- func Ports() *schema.Table
- func ProjectLimits() *schema.Table
- func Projects() *schema.Table
- func SecurityGroupRules() *schema.Table
- func SecurityGroups() *schema.Table
- func UserKeyPairs() *schema.Table
- func Users() *schema.Table
- func Volumes() *schema.Table
- type Address
- type Attachment
- type Flavor
- type FlavorAccess
- type FlavorExtraSpecsData
- type Host
- type Instance
- type InstanceFlavor
- type KeyPair
- type Network
- type Pair
- type SecurityGroup
- type Single
- type Tag
- type Time
- type User
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AggregateHosts ¶
func Aggregates ¶
func AttachmentHosts ¶
func Attachments ¶
func ExtractFlavorAccessInto ¶
func ExtractFlavorAccessInto(r pagination.Page, v interface{}) error
func ExtractFlavorsExtraSpecsAsMap ¶
func ExtractFlavorsExtraSpecsAsMap(r flavors.ListExtraSpecsResult) (*map[string]string, error)
func ExtractFlavorsInto ¶
func ExtractFlavorsInto(r pagination.Page, v interface{}) error
func ExtractUsersInto ¶
func ExtractUsersInto(r pagination.Page, v interface{}) error
func FlavorAccesses ¶
func FlavorExtraSpecs ¶
func Hypervisors ¶
func ImageMetadata ¶
func ImageProperties ¶
func InstanceAddresses ¶
func InstanceAttachedVolumes ¶
func InstanceFlavors ¶
func InstanceMetadata ¶
func InstanceSecurityGroups ¶
func InstanceTags ¶
func NetworkSubnets ¶
func NetworkTags ¶
func ProjectLimits ¶
func SecurityGroupRules ¶
func SecurityGroups ¶
func UserKeyPairs ¶
Types ¶
type Attachment ¶
type Attachment struct { ID string `json:"id"` AttachedAt Time `json:"attached_at"` DetachedAt Time `json:"detached_at"` AttachmentID string `json:"attachment_id"` VolumeID string `json:"volume_id"` Instance string `json:"instance" cq-name:"instance_id"` Status string `json:"status"` AttachMode string `json:"attach_mode"` ProjectID string `json:"-" cq-name:"project_id"` ConnectionInfo struct { AccessMode string `json:"access_mode"` AttachmentID string `json:"attachment_id"` AuthEnabled bool `json:"auth_enabled"` AuthUsername string `json:"auth_username"` ClusterName string `json:"cluster_name"` Discard bool `json:"discard"` DriverVolumeType string `json:"driver_volume_type"` Encrypted bool `json:"encrypted"` Hosts []string `json:"hosts"` Keyring string `json:"keyring"` Name string `json:"name"` Ports []string `json:"ports"` SecretType string `json:"secret_type"` SecretUUID string `json:"secret_uuid"` VolumeID string `json:"volume_id"` } `json:"connection_info"` }
type Flavor ¶
type Flavor struct { ID *string `json:"id,omitempty"` Disk int `json:"disk"` RAM int `json:"ram"` Name string `json:"name"` RxTxFactor *float64 `json:"rxtx_factor"` Swap int `json:"-"` VCPUs int `json:"vcpus"` IsPublic *bool `json:"os-flavor-access:is_public" cq-name:"is_public"` Ephemeral int `json:"OS-FLV-EXT-DATA:ephemeral" cq-name:"ephemeral"` Description *string `json:"description"` // new in version 2.55 ExtraSpecsRaw json.RawMessage `json:"extra_specs"` ExtraSpecsObj *FlavorExtraSpecsData `json:"-" cq-name:"extra_specs"` ExtraSpecsMap *map[string]string `json:"-"` }
func (*Flavor) UnmarshalJSON ¶
type FlavorAccess ¶
type FlavorExtraSpecsData ¶
type FlavorExtraSpecsData struct { CPUCores string `json:"hw:cpu_cores"` CPUSockets string `json:"hw:cpu_sockets"` RNGAllowed string `json:"hw_rng:allowed"` WatchdogAction string `json:"hw:watchdog_action"` VGPUs string `json:"resources:VGPU"` TraitCustomVGPU string `json:"trait:CUSTOM_VGPU"` }
func ExtractFlavorsExtraSpecsAsObj ¶
func ExtractFlavorsExtraSpecsAsObj(r flavors.ListExtraSpecsResult) (*FlavorExtraSpecsData, error)
type Instance ¶
type Instance struct { ID string `json:"id"` TenantID string `json:"tenant_id"` UserID string `json:"user_id"` Name string `json:"name"` CreatedAt *Time `json:"created" cq-name:"created_at" cq-type:"timestamp"` LaunchedAt *Time `json:"OS-SRV-USG:launched_at" cq-name:"launched_at" cq-type:"timestamp"` UpdatedAt *Time `json:"updated" cq-name:"updated_at" cq-type:"timestamp"` TerminatedAt *Time `json:"OS-SRV-USG:terminated_at" cq-name:"terminated_at" cq-type:"timestamp"` HostID string `json:"hostid"` Status string `json:"status"` Progress int `json:"progress"` AccessIPv4 string `json:"accessIPv4"` AccessIPv6 string `json:"accessIPv6"` Image any `json:"image"` Flavor InstanceFlavor `json:"flavor"` Addresses map[string][]Address `json:"addresses"` Metadata map[string]string `json:"metadata"` Links []struct { Href string `json:"href"` Rel string `json:"rel"` } `json:"links"` KeyName string `json:"key_name"` AdminPass string `json:"adminPass"` SecurityGroups []struct { Name string `json:"name"` } `json:"security_groups"` AttachedVolumes []servers.AttachedVolume `json:"os-extended-volumes:volumes_attached" cq-name:"attached_volumes"` Tags *[]string `json:"tags"` ServerGroups *[]string `json:"server_groups"` DiskConfig string `json:"OS-DCF:diskConfig" cq-name:"disk_config"` AvailabilityZone string `json:"OS-EXT-AZ:availability_zone" cq-name:"availability_zone"` Host string `json:"OS-EXT-SRV-ATTR:host" cq-name:"host"` HostName string `json:"OS-EXT-SRV-ATTR:hostname" cq-name:"hostname"` HypervisorHostname string `json:"OS-EXT-SRV-ATTR:hypervisor_hostname" cq-name:"hypervisor_hostname"` InstanceName string `json:"OS-EXT-SRV-ATTR:instance_name" cq-name:"instance_name"` KernelID string `json:"OS-EXT-SRV-ATTR:kernel_id" cq-name:"kernel_id"` LaunchIndex int `json:"OS-EXT-SRV-ATTR:launch_index" cq-name:"launch_index"` RAMDiskID string `json:"OS-EXT-SRV-ATTR:ramdisk_id" cq-name:"ramdisk_id"` ReservationID string `json:"OS-EXT-SRV-ATTR:reservation_id" cq-name:"reservation_id"` RootDeviceName string `json:"OS-EXT-SRV-ATTR:root_device_name" cq-name:"root_device_name"` UserData string `json:"OS-EXT-SRV-ATTR:user_data" cq-name:"user_data"` PowerState int `json:"OS-EXT-STS:power_state" cq-name:"power_state_id"` VMState string `json:"OS-EXT-STS:vm_state" cq-name:"vm_state"` ConfigDrive string `json:"config_drive"` Description string `json:"description"` }
Instance is an internal type used to unmarshal more data from the API response than would usually be possible through the ordinary gophercloud struct. OpenStack API microversions enable more response data that is not taken into account by the gophercloud library, which unmarshals only what is available at the base level for each API version, for backward compatibility. This is also why there is an ExtractInto function that allows you to pass in an arbitrary struct to marshal the response data into.
type InstanceFlavor ¶
type InstanceFlavor struct { Name string `json:"original_name"` Disk int `json:"disk"` RAM int `json:"ram"` Swap int `json:"-"` VCPUs int `json:"vcpus"` Ephemeral int `json:"OS-FLV-EXT-DATA:ephemeral" cq-name:"ephemeral"` ExtraSpecsRaw json.RawMessage `json:"extra_specs"` ExtraSpecsObj *FlavorExtraSpecsData `json:"-" cq-name:"extra_specs"` ExtraSpecsMap *map[string]string `json:"-"` // contains filtered or unexported fields }
type KeyPair ¶
type KeyPair struct { ID *int `json:"ID"` Name string `json:"name"` Fingerprint string `json:"fingerprint"` PublicKey string `json:"public_key"` PrivateKey string `json:"private_key"` UserID *string `json:"user_id"` Type string `json:"type"` Deleted bool `json:"deleted"` CreatedAt *time.Time `json:"created_at"` UpdatedAt *time.Time `json:"updated_at"` DeletedAt *time.Time `json:"deleted_at"` }
type Network ¶
type Network struct { // UUID for the network ID string `json:"id"` // Human-readable name for the network. Might not be unique. Name string `json:"name"` // Description for the network Description string `json:"description"` // The administrative state of network. If false (down), the network does not // forward packets. AdminStateUp bool `json:"admin_state_up"` // Indicates whether network is currently operational. Possible values include // `ACTIVE', `DOWN', `BUILD', or `ERROR'. Plug-ins might define additional // values. Status string `json:"status"` // Subnets associated with this network. Subnets []string `json:"subnets"` // TenantID is the project owner of the network. TenantID string `json:"tenant_id"` // UpdatedAt and CreatedAt contain ISO-8601 timestamps of when the state of the // network last changed, and when it was created. UpdatedAt time.Time `json:"-"` CreatedAt time.Time `json:"-"` // ProjectID is the project owner of the network. ProjectID string `json:"project_id"` Shared bool `json:"shared"` // Availability zone hints groups network nodes that run services like DHCP, L3, FW, and others. // Used to make network resources highly available. AvailabilityZoneHints []string `json:"availability_zone_hints"` // Tags optionally set via extensions/attributestags Tags []string `json:"tags"` // RevisionNumber optionally set via extensions/standard-attr-revisions RevisionNumber int `json:"revision_number"` }
type Pair ¶
type Pair[K comparable, V any] struct { Key K `cq-name:"key"` Value V `cq-name:"value"` }
type SecurityGroup ¶
type SecurityGroup struct {
Name string `json:"name"`
}
type User ¶
type User struct { DefaultProjectID string `json:"default_project_id"` Description string `json:"description"` DomainID string `json:"domain_id"` Enabled bool `json:"enabled"` Extra map[string]interface{} `json:"-"` ID string `json:"id"` Links map[string]interface{} `json:"links"` Name string `json:"name"` PasswordExpiresAt time.Time `json:"-"` Options struct { IgnoreChangePasswordUponFirstUse bool `json:"ignore_change_password_upon_first_use"` IgnoreLockoutFailureAttempts bool `json:"ignore_lockout_failure_attempts"` IgnorePasswordExpiry bool `json:"ignore_password_expiry"` } `json:"options"` }
func (*User) UnmarshalJSON ¶
type Volume ¶
type Volume struct { // Unique identifier for the volume. ID string `json:"id"` // Current status of the volume. Status string `json:"status"` // Size of the volume in GB. Size int `json:"size"` // AvailabilityZone is which availability zone the volume is in. AvailabilityZone string `json:"availability_zone"` // The date when this volume was created. CreatedAt Time `json:"created_at"` // The date when this volume was last updated UpdatedAt Time `json:"updated_at"` // Instances onto which the volume is attached. Attachments []volumes.Attachment `json:"attachments"` // Human-readable display name for the volume. Name string `json:"name"` // Human-readable description for the volume. Description string `json:"description"` // The type of volume to create, either SATA or SSD. VolumeType string `json:"volume_type"` // The ID of the snapshot from which the volume was created SnapshotID string `json:"snapshot_id"` // The ID of another block storage volume from which the current volume was created SourceVolID string `json:"source_volid"` // The backup ID, from which the volume was restored // This field is supported since 3.47 microversion BackupID *string `json:"backup_id"` // The group ID; this field is supported since 3.47 microversion GroupID *string `json:"group_id"` // Arbitrary key-value pairs defined by the user. Metadata map[string]string `json:"metadata"` // UserID is the id of the user who created the volume. UserID string `json:"user_id"` // Indicates whether this is a bootable volume. Bootable string `json:"bootable"` // Encrypted denotes if the volume is encrypted. Encrypted bool `json:"encrypted"` // ReplicationStatus is the status of replication. ReplicationStatus string `json:"replication_status"` // ConsistencyGroupID is the consistency group ID. ConsistencyGroupID string `json:"consistencygroup_id"` // Multiattach denotes if the volume is multi-attach capable. Multiattach bool `json:"multiattach"` // Image metadata entries, only included for volumes that were created from an image, or from a snapshot of a volume originally created from an image. VolumeImageMetadata map[string]string `json:"volume_image_metadata"` // The volume migration status MigrationStatus string `json:"migration_status"` OsVolHostAttrHost string `json:"os-vol-host-attr:host" cq-name:"host"` OsVolMigStatusAttrMigstat string `json:"os-vol-mig-status-attr:migstat" cq-name:"migration_status"` OsVolMigStatusAttrNameID string `json:"os-vol-mig-status-attr:name_id" cq-name:"migration_status_name"` OsVolTenantAttrTenantID string `json:"os-vol-tenant-attr:tenant_id" cq-name:"migration_status_tenant"` ProviderID string `json:"provider_id"` ServiceUUID string `json:"service_uuid"` }
Source Files ¶
- aggregate_hosts.go
- aggregates.go
- attachment_hosts.go
- attachments.go
- data_structs.go
- flavor_accesses.go
- flavor_extra_specs.go
- flavors.go
- hypervisors.go
- image_metadata.go
- image_properties.go
- image_tags.go
- images.go
- instance_addresses.go
- instance_attached_volumes.go
- instance_flavor_extra_specs.go
- instance_flavors.go
- instance_metadata.go
- instance_security_groups.go
- instance_tags.go
- instances.go
- network_subnets.go
- network_tags.go
- networks.go
- ports.go
- project_limits.go
- projects.go
- security_group_rules.go
- security_groups.go
- time.go
- user_keypairs.go
- users.go
- volumes.go
Click to show internal directories.
Click to hide internal directories.