Documentation ¶
Index ¶
- Constants
- func DefaultClientConfig(flags *pflag.FlagSet) clientcmd.ClientConfig
- func GetConfig() (*restclient.Config, error)
- func GetKubevirtClientConfig() (*rest.Config, error)
- func RequestFromConfig(config *rest.Config, vm string, namespace string, resource string) (*http.Request, error)
- type BinaryReadWriter
- type KubevirtClient
- func GetKubevirtClient() (KubevirtClient, error)
- func GetKubevirtClientFromClientConfig(cmdConfig clientcmd.ClientConfig) (KubevirtClient, error)
- func GetKubevirtClientFromFlags(master string, kubeconfig string) (KubevirtClient, error)
- func GetKubevirtClientFromRESTConfig(config *rest.Config) (KubevirtClient, error)
- func GetKubevirtSubresourceClient() (KubevirtClient, error)
- func GetKubevirtSubresourceClientFromFlags(master string, kubeconfig string) (KubevirtClient, error)
- type MockKubevirtClient
- func (_m *MockKubevirtClient) Admissionregistration() v1beta1.AdmissionregistrationV1beta1Interface
- func (_m *MockKubevirtClient) AdmissionregistrationV1alpha1() v1alpha1.AdmissionregistrationV1alpha1Interface
- func (_m *MockKubevirtClient) AdmissionregistrationV1beta1() v1beta1.AdmissionregistrationV1beta1Interface
- func (_m *MockKubevirtClient) Apps() v10.AppsV1Interface
- func (_m *MockKubevirtClient) AppsV1() v10.AppsV1Interface
- func (_m *MockKubevirtClient) AppsV1beta1() v1beta10.AppsV1beta1Interface
- func (_m *MockKubevirtClient) AppsV1beta2() v1beta2.AppsV1beta2Interface
- func (_m *MockKubevirtClient) Authentication() v11.AuthenticationV1Interface
- func (_m *MockKubevirtClient) AuthenticationV1() v11.AuthenticationV1Interface
- func (_m *MockKubevirtClient) AuthenticationV1beta1() v1beta11.AuthenticationV1beta1Interface
- func (_m *MockKubevirtClient) Authorization() v12.AuthorizationV1Interface
- func (_m *MockKubevirtClient) AuthorizationV1() v12.AuthorizationV1Interface
- func (_m *MockKubevirtClient) AuthorizationV1beta1() v1beta12.AuthorizationV1beta1Interface
- func (_m *MockKubevirtClient) Autoscaling() v13.AutoscalingV1Interface
- func (_m *MockKubevirtClient) AutoscalingV1() v13.AutoscalingV1Interface
- func (_m *MockKubevirtClient) AutoscalingV2beta1() v2beta1.AutoscalingV2beta1Interface
- func (_m *MockKubevirtClient) Batch() v14.BatchV1Interface
- func (_m *MockKubevirtClient) BatchV1() v14.BatchV1Interface
- func (_m *MockKubevirtClient) BatchV1beta1() v1beta13.BatchV1beta1Interface
- func (_m *MockKubevirtClient) BatchV2alpha1() v2alpha1.BatchV2alpha1Interface
- func (_m *MockKubevirtClient) Certificates() v1beta14.CertificatesV1beta1Interface
- func (_m *MockKubevirtClient) CertificatesV1beta1() v1beta14.CertificatesV1beta1Interface
- func (_m *MockKubevirtClient) Core() v15.CoreV1Interface
- func (_m *MockKubevirtClient) CoreV1() v15.CoreV1Interface
- func (_m *MockKubevirtClient) Discovery() discovery.DiscoveryInterface
- func (_m *MockKubevirtClient) EXPECT() *_MockKubevirtClientRecorder
- func (_m *MockKubevirtClient) Events() v1beta15.EventsV1beta1Interface
- func (_m *MockKubevirtClient) EventsV1beta1() v1beta15.EventsV1beta1Interface
- func (_m *MockKubevirtClient) Extensions() v1beta16.ExtensionsV1beta1Interface
- func (_m *MockKubevirtClient) ExtensionsV1beta1() v1beta16.ExtensionsV1beta1Interface
- func (_m *MockKubevirtClient) Networking() v16.NetworkingV1Interface
- func (_m *MockKubevirtClient) NetworkingV1() v16.NetworkingV1Interface
- func (_m *MockKubevirtClient) OfflineVirtualMachine(namespace string) OfflineVirtualMachineInterface
- func (_m *MockKubevirtClient) Policy() v1beta17.PolicyV1beta1Interface
- func (_m *MockKubevirtClient) PolicyV1beta1() v1beta17.PolicyV1beta1Interface
- func (_m *MockKubevirtClient) Rbac() v17.RbacV1Interface
- func (_m *MockKubevirtClient) RbacV1() v17.RbacV1Interface
- func (_m *MockKubevirtClient) RbacV1alpha1() v1alpha10.RbacV1alpha1Interface
- func (_m *MockKubevirtClient) RbacV1beta1() v1beta18.RbacV1beta1Interface
- func (_m *MockKubevirtClient) ReplicaSet(namespace string) ReplicaSetInterface
- func (_m *MockKubevirtClient) RestClient() *rest.RESTClient
- func (_m *MockKubevirtClient) Scheduling() v1alpha11.SchedulingV1alpha1Interface
- func (_m *MockKubevirtClient) SchedulingV1alpha1() v1alpha11.SchedulingV1alpha1Interface
- func (_m *MockKubevirtClient) Settings() v1alpha12.SettingsV1alpha1Interface
- func (_m *MockKubevirtClient) SettingsV1alpha1() v1alpha12.SettingsV1alpha1Interface
- func (_m *MockKubevirtClient) Storage() v18.StorageV1Interface
- func (_m *MockKubevirtClient) StorageV1() v18.StorageV1Interface
- func (_m *MockKubevirtClient) StorageV1alpha1() v1alpha13.StorageV1alpha1Interface
- func (_m *MockKubevirtClient) StorageV1beta1() v1beta19.StorageV1beta1Interface
- func (_m *MockKubevirtClient) VM(namespace string) VMInterface
- type MockOfflineVirtualMachineInterface
- func (_m *MockOfflineVirtualMachineInterface) Create(_param0 *v19.OfflineVirtualMachine) (*v19.OfflineVirtualMachine, error)
- func (_m *MockOfflineVirtualMachineInterface) Delete(name string, options *v1.DeleteOptions) error
- func (_m *MockOfflineVirtualMachineInterface) EXPECT() *_MockOfflineVirtualMachineInterfaceRecorder
- func (_m *MockOfflineVirtualMachineInterface) Get(name string, options *v1.GetOptions) (*v19.OfflineVirtualMachine, error)
- func (_m *MockOfflineVirtualMachineInterface) List(opts *v1.ListOptions) (*v19.OfflineVirtualMachineList, error)
- func (_m *MockOfflineVirtualMachineInterface) Update(_param0 *v19.OfflineVirtualMachine) (*v19.OfflineVirtualMachine, error)
- type MockReplicaSetInterface
- func (_m *MockReplicaSetInterface) Create(_param0 *v19.VirtualMachineReplicaSet) (*v19.VirtualMachineReplicaSet, error)
- func (_m *MockReplicaSetInterface) Delete(name string, options *v1.DeleteOptions) error
- func (_m *MockReplicaSetInterface) EXPECT() *_MockReplicaSetInterfaceRecorder
- func (_m *MockReplicaSetInterface) Get(name string, options v1.GetOptions) (*v19.VirtualMachineReplicaSet, error)
- func (_m *MockReplicaSetInterface) List(opts v1.ListOptions) (*v19.VirtualMachineReplicaSetList, error)
- func (_m *MockReplicaSetInterface) Update(_param0 *v19.VirtualMachineReplicaSet) (*v19.VirtualMachineReplicaSet, error)
- type MockVMInterface
- func (_m *MockVMInterface) Create(_param0 *v19.VirtualMachine) (*v19.VirtualMachine, error)
- func (_m *MockVMInterface) Delete(name string, options *v1.DeleteOptions) error
- func (_m *MockVMInterface) EXPECT() *_MockVMInterfaceRecorder
- func (_m *MockVMInterface) Get(name string, options v1.GetOptions) (*v19.VirtualMachine, error)
- func (_m *MockVMInterface) List(opts v1.ListOptions) (*v19.VirtualMachineList, error)
- func (_m *MockVMInterface) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v19.VirtualMachine, error)
- func (_m *MockVMInterface) SerialConsole(name string, in io.Reader, out io.Writer) error
- func (_m *MockVMInterface) Update(_param0 *v19.VirtualMachine) (*v19.VirtualMachine, error)
- func (_m *MockVMInterface) VNC(name string, in io.Reader, out io.Writer) error
- type MockVMPresetInterface
- func (_m *MockVMPresetInterface) Create(_param0 *v19.VirtualMachinePreset) (*v19.VirtualMachinePreset, error)
- func (_m *MockVMPresetInterface) Delete(name string, options *v1.DeleteOptions) error
- func (_m *MockVMPresetInterface) EXPECT() *_MockVMPresetInterfaceRecorder
- func (_m *MockVMPresetInterface) Get(name string, options v1.GetOptions) (*v19.VirtualMachinePreset, error)
- func (_m *MockVMPresetInterface) List(opts v1.ListOptions) (*v19.VirtualMachinePresetList, error)
- func (_m *MockVMPresetInterface) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v19.VirtualMachinePreset, error)
- func (_m *MockVMPresetInterface) Update(_param0 *v19.VirtualMachinePreset) (*v19.VirtualMachinePreset, error)
- type OfflineVirtualMachineInterface
- type ReplicaSetInterface
- type RoundTripCallback
- type VMInterface
- type VMPresetInterface
- type VirtHandlerClient
- type VirtHandlerConn
- type WebsocketRoundTripper
Constants ¶
const (
WebsocketMessageBufferSize = 10240
)
Variables ¶
This section is empty.
Functions ¶
func DefaultClientConfig ¶ added in v0.4.0
func DefaultClientConfig(flags *pflag.FlagSet) clientcmd.ClientConfig
DefaultClientConfig creates a clientcmd.ClientConfig with the following hierarchy:
Use the kubeconfig builder. The number of merges and overrides here gets a little crazy. Stay with me.
Merge the kubeconfig itself. This is done with the following hierarchy rules:
CommandLineLocation - this parsed from the command line, so it must be late bound. If you specify this, then no other kubeconfig files are merged. This file must exist.
If $KUBECONFIG is set, then it is treated as a list of files that should be merged.
HomeDirectoryLocation Empty filenames are ignored. Files with non-deserializable content produced errors. The first file to set a particular value or map key wins and the value or map key is never changed. This means that the first file to set CurrentContext will have its context preserved. It also means that if two files specify a "red-user", only values from the first file's red-user are used. Even non-conflicting entries from the second file's "red-user" are discarded.
Determine the context to use based on the first hit in this chain
command line argument - again, parsed from the command line, so it must be late bound
CurrentContext from the merged kubeconfig file
Empty is allowed at this stage
Determine the cluster info and auth info to use. At this point, we may or may not have a context. They are built based on the first hit in this chain. (run it twice, once for auth, once for cluster)
command line argument
If context is present, then use the context value
Empty is allowed
Determine the actual cluster info to use. At this point, we may or may not have a cluster info. Build each piece of the cluster info based on the chain:
command line argument
If cluster info is present and a value for the attribute is present, use it.
If you don't have a server location, bail.
Auth info is build using the same rules as cluster info, EXCEPT that you can only have one authentication technique per auth info. The following conditions result in an error:
If there are two conflicting techniques specified from the command line, fail.
If the command line does not specify one, and the auth info has conflicting techniques, fail.
If the command line specifies one and the auth info specifies another, honor the command line technique.
Use default values and potentially prompt for auth information
However, if it appears that we're running in a kubernetes cluster container environment, then run with the auth info kubernetes mounted for us. Specifically: The env vars KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT are set, and the file /var/run/secrets/kubernetes.io/serviceaccount/token exists and is not a directory.
Initially copied from https://github.com/kubernetes/kubernetes/blob/09f321c80bfc9bca63a5530b56d7a1a3ba80ba9b/pkg/kubectl/cmd/util/factory_client_access.go#L174
func GetConfig ¶ added in v0.4.0
func GetConfig() (*restclient.Config, error)
func GetKubevirtClientConfig ¶
Types ¶
type BinaryReadWriter ¶ added in v0.4.0
type KubevirtClient ¶
type KubevirtClient interface { VM(namespace string) VMInterface ReplicaSet(namespace string) ReplicaSetInterface OfflineVirtualMachine(namespace string) OfflineVirtualMachineInterface RestClient() *rest.RESTClient kubernetes.Interface }
func GetKubevirtClient ¶
func GetKubevirtClient() (KubevirtClient, error)
func GetKubevirtClientFromClientConfig ¶ added in v0.4.0
func GetKubevirtClientFromClientConfig(cmdConfig clientcmd.ClientConfig) (KubevirtClient, error)
func GetKubevirtClientFromFlags ¶
func GetKubevirtClientFromFlags(master string, kubeconfig string) (KubevirtClient, error)
func GetKubevirtClientFromRESTConfig ¶ added in v0.4.0
func GetKubevirtClientFromRESTConfig(config *rest.Config) (KubevirtClient, error)
func GetKubevirtSubresourceClient ¶ added in v0.4.0
func GetKubevirtSubresourceClient() (KubevirtClient, error)
func GetKubevirtSubresourceClientFromFlags ¶ added in v0.4.0
func GetKubevirtSubresourceClientFromFlags(master string, kubeconfig string) (KubevirtClient, error)
type MockKubevirtClient ¶
type MockKubevirtClient struct {
// contains filtered or unexported fields
}
Mock of KubevirtClient interface
func NewMockKubevirtClient ¶
func NewMockKubevirtClient(ctrl *gomock.Controller) *MockKubevirtClient
func (*MockKubevirtClient) Admissionregistration ¶
func (_m *MockKubevirtClient) Admissionregistration() v1beta1.AdmissionregistrationV1beta1Interface
func (*MockKubevirtClient) AdmissionregistrationV1alpha1 ¶
func (_m *MockKubevirtClient) AdmissionregistrationV1alpha1() v1alpha1.AdmissionregistrationV1alpha1Interface
func (*MockKubevirtClient) AdmissionregistrationV1beta1 ¶ added in v0.4.0
func (_m *MockKubevirtClient) AdmissionregistrationV1beta1() v1beta1.AdmissionregistrationV1beta1Interface
func (*MockKubevirtClient) Apps ¶
func (_m *MockKubevirtClient) Apps() v10.AppsV1Interface
func (*MockKubevirtClient) AppsV1 ¶ added in v0.4.0
func (_m *MockKubevirtClient) AppsV1() v10.AppsV1Interface
func (*MockKubevirtClient) AppsV1beta1 ¶
func (_m *MockKubevirtClient) AppsV1beta1() v1beta10.AppsV1beta1Interface
func (*MockKubevirtClient) AppsV1beta2 ¶
func (_m *MockKubevirtClient) AppsV1beta2() v1beta2.AppsV1beta2Interface
func (*MockKubevirtClient) Authentication ¶
func (_m *MockKubevirtClient) Authentication() v11.AuthenticationV1Interface
func (*MockKubevirtClient) AuthenticationV1 ¶
func (_m *MockKubevirtClient) AuthenticationV1() v11.AuthenticationV1Interface
func (*MockKubevirtClient) AuthenticationV1beta1 ¶
func (_m *MockKubevirtClient) AuthenticationV1beta1() v1beta11.AuthenticationV1beta1Interface
func (*MockKubevirtClient) Authorization ¶
func (_m *MockKubevirtClient) Authorization() v12.AuthorizationV1Interface
func (*MockKubevirtClient) AuthorizationV1 ¶
func (_m *MockKubevirtClient) AuthorizationV1() v12.AuthorizationV1Interface
func (*MockKubevirtClient) AuthorizationV1beta1 ¶
func (_m *MockKubevirtClient) AuthorizationV1beta1() v1beta12.AuthorizationV1beta1Interface
func (*MockKubevirtClient) Autoscaling ¶
func (_m *MockKubevirtClient) Autoscaling() v13.AutoscalingV1Interface
func (*MockKubevirtClient) AutoscalingV1 ¶
func (_m *MockKubevirtClient) AutoscalingV1() v13.AutoscalingV1Interface
func (*MockKubevirtClient) AutoscalingV2beta1 ¶
func (_m *MockKubevirtClient) AutoscalingV2beta1() v2beta1.AutoscalingV2beta1Interface
func (*MockKubevirtClient) Batch ¶
func (_m *MockKubevirtClient) Batch() v14.BatchV1Interface
func (*MockKubevirtClient) BatchV1 ¶
func (_m *MockKubevirtClient) BatchV1() v14.BatchV1Interface
func (*MockKubevirtClient) BatchV1beta1 ¶
func (_m *MockKubevirtClient) BatchV1beta1() v1beta13.BatchV1beta1Interface
func (*MockKubevirtClient) BatchV2alpha1 ¶
func (_m *MockKubevirtClient) BatchV2alpha1() v2alpha1.BatchV2alpha1Interface
func (*MockKubevirtClient) Certificates ¶
func (_m *MockKubevirtClient) Certificates() v1beta14.CertificatesV1beta1Interface
func (*MockKubevirtClient) CertificatesV1beta1 ¶
func (_m *MockKubevirtClient) CertificatesV1beta1() v1beta14.CertificatesV1beta1Interface
func (*MockKubevirtClient) Core ¶
func (_m *MockKubevirtClient) Core() v15.CoreV1Interface
func (*MockKubevirtClient) CoreV1 ¶
func (_m *MockKubevirtClient) CoreV1() v15.CoreV1Interface
func (*MockKubevirtClient) Discovery ¶
func (_m *MockKubevirtClient) Discovery() discovery.DiscoveryInterface
func (*MockKubevirtClient) EXPECT ¶
func (_m *MockKubevirtClient) EXPECT() *_MockKubevirtClientRecorder
func (*MockKubevirtClient) Events ¶ added in v0.4.0
func (_m *MockKubevirtClient) Events() v1beta15.EventsV1beta1Interface
func (*MockKubevirtClient) EventsV1beta1 ¶ added in v0.4.0
func (_m *MockKubevirtClient) EventsV1beta1() v1beta15.EventsV1beta1Interface
func (*MockKubevirtClient) Extensions ¶
func (_m *MockKubevirtClient) Extensions() v1beta16.ExtensionsV1beta1Interface
func (*MockKubevirtClient) ExtensionsV1beta1 ¶
func (_m *MockKubevirtClient) ExtensionsV1beta1() v1beta16.ExtensionsV1beta1Interface
func (*MockKubevirtClient) Networking ¶
func (_m *MockKubevirtClient) Networking() v16.NetworkingV1Interface
func (*MockKubevirtClient) NetworkingV1 ¶
func (_m *MockKubevirtClient) NetworkingV1() v16.NetworkingV1Interface
func (*MockKubevirtClient) OfflineVirtualMachine ¶
func (_m *MockKubevirtClient) OfflineVirtualMachine(namespace string) OfflineVirtualMachineInterface
func (*MockKubevirtClient) Policy ¶
func (_m *MockKubevirtClient) Policy() v1beta17.PolicyV1beta1Interface
func (*MockKubevirtClient) PolicyV1beta1 ¶
func (_m *MockKubevirtClient) PolicyV1beta1() v1beta17.PolicyV1beta1Interface
func (*MockKubevirtClient) Rbac ¶
func (_m *MockKubevirtClient) Rbac() v17.RbacV1Interface
func (*MockKubevirtClient) RbacV1 ¶
func (_m *MockKubevirtClient) RbacV1() v17.RbacV1Interface
func (*MockKubevirtClient) RbacV1alpha1 ¶
func (_m *MockKubevirtClient) RbacV1alpha1() v1alpha10.RbacV1alpha1Interface
func (*MockKubevirtClient) RbacV1beta1 ¶
func (_m *MockKubevirtClient) RbacV1beta1() v1beta18.RbacV1beta1Interface
func (*MockKubevirtClient) ReplicaSet ¶
func (_m *MockKubevirtClient) ReplicaSet(namespace string) ReplicaSetInterface
func (*MockKubevirtClient) RestClient ¶
func (_m *MockKubevirtClient) RestClient() *rest.RESTClient
func (*MockKubevirtClient) Scheduling ¶
func (_m *MockKubevirtClient) Scheduling() v1alpha11.SchedulingV1alpha1Interface
func (*MockKubevirtClient) SchedulingV1alpha1 ¶
func (_m *MockKubevirtClient) SchedulingV1alpha1() v1alpha11.SchedulingV1alpha1Interface
func (*MockKubevirtClient) Settings ¶
func (_m *MockKubevirtClient) Settings() v1alpha12.SettingsV1alpha1Interface
func (*MockKubevirtClient) SettingsV1alpha1 ¶
func (_m *MockKubevirtClient) SettingsV1alpha1() v1alpha12.SettingsV1alpha1Interface
func (*MockKubevirtClient) Storage ¶
func (_m *MockKubevirtClient) Storage() v18.StorageV1Interface
func (*MockKubevirtClient) StorageV1 ¶
func (_m *MockKubevirtClient) StorageV1() v18.StorageV1Interface
func (*MockKubevirtClient) StorageV1alpha1 ¶ added in v0.4.0
func (_m *MockKubevirtClient) StorageV1alpha1() v1alpha13.StorageV1alpha1Interface
func (*MockKubevirtClient) StorageV1beta1 ¶
func (_m *MockKubevirtClient) StorageV1beta1() v1beta19.StorageV1beta1Interface
func (*MockKubevirtClient) VM ¶
func (_m *MockKubevirtClient) VM(namespace string) VMInterface
type MockOfflineVirtualMachineInterface ¶
type MockOfflineVirtualMachineInterface struct {
// contains filtered or unexported fields
}
Mock of OfflineVirtualMachineInterface interface
func NewMockOfflineVirtualMachineInterface ¶
func NewMockOfflineVirtualMachineInterface(ctrl *gomock.Controller) *MockOfflineVirtualMachineInterface
func (*MockOfflineVirtualMachineInterface) Create ¶
func (_m *MockOfflineVirtualMachineInterface) Create(_param0 *v19.OfflineVirtualMachine) (*v19.OfflineVirtualMachine, error)
func (*MockOfflineVirtualMachineInterface) Delete ¶
func (_m *MockOfflineVirtualMachineInterface) Delete(name string, options *v1.DeleteOptions) error
func (*MockOfflineVirtualMachineInterface) EXPECT ¶
func (_m *MockOfflineVirtualMachineInterface) EXPECT() *_MockOfflineVirtualMachineInterfaceRecorder
func (*MockOfflineVirtualMachineInterface) Get ¶
func (_m *MockOfflineVirtualMachineInterface) Get(name string, options *v1.GetOptions) (*v19.OfflineVirtualMachine, error)
func (*MockOfflineVirtualMachineInterface) List ¶
func (_m *MockOfflineVirtualMachineInterface) List(opts *v1.ListOptions) (*v19.OfflineVirtualMachineList, error)
func (*MockOfflineVirtualMachineInterface) Update ¶
func (_m *MockOfflineVirtualMachineInterface) Update(_param0 *v19.OfflineVirtualMachine) (*v19.OfflineVirtualMachine, error)
type MockReplicaSetInterface ¶
type MockReplicaSetInterface struct {
// contains filtered or unexported fields
}
Mock of ReplicaSetInterface interface
func NewMockReplicaSetInterface ¶
func NewMockReplicaSetInterface(ctrl *gomock.Controller) *MockReplicaSetInterface
func (*MockReplicaSetInterface) Create ¶
func (_m *MockReplicaSetInterface) Create(_param0 *v19.VirtualMachineReplicaSet) (*v19.VirtualMachineReplicaSet, error)
func (*MockReplicaSetInterface) Delete ¶
func (_m *MockReplicaSetInterface) Delete(name string, options *v1.DeleteOptions) error
func (*MockReplicaSetInterface) EXPECT ¶
func (_m *MockReplicaSetInterface) EXPECT() *_MockReplicaSetInterfaceRecorder
func (*MockReplicaSetInterface) Get ¶
func (_m *MockReplicaSetInterface) Get(name string, options v1.GetOptions) (*v19.VirtualMachineReplicaSet, error)
func (*MockReplicaSetInterface) List ¶
func (_m *MockReplicaSetInterface) List(opts v1.ListOptions) (*v19.VirtualMachineReplicaSetList, error)
func (*MockReplicaSetInterface) Update ¶
func (_m *MockReplicaSetInterface) Update(_param0 *v19.VirtualMachineReplicaSet) (*v19.VirtualMachineReplicaSet, error)
type MockVMInterface ¶
type MockVMInterface struct {
// contains filtered or unexported fields
}
Mock of VMInterface interface
func NewMockVMInterface ¶
func NewMockVMInterface(ctrl *gomock.Controller) *MockVMInterface
func (*MockVMInterface) Create ¶
func (_m *MockVMInterface) Create(_param0 *v19.VirtualMachine) (*v19.VirtualMachine, error)
func (*MockVMInterface) Delete ¶
func (_m *MockVMInterface) Delete(name string, options *v1.DeleteOptions) error
func (*MockVMInterface) EXPECT ¶
func (_m *MockVMInterface) EXPECT() *_MockVMInterfaceRecorder
func (*MockVMInterface) Get ¶
func (_m *MockVMInterface) Get(name string, options v1.GetOptions) (*v19.VirtualMachine, error)
func (*MockVMInterface) List ¶
func (_m *MockVMInterface) List(opts v1.ListOptions) (*v19.VirtualMachineList, error)
func (*MockVMInterface) Patch ¶
func (_m *MockVMInterface) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v19.VirtualMachine, error)
func (*MockVMInterface) SerialConsole ¶
func (*MockVMInterface) Update ¶
func (_m *MockVMInterface) Update(_param0 *v19.VirtualMachine) (*v19.VirtualMachine, error)
type MockVMPresetInterface ¶
type MockVMPresetInterface struct {
// contains filtered or unexported fields
}
Mock of VMPresetInterface interface
func NewMockVMPresetInterface ¶
func NewMockVMPresetInterface(ctrl *gomock.Controller) *MockVMPresetInterface
func (*MockVMPresetInterface) Create ¶
func (_m *MockVMPresetInterface) Create(_param0 *v19.VirtualMachinePreset) (*v19.VirtualMachinePreset, error)
func (*MockVMPresetInterface) Delete ¶
func (_m *MockVMPresetInterface) Delete(name string, options *v1.DeleteOptions) error
func (*MockVMPresetInterface) EXPECT ¶
func (_m *MockVMPresetInterface) EXPECT() *_MockVMPresetInterfaceRecorder
func (*MockVMPresetInterface) Get ¶
func (_m *MockVMPresetInterface) Get(name string, options v1.GetOptions) (*v19.VirtualMachinePreset, error)
func (*MockVMPresetInterface) List ¶
func (_m *MockVMPresetInterface) List(opts v1.ListOptions) (*v19.VirtualMachinePresetList, error)
func (*MockVMPresetInterface) Patch ¶
func (_m *MockVMPresetInterface) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v19.VirtualMachinePreset, error)
func (*MockVMPresetInterface) Update ¶
func (_m *MockVMPresetInterface) Update(_param0 *v19.VirtualMachinePreset) (*v19.VirtualMachinePreset, error)
type OfflineVirtualMachineInterface ¶
type OfflineVirtualMachineInterface interface { Get(name string, options *k8smetav1.GetOptions) (*v1.OfflineVirtualMachine, error) List(opts *k8smetav1.ListOptions) (*v1.OfflineVirtualMachineList, error) Create(*v1.OfflineVirtualMachine) (*v1.OfflineVirtualMachine, error) Update(*v1.OfflineVirtualMachine) (*v1.OfflineVirtualMachine, error) Delete(name string, options *k8smetav1.DeleteOptions) error }
OfflineVirtualMachineInterface provides convenience methods to work with offline virtual machines inside the cluster
type ReplicaSetInterface ¶
type ReplicaSetInterface interface { Get(name string, options k8smetav1.GetOptions) (*v1.VirtualMachineReplicaSet, error) List(opts k8smetav1.ListOptions) (*v1.VirtualMachineReplicaSetList, error) Create(*v1.VirtualMachineReplicaSet) (*v1.VirtualMachineReplicaSet, error) Update(*v1.VirtualMachineReplicaSet) (*v1.VirtualMachineReplicaSet, error) Delete(name string, options *k8smetav1.DeleteOptions) error }
type RoundTripCallback ¶ added in v0.4.0
type VMInterface ¶
type VMInterface interface { Get(name string, options k8smetav1.GetOptions) (*v1.VirtualMachine, error) List(opts k8smetav1.ListOptions) (*v1.VirtualMachineList, error) Create(*v1.VirtualMachine) (*v1.VirtualMachine, error) Update(*v1.VirtualMachine) (*v1.VirtualMachine, error) Delete(name string, options *k8smetav1.DeleteOptions) error Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.VirtualMachine, err error) SerialConsole(name string, in io.Reader, out io.Writer) error VNC(name string, in io.Reader, out io.Writer) error }
type VMPresetInterface ¶
type VMPresetInterface interface { Get(name string, options k8smetav1.GetOptions) (*v1.VirtualMachinePreset, error) List(opts k8smetav1.ListOptions) (*v1.VirtualMachinePresetList, error) Create(*v1.VirtualMachinePreset) (*v1.VirtualMachinePreset, error) Update(*v1.VirtualMachinePreset) (*v1.VirtualMachinePreset, error) Delete(name string, options *k8smetav1.DeleteOptions) error Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.VirtualMachinePreset, err error) }
type VirtHandlerClient ¶
type VirtHandlerClient interface {
ForNode(nodeName string) VirtHandlerConn
}
func NewVirtHandlerClient ¶
func NewVirtHandlerClient(client KubevirtClient) VirtHandlerClient
type VirtHandlerConn ¶
type WebsocketRoundTripper ¶ added in v0.4.0
type WebsocketRoundTripper struct { Dialer *websocket.Dialer Do RoundTripCallback }