Documentation ¶
Index ¶
- Constants
- Variables
- func HandleHypervisorGetEmptyCPUInfoSuccessfully(t *testing.T)
- func HandleHypervisorGetSuccessfully(t *testing.T)
- func HandleHypervisorListPre253Successfully(t *testing.T)
- func HandleHypervisorListSuccessfully(t *testing.T)
- func HandleHypervisorListWithParametersSuccessfully(t *testing.T)
- func HandleHypervisorUptimeSuccessfully(t *testing.T)
- func HandleHypervisorsStatisticsSuccessfully(t *testing.T)
Constants ¶
const HypervisorGetBody = `` /* 1085-byte string literal not displayed */
HypervisorGetBody represents a raw hypervisor GET result with Pike+ release.
const HypervisorGetEmptyCPUInfoBody = `` /* 775-byte string literal not displayed */
HypervisorGetEmptyCPUInfoBody represents a raw hypervisor GET result with no cpu_info
const HypervisorListBody = `` /* 2340-byte string literal not displayed */
HypervisorListBody represents a raw hypervisor list result with Pike+ release.
const HypervisorListBodyPre253 = `` /* 2192-byte string literal not displayed */
HypervisorListBodyPre253 represents a raw hypervisor list from the Compute API with microversion older than 2.53. The first hypervisor represents what the specification says (~Newton) The second is exactly the same, but what you can get off a real system (~Kilo)
const HypervisorListWithParametersBody = `` /* 3030-byte string literal not displayed */
HypervisorListWithParametersBody represents a raw hypervisor list result with Pike+ release.
const HypervisorUptimeBody = `` /* 272-byte string literal not displayed */
HypervisorUptimeBody represents a raw hypervisor uptime request result with Pike+ release.
const HypervisorsStatisticsBody = `` /* 369-byte string literal not displayed */
Variables ¶
var ( HypervisorFakePre253 = hypervisors.Hypervisor{ CPUInfo: hypervisors.CPUInfo{ Arch: "x86_64", Model: "Nehalem", Vendor: "Intel", Features: []string{ "pge", "clflush", }, Topology: hypervisors.Topology{ Cores: 1, Threads: 1, Sockets: 4, }, }, CurrentWorkload: 0, Status: "enabled", State: "up", DiskAvailableLeast: 0, HostIP: "1.1.1.1", FreeDiskGB: 1028, FreeRamMB: 7680, HypervisorHostname: "fake-mini", HypervisorType: "fake", HypervisorVersion: 2002000, ID: "1", LocalGB: 1028, LocalGBUsed: 0, MemoryMB: 8192, MemoryMBUsed: 512, RunningVMs: 0, Service: hypervisors.Service{ Host: "e6a37ee802d74863ab8b91ade8f12a67", ID: "2", DisabledReason: "", }, VCPUs: 1, VCPUsUsed: 0, } HypervisorFake = hypervisors.Hypervisor{ CPUInfo: hypervisors.CPUInfo{ Arch: "x86_64", Model: "Nehalem", Vendor: "Intel", Features: []string{ "pge", "clflush", }, Topology: hypervisors.Topology{ Cores: 1, Threads: 1, Sockets: 4, }, }, CurrentWorkload: 0, Status: "enabled", State: "up", DiskAvailableLeast: 0, HostIP: "1.1.1.1", FreeDiskGB: 1028, FreeRamMB: 7680, HypervisorHostname: "fake-mini", HypervisorType: "fake", HypervisorVersion: 2002000, ID: "c48f6247-abe4-4a24-824e-ea39e108874f", LocalGB: 1028, LocalGBUsed: 0, MemoryMB: 8192, MemoryMBUsed: 512, RunningVMs: 0, Service: hypervisors.Service{ Host: "e6a37ee802d74863ab8b91ade8f12a67", ID: "9c2566e7-7a54-4777-a1ae-c2662f0c407c", DisabledReason: "", }, VCPUs: 1, VCPUsUsed: 0, } HypervisorFakeWithParameters = hypervisors.Hypervisor{ CPUInfo: hypervisors.CPUInfo{ Arch: "x86_64", Model: "Nehalem", Vendor: "Intel", Features: []string{ "pge", "clflush", }, Topology: hypervisors.Topology{ Cores: 1, Threads: 1, Sockets: 4, }, }, CurrentWorkload: 0, Status: "enabled", State: "up", DiskAvailableLeast: 0, HostIP: "1.1.1.1", FreeDiskGB: 1028, FreeRamMB: 7680, HypervisorHostname: "fake-mini", HypervisorType: "fake", HypervisorVersion: 2002000, ID: "c48f6247-abe4-4a24-824e-ea39e108874f", LocalGB: 1028, LocalGBUsed: 0, MemoryMB: 8192, MemoryMBUsed: 512, RunningVMs: 0, Service: hypervisors.Service{ Host: "e6a37ee802d74863ab8b91ade8f12a67", ID: "9c2566e7-7a54-4777-a1ae-c2662f0c407c", DisabledReason: "", }, Servers: &[]hypervisors.Server{ { Name: "instance-00000001", UUID: "c42acc8d-eab3-4e4d-9d90-01b0791328f4", }, { Name: "instance-00000002", UUID: "8aaf2941-b774-41fc-921b-20c4757cc359", }, }, VCPUs: 1, VCPUsUsed: 0, } HypervisorEmptyCPUInfo = hypervisors.Hypervisor{ CurrentWorkload: 0, Status: "enabled", State: "up", DiskAvailableLeast: 0, HostIP: "1.1.1.1", FreeDiskGB: 1028, FreeRamMB: 7680, HypervisorHostname: "fake-mini", HypervisorType: "fake", HypervisorVersion: 2002000, ID: "c48f6247-abe4-4a24-824e-ea39e108874f", LocalGB: 1028, LocalGBUsed: 0, MemoryMB: 8192, MemoryMBUsed: 512, RunningVMs: 0, Service: hypervisors.Service{ Host: "e6a37ee802d74863ab8b91ade8f12a67", ID: "9c2566e7-7a54-4777-a1ae-c2662f0c407c", DisabledReason: "", }, VCPUs: 1, VCPUsUsed: 0, } HypervisorsStatisticsExpected = hypervisors.Statistics{ Count: 1, CurrentWorkload: 0, DiskAvailableLeast: 0, FreeDiskGB: 1028, FreeRamMB: 7680, LocalGB: 1028, LocalGBUsed: 0, MemoryMB: 8192, MemoryMBUsed: 512, RunningVMs: 0, VCPUs: 2, VCPUsUsed: 0, } HypervisorUptimeExpected = hypervisors.Uptime{ HypervisorHostname: "fake-mini", ID: "c48f6247-abe4-4a24-824e-ea39e108874f", State: "up", Status: "enabled", Uptime: " 08:32:11 up 93 days, 18:25, 12 users, load average: 0.20, 0.12, 0.14", } )
Functions ¶
func HandleHypervisorListWithParametersSuccessfully ¶ added in v0.19.0
Types ¶
This section is empty.