Skip to content

Commit

Permalink
new changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sipriyaa committed Oct 21, 2024
1 parent 30ce63e commit 0dcc307
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions tests/e2e/snapshot_vmservice_vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,10 @@ var _ bool = ginkgo.Describe("[snapshot-vmsvc] Snapshot VM Service VM", func() {
// reading storage profile id of "wcpglobal_storage_profile"
storageProfileId = e2eVSphere.GetSpbmPolicyID(storagePolicyName)

/* creating/reading content library
"https://wp-content-pstg.broadcom.com/vmsvc/lib.json" */
// creating/reading content library
contentLibId := createAndOrGetContentlibId4Url(vcRestSessionId, GetAndExpectStringEnvVar(envContentLibraryUrl),
dsRef.Value, GetAndExpectStringEnvVar(envContentLibraryUrlSslThumbprint))

/* kubectl get vmclass -n <ns> */
vmClass = os.Getenv(envVMClass)
if vmClass == "" {
vmClass = vmClassBestEffortSmall
Expand All @@ -148,10 +146,7 @@ var _ bool = ginkgo.Describe("[snapshot-vmsvc] Snapshot VM Service VM", func() {
cnsopC, err = ctlrclient.New(f.ClientConfig(), ctlrclient.Options{Scheme: cnsOpScheme})
gomega.Expect(err).NotTo(gomega.HaveOccurred())

/*
*** reading vm image name "ubuntu-2004-cloud-init-21.4-kube-v1.20.10" ***
kubectl get vmimage -o wide -n <ns>
*/
// reading vm image name
vmImageName := GetAndExpectStringEnvVar(envVmsvcVmImageName)
framework.Logf("Waiting for virtual machine image list to be available in namespace '%s' for image '%s'",
namespace, vmImageName)
Expand Down Expand Up @@ -230,7 +225,6 @@ var _ bool = ginkgo.Describe("[snapshot-vmsvc] Snapshot VM Service VM", func() {
}()

ginkgo.By("Creating VM bootstrap data")
/* kubectl get secret -n <ns> */
secretName := createBootstrapSecretForVmsvcVms(ctx, client, namespace)
defer func() {
ginkgo.By("Deleting VM bootstrap data")
Expand All @@ -239,7 +233,6 @@ var _ bool = ginkgo.Describe("[snapshot-vmsvc] Snapshot VM Service VM", func() {
}()

ginkgo.By("Creating VM")
/* kubectl get vm -o wide -n <ns> */
vm := createVmServiceVmWithPvcs(
ctx, vmopC, namespace, vmClass, []*v1.PersistentVolumeClaim{pvc}, vmi, storageClassName, secretName)
defer func() {
Expand All @@ -252,12 +245,6 @@ var _ bool = ginkgo.Describe("[snapshot-vmsvc] Snapshot VM Service VM", func() {
}()

ginkgo.By("Creating loadbalancing service for ssh with the VM")
/*
kubectl get network -n <ns>
kubectl get vmservice -n <ns>
kubectl get svc -n <ns>
kubectl get endpoints -n <ns>
*/
vmlbsvc := createService4Vm(ctx, vmopC, namespace, vm.Name)
defer func() {
ginkgo.By("Deleting loadbalancing service for ssh with the VM")
Expand All @@ -277,9 +264,6 @@ var _ bool = ginkgo.Describe("[snapshot-vmsvc] Snapshot VM Service VM", func() {
[]*v1.PersistentVolumeClaim{pvc})).NotTo(gomega.HaveOccurred())

ginkgo.By("Verify PVCs are accessible to the VM")
/*
[ ~ ]# kubectl get cnsnodevmattachment -n <ns> -o yaml
*/
ginkgo.By("Write some IO to the CSI volumes and read it back from them and verify the data integrity")
vm, err = getVmsvcVM(ctx, vmopC, vm.Namespace, vm.Name) // refresh vm info
gomega.Expect(err).NotTo(gomega.HaveOccurred())
Expand Down

0 comments on commit 0dcc307

Please sign in to comment.