Skip to content

Commit

Permalink
openstack: block image based VMs
Browse files Browse the repository at this point in the history
We cannot support this currently

Signed-off-by: Benny Zlotnik <[email protected]>
  • Loading branch information
bennyz authored and ahadas committed Aug 29, 2023
1 parent 2f4d552 commit f22238e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package io.konveyor.forklift.openstack

import future.keywords.if

default not_volume_based = false

not_volume_based if {
input.imageID != ""
}

concerns[flag] {
not_volume_based
flag := {
"category": "Critical",
"label": "Unsupported image format detected",
"assessment": "The VM is not volume based, currently only volume based VMs can be imported.",
}
}
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
package io.konveyor.forklift.openstack

test_with_valid_image_format {
test_image_based_vm {
mock_vm := {
"name": "test",
"imageID": "b749c132-bb97-4145-b86e-a1751cf75e21",
"image": {
"id": "b749c132-bb97-4145-b86e-a1751cf75e21",
"diskFormat": "qcow2",
},
}
results := concerns with input as mock_vm
count(results) == 0
count(results) == 1
}

test_with_invalid_storage_type {
test_volume_based_vm {
mock_vm := {
"name": "test",
"image": {
"id": "b749c132-bb97-4145-b86e-a1751cf75e21",
"diskFormat": "ami",
},
"volumes": []
}
results := concerns with input as mock_vm
count(results) == 1
count(results) == 0
}

0 comments on commit f22238e

Please sign in to comment.