Documentation
¶
Index ¶
- Constants
- Variables
- func DeleteResource(c *ServiceClient, u string, query ...url.Values) error
- func DeleteResourceWithResp(c *ServiceClient, u string, query ...url.Values) (*resty.Response, error)
- func FindResource[T any](c *ServiceClient, u string, bodyKey string) (*T, error)
- func GetResource[T any](c *ServiceClient, u string, bodyKey string) (*T, error)
- func NewPasswordAuth(authUrl string, user model.User, project model.Project) *auth_plugin.PasswordAuthPlugin
- func ParsetVersionFromString(vertionStr string) microVersion
- func QueryByIdOrName[T any](idOrName string, showFunc func(id string) (*T, error), ...) (*T, error)
- func QueryResource[T any](c *ServiceClient, u string, query url.Values, bodyKey string) ([]T, error)
- type CinderV2
- func (c CinderV2) CreateBackup(volumeId string, name string, force bool) (*cinder.Backup, error)
- func (c CinderV2) CreateSnapshot(volumeId string, name string, force bool) (*cinder.Snapshot, error)
- func (c CinderV2) CreateType(params map[string]any) (*cinder.VolumeType, error)
- func (c CinderV2) CreateVolume(options map[string]any) (*cinder.Volume, error)
- func (c CinderV2) CreateVolumeAndWait(options map[string]any, timeoutSeconds int) (*cinder.Volume, error)
- func (c CinderV2) DeleteBackup(id string) error
- func (c CinderV2) DeleteSnapshot(id string) error
- func (c CinderV2) DeleteType(id string) error
- func (c CinderV2) DeleteVolume(id string, force bool, cascade bool) error
- func (c CinderV2) ExtendVolume(id string, size int) error
- func (c CinderV2) FindBackup(idOrName string, allTenats ...bool) (*cinder.Backup, error)
- func (c CinderV2) FindSnapshot(idOrName string, allTenats ...bool) (*cinder.Snapshot, error)
- func (c CinderV2) FindType(idOrName string) (*cinder.VolumeType, error)
- func (c CinderV2) FindVolume(idOrName string, allTenats ...bool) (*cinder.Volume, error)
- func (c CinderV2) GetBackup(id string) (*cinder.Backup, error)
- func (c CinderV2) GetCurrentVersion() (*model.ApiVersion, error)
- func (c CinderV2) GetDefaultType() (*cinder.VolumeType, error)
- func (c CinderV2) GetSnapshot(id string) (*cinder.Snapshot, error)
- func (c CinderV2) GetType(id string) (*cinder.VolumeType, error)
- func (c CinderV2) GetVolume(id string) (*cinder.Volume, error)
- func (c CinderV2) ListBackup(query url.Values, details ...bool) ([]cinder.Backup, error)
- func (c CinderV2) ListByName(name string, details ...bool) ([]cinder.Volume, error)
- func (c CinderV2) ListService(query url.Values) ([]cinder.Service, error)
- func (c CinderV2) ListSnapshot(query url.Values, details ...bool) ([]cinder.Snapshot, error)
- func (c CinderV2) ListType(query url.Values) ([]cinder.VolumeType, error)
- func (c CinderV2) ListVolume(query url.Values, details ...bool) ([]cinder.Volume, error)
- func (c CinderV2) RetypeVolume(id string, newType string, migrationPolicy string) error
- func (c CinderV2) RevertVolume(id string, snapshotId string) error
- type GlanceV2
- func (c GlanceV2) CreateImage(options glance.Image) (*glance.Image, error)
- func (c GlanceV2) DeleteImage(id string) error
- func (c GlanceV2) DownloadImage(id string, fileName string, process ...bool) error
- func (c GlanceV2) FindImage(idOrName string) (*glance.Image, error)
- func (c GlanceV2) FoundByName(name string) (*glance.Image, error)
- func (c GlanceV2) GetCurrentVersion() (*model.ApiVersion, error)
- func (c GlanceV2) GetImage(id string) (*glance.Image, error)
- func (c GlanceV2) ListImage(query url.Values) ([]glance.Image, error)
- func (c GlanceV2) ListWithTotal(query url.Values, total int) ([]glance.Image, error)
- func (c GlanceV2) UpdateImage(id string, params map[string]any) (*glance.Image, error)
- func (c GlanceV2) UploadImage(id string, file string, progress ...bool) error
- type KeystoneV3
- func (c KeystoneV3) CreateEndpoint(endpoint keystone.Endpoint) (*keystone.Endpoint, error)
- func (c KeystoneV3) CreateService(service keystone.Service) (*keystone.Service, error)
- func (c KeystoneV3) DeleteEndpoint(id string) error
- func (c KeystoneV3) DeleteProject(id string) error
- func (c KeystoneV3) DeleteService(id string) error
- func (c KeystoneV3) FindProject(idOrName string) (*model.Project, error)
- func (c KeystoneV3) FindService(idOrName string) (*keystone.Service, error)
- func (c KeystoneV3) FindUser(idOrName string) (*model.User, error)
- func (c KeystoneV3) GetProject(id string) (*model.Project, error)
- func (c KeystoneV3) GetService(id string) (*keystone.Service, error)
- func (c KeystoneV3) GetServiceByName(t string) (*keystone.Service, error)
- func (c KeystoneV3) GetServiceByType(t string) (*keystone.Service, error)
- func (c KeystoneV3) GetStableVersion() (*model.ApiVersion, error)
- func (c KeystoneV3) GetUser(id string) (*model.User, error)
- func (c KeystoneV3) ListByName(name string) ([]keystone.Service, error)
- func (c KeystoneV3) ListEndpoint(query url.Values) ([]keystone.Endpoint, error)
- func (c KeystoneV3) ListEndpointByService(service_id string) ([]keystone.Endpoint, error)
- func (c KeystoneV3) ListProject(query url.Values) ([]model.Project, error)
- func (c KeystoneV3) ListRegion(query url.Values) ([]keystone.Region, error)
- func (c KeystoneV3) ListRoleAssigment(query url.Values) ([]keystone.RoleAssigment, error)
- func (c KeystoneV3) ListService(query url.Values) ([]keystone.Service, error)
- func (c KeystoneV3) ListUser(query url.Values) ([]model.User, error)
- func (c KeystoneV3) ListUsersByProject(projectId string) ([]model.User, error)
- type NeutronV2
- func (c NeutronV2) AddRouterPort(routerId, portId string) error
- func (c NeutronV2) AddRouterSubnet(routerId, subnetId string) error
- func (c NeutronV2) CreateNetwork(params map[string]any) (*neutron.Network, error)
- func (c NeutronV2) CreatePort(params map[string]any) (*neutron.Port, error)
- func (c NeutronV2) CreateRouter(params map[string]any) (*neutron.Router, error)
- func (c NeutronV2) CreateSubnet(params map[string]any) (*neutron.Subnet, error)
- func (c NeutronV2) DeleteNetwork(id string) error
- func (c NeutronV2) DeletePort(id string) error
- func (c NeutronV2) DeleteRouter(id string) error
- func (c NeutronV2) DeleteSubnet(id string) error
- func (c NeutronV2) FindNetwork(idOrName string) (*neutron.Network, error)
- func (c NeutronV2) FindPort(idOrName string) (*neutron.Port, error)
- func (c NeutronV2) FindQosPolicy(idOrName string) (*neutron.QosPolicy, error)
- func (c NeutronV2) FindRouter(idOrName string) (*neutron.Router, error)
- func (c NeutronV2) FindSecurityGroup(idOrName string) (*neutron.SecurityGroup, error)
- func (c NeutronV2) FindSubnet(idOrName string) (*neutron.Subnet, error)
- func (c *NeutronV2) GetCurrentVersion() (*model.ApiVersion, error)
- func (c NeutronV2) GetNetwork(id string) (*neutron.Network, error)
- func (c NeutronV2) GetPort(id string) (*neutron.Port, error)
- func (c NeutronV2) GetQosPolicy(id string) (*neutron.QosPolicy, error)
- func (c NeutronV2) GetRouter(id string) (*neutron.Router, error)
- func (c NeutronV2) GetSecurityGroup(id string) (*neutron.SecurityGroup, error)
- func (c NeutronV2) GetSecurityGroupRule(id string) (*neutron.SecurityGroupRule, error)
- func (c NeutronV2) GetSubnet(id string) (*neutron.Subnet, error)
- func (c NeutronV2) ListAgent(query url.Values) ([]neutron.Agent, error)
- func (c NeutronV2) ListNetwork(query url.Values) ([]neutron.Network, error)
- func (c NeutronV2) ListNetwrkByName(name string) ([]neutron.Network, error)
- func (c NeutronV2) ListPort(query url.Values) ([]neutron.Port, error)
- func (c NeutronV2) ListPortByDeviceId(deviceId string) (neutron.Ports, error)
- func (c NeutronV2) ListPortByName(name string) ([]neutron.Port, error)
- func (c NeutronV2) ListQosPolicy(query url.Values) ([]neutron.QosPolicy, error)
- func (c NeutronV2) ListQosRule(query url.Values) ([]neutron.QosRule, error)
- func (c NeutronV2) ListRouter(query url.Values) ([]neutron.Router, error)
- func (c NeutronV2) ListRouterByName(name string) ([]neutron.Router, error)
- func (c NeutronV2) ListSecurityGroup(query url.Values) ([]neutron.SecurityGroup, error)
- func (c NeutronV2) ListSecurityGroupRule(query url.Values) ([]neutron.SecurityGroupRule, error)
- func (c NeutronV2) ListSubnet(query url.Values) ([]neutron.Subnet, error)
- func (c NeutronV2) ListSubnetByName(name string) ([]neutron.Subnet, error)
- func (c NeutronV2) RemoveRouterPort(routerId, portId string) error
- func (c NeutronV2) RemoveRouterSubnet(routerId, subnetId string) error
- func (c NeutronV2) UpdatePort(id string, options map[string]any) (*neutron.Port, error)
- type NovaV2
- func (c NovaV2) AggAddHost(id int, host string) (*nova.Aggregate, error)
- func (c NovaV2) AggRemoveHost(id int, host string) (*nova.Aggregate, error)
- func (c NovaV2) CopyFlavor(id string, newName string, newId string, newVcpus int, newRam int, newDisk int, ...) (*nova.Flavor, error)
- func (c NovaV2) CreateAgg(agg nova.Aggregate) (*nova.Aggregate, error)
- func (c NovaV2) CreateFlavor(flavor nova.Flavor) (*nova.Flavor, error)
- func (c NovaV2) CreateKeypair(name string, keyType string, opt nova.KeypairOpt) (*nova.Keypair, error)
- func (c NovaV2) CreateServer(options nova.ServerOpt) (*nova.Server, error)
- func (c NovaV2) CreateServerAndWait(options nova.ServerOpt) (*nova.Server, error)
- func (c NovaV2) Delete(id string) error
- func (c NovaV2) DeleteAgg(id int) error
- func (c NovaV2) DeleteFlavor(id string) error
- func (c NovaV2) DeleteFlavorExtraSpec(id string, extraSpec string) error
- func (c NovaV2) DeleteKeypair(name string) error
- func (c NovaV2) DeleteServer(id string) error
- func (c NovaV2) DeleteServerInterfaceAndWait(id string, portId string, timeout time.Duration) error
- func (c NovaV2) DeleteServerVolumeAndWait(id string, volumeId string, waitSeconds int) error
- func (c NovaV2) DeleteService(host string, binary string) error
- func (c NovaV2) Detail(query url.Values) ([]nova.Hypervisor, error)
- func (c NovaV2) DisableService(host string, binary string, reason string) (*nova.Service, error)
- func (c *NovaV2) DiscoverMicroVersion() error
- func (c NovaV2) DownService(host string, binary string) (*nova.Service, error)
- func (c NovaV2) EnableService(host string, binary string) (*nova.Service, error)
- func (c NovaV2) EvacuateServer(id string, password string, host string, force bool) error
- func (c NovaV2) FindAgg(idOrName string) (*nova.Aggregate, error)
- func (c NovaV2) FindFlavor(idOrName string) (*nova.Flavor, error)
- func (c NovaV2) FindHypervisor(idOrHostName string) (*nova.Hypervisor, error)
- func (c NovaV2) FindServer(idOrName string, allTenants ...bool) (*nova.Server, error)
- func (c NovaV2) GetAgg(id string) (*nova.Aggregate, error)
- func (c *NovaV2) GetApiVersions() (model.ApiVersions, error)
- func (c NovaV2) GetByHostBinary(host string, binary string) (*nova.Service, error)
- func (c NovaV2) GetFlavor(id string) (*nova.Flavor, error)
- func (c NovaV2) GetFlavorExtraSpecs(id string) (nova.ExtraSpecs, error)
- func (c NovaV2) GetFlavorWithExtraSpecs(id string) (*nova.Flavor, error)
- func (c NovaV2) GetHypervisor(id string) (*nova.Hypervisor, error)
- func (c NovaV2) GetHypervisorByHostname(hostname string) (*nova.Hypervisor, error)
- func (c NovaV2) GetHypervisorFlavorCapacities(query url.Values) (*nova.FlavorCapacities, error)
- func (c NovaV2) GetHypervisorUptime(id string) (*nova.Hypervisor, error)
- func (c NovaV2) GetKeypair(name string) (*nova.Keypair, error)
- func (c *NovaV2) GetMicroVersion() string
- func (c NovaV2) GetQuotaSet(projectId string) (*nova.QuotaSet, error)
- func (c NovaV2) GetServer(id string) (*nova.Server, error)
- func (c NovaV2) GetServerAction(id, requestId string) (*nova.InstanceAction, error)
- func (c NovaV2) GetServerConsoleLog(id string, length uint) (*nova.ConsoleLog, error)
- func (c NovaV2) GetServerConsoleUrl(id string, consoleType string) (*nova.Console, error)
- func (c NovaV2) ListAZ(query url.Values, detail ...bool) ([]nova.AvailabilityZone, error)
- func (c NovaV2) ListAgg(query url.Values) ([]nova.Aggregate, error)
- func (c NovaV2) ListByName(hostname string) ([]nova.Hypervisor, error)
- func (c NovaV2) ListComputeService() ([]nova.Service, error)
- func (c NovaV2) ListFlavors(query url.Values, details ...bool) ([]nova.Flavor, error)
- func (c NovaV2) ListHypervisor(query url.Values, details ...bool) ([]nova.Hypervisor, error)
- func (c NovaV2) ListKeypair(query url.Values) ([]nova.Keypair, error)
- func (c NovaV2) ListMigration(query url.Values) ([]nova.Migration, error)
- func (c NovaV2) ListServer(query url.Values, details ...bool) ([]nova.Server, error)
- func (c NovaV2) ListServerActions(id string) ([]nova.InstanceAction, error)
- func (c NovaV2) ListServerActionsWithEvents(id string, actionName string, requestId string, last int) ([]nova.InstanceAction, error)
- func (c NovaV2) ListServerGroup(query url.Values) ([]nova.ServerGroup, error)
- func (c NovaV2) ListServerInterfaces(id string) ([]nova.InterfaceAttachment, error)
- func (c NovaV2) ListServerMigrations(id string, query url.Values) ([]nova.Migration, error)
- func (c NovaV2) ListServerVolumes(id string) ([]nova.VolumeAttachment, error)
- func (c NovaV2) ListService(query url.Values) ([]nova.Service, error)
- func (c *NovaV2) MicroVersionLargeEqual(version string) bool
- func (c NovaV2) PauseServer(id string) error
- func (c NovaV2) RebootServer(id string, hard bool) error
- func (c NovaV2) RebuildServer(id string, opt nova.RebuilOpt) error
- func (c NovaV2) ResizeConfirm(id string) error
- func (c NovaV2) ResizeRevert(id string) error
- func (c NovaV2) ResizeServer(id string, flavorRef string) error
- func (c NovaV2) ResumeServer(id string) error
- func (c NovaV2) ServerAddInterface(id, netId, portId string) (*nova.InterfaceAttachment, error)
- func (c NovaV2) ServerAddVolume(id, volumeId string) (*nova.VolumeAttachment, error)
- func (c NovaV2) ServerCreateImage(id string, imagName string, metadata map[string]string) (string, error)
- func (c NovaV2) ServerDeleteInterface(id, portId string) (*resty.Response, error)
- func (c NovaV2) ServerDeleteVolume(id, volumeId string) error
- func (c NovaV2) ServerLiveMigrate(id string, blockMigrate any, host string) error
- func (c NovaV2) ServerMigrate(id string, host string) error
- func (c NovaV2) ServerRegionLiveMigrate(id string, destRegion string, blockMigrate bool, dryRun bool, destHost string) (*nova.RegionMigrateResp, error)
- func (c NovaV2) ServerRename(id string, name string) error
- func (c NovaV2) ServerSetName(id string, name string) error
- func (c NovaV2) SetFlavorExtraSpecs(id string, extraSpecs map[string]string) (nova.ExtraSpecs, error)
- func (c NovaV2) SetServer(id string, params map[string]any) error
- func (c NovaV2) SetServerPassword(id string, password, user string) error
- func (c NovaV2) SetServerState(id string, active bool) error
- func (c NovaV2) ShelveServer(id string) error
- func (c NovaV2) StartServer(id string) error
- func (c NovaV2) StopServer(id string) error
- func (c NovaV2) StopServerAndWait(id string) error
- func (c *NovaV2) String() string
- func (c NovaV2) SuspendServer(id string) error
- func (c NovaV2) UnpauseServer(id string) error
- func (c NovaV2) UnshelveServer(id string) error
- func (c NovaV2) UpService(host string, binary string) (*nova.Service, error)
- func (c NovaV2) WaitServerBooted(id string) (*nova.Server, error)
- func (c NovaV2) WaitServerDeleted(id string) error
- func (c NovaV2) WaitServerRebooted(id string, newFlavorName string) (*nova.Server, error)
- func (c NovaV2) WaitServerResized(id string, newFlavorName string) (*nova.Server, error)
- func (c NovaV2) WaitServerStatus(serverId string, status string, interval int) (*nova.Server, error)
- func (c NovaV2) WaitServerTask(id string, taskState string) (*nova.Server, error)
- type ReqBody
- type ServiceClient
- type UrlPath
Constants ¶
View Source
const ( SERVICES = "services" SERVICE = "service" PROJECTS = "projects" PROJECT = "project" USERS = "users" USER = "user" VOLUMES = "volumes" SNAPSHOTS = "snapshots" BACKUPS = "backups" ROUTERS = "routers" ROUTER = "router" NETWORKS = "networks" NETWORK = "network" SUBNETS = "subnets" SUBNET = "subnet" PORTS = "ports" PORT = "port" SERVERS = "servers" SERVER = "server" )
response body key
View Source
const DEFAULT_IMAGE_LIMIT = 1000
View Source
const X_OPENSTACK_NOVA_API_VERSION = "X-Openstack-Nova-Api-Version"
Variables ¶
View Source
var ErrActionFailed = errors.New("action is failed")
View Source
var ErrActionNotFinish = errors.New("action is not finished")
View Source
var ErrResourceMulti = errors.New("multiple resources")
View Source
var ErrResourceNotFound = errors.New("resource not found")
View Source
var ErrServerIsError = errors.New("server is error")
View Source
var ErrServerIsNotDeleted = errors.New("server is not deleted")
View Source
var ErrServerNotStopped = errors.New("server is not stopped")
View Source
var ErrServerStatusNotExpect = errors.New("server status is not expect")
Functions ¶
func DeleteResource ¶
func DeleteResource(c *ServiceClient, u string, query ...url.Values) error
func DeleteResourceWithResp ¶
func FindResource ¶
func FindResource[T any](c *ServiceClient, u string, bodyKey string) (*T, error)
func GetResource ¶
func GetResource[T any](c *ServiceClient, u string, bodyKey string) (*T, error)
func NewPasswordAuth ¶
func NewPasswordAuth(authUrl string, user model.User, project model.Project) *auth_plugin.PasswordAuthPlugin
func ParsetVersionFromString ¶
func ParsetVersionFromString(vertionStr string) microVersion
func QueryByIdOrName ¶
func QueryResource ¶
Types ¶
type CinderV2 ¶
type CinderV2 struct{ *ServiceClient }
func (CinderV2) CreateBackup ¶
func (CinderV2) CreateSnapshot ¶
func (CinderV2) CreateType ¶
func (CinderV2) CreateVolume ¶
func (CinderV2) CreateVolumeAndWait ¶
func (CinderV2) DeleteBackup ¶
func (CinderV2) DeleteSnapshot ¶
func (CinderV2) DeleteType ¶
func (CinderV2) DeleteVolume ¶
func (CinderV2) FindBackup ¶
func (CinderV2) FindSnapshot ¶
func (CinderV2) FindVolume ¶
func (CinderV2) GetCurrentVersion ¶
func (c CinderV2) GetCurrentVersion() (*model.ApiVersion, error)
func (CinderV2) GetDefaultType ¶
func (c CinderV2) GetDefaultType() (*cinder.VolumeType, error)
func (CinderV2) ListBackup ¶
func (CinderV2) ListByName ¶
func (CinderV2) ListService ¶
func (CinderV2) ListSnapshot ¶
func (CinderV2) ListVolume ¶
func (CinderV2) RetypeVolume ¶
type GlanceV2 ¶
type GlanceV2 struct{ *ServiceClient }
func (GlanceV2) CreateImage ¶
func (GlanceV2) DeleteImage ¶
func (GlanceV2) DownloadImage ¶
func (GlanceV2) GetCurrentVersion ¶
func (c GlanceV2) GetCurrentVersion() (*model.ApiVersion, error)
func (GlanceV2) ListWithTotal ¶
func (GlanceV2) UpdateImage ¶
type KeystoneV3 ¶
type KeystoneV3 struct{ *ServiceClient }
func (KeystoneV3) CreateEndpoint ¶
func (KeystoneV3) CreateService ¶
func (KeystoneV3) DeleteEndpoint ¶
func (c KeystoneV3) DeleteEndpoint(id string) error
func (KeystoneV3) DeleteProject ¶
func (c KeystoneV3) DeleteProject(id string) error
func (KeystoneV3) DeleteService ¶
func (c KeystoneV3) DeleteService(id string) error
func (KeystoneV3) FindProject ¶
func (c KeystoneV3) FindProject(idOrName string) (*model.Project, error)
func (KeystoneV3) FindService ¶
func (c KeystoneV3) FindService(idOrName string) (*keystone.Service, error)
func (KeystoneV3) GetProject ¶
func (c KeystoneV3) GetProject(id string) (*model.Project, error)
func (KeystoneV3) GetService ¶
func (c KeystoneV3) GetService(id string) (*keystone.Service, error)
func (KeystoneV3) GetServiceByName ¶
func (c KeystoneV3) GetServiceByName(t string) (*keystone.Service, error)
func (KeystoneV3) GetServiceByType ¶
func (c KeystoneV3) GetServiceByType(t string) (*keystone.Service, error)
func (KeystoneV3) GetStableVersion ¶
func (c KeystoneV3) GetStableVersion() (*model.ApiVersion, error)
func (KeystoneV3) ListByName ¶
func (c KeystoneV3) ListByName(name string) ([]keystone.Service, error)
func (KeystoneV3) ListEndpoint ¶
func (KeystoneV3) ListEndpointByService ¶
func (c KeystoneV3) ListEndpointByService(service_id string) ([]keystone.Endpoint, error)
func (KeystoneV3) ListProject ¶
func (KeystoneV3) ListRegion ¶
func (KeystoneV3) ListRoleAssigment ¶
func (c KeystoneV3) ListRoleAssigment(query url.Values) ([]keystone.RoleAssigment, error)
func (KeystoneV3) ListService ¶
func (KeystoneV3) ListUsersByProject ¶
func (c KeystoneV3) ListUsersByProject(projectId string) ([]model.User, error)
type NeutronV2 ¶
type NeutronV2 struct {
*ServiceClient
// contains filtered or unexported fields
}
func (NeutronV2) AddRouterPort ¶
func (NeutronV2) AddRouterSubnet ¶
func (NeutronV2) CreateNetwork ¶
func (NeutronV2) CreatePort ¶
func (NeutronV2) CreateRouter ¶
func (NeutronV2) CreateSubnet ¶
func (NeutronV2) DeleteNetwork ¶
func (NeutronV2) DeletePort ¶
func (NeutronV2) DeleteRouter ¶
func (NeutronV2) DeleteSubnet ¶
func (NeutronV2) FindNetwork ¶
func (NeutronV2) FindQosPolicy ¶
func (NeutronV2) FindRouter ¶
func (NeutronV2) FindSecurityGroup ¶
func (c NeutronV2) FindSecurityGroup(idOrName string) (*neutron.SecurityGroup, error)
func (NeutronV2) FindSubnet ¶
func (*NeutronV2) GetCurrentVersion ¶
func (c *NeutronV2) GetCurrentVersion() (*model.ApiVersion, error)
func (NeutronV2) GetQosPolicy ¶
func (NeutronV2) GetSecurityGroup ¶
func (c NeutronV2) GetSecurityGroup(id string) (*neutron.SecurityGroup, error)
func (NeutronV2) GetSecurityGroupRule ¶
func (c NeutronV2) GetSecurityGroupRule(id string) (*neutron.SecurityGroupRule, error)
func (NeutronV2) ListNetwork ¶
func (NeutronV2) ListNetwrkByName ¶
func (NeutronV2) ListPortByDeviceId ¶
func (NeutronV2) ListPortByName ¶
func (NeutronV2) ListQosPolicy ¶
func (NeutronV2) ListQosRule ¶
func (NeutronV2) ListRouter ¶
func (NeutronV2) ListRouterByName ¶
func (NeutronV2) ListSecurityGroup ¶
func (NeutronV2) ListSecurityGroupRule ¶
func (NeutronV2) ListSubnet ¶
func (NeutronV2) ListSubnetByName ¶
func (NeutronV2) RemoveRouterPort ¶
func (NeutronV2) RemoveRouterSubnet ¶
type NovaV2 ¶
type NovaV2 struct {
*ServiceClient
}
func (NovaV2) AggRemoveHost ¶
func (NovaV2) CopyFlavor ¶
func (NovaV2) CreateKeypair ¶
func (NovaV2) CreateServer ¶
func (NovaV2) CreateServerAndWait ¶
func (NovaV2) DeleteFlavor ¶
func (NovaV2) DeleteFlavorExtraSpec ¶
func (NovaV2) DeleteKeypair ¶
func (NovaV2) DeleteServer ¶
func (NovaV2) DeleteServerInterfaceAndWait ¶
func (NovaV2) DeleteServerVolumeAndWait ¶
func (NovaV2) DisableService ¶
func (*NovaV2) DiscoverMicroVersion ¶
func (NovaV2) DownService ¶
func (NovaV2) EnableService ¶
func (NovaV2) EvacuateServer ¶
func (NovaV2) FindHypervisor ¶
func (c NovaV2) FindHypervisor(idOrHostName string) (*nova.Hypervisor, error)
func (NovaV2) FindServer ¶
func (*NovaV2) GetApiVersions ¶
func (c *NovaV2) GetApiVersions() (model.ApiVersions, error)
func (NovaV2) GetByHostBinary ¶
func (NovaV2) GetFlavorExtraSpecs ¶
func (c NovaV2) GetFlavorExtraSpecs(id string) (nova.ExtraSpecs, error)
func (NovaV2) GetFlavorWithExtraSpecs ¶
func (NovaV2) GetHypervisor ¶
func (c NovaV2) GetHypervisor(id string) (*nova.Hypervisor, error)
func (NovaV2) GetHypervisorByHostname ¶
func (c NovaV2) GetHypervisorByHostname(hostname string) (*nova.Hypervisor, error)
func (NovaV2) GetHypervisorFlavorCapacities ¶
func (NovaV2) GetHypervisorUptime ¶
func (c NovaV2) GetHypervisorUptime(id string) (*nova.Hypervisor, error)
func (*NovaV2) GetMicroVersion ¶
func (NovaV2) GetServerAction ¶
func (c NovaV2) GetServerAction(id, requestId string) (*nova.InstanceAction, error)
func (NovaV2) GetServerConsoleLog ¶
func (NovaV2) GetServerConsoleUrl ¶
func (NovaV2) ListByName ¶
func (c NovaV2) ListByName(hostname string) ([]nova.Hypervisor, error)
func (NovaV2) ListFlavors ¶
func (NovaV2) ListHypervisor ¶
func (NovaV2) ListMigration ¶
func (NovaV2) ListServer ¶
func (NovaV2) ListServerActions ¶
func (c NovaV2) ListServerActions(id string) ([]nova.InstanceAction, error)
func (NovaV2) ListServerActionsWithEvents ¶
func (NovaV2) ListServerGroup ¶
func (NovaV2) ListServerInterfaces ¶
func (c NovaV2) ListServerInterfaces(id string) ([]nova.InterfaceAttachment, error)
func (NovaV2) ListServerMigrations ¶
func (NovaV2) ListServerVolumes ¶
func (c NovaV2) ListServerVolumes(id string) ([]nova.VolumeAttachment, error)
func (NovaV2) ListService ¶
service api
func (*NovaV2) MicroVersionLargeEqual ¶
func (NovaV2) PauseServer ¶
func (NovaV2) ResizeConfirm ¶
func (NovaV2) ResizeRevert ¶
func (NovaV2) ResumeServer ¶
func (NovaV2) ServerAddInterface ¶
func (c NovaV2) ServerAddInterface(id, netId, portId string) (*nova.InterfaceAttachment, error)
func (NovaV2) ServerAddVolume ¶
func (c NovaV2) ServerAddVolume(id, volumeId string) (*nova.VolumeAttachment, error)
func (NovaV2) ServerCreateImage ¶
func (NovaV2) ServerDeleteInterface ¶
func (NovaV2) ServerDeleteVolume ¶
func (NovaV2) ServerLiveMigrate ¶
func (NovaV2) ServerRegionLiveMigrate ¶
func (NovaV2) SetFlavorExtraSpecs ¶
func (NovaV2) SetServerPassword ¶
func (NovaV2) ShelveServer ¶
func (NovaV2) StartServer ¶
func (NovaV2) StopServer ¶
func (NovaV2) StopServerAndWait ¶
func (NovaV2) SuspendServer ¶
func (NovaV2) UnpauseServer ¶
func (NovaV2) UnshelveServer ¶
func (NovaV2) WaitServerDeleted ¶
func (NovaV2) WaitServerRebooted ¶
func (NovaV2) WaitServerResized ¶
func (NovaV2) WaitServerStatus ¶
type ServiceClient ¶
func NewServiceClient ¶
func NewServiceClient(regionName string, sType, sName, sInterface string, version string, authPlugin auth_plugin.AuthPlugin) *ServiceClient
func (*ServiceClient) BaserUrl ¶
func (c *ServiceClient) BaserUrl() string
func (*ServiceClient) Header ¶
func (c *ServiceClient) Header() http.Header
func (*ServiceClient) IndexUrl ¶
func (c *ServiceClient) IndexUrl() (string, error)
type UrlPath ¶
type UrlPath string
const ( // server URL_SERVERS UrlPath = "servers" URL_SERVERS_DETAIL UrlPath = "servers/detail" URL_SERVER UrlPath = "servers/%s" URL_SERVER_VOLUMES_BOOT UrlPath = "os-volumes_boot" // URL_SERVER_METADATA = "servers/%s/metadata" // URL_SERVER_METADATA_ITEM = "servers/%s/metadata/%s" URL_SERVER_CONSOLE UrlPath = "servers/%s/console" URL_COMPUTE_SERVICES UrlPath = "os-services" URL_COMPUTE_SERVICE UrlPath = "os-services/%s" URL_COMPUTE_SERVICE_ACTION UrlPath = "os-services/%s" URL_HYPERVISORS UrlPath = "os-hypervisors" URL_HYPERVISORS_DETAIL UrlPath = "os-hypervisors/detail" URL_HYPERVISOR UrlPath = "os-hypervisors/%s" URL_HYPERVISOR_UPTIME UrlPath = "os-hypervisors/%s/uptime" URL_HYPERVISOR_CAPACITIES UrlPath = "os-hypervisors/statistics/flavor-capacities" URL_SERVER_ACTION UrlPath = "servers/%s/action" // 虚拟机接口 URL_SERVER_INTERFACES UrlPath = "servers/%s/os-interface" URL_SERVER_INTERFACE UrlPath = "servers/%s/os-interface/%s" // 安全组 URL_SERVER_SECURITY_GROUPS UrlPath = "servers/%s/os-security-groups" URL_SERVER_SECURITY_GROUP UrlPath = "servers/%s/os-security-groups/%s" // 密钥对 URL_KEYPAIRS UrlPath = "os-keypairs" URL_KEYPAIR UrlPath = "os-keypairs/%s" // 可用区 URL_AVAILABILITY_ZONES UrlPath = "os-availability-zone" URL_AVAILABILITY_ZONES_DETAIL UrlPath = "os-availability-zone/detail" // 聚合 URL_AGGREGATES UrlPath = "os-aggregates" URL_AGGREGATE UrlPath = "os-aggregates/%s" URL_AGGREGATE_ACTION UrlPath = "os-aggregates/%s/action" URL_AGGREGATES_DETAIL UrlPath = "os-aggregates/detail" // 虚拟机迁移 URL_MIGRATIONS_LIST UrlPath = "os-migrations" // 配额 URL_QUOTAS_LIST UrlPath = "os-quota-sets" URL_QUOTA_DETAIL UrlPath = "os-quota-sets/%s" URL_QUOTA_DEFAULTS UrlPath = "os-quota-sets/%s/defaults" // 虚拟机类型 URL_FLAVORS UrlPath = "flavors" URL_FLAVORS_DETAIL UrlPath = "flavors/detail" URL_FLAVOR UrlPath = "flavors/%s" URL_FLAVOR_EXTRA_SPECS UrlPath = "flavors/%s/os-extra_specs" URL_FLAVOR_EXTRA_SPEC UrlPath = "flavors/%s/os-extra_specs/%s" // 虚拟机卷 URL_SERVER_VOLUMES UrlPath = "servers/%s/os-volume_attachments" URL_SERVER_VOLUME UrlPath = "servers/%s/os-volume_attachments/%s" // URL_SERVERS_REMOTE_CONSOLES UrlPath = "servers/%s/remote-consoles" // URL_SERVER_INSTANCE_ACTIONS UrlPath = "servers/%s/os-instance-actions" URL_SERVER_INSTANCE_ACTION UrlPath = "servers/%s/os-instance-actions/%s" URL_SERVER_MIGRATIONS UrlPath = "servers/%s/migrations" // 群组 URL_SERVER_GROUPS UrlPath = "os-server-groups" // 虚拟机标签 URL_SERVER_TAGS = "servers/%s/tags" URL_SERVER_TAG = "servers/%s/tags/%s" // 卷 URL_VOLUMES UrlPath = "volumes" URL_VOLUMES_DETAIL UrlPath = "volumes/detail" URL_VOLUME UrlPath = "volumes/%s" URL_VOLUME_ACTION UrlPath = "volumes/%s/action" // 快照 URL_SNAPSHOTS UrlPath = "snapshots" URL_SNAPSHOTS_DETAIL UrlPath = "snapshots/detail" URL_SNAPSHOT UrlPath = "snapshots/%s" // 备份 URL_BACKUPS UrlPath = "backups" URL_BACKUPS_DETAIL UrlPath = "backups/detail" URL_BACKUP UrlPath = "backups/%s" // 卷类型 URL_VOLUME_TYPES UrlPath = "types" URL_VOLUME_TYPE UrlPath = "types/%s" URL_VOLUME_TYPE_DEFAULT UrlPath = "types/default" URL_VOLUME_SERVICES UrlPath = "os-services" // 镜像 URL_IMAGES UrlPath = "images" URL_IMAGE UrlPath = "images/%s" URL_IMAGE_FILE UrlPath = "images/%s/file" // region URL_REGIONS UrlPath = "regions" // 服务 URL_SERVICES UrlPath = "services" URL_SERVICE UrlPath = "services/%s" // endpoint URL_ENDPOINTS UrlPath = "endpoints" URL_ENDPOINT UrlPath = "endpoints/%s" // 租户 URL_PROJECTS UrlPath = "projects" URL_PROJECT UrlPath = "projects/%s" // 用户 URL_USERS UrlPath = "users" URL_USER UrlPath = "users/%s" // 角色 URL_ROLE_ASSIGNMENTS UrlPath = "role_assignments" URL_AGENTS UrlPath = "agents" URL_NETWORKS UrlPath = "networks" URL_NETWORK UrlPath = "networks/%s" URL_SUBNETS UrlPath = "subnets" URL_SUBNET UrlPath = "subnets/%s" URL_PORTS UrlPath = "ports" URL_PORT UrlPath = "ports/%s" URL_ROUTERS UrlPath = "routers" URL_ROUTER UrlPath = "routers/%s" URL_ROUTER_ADD_INTERFACE UrlPath = "routers/%s/add_router_interface" URL_ROUTER_REMOVE_INTERFACE UrlPath = "routers/%s/remove_router_interface" URL_FLOATINGIPS UrlPath = "floatingips" URL_FLOATINGIP UrlPath = "floatingips/%s" URL_SECURITY_GROUPS UrlPath = "security-groups" URL_SECURITY_GROUP UrlPath = "security-groups/%s" URL_SECURITY_GROUP_RULES UrlPath = "security-group-rules" URL_SECURITY_GROUP_RULE UrlPath = "security-group-rules/%s" URL_LOADBALANCERS UrlPath = "lbaas/loadbalancers" URL_LOADBALANCER UrlPath = "lbaas/loadbalancers/%s" URL_LISTENERS UrlPath = "lbaas/listeners" URL_LISTENER UrlPath = "lbaas/listeners/%s" URL_POOLS UrlPath = "lbaas/pools" URL_POOL UrlPath = "lbaas/pools/%s" URL_HEALTH_MONITORS UrlPath = "lbaas/healthmonitors" URL_HEALTH_MONITOR UrlPath = "lbaas/healthmonitors/%s" URL_FIREWALLS UrlPath = "fw/firewalls" URL_FIREWALL UrlPath = "fw/firewalls/%s" URL_FIREWALL_POLICIES UrlPath = "fw/firewall_policies" URL_FIREWALL_POLICY UrlPath = "fw/firewall_policies/%s" URL_FIREWALL_RULES UrlPath = "fw/firewall_rules" URL_FIREWALL_RULE UrlPath = "fw/firewall_rules/%s" URL_QOS_POLICIES UrlPath = "qos/policies" URL_QOS_POLICY UrlPath = "qos/policies/%s" URL_QOS_POLICY_RULES UrlPath = "qos/policies-rules" )
func (UrlPath) WithDetail ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.