Documentation
¶
Index ¶
- Constants
- func CollectObjDesc(dest string, objTypes ...string) error
- func CollectObjDescUsingTestDesc(td GinkgoTestDescription) error
- func CreateNamespaceWithParameter(namespace string) error
- func CreateResourceWithFilePath(filePath string)
- func CreateResourceWithFilePathTestNamespace(filePath string)
- func CreateServiceAccount(saName string)
- func CreateUserWithParameter(username string) error
- func DeleteResourceByName(resourceType, nameSpace, resourceName string)
- func DeleteResourceWithLabelTestNamespace(resourceType, resourceLabel string)
- func DeleteServiceAccount(saName string)
- func DeleteUserWithParameter(username string) error
- func DescribeObject(name string, namespace string) (string, error)
- func DescribeObjects(namespace string, names []string) (map[string]string, error)
- func DumpObjects(namespace string, objTypes []string, dest string) error
- func DumpObjectsByType(namespace string, objType string, dest string) error
- func EncodePrivateKeyToPEM(privateKey *rsa.PrivateKey) []byte
- func GeneratePrivateKey(bitSize int) (*rsa.PrivateKey, error)
- func GeneratePublicKey(privatekey *rsa.PublicKey) ([]byte, error)
- func GetAvailableResources(virtClient kubecli.KubevirtClient, cpuNeeded int64, memNeeded int64) (int, int)
- func GetNamespaces() ([]string, error)
- func GetObjects(namespace string, objType string) ([]string, error)
- func IsEnoughResources(virtClient kubecli.KubevirtClient, cpuNeeded int, memNeeded int64) (bool, int)
- func LoggedInFedoraExpecter(vmiName string, vmiNamespace string, timeout int64, vmNameInPromt bool) (expect.Expecter, error)
- func OpenConsole(virtCli kubecli.KubevirtClient, vmiName string, vmiNamespace string, ...) (expect.Expecter, <-chan error, error)
- func ProcessTemplateWithParameters(srcFilePath, dstFilePath string, params ...string) string
- func RemoveDataVolume(dvName string, namespace string)
- func RemoveNamespaceWithParameter(namespace string) error
- func RunOcDescribeCommand(resourceType, resourceName string) string
- func VNCConnection(namespace, vmname string) (string, error)
- func WaitUntilResourceReadyByLabelTestNamespace(resourceType, label, query, expectOut string)
- func WaitUntilResourceReadyByName(resourceType, resourceName, nameSpace, query, expectOut string)
- func WaitUntilResourceReadyByNameTestNamespace(resourceType, resourceName, query, expectOut string)
- type Result
- type User
- type VirtualMachine
- func (vm VirtualMachine) Create() (string, string, error)
- func (vm VirtualMachine) Delete() (string, string, error)
- func (vm VirtualMachine) GetVMInfo(spec string) (string, string, error)
- func (vm VirtualMachine) GetVMUID() (string, error)
- func (vm VirtualMachine) IsRunning() (bool, error)
- func (vm VirtualMachine) ProcessTemplate() (string, error)
- func (vm VirtualMachine) Start() (string, string, error)
- func (vm VirtualMachine) Stop() (string, string, error)
Constants ¶
View Source
const ( NamespaceTestDefault = "kubevirt-test-default" NamespaceTestTemplate = "openshift" UsernameTestUser = "kubevirt-test-user" UsernameAdminUser = "test_admin" PasswordAdminUser = "123456" CDI_LABEL_KEY = "app" CDI_LABEL_VALUE = "containerized-data-importer" CDI_LABEL_SELECTOR = CDI_LABEL_KEY + "=" + CDI_LABEL_VALUE ShortTimeout = time.Duration(2) * time.Minute LongTimeout = time.Duration(4) * time.Minute )
Variables ¶
This section is empty.
Functions ¶
func CollectObjDesc ¶
func CollectObjDescUsingTestDesc ¶
func CollectObjDescUsingTestDesc(td GinkgoTestDescription) error
func CreateResourceWithFilePath ¶ added in v0.12.4
func CreateResourceWithFilePath(filePath string)
func CreateResourceWithFilePathTestNamespace ¶
func CreateResourceWithFilePathTestNamespace(filePath string)
func CreateServiceAccount ¶
func CreateServiceAccount(saName string)
func CreateUserWithParameter ¶
func DeleteResourceByName ¶ added in v0.12.4
func DeleteResourceByName(resourceType, nameSpace, resourceName string)
func DeleteResourceWithLabelTestNamespace ¶
func DeleteResourceWithLabelTestNamespace(resourceType, resourceLabel string)
func DeleteServiceAccount ¶
func DeleteServiceAccount(saName string)
func DeleteUserWithParameter ¶
func DescribeObjects ¶
func DumpObjectsByType ¶
func EncodePrivateKeyToPEM ¶
func EncodePrivateKeyToPEM(privateKey *rsa.PrivateKey) []byte
encodePrivateKeyToPEM encodes Private Key from RSA to PEM format
func GeneratePrivateKey ¶
func GeneratePrivateKey(bitSize int) (*rsa.PrivateKey, error)
generatePrivateKey creates a RSA Private Key of specified byte size
func GeneratePublicKey ¶
Will returns in the format "ssh-rsa ..."
func GetAvailableResources ¶ added in v0.12.4
func GetNamespaces ¶
func IsEnoughResources ¶ added in v0.12.4
func IsEnoughResources(virtClient kubecli.KubevirtClient, cpuNeeded int, memNeeded int64) (bool, int)
Checking if the cluster can run at least one VM
func LoggedInFedoraExpecter ¶
func OpenConsole ¶
func RemoveDataVolume ¶ added in v0.11.0
func RunOcDescribeCommand ¶
func VNCConnection ¶
func WaitUntilResourceReadyByLabelTestNamespace ¶
func WaitUntilResourceReadyByLabelTestNamespace(resourceType, label, query, expectOut string)
func WaitUntilResourceReadyByName ¶ added in v0.12.4
func WaitUntilResourceReadyByName(resourceType, resourceName, nameSpace, query, expectOut string)
func WaitUntilResourceReadyByNameTestNamespace ¶
func WaitUntilResourceReadyByNameTestNamespace(resourceType, resourceName, query, expectOut string)
Types ¶
type VirtualMachine ¶
type VirtualMachine struct { Name string Type string UID string Manifest string TemplateInCluster string TemplateFromFile string TemplateParams []string Namespace string }
VirtualMachine can be a vm, vmi, vmirs, vmiPreset.
func (VirtualMachine) GetVMInfo ¶
func (vm VirtualMachine) GetVMInfo(spec string) (string, string, error)
func (VirtualMachine) GetVMUID ¶
func (vm VirtualMachine) GetVMUID() (string, error)
func (VirtualMachine) IsRunning ¶
func (vm VirtualMachine) IsRunning() (bool, error)
func (VirtualMachine) ProcessTemplate ¶
func (vm VirtualMachine) ProcessTemplate() (string, error)
Click to show internal directories.
Click to hide internal directories.