Documentation ¶
Index ¶
- Constants
- Variables
- func Copy(dst *websocket.Conn, src *websocket.Conn) (int64, error)
- func CopyFrom(dst io.Writer, src *websocket.Conn) (written int64, err error)
- func CopyTo(dst *websocket.Conn, src io.Reader) (written int64, err error)
- func DefaultClientConfig(flags *pflag.FlagSet) clientcmd.ClientConfig
- func Dial(address string, tlsConfig *tls.Config) (*websocket.Conn, *http.Response, error)
- func FlagSet() *flag.FlagSet
- func GetConfig() (*restclient.Config, error)
- func GetKubevirtClientConfig() (*rest.Config, error)
- func Init()
- func NewKubeVirtList(kubevirts ...v1.KubeVirt) *v1.KubeVirtList
- func NewMigrationList(migrations ...v1.VirtualMachineInstanceMigration) *v1.VirtualMachineInstanceMigrationList
- func NewMinimalKubeVirt(name string) *v1.KubeVirt
- func NewMinimalMigration(name string) *v1.VirtualMachineInstanceMigration
- func NewMinimalVM(name string) *v1.VirtualMachine
- func NewMinimalVirtualMachineInstancePreset(name string) *v1.VirtualMachineInstancePreset
- func NewMinimalVirtualMachineInstanceReplicaSet(name string) *v1.VirtualMachineInstanceReplicaSet
- func NewUpgrader() *websocket.Upgrader
- func NewVMList(vms ...v1.VirtualMachine) *v1.VirtualMachineList
- func NewVirtualMachineInstancePresetList(rss ...v1.VirtualMachineInstancePreset) *v1.VirtualMachineInstancePresetList
- func NewVirtualMachineInstanceReplicaSetList(rss ...v1.VirtualMachineInstanceReplicaSet) *v1.VirtualMachineInstanceReplicaSetList
- func RequestFromConfig(config *rest.Config, vmi string, namespace string, resource string) (*http.Request, error)
- type AsyncSubresourceError
- type KubeVirtInterface
- type KubevirtClient
- func GetInvalidKubevirtClientFromClientConfig(cmdConfig clientcmd.ClientConfig) (KubevirtClient, error)
- func GetKubevirtClient() (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)
- func GetMockKubevirtClientFromClientConfig(cmdConfig clientcmd.ClientConfig) (KubevirtClient, error)
- type MockKubeVirtInterface
- func (_m *MockKubeVirtInterface) Create(instance *v117.KubeVirt) (*v117.KubeVirt, error)
- func (_m *MockKubeVirtInterface) Delete(name string, options *v11.DeleteOptions) error
- func (_m *MockKubeVirtInterface) EXPECT() *_MockKubeVirtInterfaceRecorder
- func (_m *MockKubeVirtInterface) Get(name string, options *v11.GetOptions) (*v117.KubeVirt, error)
- func (_m *MockKubeVirtInterface) List(opts *v11.ListOptions) (*v117.KubeVirtList, error)
- func (_m *MockKubeVirtInterface) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v117.KubeVirt, error)
- func (_m *MockKubeVirtInterface) PatchStatus(name string, pt types.PatchType, data []byte) (*v117.KubeVirt, error)
- func (_m *MockKubeVirtInterface) Update(_param0 *v117.KubeVirt) (*v117.KubeVirt, error)
- func (_m *MockKubeVirtInterface) UpdateStatus(_param0 *v117.KubeVirt) (*v117.KubeVirt, error)
- type MockKubevirtClient
- func (_m *MockKubevirtClient) AdmissionregistrationV1() v12.AdmissionregistrationV1Interface
- func (_m *MockKubevirtClient) AdmissionregistrationV1beta1() v1beta1.AdmissionregistrationV1beta1Interface
- func (_m *MockKubevirtClient) AppsV1() v13.AppsV1Interface
- func (_m *MockKubevirtClient) AppsV1beta1() v1beta10.AppsV1beta1Interface
- func (_m *MockKubevirtClient) AppsV1beta2() v1beta2.AppsV1beta2Interface
- func (_m *MockKubevirtClient) AuthenticationV1() v14.AuthenticationV1Interface
- func (_m *MockKubevirtClient) AuthenticationV1beta1() v1beta11.AuthenticationV1beta1Interface
- func (_m *MockKubevirtClient) AuthorizationV1() v15.AuthorizationV1Interface
- func (_m *MockKubevirtClient) AuthorizationV1beta1() v1beta12.AuthorizationV1beta1Interface
- func (_m *MockKubevirtClient) AutoscalingV1() v16.AutoscalingV1Interface
- func (_m *MockKubevirtClient) AutoscalingV2beta1() v2beta1.AutoscalingV2beta1Interface
- func (_m *MockKubevirtClient) AutoscalingV2beta2() v2beta2.AutoscalingV2beta2Interface
- func (_m *MockKubevirtClient) BatchV1() v17.BatchV1Interface
- func (_m *MockKubevirtClient) BatchV1beta1() v1beta13.BatchV1beta1Interface
- func (_m *MockKubevirtClient) BatchV2alpha1() v2alpha1.BatchV2alpha1Interface
- func (_m *MockKubevirtClient) CdiClient() versioned.Interface
- func (_m *MockKubevirtClient) CertificatesV1() v18.CertificatesV1Interface
- func (_m *MockKubevirtClient) CertificatesV1beta1() v1beta14.CertificatesV1beta1Interface
- func (_m *MockKubevirtClient) Config() *rest.Config
- func (_m *MockKubevirtClient) CoordinationV1() v19.CoordinationV1Interface
- func (_m *MockKubevirtClient) CoordinationV1beta1() v1beta15.CoordinationV1beta1Interface
- func (_m *MockKubevirtClient) CoreV1() v110.CoreV1Interface
- func (_m *MockKubevirtClient) Discovery() discovery.DiscoveryInterface
- func (_m *MockKubevirtClient) DiscoveryClient() discovery.DiscoveryInterface
- func (_m *MockKubevirtClient) DiscoveryV1alpha1() v1alpha10.DiscoveryV1alpha1Interface
- func (_m *MockKubevirtClient) DiscoveryV1beta1() v1beta16.DiscoveryV1beta1Interface
- func (_m *MockKubevirtClient) DynamicClient() dynamic.Interface
- func (_m *MockKubevirtClient) EXPECT() *_MockKubevirtClientRecorder
- func (_m *MockKubevirtClient) EventsV1() v111.EventsV1Interface
- func (_m *MockKubevirtClient) EventsV1beta1() v1beta17.EventsV1beta1Interface
- func (_m *MockKubevirtClient) ExtensionsClient() clientset.Interface
- func (_m *MockKubevirtClient) ExtensionsV1beta1() v1beta18.ExtensionsV1beta1Interface
- func (_m *MockKubevirtClient) FlowcontrolV1alpha1() v1alpha11.FlowcontrolV1alpha1Interface
- func (_m *MockKubevirtClient) FlowcontrolV1beta1() v1beta19.FlowcontrolV1beta1Interface
- func (_m *MockKubevirtClient) GeneratedKubeVirtClient() versioned1.Interface
- func (_m *MockKubevirtClient) InternalV1alpha1() v1alpha1.InternalV1alpha1Interface
- func (_m *MockKubevirtClient) KubeVirt(namespace string) KubeVirtInterface
- func (_m *MockKubevirtClient) KubernetesSnapshotClient() versioned0.Interface
- func (_m *MockKubevirtClient) NetworkClient() versioned2.Interface
- func (_m *MockKubevirtClient) NetworkingV1() v112.NetworkingV1Interface
- func (_m *MockKubevirtClient) NetworkingV1beta1() v1beta110.NetworkingV1beta1Interface
- func (_m *MockKubevirtClient) NodeV1() v113.NodeV1Interface
- func (_m *MockKubevirtClient) NodeV1alpha1() v1alpha12.NodeV1alpha1Interface
- func (_m *MockKubevirtClient) NodeV1beta1() v1beta111.NodeV1beta1Interface
- func (_m *MockKubevirtClient) PolicyV1beta1() v1beta112.PolicyV1beta1Interface
- func (_m *MockKubevirtClient) PrometheusClient() versioned3.Interface
- func (_m *MockKubevirtClient) RbacV1() v114.RbacV1Interface
- func (_m *MockKubevirtClient) RbacV1alpha1() v1alpha13.RbacV1alpha1Interface
- func (_m *MockKubevirtClient) RbacV1beta1() v1beta113.RbacV1beta1Interface
- func (_m *MockKubevirtClient) ReplicaSet(namespace string) ReplicaSetInterface
- func (_m *MockKubevirtClient) RestClient() *rest.RESTClient
- func (_m *MockKubevirtClient) SchedulingV1() v115.SchedulingV1Interface
- func (_m *MockKubevirtClient) SchedulingV1alpha1() v1alpha14.SchedulingV1alpha1Interface
- func (_m *MockKubevirtClient) SchedulingV1beta1() v1beta114.SchedulingV1beta1Interface
- func (_m *MockKubevirtClient) SecClient() v1.SecurityV1Interface
- func (_m *MockKubevirtClient) ServerVersion() *ServerVersion
- func (_m *MockKubevirtClient) StorageV1() v116.StorageV1Interface
- func (_m *MockKubevirtClient) StorageV1alpha1() v1alpha15.StorageV1alpha1Interface
- func (_m *MockKubevirtClient) StorageV1beta1() v1beta115.StorageV1beta1Interface
- func (_m *MockKubevirtClient) VirtualMachine(namespace string) VirtualMachineInterface
- func (_m *MockKubevirtClient) VirtualMachineInstance(namespace string) VirtualMachineInstanceInterface
- func (_m *MockKubevirtClient) VirtualMachineInstanceMigration(namespace string) VirtualMachineInstanceMigrationInterface
- func (_m *MockKubevirtClient) VirtualMachineInstancePreset(namespace string) VirtualMachineInstancePresetInterface
- func (_m *MockKubevirtClient) VirtualMachineRestore(namespace string) v1alpha16.VirtualMachineRestoreInterface
- func (_m *MockKubevirtClient) VirtualMachineSnapshot(namespace string) v1alpha16.VirtualMachineSnapshotInterface
- func (_m *MockKubevirtClient) VirtualMachineSnapshotContent(namespace string) v1alpha16.VirtualMachineSnapshotContentInterface
- type MockReplicaSetInterface
- func (_m *MockReplicaSetInterface) Create(_param0 *v117.VirtualMachineInstanceReplicaSet) (*v117.VirtualMachineInstanceReplicaSet, error)
- func (_m *MockReplicaSetInterface) Delete(name string, options *v11.DeleteOptions) error
- func (_m *MockReplicaSetInterface) EXPECT() *_MockReplicaSetInterfaceRecorder
- func (_m *MockReplicaSetInterface) Get(name string, options v11.GetOptions) (*v117.VirtualMachineInstanceReplicaSet, error)
- func (_m *MockReplicaSetInterface) GetScale(replicaSetName string, options v11.GetOptions) (*v10.Scale, error)
- func (_m *MockReplicaSetInterface) List(opts v11.ListOptions) (*v117.VirtualMachineInstanceReplicaSetList, error)
- func (_m *MockReplicaSetInterface) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v117.VirtualMachineInstanceReplicaSet, error)
- func (_m *MockReplicaSetInterface) PatchStatus(name string, pt types.PatchType, data []byte) (*v117.VirtualMachineInstanceReplicaSet, error)
- func (_m *MockReplicaSetInterface) Update(_param0 *v117.VirtualMachineInstanceReplicaSet) (*v117.VirtualMachineInstanceReplicaSet, error)
- func (_m *MockReplicaSetInterface) UpdateScale(replicaSetName string, scale *v10.Scale) (*v10.Scale, error)
- func (_m *MockReplicaSetInterface) UpdateStatus(_param0 *v117.VirtualMachineInstanceReplicaSet) (*v117.VirtualMachineInstanceReplicaSet, error)
- type MockStreamInterface
- type MockVirtualMachineInstanceInterface
- func (_m *MockVirtualMachineInstanceInterface) AddVolume(name string, addVolumeOptions *v117.AddVolumeOptions) error
- func (_m *MockVirtualMachineInstanceInterface) Create(instance *v117.VirtualMachineInstance) (*v117.VirtualMachineInstance, error)
- func (_m *MockVirtualMachineInstanceInterface) Delete(name string, options *v11.DeleteOptions) error
- func (_m *MockVirtualMachineInstanceInterface) EXPECT() *_MockVirtualMachineInstanceInterfaceRecorder
- func (_m *MockVirtualMachineInstanceInterface) FilesystemList(name string) (v117.VirtualMachineInstanceFileSystemList, error)
- func (_m *MockVirtualMachineInstanceInterface) Get(name string, options *v11.GetOptions) (*v117.VirtualMachineInstance, error)
- func (_m *MockVirtualMachineInstanceInterface) GuestOsInfo(name string) (v117.VirtualMachineInstanceGuestAgentInfo, error)
- func (_m *MockVirtualMachineInstanceInterface) List(opts *v11.ListOptions) (*v117.VirtualMachineInstanceList, error)
- func (_m *MockVirtualMachineInstanceInterface) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v117.VirtualMachineInstance, error)
- func (_m *MockVirtualMachineInstanceInterface) Pause(name string) error
- func (_m *MockVirtualMachineInstanceInterface) RemoveVolume(name string, removeVolumeOptions *v117.RemoveVolumeOptions) error
- func (_m *MockVirtualMachineInstanceInterface) SerialConsole(name string, options *SerialConsoleOptions) (StreamInterface, error)
- func (_m *MockVirtualMachineInstanceInterface) Unpause(name string) error
- func (_m *MockVirtualMachineInstanceInterface) Update(_param0 *v117.VirtualMachineInstance) (*v117.VirtualMachineInstance, error)
- func (_m *MockVirtualMachineInstanceInterface) UserList(name string) (v117.VirtualMachineInstanceGuestOSUserList, error)
- func (_m *MockVirtualMachineInstanceInterface) VNC(name string) (StreamInterface, error)
- type MockVirtualMachineInstanceMigrationInterface
- func (_m *MockVirtualMachineInstanceMigrationInterface) Create(_param0 *v117.VirtualMachineInstanceMigration) (*v117.VirtualMachineInstanceMigration, error)
- func (_m *MockVirtualMachineInstanceMigrationInterface) Delete(name string, options *v11.DeleteOptions) error
- func (_m *MockVirtualMachineInstanceMigrationInterface) EXPECT() *_MockVirtualMachineInstanceMigrationInterfaceRecorder
- func (_m *MockVirtualMachineInstanceMigrationInterface) Get(name string, options *v11.GetOptions) (*v117.VirtualMachineInstanceMigration, error)
- func (_m *MockVirtualMachineInstanceMigrationInterface) List(opts *v11.ListOptions) (*v117.VirtualMachineInstanceMigrationList, error)
- func (_m *MockVirtualMachineInstanceMigrationInterface) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v117.VirtualMachineInstanceMigration, error)
- func (_m *MockVirtualMachineInstanceMigrationInterface) PatchStatus(name string, pt types.PatchType, data []byte) (*v117.VirtualMachineInstanceMigration, error)
- func (_m *MockVirtualMachineInstanceMigrationInterface) Update(_param0 *v117.VirtualMachineInstanceMigration) (*v117.VirtualMachineInstanceMigration, error)
- func (_m *MockVirtualMachineInstanceMigrationInterface) UpdateStatus(_param0 *v117.VirtualMachineInstanceMigration) (*v117.VirtualMachineInstanceMigration, error)
- type MockVirtualMachineInstancePresetInterface
- func (_m *MockVirtualMachineInstancePresetInterface) Create(_param0 *v117.VirtualMachineInstancePreset) (*v117.VirtualMachineInstancePreset, error)
- func (_m *MockVirtualMachineInstancePresetInterface) Delete(name string, options *v11.DeleteOptions) error
- func (_m *MockVirtualMachineInstancePresetInterface) EXPECT() *_MockVirtualMachineInstancePresetInterfaceRecorder
- func (_m *MockVirtualMachineInstancePresetInterface) Get(name string, options v11.GetOptions) (*v117.VirtualMachineInstancePreset, error)
- func (_m *MockVirtualMachineInstancePresetInterface) List(opts v11.ListOptions) (*v117.VirtualMachineInstancePresetList, error)
- func (_m *MockVirtualMachineInstancePresetInterface) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v117.VirtualMachineInstancePreset, error)
- func (_m *MockVirtualMachineInstancePresetInterface) Update(_param0 *v117.VirtualMachineInstancePreset) (*v117.VirtualMachineInstancePreset, error)
- type MockVirtualMachineInterface
- func (_m *MockVirtualMachineInterface) AddVolume(name string, addVolumeOptions *v117.AddVolumeOptions) error
- func (_m *MockVirtualMachineInterface) Create(_param0 *v117.VirtualMachine) (*v117.VirtualMachine, error)
- func (_m *MockVirtualMachineInterface) Delete(name string, options *v11.DeleteOptions) error
- func (_m *MockVirtualMachineInterface) EXPECT() *_MockVirtualMachineInterfaceRecorder
- func (_m *MockVirtualMachineInterface) ForceRestart(name string, graceperiod int) error
- func (_m *MockVirtualMachineInterface) Get(name string, options *v11.GetOptions) (*v117.VirtualMachine, error)
- func (_m *MockVirtualMachineInterface) List(opts *v11.ListOptions) (*v117.VirtualMachineList, error)
- func (_m *MockVirtualMachineInterface) Migrate(name string) error
- func (_m *MockVirtualMachineInterface) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v117.VirtualMachine, error)
- func (_m *MockVirtualMachineInterface) PatchStatus(name string, pt types.PatchType, data []byte) (*v117.VirtualMachine, error)
- func (_m *MockVirtualMachineInterface) RemoveVolume(name string, removeVolumeOptions *v117.RemoveVolumeOptions) error
- func (_m *MockVirtualMachineInterface) Rename(name string, options *v117.RenameOptions) error
- func (_m *MockVirtualMachineInterface) Restart(name string) error
- func (_m *MockVirtualMachineInterface) Start(name string) error
- func (_m *MockVirtualMachineInterface) Stop(name string) error
- func (_m *MockVirtualMachineInterface) Update(_param0 *v117.VirtualMachine) (*v117.VirtualMachine, error)
- func (_m *MockVirtualMachineInterface) UpdateStatus(_param0 *v117.VirtualMachine) (*v117.VirtualMachine, error)
- type ReplicaSetInterface
- type RoundTripCallback
- type SerialConsoleOptions
- type ServerVersion
- type StreamInterface
- type StreamOptions
- type VirtHandlerClient
- type VirtHandlerConn
- type VirtualMachineInstanceInterface
- type VirtualMachineInstanceMigrationInterface
- type VirtualMachineInstancePresetInterface
- type VirtualMachineInterface
- type WebsocketRoundTripper
Constants ¶
const (
ApiGroupName = "/apis/" + v1.SubresourceGroupName
)
const (
WebsocketMessageBufferSize = 10240
)
Variables ¶
var GetKubevirtClientFromClientConfig = func(cmdConfig clientcmd.ClientConfig) (KubevirtClient, error) { config, err := cmdConfig.ClientConfig() if err != nil { return nil, err } return GetKubevirtClientFromRESTConfig(config) }
this function is defined as a closure so iut could be overwritten by unit tests
Functions ¶
func DefaultClientConfig ¶
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 ¶
func GetConfig() (*restclient.Config, error)
func GetKubevirtClientConfig ¶
func Init ¶ added in v0.20.1
func Init()
Init adds the default `kubeconfig` and `master` flags. It is not added by default to allow integration into the different controller generators which normally add these flags too.
func NewKubeVirtList ¶
func NewKubeVirtList(kubevirts ...v1.KubeVirt) *v1.KubeVirtList
func NewMigrationList ¶
func NewMigrationList(migrations ...v1.VirtualMachineInstanceMigration) *v1.VirtualMachineInstanceMigrationList
func NewMinimalKubeVirt ¶
func NewMinimalMigration ¶
func NewMinimalMigration(name string) *v1.VirtualMachineInstanceMigration
func NewMinimalVM ¶
func NewMinimalVM(name string) *v1.VirtualMachine
func NewMinimalVirtualMachineInstancePreset ¶
func NewMinimalVirtualMachineInstancePreset(name string) *v1.VirtualMachineInstancePreset
func NewMinimalVirtualMachineInstanceReplicaSet ¶
func NewMinimalVirtualMachineInstanceReplicaSet(name string) *v1.VirtualMachineInstanceReplicaSet
func NewUpgrader ¶ added in v0.20.1
func NewVMList ¶
func NewVMList(vms ...v1.VirtualMachine) *v1.VirtualMachineList
func NewVirtualMachineInstancePresetList ¶
func NewVirtualMachineInstancePresetList(rss ...v1.VirtualMachineInstancePreset) *v1.VirtualMachineInstancePresetList
func NewVirtualMachineInstanceReplicaSetList ¶
func NewVirtualMachineInstanceReplicaSetList(rss ...v1.VirtualMachineInstanceReplicaSet) *v1.VirtualMachineInstanceReplicaSetList
Types ¶
type AsyncSubresourceError ¶
type AsyncSubresourceError struct { StatusCode int // contains filtered or unexported fields }
func (*AsyncSubresourceError) Error ¶
func (a *AsyncSubresourceError) Error() string
func (*AsyncSubresourceError) GetStatusCode ¶
func (a *AsyncSubresourceError) GetStatusCode() int
type KubeVirtInterface ¶
type KubeVirtInterface interface { Get(name string, options *k8smetav1.GetOptions) (*v1.KubeVirt, error) List(opts *k8smetav1.ListOptions) (*v1.KubeVirtList, error) Create(instance *v1.KubeVirt) (*v1.KubeVirt, error) Update(*v1.KubeVirt) (*v1.KubeVirt, error) Delete(name string, options *k8smetav1.DeleteOptions) error Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.KubeVirt, err error) UpdateStatus(*v1.KubeVirt) (*v1.KubeVirt, error) PatchStatus(name string, pt types.PatchType, data []byte) (result *v1.KubeVirt, err error) }
type KubevirtClient ¶
type KubevirtClient interface { VirtualMachineInstance(namespace string) VirtualMachineInstanceInterface VirtualMachineInstanceMigration(namespace string) VirtualMachineInstanceMigrationInterface ReplicaSet(namespace string) ReplicaSetInterface VirtualMachine(namespace string) VirtualMachineInterface KubeVirt(namespace string) KubeVirtInterface VirtualMachineInstancePreset(namespace string) VirtualMachineInstancePresetInterface VirtualMachineSnapshot(namespace string) vmsnapshotv1alpha1.VirtualMachineSnapshotInterface VirtualMachineSnapshotContent(namespace string) vmsnapshotv1alpha1.VirtualMachineSnapshotContentInterface VirtualMachineRestore(namespace string) vmsnapshotv1alpha1.VirtualMachineRestoreInterface ServerVersion() *ServerVersion RestClient() *rest.RESTClient GeneratedKubeVirtClient() generatedclient.Interface CdiClient() cdiclient.Interface NetworkClient() networkclient.Interface ExtensionsClient() extclient.Interface SecClient() secv1.SecurityV1Interface DiscoveryClient() discovery.DiscoveryInterface PrometheusClient() promclient.Interface KubernetesSnapshotClient() k8ssnapshotclient.Interface DynamicClient() dynamic.Interface kubernetes.Interface Config() *rest.Config }
func GetInvalidKubevirtClientFromClientConfig ¶
func GetInvalidKubevirtClientFromClientConfig(cmdConfig clientcmd.ClientConfig) (KubevirtClient, error)
GetInvalidKubevirtClientFromClientConfig is an entry point for testing case where client should be invalid
func GetKubevirtClient ¶
func GetKubevirtClient() (KubevirtClient, error)
func GetKubevirtClientFromFlags ¶
func GetKubevirtClientFromFlags(master string, kubeconfig string) (KubevirtClient, error)
func GetKubevirtClientFromRESTConfig ¶
func GetKubevirtClientFromRESTConfig(config *rest.Config) (KubevirtClient, error)
func GetKubevirtSubresourceClient ¶
func GetKubevirtSubresourceClient() (KubevirtClient, error)
func GetKubevirtSubresourceClientFromFlags ¶
func GetKubevirtSubresourceClientFromFlags(master string, kubeconfig string) (KubevirtClient, error)
func GetMockKubevirtClientFromClientConfig ¶
func GetMockKubevirtClientFromClientConfig(cmdConfig clientcmd.ClientConfig) (KubevirtClient, error)
GetMockKubevirtClientFromClientConfig is an entry point for testing, could be used to override GetKubevirtClientFromClientConfig
type MockKubeVirtInterface ¶
type MockKubeVirtInterface struct {
// contains filtered or unexported fields
}
Mock of KubeVirtInterface interface
func NewMockKubeVirtInterface ¶
func NewMockKubeVirtInterface(ctrl *gomock.Controller) *MockKubeVirtInterface
func (*MockKubeVirtInterface) Delete ¶
func (_m *MockKubeVirtInterface) Delete(name string, options *v11.DeleteOptions) error
func (*MockKubeVirtInterface) EXPECT ¶
func (_m *MockKubeVirtInterface) EXPECT() *_MockKubeVirtInterfaceRecorder
func (*MockKubeVirtInterface) Get ¶
func (_m *MockKubeVirtInterface) Get(name string, options *v11.GetOptions) (*v117.KubeVirt, error)
func (*MockKubeVirtInterface) List ¶
func (_m *MockKubeVirtInterface) List(opts *v11.ListOptions) (*v117.KubeVirtList, error)
func (*MockKubeVirtInterface) PatchStatus ¶ added in v0.33.0
func (*MockKubeVirtInterface) UpdateStatus ¶ added in v0.33.0
type MockKubevirtClient ¶
type MockKubevirtClient struct {
// contains filtered or unexported fields
}
Mock of KubevirtClient interface
var MockKubevirtClientInstance *MockKubevirtClient
MockKubevirtClientInstance is a reference to the kubevirt client that could be manipulated by the test code
func NewMockKubevirtClient ¶
func NewMockKubevirtClient(ctrl *gomock.Controller) *MockKubevirtClient
func (*MockKubevirtClient) AdmissionregistrationV1 ¶ added in v0.26.0
func (_m *MockKubevirtClient) AdmissionregistrationV1() v12.AdmissionregistrationV1Interface
func (*MockKubevirtClient) AdmissionregistrationV1beta1 ¶
func (_m *MockKubevirtClient) AdmissionregistrationV1beta1() v1beta1.AdmissionregistrationV1beta1Interface
func (*MockKubevirtClient) AppsV1 ¶
func (_m *MockKubevirtClient) AppsV1() v13.AppsV1Interface
func (*MockKubevirtClient) AppsV1beta1 ¶
func (_m *MockKubevirtClient) AppsV1beta1() v1beta10.AppsV1beta1Interface
func (*MockKubevirtClient) AppsV1beta2 ¶
func (_m *MockKubevirtClient) AppsV1beta2() v1beta2.AppsV1beta2Interface
func (*MockKubevirtClient) AuthenticationV1 ¶
func (_m *MockKubevirtClient) AuthenticationV1() v14.AuthenticationV1Interface
func (*MockKubevirtClient) AuthenticationV1beta1 ¶
func (_m *MockKubevirtClient) AuthenticationV1beta1() v1beta11.AuthenticationV1beta1Interface
func (*MockKubevirtClient) AuthorizationV1 ¶
func (_m *MockKubevirtClient) AuthorizationV1() v15.AuthorizationV1Interface
func (*MockKubevirtClient) AuthorizationV1beta1 ¶
func (_m *MockKubevirtClient) AuthorizationV1beta1() v1beta12.AuthorizationV1beta1Interface
func (*MockKubevirtClient) AutoscalingV1 ¶
func (_m *MockKubevirtClient) AutoscalingV1() v16.AutoscalingV1Interface
func (*MockKubevirtClient) AutoscalingV2beta1 ¶
func (_m *MockKubevirtClient) AutoscalingV2beta1() v2beta1.AutoscalingV2beta1Interface
func (*MockKubevirtClient) AutoscalingV2beta2 ¶
func (_m *MockKubevirtClient) AutoscalingV2beta2() v2beta2.AutoscalingV2beta2Interface
func (*MockKubevirtClient) BatchV1 ¶
func (_m *MockKubevirtClient) BatchV1() v17.BatchV1Interface
func (*MockKubevirtClient) BatchV1beta1 ¶
func (_m *MockKubevirtClient) BatchV1beta1() v1beta13.BatchV1beta1Interface
func (*MockKubevirtClient) BatchV2alpha1 ¶
func (_m *MockKubevirtClient) BatchV2alpha1() v2alpha1.BatchV2alpha1Interface
func (*MockKubevirtClient) CdiClient ¶
func (_m *MockKubevirtClient) CdiClient() versioned.Interface
func (*MockKubevirtClient) CertificatesV1 ¶ added in v0.38.1
func (_m *MockKubevirtClient) CertificatesV1() v18.CertificatesV1Interface
func (*MockKubevirtClient) CertificatesV1beta1 ¶
func (_m *MockKubevirtClient) CertificatesV1beta1() v1beta14.CertificatesV1beta1Interface
func (*MockKubevirtClient) Config ¶
func (_m *MockKubevirtClient) Config() *rest.Config
func (*MockKubevirtClient) CoordinationV1 ¶ added in v0.26.0
func (_m *MockKubevirtClient) CoordinationV1() v19.CoordinationV1Interface
func (*MockKubevirtClient) CoordinationV1beta1 ¶
func (_m *MockKubevirtClient) CoordinationV1beta1() v1beta15.CoordinationV1beta1Interface
func (*MockKubevirtClient) CoreV1 ¶
func (_m *MockKubevirtClient) CoreV1() v110.CoreV1Interface
func (*MockKubevirtClient) Discovery ¶
func (_m *MockKubevirtClient) Discovery() discovery.DiscoveryInterface
func (*MockKubevirtClient) DiscoveryClient ¶
func (_m *MockKubevirtClient) DiscoveryClient() discovery.DiscoveryInterface
func (*MockKubevirtClient) DiscoveryV1alpha1 ¶ added in v0.26.0
func (_m *MockKubevirtClient) DiscoveryV1alpha1() v1alpha10.DiscoveryV1alpha1Interface
func (*MockKubevirtClient) DiscoveryV1beta1 ¶ added in v0.38.1
func (_m *MockKubevirtClient) DiscoveryV1beta1() v1beta16.DiscoveryV1beta1Interface
func (*MockKubevirtClient) DynamicClient ¶ added in v0.38.1
func (_m *MockKubevirtClient) DynamicClient() dynamic.Interface
func (*MockKubevirtClient) EXPECT ¶
func (_m *MockKubevirtClient) EXPECT() *_MockKubevirtClientRecorder
func (*MockKubevirtClient) EventsV1 ¶ added in v0.38.1
func (_m *MockKubevirtClient) EventsV1() v111.EventsV1Interface
func (*MockKubevirtClient) EventsV1beta1 ¶
func (_m *MockKubevirtClient) EventsV1beta1() v1beta17.EventsV1beta1Interface
func (*MockKubevirtClient) ExtensionsClient ¶
func (_m *MockKubevirtClient) ExtensionsClient() clientset.Interface
func (*MockKubevirtClient) ExtensionsV1beta1 ¶
func (_m *MockKubevirtClient) ExtensionsV1beta1() v1beta18.ExtensionsV1beta1Interface
func (*MockKubevirtClient) FlowcontrolV1alpha1 ¶ added in v0.38.1
func (_m *MockKubevirtClient) FlowcontrolV1alpha1() v1alpha11.FlowcontrolV1alpha1Interface
func (*MockKubevirtClient) FlowcontrolV1beta1 ¶ added in v0.38.1
func (_m *MockKubevirtClient) FlowcontrolV1beta1() v1beta19.FlowcontrolV1beta1Interface
func (*MockKubevirtClient) GeneratedKubeVirtClient ¶ added in v0.31.0
func (_m *MockKubevirtClient) GeneratedKubeVirtClient() versioned1.Interface
func (*MockKubevirtClient) InternalV1alpha1 ¶ added in v0.38.1
func (_m *MockKubevirtClient) InternalV1alpha1() v1alpha1.InternalV1alpha1Interface
func (*MockKubevirtClient) KubeVirt ¶
func (_m *MockKubevirtClient) KubeVirt(namespace string) KubeVirtInterface
func (*MockKubevirtClient) KubernetesSnapshotClient ¶ added in v0.31.0
func (_m *MockKubevirtClient) KubernetesSnapshotClient() versioned0.Interface
func (*MockKubevirtClient) NetworkClient ¶
func (_m *MockKubevirtClient) NetworkClient() versioned2.Interface
func (*MockKubevirtClient) NetworkingV1 ¶
func (_m *MockKubevirtClient) NetworkingV1() v112.NetworkingV1Interface
func (*MockKubevirtClient) NetworkingV1beta1 ¶ added in v0.26.0
func (_m *MockKubevirtClient) NetworkingV1beta1() v1beta110.NetworkingV1beta1Interface
func (*MockKubevirtClient) NodeV1 ¶ added in v0.38.1
func (_m *MockKubevirtClient) NodeV1() v113.NodeV1Interface
func (*MockKubevirtClient) NodeV1alpha1 ¶ added in v0.26.0
func (_m *MockKubevirtClient) NodeV1alpha1() v1alpha12.NodeV1alpha1Interface
func (*MockKubevirtClient) NodeV1beta1 ¶ added in v0.26.0
func (_m *MockKubevirtClient) NodeV1beta1() v1beta111.NodeV1beta1Interface
func (*MockKubevirtClient) PolicyV1beta1 ¶
func (_m *MockKubevirtClient) PolicyV1beta1() v1beta112.PolicyV1beta1Interface
func (*MockKubevirtClient) PrometheusClient ¶ added in v0.20.6
func (_m *MockKubevirtClient) PrometheusClient() versioned3.Interface
func (*MockKubevirtClient) RbacV1 ¶
func (_m *MockKubevirtClient) RbacV1() v114.RbacV1Interface
func (*MockKubevirtClient) RbacV1alpha1 ¶
func (_m *MockKubevirtClient) RbacV1alpha1() v1alpha13.RbacV1alpha1Interface
func (*MockKubevirtClient) RbacV1beta1 ¶
func (_m *MockKubevirtClient) RbacV1beta1() v1beta113.RbacV1beta1Interface
func (*MockKubevirtClient) ReplicaSet ¶
func (_m *MockKubevirtClient) ReplicaSet(namespace string) ReplicaSetInterface
func (*MockKubevirtClient) RestClient ¶
func (_m *MockKubevirtClient) RestClient() *rest.RESTClient
func (*MockKubevirtClient) SchedulingV1 ¶ added in v0.26.0
func (_m *MockKubevirtClient) SchedulingV1() v115.SchedulingV1Interface
func (*MockKubevirtClient) SchedulingV1alpha1 ¶
func (_m *MockKubevirtClient) SchedulingV1alpha1() v1alpha14.SchedulingV1alpha1Interface
func (*MockKubevirtClient) SchedulingV1beta1 ¶
func (_m *MockKubevirtClient) SchedulingV1beta1() v1beta114.SchedulingV1beta1Interface
func (*MockKubevirtClient) SecClient ¶
func (_m *MockKubevirtClient) SecClient() v1.SecurityV1Interface
func (*MockKubevirtClient) ServerVersion ¶
func (_m *MockKubevirtClient) ServerVersion() *ServerVersion
func (*MockKubevirtClient) StorageV1 ¶
func (_m *MockKubevirtClient) StorageV1() v116.StorageV1Interface
func (*MockKubevirtClient) StorageV1alpha1 ¶
func (_m *MockKubevirtClient) StorageV1alpha1() v1alpha15.StorageV1alpha1Interface
func (*MockKubevirtClient) StorageV1beta1 ¶
func (_m *MockKubevirtClient) StorageV1beta1() v1beta115.StorageV1beta1Interface
func (*MockKubevirtClient) VirtualMachine ¶
func (_m *MockKubevirtClient) VirtualMachine(namespace string) VirtualMachineInterface
func (*MockKubevirtClient) VirtualMachineInstance ¶
func (_m *MockKubevirtClient) VirtualMachineInstance(namespace string) VirtualMachineInstanceInterface
func (*MockKubevirtClient) VirtualMachineInstanceMigration ¶
func (_m *MockKubevirtClient) VirtualMachineInstanceMigration(namespace string) VirtualMachineInstanceMigrationInterface
func (*MockKubevirtClient) VirtualMachineInstancePreset ¶
func (_m *MockKubevirtClient) VirtualMachineInstancePreset(namespace string) VirtualMachineInstancePresetInterface
func (*MockKubevirtClient) VirtualMachineRestore ¶ added in v0.34.0
func (_m *MockKubevirtClient) VirtualMachineRestore(namespace string) v1alpha16.VirtualMachineRestoreInterface
func (*MockKubevirtClient) VirtualMachineSnapshot ¶ added in v0.31.0
func (_m *MockKubevirtClient) VirtualMachineSnapshot(namespace string) v1alpha16.VirtualMachineSnapshotInterface
func (*MockKubevirtClient) VirtualMachineSnapshotContent ¶ added in v0.31.0
func (_m *MockKubevirtClient) VirtualMachineSnapshotContent(namespace string) v1alpha16.VirtualMachineSnapshotContentInterface
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 *v117.VirtualMachineInstanceReplicaSet) (*v117.VirtualMachineInstanceReplicaSet, error)
func (*MockReplicaSetInterface) Delete ¶
func (_m *MockReplicaSetInterface) Delete(name string, options *v11.DeleteOptions) error
func (*MockReplicaSetInterface) EXPECT ¶
func (_m *MockReplicaSetInterface) EXPECT() *_MockReplicaSetInterfaceRecorder
func (*MockReplicaSetInterface) Get ¶
func (_m *MockReplicaSetInterface) Get(name string, options v11.GetOptions) (*v117.VirtualMachineInstanceReplicaSet, error)
func (*MockReplicaSetInterface) GetScale ¶
func (_m *MockReplicaSetInterface) GetScale(replicaSetName string, options v11.GetOptions) (*v10.Scale, error)
func (*MockReplicaSetInterface) List ¶
func (_m *MockReplicaSetInterface) List(opts v11.ListOptions) (*v117.VirtualMachineInstanceReplicaSetList, error)
func (*MockReplicaSetInterface) Patch ¶
func (_m *MockReplicaSetInterface) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v117.VirtualMachineInstanceReplicaSet, error)
func (*MockReplicaSetInterface) PatchStatus ¶ added in v0.33.0
func (_m *MockReplicaSetInterface) PatchStatus(name string, pt types.PatchType, data []byte) (*v117.VirtualMachineInstanceReplicaSet, error)
func (*MockReplicaSetInterface) Update ¶
func (_m *MockReplicaSetInterface) Update(_param0 *v117.VirtualMachineInstanceReplicaSet) (*v117.VirtualMachineInstanceReplicaSet, error)
func (*MockReplicaSetInterface) UpdateScale ¶
func (*MockReplicaSetInterface) UpdateStatus ¶ added in v0.33.0
func (_m *MockReplicaSetInterface) UpdateStatus(_param0 *v117.VirtualMachineInstanceReplicaSet) (*v117.VirtualMachineInstanceReplicaSet, error)
type MockStreamInterface ¶
type MockStreamInterface struct {
// contains filtered or unexported fields
}
Mock of StreamInterface interface
func NewMockStreamInterface ¶
func NewMockStreamInterface(ctrl *gomock.Controller) *MockStreamInterface
func (*MockStreamInterface) EXPECT ¶
func (_m *MockStreamInterface) EXPECT() *_MockStreamInterfaceRecorder
func (*MockStreamInterface) Stream ¶
func (_m *MockStreamInterface) Stream(options StreamOptions) error
type MockVirtualMachineInstanceInterface ¶
type MockVirtualMachineInstanceInterface struct {
// contains filtered or unexported fields
}
Mock of VirtualMachineInstanceInterface interface
func NewMockVirtualMachineInstanceInterface ¶
func NewMockVirtualMachineInstanceInterface(ctrl *gomock.Controller) *MockVirtualMachineInstanceInterface
func (*MockVirtualMachineInstanceInterface) AddVolume ¶ added in v0.36.0
func (_m *MockVirtualMachineInstanceInterface) AddVolume(name string, addVolumeOptions *v117.AddVolumeOptions) error
func (*MockVirtualMachineInstanceInterface) Create ¶
func (_m *MockVirtualMachineInstanceInterface) Create(instance *v117.VirtualMachineInstance) (*v117.VirtualMachineInstance, error)
func (*MockVirtualMachineInstanceInterface) Delete ¶
func (_m *MockVirtualMachineInstanceInterface) Delete(name string, options *v11.DeleteOptions) error
func (*MockVirtualMachineInstanceInterface) EXPECT ¶
func (_m *MockVirtualMachineInstanceInterface) EXPECT() *_MockVirtualMachineInstanceInterfaceRecorder
func (*MockVirtualMachineInstanceInterface) FilesystemList ¶ added in v0.28.0
func (_m *MockVirtualMachineInstanceInterface) FilesystemList(name string) (v117.VirtualMachineInstanceFileSystemList, error)
func (*MockVirtualMachineInstanceInterface) Get ¶
func (_m *MockVirtualMachineInstanceInterface) Get(name string, options *v11.GetOptions) (*v117.VirtualMachineInstance, error)
func (*MockVirtualMachineInstanceInterface) GuestOsInfo ¶ added in v0.27.0
func (_m *MockVirtualMachineInstanceInterface) GuestOsInfo(name string) (v117.VirtualMachineInstanceGuestAgentInfo, error)
func (*MockVirtualMachineInstanceInterface) List ¶
func (_m *MockVirtualMachineInstanceInterface) List(opts *v11.ListOptions) (*v117.VirtualMachineInstanceList, error)
func (*MockVirtualMachineInstanceInterface) Patch ¶
func (_m *MockVirtualMachineInstanceInterface) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v117.VirtualMachineInstance, error)
func (*MockVirtualMachineInstanceInterface) Pause ¶ added in v0.24.0
func (_m *MockVirtualMachineInstanceInterface) Pause(name string) error
func (*MockVirtualMachineInstanceInterface) RemoveVolume ¶ added in v0.36.0
func (_m *MockVirtualMachineInstanceInterface) RemoveVolume(name string, removeVolumeOptions *v117.RemoveVolumeOptions) error
func (*MockVirtualMachineInstanceInterface) SerialConsole ¶
func (_m *MockVirtualMachineInstanceInterface) SerialConsole(name string, options *SerialConsoleOptions) (StreamInterface, error)
func (*MockVirtualMachineInstanceInterface) Unpause ¶ added in v0.24.0
func (_m *MockVirtualMachineInstanceInterface) Unpause(name string) error
func (*MockVirtualMachineInstanceInterface) Update ¶
func (_m *MockVirtualMachineInstanceInterface) Update(_param0 *v117.VirtualMachineInstance) (*v117.VirtualMachineInstance, error)
func (*MockVirtualMachineInstanceInterface) UserList ¶ added in v0.28.0
func (_m *MockVirtualMachineInstanceInterface) UserList(name string) (v117.VirtualMachineInstanceGuestOSUserList, error)
func (*MockVirtualMachineInstanceInterface) VNC ¶
func (_m *MockVirtualMachineInstanceInterface) VNC(name string) (StreamInterface, error)
type MockVirtualMachineInstanceMigrationInterface ¶
type MockVirtualMachineInstanceMigrationInterface struct {
// contains filtered or unexported fields
}
Mock of VirtualMachineInstanceMigrationInterface interface
func NewMockVirtualMachineInstanceMigrationInterface ¶
func NewMockVirtualMachineInstanceMigrationInterface(ctrl *gomock.Controller) *MockVirtualMachineInstanceMigrationInterface
func (*MockVirtualMachineInstanceMigrationInterface) Create ¶
func (_m *MockVirtualMachineInstanceMigrationInterface) Create(_param0 *v117.VirtualMachineInstanceMigration) (*v117.VirtualMachineInstanceMigration, error)
func (*MockVirtualMachineInstanceMigrationInterface) Delete ¶
func (_m *MockVirtualMachineInstanceMigrationInterface) Delete(name string, options *v11.DeleteOptions) error
func (*MockVirtualMachineInstanceMigrationInterface) EXPECT ¶
func (_m *MockVirtualMachineInstanceMigrationInterface) EXPECT() *_MockVirtualMachineInstanceMigrationInterfaceRecorder
func (*MockVirtualMachineInstanceMigrationInterface) Get ¶
func (_m *MockVirtualMachineInstanceMigrationInterface) Get(name string, options *v11.GetOptions) (*v117.VirtualMachineInstanceMigration, error)
func (*MockVirtualMachineInstanceMigrationInterface) List ¶
func (_m *MockVirtualMachineInstanceMigrationInterface) List(opts *v11.ListOptions) (*v117.VirtualMachineInstanceMigrationList, error)
func (*MockVirtualMachineInstanceMigrationInterface) Patch ¶
func (_m *MockVirtualMachineInstanceMigrationInterface) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v117.VirtualMachineInstanceMigration, error)
func (*MockVirtualMachineInstanceMigrationInterface) PatchStatus ¶ added in v0.33.0
func (_m *MockVirtualMachineInstanceMigrationInterface) PatchStatus(name string, pt types.PatchType, data []byte) (*v117.VirtualMachineInstanceMigration, error)
func (*MockVirtualMachineInstanceMigrationInterface) Update ¶
func (_m *MockVirtualMachineInstanceMigrationInterface) Update(_param0 *v117.VirtualMachineInstanceMigration) (*v117.VirtualMachineInstanceMigration, error)
func (*MockVirtualMachineInstanceMigrationInterface) UpdateStatus ¶ added in v0.33.0
func (_m *MockVirtualMachineInstanceMigrationInterface) UpdateStatus(_param0 *v117.VirtualMachineInstanceMigration) (*v117.VirtualMachineInstanceMigration, error)
type MockVirtualMachineInstancePresetInterface ¶
type MockVirtualMachineInstancePresetInterface struct {
// contains filtered or unexported fields
}
Mock of VirtualMachineInstancePresetInterface interface
func NewMockVirtualMachineInstancePresetInterface ¶
func NewMockVirtualMachineInstancePresetInterface(ctrl *gomock.Controller) *MockVirtualMachineInstancePresetInterface
func (*MockVirtualMachineInstancePresetInterface) Create ¶
func (_m *MockVirtualMachineInstancePresetInterface) Create(_param0 *v117.VirtualMachineInstancePreset) (*v117.VirtualMachineInstancePreset, error)
func (*MockVirtualMachineInstancePresetInterface) Delete ¶
func (_m *MockVirtualMachineInstancePresetInterface) Delete(name string, options *v11.DeleteOptions) error
func (*MockVirtualMachineInstancePresetInterface) EXPECT ¶
func (_m *MockVirtualMachineInstancePresetInterface) EXPECT() *_MockVirtualMachineInstancePresetInterfaceRecorder
func (*MockVirtualMachineInstancePresetInterface) Get ¶
func (_m *MockVirtualMachineInstancePresetInterface) Get(name string, options v11.GetOptions) (*v117.VirtualMachineInstancePreset, error)
func (*MockVirtualMachineInstancePresetInterface) List ¶
func (_m *MockVirtualMachineInstancePresetInterface) List(opts v11.ListOptions) (*v117.VirtualMachineInstancePresetList, error)
func (*MockVirtualMachineInstancePresetInterface) Patch ¶
func (_m *MockVirtualMachineInstancePresetInterface) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v117.VirtualMachineInstancePreset, error)
func (*MockVirtualMachineInstancePresetInterface) Update ¶
func (_m *MockVirtualMachineInstancePresetInterface) Update(_param0 *v117.VirtualMachineInstancePreset) (*v117.VirtualMachineInstancePreset, error)
type MockVirtualMachineInterface ¶
type MockVirtualMachineInterface struct {
// contains filtered or unexported fields
}
Mock of VirtualMachineInterface interface
func NewMockVirtualMachineInterface ¶
func NewMockVirtualMachineInterface(ctrl *gomock.Controller) *MockVirtualMachineInterface
func (*MockVirtualMachineInterface) AddVolume ¶ added in v0.36.0
func (_m *MockVirtualMachineInterface) AddVolume(name string, addVolumeOptions *v117.AddVolumeOptions) error
func (*MockVirtualMachineInterface) Create ¶
func (_m *MockVirtualMachineInterface) Create(_param0 *v117.VirtualMachine) (*v117.VirtualMachine, error)
func (*MockVirtualMachineInterface) Delete ¶
func (_m *MockVirtualMachineInterface) Delete(name string, options *v11.DeleteOptions) error
func (*MockVirtualMachineInterface) EXPECT ¶
func (_m *MockVirtualMachineInterface) EXPECT() *_MockVirtualMachineInterfaceRecorder
func (*MockVirtualMachineInterface) ForceRestart ¶ added in v0.25.0
func (_m *MockVirtualMachineInterface) ForceRestart(name string, graceperiod int) error
func (*MockVirtualMachineInterface) Get ¶
func (_m *MockVirtualMachineInterface) Get(name string, options *v11.GetOptions) (*v117.VirtualMachine, error)
func (*MockVirtualMachineInterface) List ¶
func (_m *MockVirtualMachineInterface) List(opts *v11.ListOptions) (*v117.VirtualMachineList, error)
func (*MockVirtualMachineInterface) Migrate ¶ added in v0.21.0
func (_m *MockVirtualMachineInterface) Migrate(name string) error
func (*MockVirtualMachineInterface) Patch ¶
func (_m *MockVirtualMachineInterface) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v117.VirtualMachine, error)
func (*MockVirtualMachineInterface) PatchStatus ¶ added in v0.33.0
func (_m *MockVirtualMachineInterface) PatchStatus(name string, pt types.PatchType, data []byte) (*v117.VirtualMachine, error)
func (*MockVirtualMachineInterface) RemoveVolume ¶ added in v0.36.0
func (_m *MockVirtualMachineInterface) RemoveVolume(name string, removeVolumeOptions *v117.RemoveVolumeOptions) error
func (*MockVirtualMachineInterface) Rename ¶ added in v0.28.0
func (_m *MockVirtualMachineInterface) Rename(name string, options *v117.RenameOptions) error
func (*MockVirtualMachineInterface) Restart ¶
func (_m *MockVirtualMachineInterface) Restart(name string) error
func (*MockVirtualMachineInterface) Start ¶
func (_m *MockVirtualMachineInterface) Start(name string) error
func (*MockVirtualMachineInterface) Stop ¶
func (_m *MockVirtualMachineInterface) Stop(name string) error
func (*MockVirtualMachineInterface) Update ¶
func (_m *MockVirtualMachineInterface) Update(_param0 *v117.VirtualMachine) (*v117.VirtualMachine, error)
func (*MockVirtualMachineInterface) UpdateStatus ¶ added in v0.33.0
func (_m *MockVirtualMachineInterface) UpdateStatus(_param0 *v117.VirtualMachine) (*v117.VirtualMachine, error)
type ReplicaSetInterface ¶
type ReplicaSetInterface interface { Get(name string, options k8smetav1.GetOptions) (*v1.VirtualMachineInstanceReplicaSet, error) List(opts k8smetav1.ListOptions) (*v1.VirtualMachineInstanceReplicaSetList, error) Create(*v1.VirtualMachineInstanceReplicaSet) (*v1.VirtualMachineInstanceReplicaSet, error) Update(*v1.VirtualMachineInstanceReplicaSet) (*v1.VirtualMachineInstanceReplicaSet, error) Delete(name string, options *k8smetav1.DeleteOptions) error GetScale(replicaSetName string, options k8smetav1.GetOptions) (*autov1.Scale, error) UpdateScale(replicaSetName string, scale *autov1.Scale) (*autov1.Scale, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.VirtualMachineInstanceReplicaSet, err error) UpdateStatus(*v1.VirtualMachineInstanceReplicaSet) (*v1.VirtualMachineInstanceReplicaSet, error) PatchStatus(name string, pt types.PatchType, data []byte) (result *v1.VirtualMachineInstanceReplicaSet, err error) }
type RoundTripCallback ¶
type SerialConsoleOptions ¶ added in v0.26.1
type ServerVersion ¶
type ServerVersion struct {
// contains filtered or unexported fields
}
type StreamInterface ¶
type StreamInterface interface {
Stream(options StreamOptions) error
}
type VirtHandlerClient ¶
type VirtHandlerClient interface { ForNode(nodeName string) VirtHandlerConn Port(port int) VirtHandlerClient Namespace(namespace string) VirtHandlerClient }
func NewVirtHandlerClient ¶
func NewVirtHandlerClient(client KubevirtClient) VirtHandlerClient
type VirtHandlerConn ¶
type VirtHandlerConn interface { ConnectionDetails() (ip string, port int, err error) ConsoleURI(vmi *virtv1.VirtualMachineInstance) (string, error) VNCURI(vmi *virtv1.VirtualMachineInstance) (string, error) PauseURI(vmi *virtv1.VirtualMachineInstance) (string, error) UnpauseURI(vmi *virtv1.VirtualMachineInstance) (string, error) Pod() (pod *v1.Pod, err error) Put(url string, tlsConfig *tls.Config) error Get(url string, tlsConfig *tls.Config) (string, error) GuestInfoURI(vmi *virtv1.VirtualMachineInstance) (string, error) UserListURI(vmi *virtv1.VirtualMachineInstance) (string, error) FilesystemListURI(vmi *virtv1.VirtualMachineInstance) (string, error) }
type VirtualMachineInstanceInterface ¶
type VirtualMachineInstanceInterface interface { Get(name string, options *k8smetav1.GetOptions) (*v1.VirtualMachineInstance, error) List(opts *k8smetav1.ListOptions) (*v1.VirtualMachineInstanceList, error) Create(instance *v1.VirtualMachineInstance) (*v1.VirtualMachineInstance, error) Update(*v1.VirtualMachineInstance) (*v1.VirtualMachineInstance, error) Delete(name string, options *k8smetav1.DeleteOptions) error Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.VirtualMachineInstance, err error) SerialConsole(name string, options *SerialConsoleOptions) (StreamInterface, error) VNC(name string) (StreamInterface, error) Pause(name string) error Unpause(name string) error GuestOsInfo(name string) (v1.VirtualMachineInstanceGuestAgentInfo, error) UserList(name string) (v1.VirtualMachineInstanceGuestOSUserList, error) FilesystemList(name string) (v1.VirtualMachineInstanceFileSystemList, error) AddVolume(name string, addVolumeOptions *v1.AddVolumeOptions) error RemoveVolume(name string, removeVolumeOptions *v1.RemoveVolumeOptions) error }
type VirtualMachineInstanceMigrationInterface ¶
type VirtualMachineInstanceMigrationInterface interface { Get(name string, options *k8smetav1.GetOptions) (*v1.VirtualMachineInstanceMigration, error) List(opts *k8smetav1.ListOptions) (*v1.VirtualMachineInstanceMigrationList, error) Create(*v1.VirtualMachineInstanceMigration) (*v1.VirtualMachineInstanceMigration, error) Update(*v1.VirtualMachineInstanceMigration) (*v1.VirtualMachineInstanceMigration, error) Delete(name string, options *k8smetav1.DeleteOptions) error Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.VirtualMachineInstanceMigration, err error) UpdateStatus(*v1.VirtualMachineInstanceMigration) (*v1.VirtualMachineInstanceMigration, error) PatchStatus(name string, pt types.PatchType, data []byte) (result *v1.VirtualMachineInstanceMigration, err error) }
type VirtualMachineInstancePresetInterface ¶
type VirtualMachineInstancePresetInterface interface { Get(name string, options k8smetav1.GetOptions) (*v1.VirtualMachineInstancePreset, error) List(opts k8smetav1.ListOptions) (*v1.VirtualMachineInstancePresetList, error) Create(*v1.VirtualMachineInstancePreset) (*v1.VirtualMachineInstancePreset, error) Update(*v1.VirtualMachineInstancePreset) (*v1.VirtualMachineInstancePreset, error) Delete(name string, options *k8smetav1.DeleteOptions) error Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.VirtualMachineInstancePreset, err error) }
type VirtualMachineInterface ¶
type VirtualMachineInterface 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) UpdateStatus(*v1.VirtualMachine) (*v1.VirtualMachine, error) PatchStatus(name string, pt types.PatchType, data []byte) (result *v1.VirtualMachine, err error) Restart(name string) error ForceRestart(name string, graceperiod int) error Start(name string) error Stop(name string) error Migrate(name string) error Rename(name string, options *v1.RenameOptions) error AddVolume(name string, addVolumeOptions *v1.AddVolumeOptions) error RemoveVolume(name string, removeVolumeOptions *v1.RemoveVolumeOptions) error }
VirtualMachineInterface provides convenience methods to work with virtual machines inside the cluster
type WebsocketRoundTripper ¶
type WebsocketRoundTripper struct { Dialer *websocket.Dialer Do RoundTripCallback }