Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rajivnathan committed Nov 20, 2023
1 parent 6078e60 commit f3fdf96
Showing 1 changed file with 2 additions and 181 deletions.
183 changes: 2 additions & 181 deletions controllers/idler/idler_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1466,198 +1466,19 @@ var virtualmachineinstanceJSON = []byte(`{
"apiVersion": "kubevirt.io/v1",
"kind": "VirtualMachineInstance",
"metadata": {
"annotations": {
"kubevirt.io/latest-observed-api-version": "v1",
"kubevirt.io/storage-observed-api-version": "v1",
"kubevirt.io/vm-generation": "1",
"vm.kubevirt.io/flavor": "small",
"vm.kubevirt.io/os": "rhel9",
"vm.kubevirt.io/workload": "server"
},
"creationTimestamp": "2023-11-16T18:37:55Z",
"finalizers": [
"kubevirt.io/virtualMachineControllerFinalize",
"foregroundDeleteVirtualMachine"
],
"generation": 4,
"labels": {
"kubevirt.io/domain": "rhel9-rajiv",
"kubevirt.io/size": "small"
},
"name": "rhel9-rajiv",
"namespace": "another-namespace",
"resourceVersion": "229052",
"uid": "51e33178-448e-4236-8006-14a21568a569"
},
"spec": {
"architecture": "amd64",
"domain": {
"resources": {
"limits": {
"memory": "2Gi"
},
"requests": {
"memory": "2Gi"
}
}
},
"evictionStrategy": "LiveMigrate",
"networks": [
{
"name": "default",
"pod": {}
}
],
"terminationGracePeriodSeconds": 180,
"volumes": [
{
"dataVolume": {
"name": "rhel9-rajiv"
},
"name": "rootdisk"
},
{
"cloudInitNoCloud": {
"userData": "#cloud-config\nuser: cloud-user\npassword: abcd-1234-ef56\nchpasswd:\n expire: false\n"
},
"name": "cloudinitdisk"
}
]
"namespace": "another-namespace"
}
}`)

var virtualmachineJSON = []byte(`{
"apiVersion": "kubevirt.io/v1",
"kind": "VirtualMachine",
"metadata": {
"annotations": {
"kubevirt.io/latest-observed-api-version": "v1",
"kubevirt.io/storage-observed-api-version": "v1alpha3",
"vm.kubevirt.io/validations": "[\n {\n \"name\": \"minimal-required-memory\",\n \"path\": \"jsonpath::.spec.domain.resources.requests.memory\",\n \"rule\": \"integer\",\n \"message\": \"This VM requires more memory.\",\n \"min\": 1610612736\n }\n]\n"
},
"creationTimestamp": "2023-09-12T15:27:31Z",
"finalizers": [
"kubevirt.io/virtualMachineControllerFinalize"
],
"generation": 1,
"labels": {
"app": "rhel9-rajiv",
"vm.kubevirt.io/template": "rhel9-server-small",
"vm.kubevirt.io/template.namespace": "openshift",
"vm.kubevirt.io/template.revision": "1",
"vm.kubevirt.io/template.version": "v0.25.0"
},
"name": "rhel9-rajiv",
"namespace": "another-namespace"
},
"spec": {
"dataVolumeTemplates": [
{
"apiVersion": "cdi.kubevirt.io/v1beta1",
"kind": "DataVolume",
"metadata": {
"creationTimestamp": null,
"name": "rhel9-rajiv"
},
"spec": {
"sourceRef": {
"kind": "DataSource",
"name": "rhel9",
"namespace": "openshift-virtualization-os-images"
},
"storage": {
"resources": {
"requests": {
"storage": "30Gi"
}
}
}
}
}
],
"running": true,
"template": {
"metadata": {
"annotations": {
"vm.kubevirt.io/flavor": "small",
"vm.kubevirt.io/os": "rhel9",
"vm.kubevirt.io/workload": "server"
},
"creationTimestamp": null,
"labels": {
"kubevirt.io/domain": "rhel9-rajiv",
"kubevirt.io/size": "small"
}
},
"spec": {
"domain": {
"resources": {
"requests": {
"memory": "2Gi"
}
}
},
"evictionStrategy": "LiveMigrate",
"networks": [
{
"name": "default",
"pod": {}
}
],
"terminationGracePeriodSeconds": 180,
"volumes": [
{
"dataVolume": {
"name": "rhel9-rajiv"
},
"name": "rootdisk"
},
{
"cloudInitNoCloud": {
"userData": "#cloud-config\nuser: cloud-user\npassword: abcd-1234-ef56\nchpasswd: { expire: False }"
},
"name": "cloudinitdisk"
}
]
}
}
},
"status": {
"conditions": [
{
"lastProbeTime": null,
"lastTransitionTime": "2023-09-12T15:32:55Z",
"status": "True",
"type": "Ready"
},
{
"lastProbeTime": null,
"lastTransitionTime": null,
"message": "cannot migrate VMI: PVC rhel9-rajiv is not shared, live migration requires that all PVCs must be shared (using ReadWriteMany access mode)",
"reason": "DisksNotLiveMigratable",
"status": "False",
"type": "LiveMigratable"
},
{
"lastProbeTime": "2023-09-12T15:33:14Z",
"lastTransitionTime": null,
"status": "True",
"type": "AgentConnected"
}
],
"created": true,
"printableStatus": "Running",
"ready": true,
"volumeSnapshotStatuses": [
{
"enabled": true,
"name": "rootdisk"
},
{
"enabled": false,
"name": "cloudinitdisk",
"reason": "Snapshot is not supported for this volumeSource type [cloudinitdisk]"
}
]
"running": true
}
}`)

0 comments on commit f3fdf96

Please sign in to comment.