const ( ApiGroupName = "/apis/" + v1.SubresourceGroupName )
var ( SchemeBuilder runtime.SchemeBuilder Scheme *runtime.Scheme Codecs serializer.CodecFactory ParameterCodec runtime.ParameterCodec )
this function is defined as a closure so iut could be overwritten by unit tests
var GetKubevirtClientFromClientConfig = func(cmdConfig clientcmd.ClientConfig) (KubevirtClient, error) { config, err := cmdConfig.ClientConfig() if err != nil { return nil, err } return GetKubevirtClientFromRESTConfig(config) }
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 FlagSet() *flag.FlagSet
func GetConfig() (*restclient.Config, error)
Deprecated: Use GetKubevirtClientConfig instead
func GetKubevirtClientConfig() (*rest.Config, error)
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(kubevirts ...v1.KubeVirt) *v1.KubeVirtList
func NewMigrationList(migrations ...v1.VirtualMachineInstanceMigration) *v1.VirtualMachineInstanceMigrationList
func NewMinimalClone(name string) *v1alpha12.VirtualMachineClone
func NewMinimalCloneList(clones ...v1alpha12.VirtualMachineClone) *v1alpha12.VirtualMachineCloneList
func NewMinimalCloneWithNS(name, namespace string) *v1alpha12.VirtualMachineClone
func NewMinimalKubeVirt(name string) *v1.KubeVirt
func NewMinimalMigration(name string) *v1.VirtualMachineInstanceMigration
func NewMinimalMigrationPolicy(name string) *v1alpha1.MigrationPolicy
func NewMinimalMigrationPolicyList(policies ...v1alpha1.MigrationPolicy) *v1alpha1.MigrationPolicyList
func NewMinimalVM(name string) *v1.VirtualMachine
func NewMinimalVirtualMachineInstancePreset(name string) *v1.VirtualMachineInstancePreset
func NewMinimalVirtualMachineInstanceReplicaSet(name string) *v1.VirtualMachineInstanceReplicaSet
func NewVMList(vms ...v1.VirtualMachine) *v1.VirtualMachineList
func NewVirtualMachineInstancePresetList(rss ...v1.VirtualMachineInstancePreset) *v1.VirtualMachineInstancePresetList
func NewVirtualMachineInstanceReplicaSetList(rss ...v1.VirtualMachineInstanceReplicaSet) *v1.VirtualMachineInstanceReplicaSetList
func RegisterRestConfigHook(fn RestConfigHookFunc)
type ClusterProfiler struct {
// contains filtered or unexported fields
}
func (v *ClusterProfiler) Dump(cpRequest *v1.ClusterProfilerRequest) (*v1.ClusterProfilerResults, error)
Dump returns at most cpRequest.PageSize profiler results. To fetch results from all kubevirt pods Dump should be called with Continue fields set to Continue field value from the response to a previous request. This should be repeated until Continue or ComponentsResult field in ClusterProfilerResponse is empty.
func (v *ClusterProfiler) Start() error
func (v *ClusterProfiler) Stop() error
type ExpandSpecInterface interface { ForVirtualMachine(vm *v1.VirtualMachine) (*v1.VirtualMachine, error) }
type GuestfsInfo struct { Registry string `json:"registry"` Tag string `json:"tag"` Digest string `json:"digest"` ImagePrefix string `json:"imagePrefix"` GsImage string `json:"gsImage"` }
type GuestfsVersion struct {
// contains filtered or unexported fields
}
func (v *GuestfsVersion) Get() (*GuestfsInfo, error)
type KubeVirtInterface interface { kvcorev1.KubeVirtInterface }
type KubevirtClient interface { VirtualMachineInstance(namespace string) VirtualMachineInstanceInterface VirtualMachineInstanceMigration(namespace string) VirtualMachineInstanceMigrationInterface ReplicaSet(namespace string) ReplicaSetInterface VirtualMachinePool(namespace string) poolv1.VirtualMachinePoolInterface VirtualMachine(namespace string) VirtualMachineInterface KubeVirt(namespace string) KubeVirtInterface VirtualMachineInstancePreset(namespace string) VirtualMachineInstancePresetInterface VirtualMachineSnapshot(namespace string) snapshotv1.VirtualMachineSnapshotInterface VirtualMachineSnapshotContent(namespace string) snapshotv1.VirtualMachineSnapshotContentInterface VirtualMachineRestore(namespace string) snapshotv1.VirtualMachineRestoreInterface VirtualMachineExport(namespace string) exportv1.VirtualMachineExportInterface VirtualMachineInstancetype(namespace string) instancetypev1beta1.VirtualMachineInstancetypeInterface VirtualMachineClusterInstancetype() instancetypev1beta1.VirtualMachineClusterInstancetypeInterface VirtualMachinePreference(namespace string) instancetypev1beta1.VirtualMachinePreferenceInterface VirtualMachineClusterPreference() instancetypev1beta1.VirtualMachineClusterPreferenceInterface MigrationPolicy() migrationsv1.MigrationPolicyInterface ExpandSpec(namespace string) ExpandSpecInterface ServerVersion() ServerVersionInterface VirtualMachineClone(namespace string) clonev1alpha1.VirtualMachineCloneInterface ClusterProfiler() *ClusterProfiler GuestfsVersion() *GuestfsVersion RestClient() *rest.RESTClient GeneratedKubeVirtClient() generatedclient.Interface CdiClient() cdiclient.Interface NetworkClient() networkclient.Interface ExtensionsClient() extclient.Interface SecClient() secv1.SecurityV1Interface RouteClient() routev1.RouteV1Interface DiscoveryClient() discovery.DiscoveryInterface PrometheusClient() promclient.Interface KubernetesSnapshotClient() k8ssnapshotclient.Interface DynamicClient() dynamic.Interface MigrationPolicyClient() *migrationsv1.MigrationsV1alpha1Client kubernetes.Interface Config() *rest.Config SetRestTimeout(timeout time.Duration) (KubevirtClient, error) }
func GetInvalidKubevirtClientFromClientConfig(cmdConfig clientcmd.ClientConfig) (KubevirtClient, error)
GetInvalidKubevirtClientFromClientConfig is an entry point for testing case where client should be invalid
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)
GetMockKubevirtClientFromClientConfig is an entry point for testing, could be used to override GetKubevirtClientFromClientConfig
Mock of ExpandSpecInterface interface
type MockExpandSpecInterface struct {
// contains filtered or unexported fields
}
func NewMockExpandSpecInterface(ctrl *gomock.Controller) *MockExpandSpecInterface
func (_m *MockExpandSpecInterface) EXPECT() *_MockExpandSpecInterfaceRecorder
func (_m *MockExpandSpecInterface) ForVirtualMachine(vm *v121.VirtualMachine) (*v121.VirtualMachine, error)
Mock of KubeVirtInterface interface
type MockKubeVirtInterface struct {
// contains filtered or unexported fields
}
func NewMockKubeVirtInterface(ctrl *gomock.Controller) *MockKubeVirtInterface
func (_m *MockKubeVirtInterface) Create(ctx context.Context, kubeVirt *v121.KubeVirt, opts v12.CreateOptions) (*v121.KubeVirt, error)
func (_m *MockKubeVirtInterface) Delete(ctx context.Context, name string, opts v12.DeleteOptions) error
func (_m *MockKubeVirtInterface) DeleteCollection(ctx context.Context, opts v12.DeleteOptions, listOpts v12.ListOptions) error
func (_m *MockKubeVirtInterface) EXPECT() *_MockKubeVirtInterfaceRecorder
func (_m *MockKubeVirtInterface) Get(ctx context.Context, name string, opts v12.GetOptions) (*v121.KubeVirt, error)
func (_m *MockKubeVirtInterface) List(ctx context.Context, opts v12.ListOptions) (*v121.KubeVirtList, error)
func (_m *MockKubeVirtInterface) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v12.PatchOptions, subresources ...string) (*v121.KubeVirt, error)
func (_m *MockKubeVirtInterface) PatchStatus(ctx context.Context, name string, pt types.PatchType, data []byte, patchOptions v12.PatchOptions) (*v121.KubeVirt, error)
func (_m *MockKubeVirtInterface) Update(ctx context.Context, kubeVirt *v121.KubeVirt, opts v12.UpdateOptions) (*v121.KubeVirt, error)
func (_m *MockKubeVirtInterface) UpdateStatus(ctx context.Context, kubeVirt *v121.KubeVirt, opts v12.UpdateOptions) (*v121.KubeVirt, error)
func (_m *MockKubeVirtInterface) Watch(ctx context.Context, opts v12.ListOptions) (watch.Interface, error)
Mock of KubevirtClient interface
type MockKubevirtClient struct {
// contains filtered or unexported fields
}
MockKubevirtClientInstance is a reference to the kubevirt client that could be manipulated by the test code
var MockKubevirtClientInstance *MockKubevirtClient
func NewMockKubevirtClient(ctrl *gomock.Controller) *MockKubevirtClient
func (_m *MockKubevirtClient) AdmissionregistrationV1() v13.AdmissionregistrationV1Interface
func (_m *MockKubevirtClient) AdmissionregistrationV1alpha1() v1alpha1.AdmissionregistrationV1alpha1Interface
func (_m *MockKubevirtClient) AdmissionregistrationV1beta1() v1beta1.AdmissionregistrationV1beta1Interface
func (_m *MockKubevirtClient) AppsV1() v14.AppsV1Interface
func (_m *MockKubevirtClient) AppsV1beta1() v1beta10.AppsV1beta1Interface
func (_m *MockKubevirtClient) AppsV1beta2() v1beta2.AppsV1beta2Interface
func (_m *MockKubevirtClient) AuthenticationV1() v15.AuthenticationV1Interface
func (_m *MockKubevirtClient) AuthenticationV1alpha1() v1alpha11.AuthenticationV1alpha1Interface
func (_m *MockKubevirtClient) AuthenticationV1beta1() v1beta11.AuthenticationV1beta1Interface
func (_m *MockKubevirtClient) AuthorizationV1() v16.AuthorizationV1Interface
func (_m *MockKubevirtClient) AuthorizationV1beta1() v1beta12.AuthorizationV1beta1Interface
func (_m *MockKubevirtClient) AutoscalingV1() v17.AutoscalingV1Interface
func (_m *MockKubevirtClient) AutoscalingV2() v2.AutoscalingV2Interface
func (_m *MockKubevirtClient) AutoscalingV2beta1() v2beta1.AutoscalingV2beta1Interface
func (_m *MockKubevirtClient) AutoscalingV2beta2() v2beta2.AutoscalingV2beta2Interface
func (_m *MockKubevirtClient) BatchV1() v18.BatchV1Interface
func (_m *MockKubevirtClient) BatchV1beta1() v1beta13.BatchV1beta1Interface
func (_m *MockKubevirtClient) CdiClient() versioned.Interface
func (_m *MockKubevirtClient) CertificatesV1() v19.CertificatesV1Interface
func (_m *MockKubevirtClient) CertificatesV1alpha1() v1alpha12.CertificatesV1alpha1Interface
func (_m *MockKubevirtClient) CertificatesV1beta1() v1beta14.CertificatesV1beta1Interface
func (_m *MockKubevirtClient) ClusterProfiler() *ClusterProfiler
func (_m *MockKubevirtClient) Config() *rest.Config
func (_m *MockKubevirtClient) CoordinationV1() v110.CoordinationV1Interface
func (_m *MockKubevirtClient) CoordinationV1beta1() v1beta15.CoordinationV1beta1Interface
func (_m *MockKubevirtClient) CoreV1() v111.CoreV1Interface
func (_m *MockKubevirtClient) Discovery() discovery.DiscoveryInterface
func (_m *MockKubevirtClient) DiscoveryClient() discovery.DiscoveryInterface
func (_m *MockKubevirtClient) DiscoveryV1() v112.DiscoveryV1Interface
func (_m *MockKubevirtClient) DiscoveryV1beta1() v1beta16.DiscoveryV1beta1Interface
func (_m *MockKubevirtClient) DynamicClient() dynamic.Interface
func (_m *MockKubevirtClient) EXPECT() *_MockKubevirtClientRecorder
func (_m *MockKubevirtClient) EventsV1() v113.EventsV1Interface
func (_m *MockKubevirtClient) EventsV1beta1() v1beta17.EventsV1beta1Interface
func (_m *MockKubevirtClient) ExpandSpec(namespace string) ExpandSpecInterface
func (_m *MockKubevirtClient) ExtensionsClient() clientset.Interface
func (_m *MockKubevirtClient) ExtensionsV1beta1() v1beta18.ExtensionsV1beta1Interface
func (_m *MockKubevirtClient) FlowcontrolV1() v114.FlowcontrolV1Interface
func (_m *MockKubevirtClient) FlowcontrolV1beta1() v1beta19.FlowcontrolV1beta1Interface
func (_m *MockKubevirtClient) FlowcontrolV1beta2() v1beta20.FlowcontrolV1beta2Interface
func (_m *MockKubevirtClient) FlowcontrolV1beta3() v1beta3.FlowcontrolV1beta3Interface
func (_m *MockKubevirtClient) GeneratedKubeVirtClient() versioned1.Interface
func (_m *MockKubevirtClient) GuestfsVersion() *GuestfsVersion
func (_m *MockKubevirtClient) InternalV1alpha1() v1alpha10.InternalV1alpha1Interface
func (_m *MockKubevirtClient) KubeVirt(namespace string) KubeVirtInterface
func (_m *MockKubevirtClient) KubernetesSnapshotClient() versioned0.Interface
func (_m *MockKubevirtClient) MigrationPolicy() v1alpha110.MigrationPolicyInterface
func (_m *MockKubevirtClient) MigrationPolicyClient() *v1alpha110.MigrationsV1alpha1Client
func (_m *MockKubevirtClient) NetworkClient() versioned2.Interface
func (_m *MockKubevirtClient) NetworkingV1() v115.NetworkingV1Interface
func (_m *MockKubevirtClient) NetworkingV1alpha1() v1alpha13.NetworkingV1alpha1Interface
func (_m *MockKubevirtClient) NetworkingV1beta1() v1beta110.NetworkingV1beta1Interface
func (_m *MockKubevirtClient) NodeV1() v116.NodeV1Interface
func (_m *MockKubevirtClient) NodeV1alpha1() v1alpha14.NodeV1alpha1Interface
func (_m *MockKubevirtClient) NodeV1beta1() v1beta111.NodeV1beta1Interface
func (_m *MockKubevirtClient) PolicyV1() v117.PolicyV1Interface
func (_m *MockKubevirtClient) PolicyV1beta1() v1beta112.PolicyV1beta1Interface
func (_m *MockKubevirtClient) PrometheusClient() versioned3.Interface
func (_m *MockKubevirtClient) RbacV1() v118.RbacV1Interface
func (_m *MockKubevirtClient) RbacV1alpha1() v1alpha15.RbacV1alpha1Interface
func (_m *MockKubevirtClient) RbacV1beta1() v1beta113.RbacV1beta1Interface
func (_m *MockKubevirtClient) ReplicaSet(namespace string) ReplicaSetInterface
func (_m *MockKubevirtClient) ResourceV1alpha2() v1alpha2.ResourceV1alpha2Interface
func (_m *MockKubevirtClient) RestClient() *rest.RESTClient
func (_m *MockKubevirtClient) RouteClient() v1.RouteV1Interface
func (_m *MockKubevirtClient) SchedulingV1() v119.SchedulingV1Interface
func (_m *MockKubevirtClient) SchedulingV1alpha1() v1alpha16.SchedulingV1alpha1Interface
func (_m *MockKubevirtClient) SchedulingV1beta1() v1beta114.SchedulingV1beta1Interface
func (_m *MockKubevirtClient) SecClient() v10.SecurityV1Interface
func (_m *MockKubevirtClient) ServerVersion() ServerVersionInterface
func (_m *MockKubevirtClient) SetRestTimeout(timeout time.Duration) (KubevirtClient, error)
func (_m *MockKubevirtClient) StorageV1() v120.StorageV1Interface
func (_m *MockKubevirtClient) StorageV1alpha1() v1alpha17.StorageV1alpha1Interface
func (_m *MockKubevirtClient) StorageV1beta1() v1beta115.StorageV1beta1Interface
func (_m *MockKubevirtClient) StoragemigrationV1alpha1() v1alpha18.StoragemigrationV1alpha1Interface
func (_m *MockKubevirtClient) VirtualMachine(namespace string) VirtualMachineInterface
func (_m *MockKubevirtClient) VirtualMachineClone(namespace string) v1alpha19.VirtualMachineCloneInterface
func (_m *MockKubevirtClient) VirtualMachineClusterInstancetype() v1beta117.VirtualMachineClusterInstancetypeInterface
func (_m *MockKubevirtClient) VirtualMachineClusterPreference() v1beta117.VirtualMachineClusterPreferenceInterface
func (_m *MockKubevirtClient) VirtualMachineExport(namespace string) v1beta116.VirtualMachineExportInterface
func (_m *MockKubevirtClient) VirtualMachineInstance(namespace string) VirtualMachineInstanceInterface
func (_m *MockKubevirtClient) VirtualMachineInstanceMigration(namespace string) VirtualMachineInstanceMigrationInterface
func (_m *MockKubevirtClient) VirtualMachineInstancePreset(namespace string) VirtualMachineInstancePresetInterface
func (_m *MockKubevirtClient) VirtualMachineInstancetype(namespace string) v1beta117.VirtualMachineInstancetypeInterface
func (_m *MockKubevirtClient) VirtualMachinePool(namespace string) v1alpha111.VirtualMachinePoolInterface
func (_m *MockKubevirtClient) VirtualMachinePreference(namespace string) v1beta117.VirtualMachinePreferenceInterface
func (_m *MockKubevirtClient) VirtualMachineRestore(namespace string) v1beta118.VirtualMachineRestoreInterface
func (_m *MockKubevirtClient) VirtualMachineSnapshot(namespace string) v1beta118.VirtualMachineSnapshotInterface
func (_m *MockKubevirtClient) VirtualMachineSnapshotContent(namespace string) v1beta118.VirtualMachineSnapshotContentInterface
Mock of ReplicaSetInterface interface
type MockReplicaSetInterface struct {
// contains filtered or unexported fields
}
func NewMockReplicaSetInterface(ctrl *gomock.Controller) *MockReplicaSetInterface
func (_m *MockReplicaSetInterface) Create(ctx context.Context, virtualMachineInstanceReplicaSet *v121.VirtualMachineInstanceReplicaSet, opts v12.CreateOptions) (*v121.VirtualMachineInstanceReplicaSet, error)
func (_m *MockReplicaSetInterface) Delete(ctx context.Context, name string, opts v12.DeleteOptions) error
func (_m *MockReplicaSetInterface) DeleteCollection(ctx context.Context, opts v12.DeleteOptions, listOpts v12.ListOptions) error
func (_m *MockReplicaSetInterface) EXPECT() *_MockReplicaSetInterfaceRecorder
func (_m *MockReplicaSetInterface) Get(ctx context.Context, name string, opts v12.GetOptions) (*v121.VirtualMachineInstanceReplicaSet, error)
func (_m *MockReplicaSetInterface) GetScale(ctx context.Context, replicaSetName string, options v12.GetOptions) (*v11.Scale, error)
func (_m *MockReplicaSetInterface) List(ctx context.Context, opts v12.ListOptions) (*v121.VirtualMachineInstanceReplicaSetList, error)
func (_m *MockReplicaSetInterface) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v12.PatchOptions, subresources ...string) (*v121.VirtualMachineInstanceReplicaSet, error)
func (_m *MockReplicaSetInterface) PatchStatus(ctx context.Context, name string, pt types.PatchType, data []byte, opts v12.PatchOptions) (*v121.VirtualMachineInstanceReplicaSet, error)
func (_m *MockReplicaSetInterface) Update(ctx context.Context, virtualMachineInstanceReplicaSet *v121.VirtualMachineInstanceReplicaSet, opts v12.UpdateOptions) (*v121.VirtualMachineInstanceReplicaSet, error)
func (_m *MockReplicaSetInterface) UpdateScale(ctx context.Context, replicaSetName string, scale *v11.Scale) (*v11.Scale, error)
func (_m *MockReplicaSetInterface) UpdateStatus(ctx context.Context, virtualMachineInstanceReplicaSet *v121.VirtualMachineInstanceReplicaSet, opts v12.UpdateOptions) (*v121.VirtualMachineInstanceReplicaSet, error)
func (_m *MockReplicaSetInterface) Watch(ctx context.Context, opts v12.ListOptions) (watch.Interface, error)
Mock of ServerVersionInterface interface
type MockServerVersionInterface struct {
// contains filtered or unexported fields
}
func NewMockServerVersionInterface(ctrl *gomock.Controller) *MockServerVersionInterface
func (_m *MockServerVersionInterface) EXPECT() *_MockServerVersionInterfaceRecorder
func (_m *MockServerVersionInterface) Get() (*version.Info, error)
Mock of VirtualMachineInstanceInterface interface
type MockVirtualMachineInstanceInterface struct {
// contains filtered or unexported fields
}
func NewMockVirtualMachineInstanceInterface(ctrl *gomock.Controller) *MockVirtualMachineInstanceInterface
func (_m *MockVirtualMachineInstanceInterface) AddVolume(ctx context.Context, name string, addVolumeOptions *v121.AddVolumeOptions) error
func (_m *MockVirtualMachineInstanceInterface) Create(ctx context.Context, virtualMachineInstance *v121.VirtualMachineInstance, opts v12.CreateOptions) (*v121.VirtualMachineInstance, error)
func (_m *MockVirtualMachineInstanceInterface) Delete(ctx context.Context, name string, opts v12.DeleteOptions) error
func (_m *MockVirtualMachineInstanceInterface) DeleteCollection(ctx context.Context, opts v12.DeleteOptions, listOpts v12.ListOptions) error
func (_m *MockVirtualMachineInstanceInterface) EXPECT() *_MockVirtualMachineInstanceInterfaceRecorder
func (_m *MockVirtualMachineInstanceInterface) FilesystemList(ctx context.Context, name string) (v121.VirtualMachineInstanceFileSystemList, error)
func (_m *MockVirtualMachineInstanceInterface) Freeze(ctx context.Context, name string, unfreezeTimeout time.Duration) error
func (_m *MockVirtualMachineInstanceInterface) Get(ctx context.Context, name string, opts v12.GetOptions) (*v121.VirtualMachineInstance, error)
func (_m *MockVirtualMachineInstanceInterface) GuestOsInfo(ctx context.Context, name string) (v121.VirtualMachineInstanceGuestAgentInfo, error)
func (_m *MockVirtualMachineInstanceInterface) List(ctx context.Context, opts v12.ListOptions) (*v121.VirtualMachineInstanceList, error)
func (_m *MockVirtualMachineInstanceInterface) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v12.PatchOptions, subresources ...string) (*v121.VirtualMachineInstance, error)
func (_m *MockVirtualMachineInstanceInterface) Pause(ctx context.Context, name string, pauseOptions *v121.PauseOptions) error
func (_m *MockVirtualMachineInstanceInterface) PortForward(name string, port int, protocol string) (v122.StreamInterface, error)
func (_m *MockVirtualMachineInstanceInterface) RemoveVolume(ctx context.Context, name string, removeVolumeOptions *v121.RemoveVolumeOptions) error
func (_m *MockVirtualMachineInstanceInterface) SEVFetchCertChain(ctx context.Context, name string) (v121.SEVPlatformInfo, error)
func (_m *MockVirtualMachineInstanceInterface) SEVInjectLaunchSecret(ctx context.Context, name string, sevSecretOptions *v121.SEVSecretOptions) error
func (_m *MockVirtualMachineInstanceInterface) SEVQueryLaunchMeasurement(ctx context.Context, name string) (v121.SEVMeasurementInfo, error)
func (_m *MockVirtualMachineInstanceInterface) SEVSetupSession(ctx context.Context, name string, sevSessionOptions *v121.SEVSessionOptions) error
func (_m *MockVirtualMachineInstanceInterface) Screenshot(ctx context.Context, name string, options *v121.ScreenshotOptions) ([]byte, error)
func (_m *MockVirtualMachineInstanceInterface) SerialConsole(name string, options *v122.SerialConsoleOptions) (v122.StreamInterface, error)
func (_m *MockVirtualMachineInstanceInterface) SoftReboot(ctx context.Context, name string) error
func (_m *MockVirtualMachineInstanceInterface) USBRedir(vmiName string) (v122.StreamInterface, error)
func (_m *MockVirtualMachineInstanceInterface) Unfreeze(ctx context.Context, name string) error
func (_m *MockVirtualMachineInstanceInterface) Unpause(ctx context.Context, name string, unpauseOptions *v121.UnpauseOptions) error
func (_m *MockVirtualMachineInstanceInterface) Update(ctx context.Context, virtualMachineInstance *v121.VirtualMachineInstance, opts v12.UpdateOptions) (*v121.VirtualMachineInstance, error)
func (_m *MockVirtualMachineInstanceInterface) UpdateStatus(ctx context.Context, virtualMachineInstance *v121.VirtualMachineInstance, opts v12.UpdateOptions) (*v121.VirtualMachineInstance, error)
func (_m *MockVirtualMachineInstanceInterface) UserList(ctx context.Context, name string) (v121.VirtualMachineInstanceGuestOSUserList, error)
func (_m *MockVirtualMachineInstanceInterface) VNC(name string) (v122.StreamInterface, error)
func (_m *MockVirtualMachineInstanceInterface) VSOCK(name string, options *v121.VSOCKOptions) (v122.StreamInterface, error)
func (_m *MockVirtualMachineInstanceInterface) Watch(ctx context.Context, opts v12.ListOptions) (watch.Interface, error)
Mock of VirtualMachineInstanceMigrationInterface interface
type MockVirtualMachineInstanceMigrationInterface struct {
// contains filtered or unexported fields
}
func NewMockVirtualMachineInstanceMigrationInterface(ctrl *gomock.Controller) *MockVirtualMachineInstanceMigrationInterface
func (_m *MockVirtualMachineInstanceMigrationInterface) Create(ctx context.Context, virtualMachineInstanceMigration *v121.VirtualMachineInstanceMigration, opts v12.CreateOptions) (*v121.VirtualMachineInstanceMigration, error)
func (_m *MockVirtualMachineInstanceMigrationInterface) Delete(ctx context.Context, name string, opts v12.DeleteOptions) error
func (_m *MockVirtualMachineInstanceMigrationInterface) DeleteCollection(ctx context.Context, opts v12.DeleteOptions, listOpts v12.ListOptions) error
func (_m *MockVirtualMachineInstanceMigrationInterface) EXPECT() *_MockVirtualMachineInstanceMigrationInterfaceRecorder
func (_m *MockVirtualMachineInstanceMigrationInterface) Get(ctx context.Context, name string, opts v12.GetOptions) (*v121.VirtualMachineInstanceMigration, error)
func (_m *MockVirtualMachineInstanceMigrationInterface) List(ctx context.Context, opts v12.ListOptions) (*v121.VirtualMachineInstanceMigrationList, error)
func (_m *MockVirtualMachineInstanceMigrationInterface) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v12.PatchOptions, subresources ...string) (*v121.VirtualMachineInstanceMigration, error)
func (_m *MockVirtualMachineInstanceMigrationInterface) PatchStatus(ctx context.Context, name string, pt types.PatchType, data []byte, opts v12.PatchOptions) (*v121.VirtualMachineInstanceMigration, error)
func (_m *MockVirtualMachineInstanceMigrationInterface) Update(ctx context.Context, virtualMachineInstanceMigration *v121.VirtualMachineInstanceMigration, opts v12.UpdateOptions) (*v121.VirtualMachineInstanceMigration, error)
func (_m *MockVirtualMachineInstanceMigrationInterface) UpdateStatus(ctx context.Context, virtualMachineInstanceMigration *v121.VirtualMachineInstanceMigration, opts v12.UpdateOptions) (*v121.VirtualMachineInstanceMigration, error)
func (_m *MockVirtualMachineInstanceMigrationInterface) Watch(ctx context.Context, opts v12.ListOptions) (watch.Interface, error)
Mock of VirtualMachineInstancePresetInterface interface
type MockVirtualMachineInstancePresetInterface struct {
// contains filtered or unexported fields
}
func NewMockVirtualMachineInstancePresetInterface(ctrl *gomock.Controller) *MockVirtualMachineInstancePresetInterface
func (_m *MockVirtualMachineInstancePresetInterface) Create(ctx context.Context, virtualMachineInstancePreset *v121.VirtualMachineInstancePreset, opts v12.CreateOptions) (*v121.VirtualMachineInstancePreset, error)
func (_m *MockVirtualMachineInstancePresetInterface) Delete(ctx context.Context, name string, opts v12.DeleteOptions) error
func (_m *MockVirtualMachineInstancePresetInterface) DeleteCollection(ctx context.Context, opts v12.DeleteOptions, listOpts v12.ListOptions) error
func (_m *MockVirtualMachineInstancePresetInterface) EXPECT() *_MockVirtualMachineInstancePresetInterfaceRecorder
func (_m *MockVirtualMachineInstancePresetInterface) Get(ctx context.Context, name string, opts v12.GetOptions) (*v121.VirtualMachineInstancePreset, error)
func (_m *MockVirtualMachineInstancePresetInterface) List(ctx context.Context, opts v12.ListOptions) (*v121.VirtualMachineInstancePresetList, error)
func (_m *MockVirtualMachineInstancePresetInterface) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v12.PatchOptions, subresources ...string) (*v121.VirtualMachineInstancePreset, error)
func (_m *MockVirtualMachineInstancePresetInterface) Update(ctx context.Context, virtualMachineInstancePreset *v121.VirtualMachineInstancePreset, opts v12.UpdateOptions) (*v121.VirtualMachineInstancePreset, error)
func (_m *MockVirtualMachineInstancePresetInterface) Watch(ctx context.Context, opts v12.ListOptions) (watch.Interface, error)
Mock of VirtualMachineInterface interface
type MockVirtualMachineInterface struct {
// contains filtered or unexported fields
}
func NewMockVirtualMachineInterface(ctrl *gomock.Controller) *MockVirtualMachineInterface
func (_m *MockVirtualMachineInterface) AddVolume(ctx context.Context, name string, addVolumeOptions *v121.AddVolumeOptions) error
func (_m *MockVirtualMachineInterface) Create(ctx context.Context, virtualMachine *v121.VirtualMachine, opts v12.CreateOptions) (*v121.VirtualMachine, error)
func (_m *MockVirtualMachineInterface) Delete(ctx context.Context, name string, opts v12.DeleteOptions) error
func (_m *MockVirtualMachineInterface) DeleteCollection(ctx context.Context, opts v12.DeleteOptions, listOpts v12.ListOptions) error
func (_m *MockVirtualMachineInterface) EXPECT() *_MockVirtualMachineInterfaceRecorder
func (_m *MockVirtualMachineInterface) ForceRestart(ctx context.Context, name string, restartOptions *v121.RestartOptions) error
func (_m *MockVirtualMachineInterface) ForceStop(ctx context.Context, name string, stopOptions *v121.StopOptions) error
func (_m *MockVirtualMachineInterface) Get(ctx context.Context, name string, opts v12.GetOptions) (*v121.VirtualMachine, error)
func (_m *MockVirtualMachineInterface) GetWithExpandedSpec(ctx context.Context, name string) (*v121.VirtualMachine, error)
func (_m *MockVirtualMachineInterface) List(ctx context.Context, opts v12.ListOptions) (*v121.VirtualMachineList, error)
func (_m *MockVirtualMachineInterface) MemoryDump(ctx context.Context, name string, memoryDumpRequest *v121.VirtualMachineMemoryDumpRequest) error
func (_m *MockVirtualMachineInterface) Migrate(ctx context.Context, name string, migrateOptions *v121.MigrateOptions) error
func (_m *MockVirtualMachineInterface) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v12.PatchOptions, subresources ...string) (*v121.VirtualMachine, error)
func (_m *MockVirtualMachineInterface) PatchStatus(ctx context.Context, name string, pt types.PatchType, data []byte, patchOptions v12.PatchOptions) (*v121.VirtualMachine, error)
func (_m *MockVirtualMachineInterface) PortForward(name string, port int, protocol string) (v122.StreamInterface, error)
func (_m *MockVirtualMachineInterface) RemoveMemoryDump(ctx context.Context, name string) error
func (_m *MockVirtualMachineInterface) RemoveVolume(ctx context.Context, name string, removeVolumeOptions *v121.RemoveVolumeOptions) error
func (_m *MockVirtualMachineInterface) Restart(ctx context.Context, name string, restartOptions *v121.RestartOptions) error
func (_m *MockVirtualMachineInterface) Start(ctx context.Context, name string, startOptions *v121.StartOptions) error
func (_m *MockVirtualMachineInterface) Stop(ctx context.Context, name string, stopOptions *v121.StopOptions) error
func (_m *MockVirtualMachineInterface) Update(ctx context.Context, virtualMachine *v121.VirtualMachine, opts v12.UpdateOptions) (*v121.VirtualMachine, error)
func (_m *MockVirtualMachineInterface) UpdateStatus(ctx context.Context, virtualMachine *v121.VirtualMachine, opts v12.UpdateOptions) (*v121.VirtualMachine, error)
func (_m *MockVirtualMachineInterface) Watch(ctx context.Context, opts v12.ListOptions) (watch.Interface, error)
type ReplicaSetInterface interface { kvcorev1.VirtualMachineInstanceReplicaSetInterface }
type RestConfigHookFunc func(*rest.Config)
type ServerVersion struct {
// contains filtered or unexported fields
}
func (v *ServerVersion) Get() (*version.Info, error)
type ServerVersionInterface interface { Get() (*version.Info, error) }
type VirtHandlerClient interface { ForNode(nodeName string) VirtHandlerConn Port(port int) VirtHandlerClient Namespace(namespace string) VirtHandlerClient }
func NewVirtHandlerClient(virtCli KubevirtClient, httpCli *http.Client) VirtHandlerClient
type VirtHandlerConn interface { ConnectionDetails() (ip string, port int, err error) ConsoleURI(vmi *virtv1.VirtualMachineInstance) (string, error) USBRedirURI(vmi *virtv1.VirtualMachineInstance) (string, error) VNCURI(vmi *virtv1.VirtualMachineInstance) (string, error) VSOCKURI(vmi *virtv1.VirtualMachineInstance, port string, tls string) (string, error) PauseURI(vmi *virtv1.VirtualMachineInstance) (string, error) UnpauseURI(vmi *virtv1.VirtualMachineInstance) (string, error) FreezeURI(vmi *virtv1.VirtualMachineInstance) (string, error) UnfreezeURI(vmi *virtv1.VirtualMachineInstance) (string, error) SoftRebootURI(vmi *virtv1.VirtualMachineInstance) (string, error) SEVFetchCertChainURI(vmi *virtv1.VirtualMachineInstance) (string, error) SEVQueryLaunchMeasurementURI(vmi *virtv1.VirtualMachineInstance) (string, error) SEVInjectLaunchSecretURI(vmi *virtv1.VirtualMachineInstance) (string, error) Pod() (pod *v1.Pod, err error) Put(url string, body io.ReadCloser) error Get(url string) (string, error) GuestInfoURI(vmi *virtv1.VirtualMachineInstance) (string, error) UserListURI(vmi *virtv1.VirtualMachineInstance) (string, error) FilesystemListURI(vmi *virtv1.VirtualMachineInstance) (string, error) }
type VirtualMachineInstanceInterface interface { kvcorev1.VirtualMachineInstanceInterface }
type VirtualMachineInstanceMigrationInterface interface { kvcorev1.VirtualMachineInstanceMigrationInterface }
type VirtualMachineInstancePresetInterface interface { kvcorev1.VirtualMachineInstancePresetInterface }
VirtualMachineInterface provides convenience methods to work with virtual machines inside the cluster
type VirtualMachineInterface interface { kvcorev1.VirtualMachineInterface }