Documentation ¶
Index ¶
- func ApplyInterfaceRequestOnVMISpec(vmiSpec *v1.VirtualMachineInstanceSpec, ...) *v1.VirtualMachineInstanceSpec
- type DirectDialer
- type MockVirtApiAuthorizor
- func (_m *MockVirtApiAuthorizor) AddExtraPrefixHeaders(header []string)
- func (_m *MockVirtApiAuthorizor) AddGroupHeaders(header []string)
- func (_m *MockVirtApiAuthorizor) AddUserHeaders(header []string)
- func (_m *MockVirtApiAuthorizor) Authorize(req *go_restful.Request) (bool, string, error)
- func (_m *MockVirtApiAuthorizor) EXPECT() *_MockVirtApiAuthorizorRecorder
- func (_m *MockVirtApiAuthorizor) GetExtraPrefixHeaders() []string
- func (_m *MockVirtApiAuthorizor) GetGroupHeaders() []string
- func (_m *MockVirtApiAuthorizor) GetUserHeaders() []string
- type Streamer
- type SubresourceAPIApp
- func (app *SubresourceAPIApp) ConsoleRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) DumpClusterProfilerHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) ExpandSpecRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) ExpandSpecVMRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) FetchVirtualMachineInstance(namespace, name string) (*v1.VirtualMachineInstance, *errors.StatusError)
- func (app *SubresourceAPIApp) FetchVirtualMachineInstanceForVM(namespace, name string) (*v1.VirtualMachineInstance, *errors.StatusError)
- func (app *SubresourceAPIApp) FilesystemList(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) FreezeVMIRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) GuestOSInfo(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) MemoryDumpVMRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) MigrateVMRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) PauseVMIRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) PortForwardRequestHandler(fetcher vmiFetcher) restful.RouteFunction
- func (app *SubresourceAPIApp) RemoveMemoryDumpVMRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) RestartVMRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) SoftRebootVMIRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) StartClusterProfilerHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) StartVMRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) StopClusterProfilerHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) StopVMRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) USBRedirRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) UnfreezeVMIRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) UnpauseVMIRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) UserList(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) VMAddInterfaceRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) VMAddVolumeRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) VMIAddInterfaceRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) VMIAddVolumeRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) VMIRemoveVolumeRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) VMRemoveVolumeRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) VNCRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) VNCScreenshotRequestHandler(request *restful.Request, response *restful.Response)
- func (app *SubresourceAPIApp) VSOCKRequestHandler(request *restful.Request, response *restful.Response)
- type URLResolver
- type VirtApiAuthorizor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyInterfaceRequestOnVMISpec ¶
func ApplyInterfaceRequestOnVMISpec(vmiSpec *v1.VirtualMachineInstanceSpec, request *v1.VirtualMachineInterfaceRequest) *v1.VirtualMachineInstanceSpec
Types ¶
type DirectDialer ¶ added in v0.58.0
type DirectDialer struct {
// contains filtered or unexported fields
}
func NewDirectDialer ¶ added in v0.58.0
func NewDirectDialer(fetch vmiFetcher, validate validator, dial dialer) *DirectDialer
func (*DirectDialer) Dial ¶ added in v0.58.0
func (d *DirectDialer) Dial(namespace, name string) (*websocket.Conn, *errors.StatusError)
func (*DirectDialer) DialUnderlying ¶ added in v0.58.0
func (d *DirectDialer) DialUnderlying(namespace, name string) (net.Conn, *errors.StatusError)
type MockVirtApiAuthorizor ¶ added in v0.12.0
type MockVirtApiAuthorizor struct {
// contains filtered or unexported fields
}
Mock of VirtApiAuthorizor interface
func NewMockVirtApiAuthorizor ¶ added in v0.12.0
func NewMockVirtApiAuthorizor(ctrl *gomock.Controller) *MockVirtApiAuthorizor
func (*MockVirtApiAuthorizor) AddExtraPrefixHeaders ¶ added in v0.12.0
func (_m *MockVirtApiAuthorizor) AddExtraPrefixHeaders(header []string)
func (*MockVirtApiAuthorizor) AddGroupHeaders ¶ added in v0.12.0
func (_m *MockVirtApiAuthorizor) AddGroupHeaders(header []string)
func (*MockVirtApiAuthorizor) AddUserHeaders ¶ added in v0.12.0
func (_m *MockVirtApiAuthorizor) AddUserHeaders(header []string)
func (*MockVirtApiAuthorizor) Authorize ¶ added in v0.12.0
func (_m *MockVirtApiAuthorizor) Authorize(req *go_restful.Request) (bool, string, error)
func (*MockVirtApiAuthorizor) EXPECT ¶ added in v0.12.0
func (_m *MockVirtApiAuthorizor) EXPECT() *_MockVirtApiAuthorizorRecorder
func (*MockVirtApiAuthorizor) GetExtraPrefixHeaders ¶ added in v0.12.0
func (_m *MockVirtApiAuthorizor) GetExtraPrefixHeaders() []string
func (*MockVirtApiAuthorizor) GetGroupHeaders ¶ added in v0.12.0
func (_m *MockVirtApiAuthorizor) GetGroupHeaders() []string
func (*MockVirtApiAuthorizor) GetUserHeaders ¶ added in v0.12.0
func (_m *MockVirtApiAuthorizor) GetUserHeaders() []string
type Streamer ¶ added in v0.44.1
type Streamer struct {
// contains filtered or unexported fields
}
func NewRawStreamer ¶ added in v0.44.1
func NewRawStreamer(fetch vmiFetcher, validate validator, dial dialer) *Streamer
func NewWebsocketStreamer ¶ added in v0.44.1
func NewWebsocketStreamer(fetch vmiFetcher, validate validator, dial dialer) *Streamer
type SubresourceAPIApp ¶ added in v0.4.0
type SubresourceAPIApp struct {
// contains filtered or unexported fields
}
func NewSubresourceAPIApp ¶ added in v0.20.0
func NewSubresourceAPIApp(virtCli kubecli.KubevirtClient, consoleServerPort int, tlsConfiguration *tls.Config, clusterConfig *virtconfig.ClusterConfig) *SubresourceAPIApp
func (*SubresourceAPIApp) ConsoleRequestHandler ¶ added in v0.4.0
func (app *SubresourceAPIApp) ConsoleRequestHandler(request *restful.Request, response *restful.Response)
func (*SubresourceAPIApp) DumpClusterProfilerHandler ¶ added in v0.46.0
func (app *SubresourceAPIApp) DumpClusterProfilerHandler(request *restful.Request, response *restful.Response)
func (*SubresourceAPIApp) ExpandSpecRequestHandler ¶ added in v0.57.0
func (app *SubresourceAPIApp) ExpandSpecRequestHandler(request *restful.Request, response *restful.Response)
func (*SubresourceAPIApp) ExpandSpecVMRequestHandler ¶ added in v0.57.0
func (app *SubresourceAPIApp) ExpandSpecVMRequestHandler(request *restful.Request, response *restful.Response)
func (*SubresourceAPIApp) FetchVirtualMachineInstance ¶ added in v0.44.1
func (app *SubresourceAPIApp) FetchVirtualMachineInstance(namespace, name string) (*v1.VirtualMachineInstance, *errors.StatusError)
FetchVirtualMachineInstance by namespace and name
func (*SubresourceAPIApp) FetchVirtualMachineInstanceForVM ¶ added in v0.44.1
func (app *SubresourceAPIApp) FetchVirtualMachineInstanceForVM(namespace, name string) (*v1.VirtualMachineInstance, *errors.StatusError)
FetchVirtualMachineInstanceForVM by namespace and name
func (*SubresourceAPIApp) FilesystemList ¶ added in v0.28.0
func (app *SubresourceAPIApp) FilesystemList(request *restful.Request, response *restful.Response)
FilesystemList handles the subresource for providing guest filesystem list
func (*SubresourceAPIApp) FreezeVMIRequestHandler ¶ added in v0.44.1
func (app *SubresourceAPIApp) FreezeVMIRequestHandler(request *restful.Request, response *restful.Response)
func (*SubresourceAPIApp) GuestOSInfo ¶ added in v0.27.0
func (app *SubresourceAPIApp) GuestOSInfo(request *restful.Request, response *restful.Response)
GuestOSInfo handles the subresource for providing VM guest agent information
func (*SubresourceAPIApp) MemoryDumpVMRequestHandler ¶ added in v0.54.0
func (app *SubresourceAPIApp) MemoryDumpVMRequestHandler(request *restful.Request, response *restful.Response)
func (*SubresourceAPIApp) MigrateVMRequestHandler ¶ added in v0.21.0
func (app *SubresourceAPIApp) MigrateVMRequestHandler(request *restful.Request, response *restful.Response)
func (*SubresourceAPIApp) PauseVMIRequestHandler ¶ added in v0.24.0
func (app *SubresourceAPIApp) PauseVMIRequestHandler(request *restful.Request, response *restful.Response)
func (*SubresourceAPIApp) PortForwardRequestHandler ¶ added in v0.44.1
func (app *SubresourceAPIApp) PortForwardRequestHandler(fetcher vmiFetcher) restful.RouteFunction
func (*SubresourceAPIApp) RemoveMemoryDumpVMRequestHandler ¶ added in v0.54.0
func (app *SubresourceAPIApp) RemoveMemoryDumpVMRequestHandler(request *restful.Request, response *restful.Response)
func (*SubresourceAPIApp) RestartVMRequestHandler ¶ added in v0.11.0
func (app *SubresourceAPIApp) RestartVMRequestHandler(request *restful.Request, response *restful.Response)
func (*SubresourceAPIApp) SoftRebootVMIRequestHandler ¶ added in v0.48.0
func (app *SubresourceAPIApp) SoftRebootVMIRequestHandler(request *restful.Request, response *restful.Response)
func (*SubresourceAPIApp) StartClusterProfilerHandler ¶ added in v0.46.0
func (app *SubresourceAPIApp) StartClusterProfilerHandler(request *restful.Request, response *restful.Response)
func (*SubresourceAPIApp) StartVMRequestHandler ¶ added in v0.17.0
func (app *SubresourceAPIApp) StartVMRequestHandler(request *restful.Request, response *restful.Response)
func (*SubresourceAPIApp) StopClusterProfilerHandler ¶ added in v0.46.0
func (app *SubresourceAPIApp) StopClusterProfilerHandler(request *restful.Request, response *restful.Response)
func (*SubresourceAPIApp) StopVMRequestHandler ¶ added in v0.17.0
func (app *SubresourceAPIApp) StopVMRequestHandler(request *restful.Request, response *restful.Response)
func (*SubresourceAPIApp) USBRedirRequestHandler ¶ added in v0.44.1
func (app *SubresourceAPIApp) USBRedirRequestHandler(request *restful.Request, response *restful.Response)
func (*SubresourceAPIApp) UnfreezeVMIRequestHandler ¶ added in v0.44.1
func (app *SubresourceAPIApp) UnfreezeVMIRequestHandler(request *restful.Request, response *restful.Response)
func (*SubresourceAPIApp) UnpauseVMIRequestHandler ¶ added in v0.24.0
func (app *SubresourceAPIApp) UnpauseVMIRequestHandler(request *restful.Request, response *restful.Response)
func (*SubresourceAPIApp) UserList ¶ added in v0.28.0
func (app *SubresourceAPIApp) UserList(request *restful.Request, response *restful.Response)
UserList handles the subresource for providing VM guest user list
func (*SubresourceAPIApp) VMAddInterfaceRequestHandler ¶ added in v1.0.0
func (app *SubresourceAPIApp) VMAddInterfaceRequestHandler(request *restful.Request, response *restful.Response)
VMAddInterfaceRequestHandler handles the subresource for hot plugging a network interface.
func (*SubresourceAPIApp) VMAddVolumeRequestHandler ¶ added in v0.36.0
func (app *SubresourceAPIApp) VMAddVolumeRequestHandler(request *restful.Request, response *restful.Response)
VMAddVolumeRequestHandler handles the subresource for hot plugging a volume and disk.
func (*SubresourceAPIApp) VMIAddInterfaceRequestHandler ¶
func (app *SubresourceAPIApp) VMIAddInterfaceRequestHandler(request *restful.Request, response *restful.Response)
VMIAddInterfaceRequestHandler handles the subresource for hot plugging a network interface.
func (*SubresourceAPIApp) VMIAddVolumeRequestHandler ¶ added in v0.36.0
func (app *SubresourceAPIApp) VMIAddVolumeRequestHandler(request *restful.Request, response *restful.Response)
VMIAddVolumeRequestHandler handles the subresource for hot plugging a volume and disk.
func (*SubresourceAPIApp) VMIRemoveVolumeRequestHandler ¶ added in v0.36.0
func (app *SubresourceAPIApp) VMIRemoveVolumeRequestHandler(request *restful.Request, response *restful.Response)
VMIRemoveVolumeRequestHandler handles the subresource for hot plugging a volume and disk.
func (*SubresourceAPIApp) VMRemoveVolumeRequestHandler ¶ added in v0.36.0
func (app *SubresourceAPIApp) VMRemoveVolumeRequestHandler(request *restful.Request, response *restful.Response)
VMRemoveVolumeRequestHandler handles the subresource for hot plugging a volume and disk.
func (*SubresourceAPIApp) VNCRequestHandler ¶ added in v0.4.0
func (app *SubresourceAPIApp) VNCRequestHandler(request *restful.Request, response *restful.Response)
func (*SubresourceAPIApp) VNCScreenshotRequestHandler ¶ added in v0.58.0
func (app *SubresourceAPIApp) VNCScreenshotRequestHandler(request *restful.Request, response *restful.Response)
VNCScreenshotRequestHandler opens a websocket based VNC connection to virt-handler and creates a screenshot in PNG format which it returns to the caller. No websocket connection will be forwarded to the client. This is inspired by https://raw.githubusercontent.com/hexylena/vnc-screenshot/9f609b72518d6d6ab5149502a6be1dd3c5b015c8/vnc-screenshot.go.
func (*SubresourceAPIApp) VSOCKRequestHandler ¶ added in v0.59.0
func (app *SubresourceAPIApp) VSOCKRequestHandler(request *restful.Request, response *restful.Response)
type URLResolver ¶ added in v0.20.0
type URLResolver func(*v1.VirtualMachineInstance, kubecli.VirtHandlerConn) (string, error)
type VirtApiAuthorizor ¶ added in v0.4.0
type VirtApiAuthorizor interface { Authorize(req *restful.Request) (bool, string, error) AddUserHeaders(header []string) GetUserHeaders() []string AddGroupHeaders(header []string) GetGroupHeaders() []string AddExtraPrefixHeaders(header []string) GetExtraPrefixHeaders() []string }
func NewAuthorizor ¶ added in v0.4.0
func NewAuthorizor(rateLimiter flowcontrol.RateLimiter) (VirtApiAuthorizor, error)
func NewAuthorizorFromConfig ¶ added in v0.4.0
func NewAuthorizorFromConfig(config *restclient.Config) (VirtApiAuthorizor, error)