On 03/12/2013 11:06 AM, [email protected] wrote:
From: whuang<[email protected]>

Signed-off-by: whuang<[email protected]>
---
  libvirt/tests/cfg/virsh_change_media.cfg | 177 +++++++++++++++++++++++++++++++
  1 file changed, 177 insertions(+)
  create mode 100755 libvirt/tests/cfg/virsh_change_media.cfg

diff --git a/libvirt/tests/cfg/virsh_change_media.cfg 
b/libvirt/tests/cfg/virsh_change_media.cfg
new file mode 100755
index 0000000..3b0a646
--- /dev/null
+++ b/libvirt/tests/cfg/virsh_change_media.cfg
@@ -0,0 +1,177 @@
+- virsh_change_media:
+    type = virsh_change_media
+    cdrom_dir = "/tmp/cdrom"
+    old_iso = "/tmp/cdrom/old.iso"
+    new_iso = "/tmp/cdrom/new.iso"

How about putting temp iso files into data_dir.get_tmp_dir()?
Is it more suitable? > Chris

Of course, /tmp is ok, it is just my advice. :)

BTW, if you can, rename parameters' name to be more special
to avoid overlapping parameter of other config file.

+    update_iso_xml = "/tmp/cdrom/update_iso.xml"
+    disk_device = "hdc"
+    vm_ref = "name"
+    init_cdrom = "''"
+    libvirtd = "on"
+    variants:
+        - positive_test:
+            status_error = "no"
+            variants:
+                - running_guest:
+                    start_vm = "yes"
+                    variants:
+                        - eject:
+                            change_media_source =
+                            action = "--eject "
+                            check_file =
+                            init_iso = "/tmp/cdrom/old.iso"
+                            variants:
+                                - options:
+                                    variants:
+                                        - none:
+                                            options = " "
+                                        - current:
+                                            options = "--current"
+                                        - live:
+                                            options = "--live"
+                                        - force:
+                                            options = "--force"
+                                        - config:
+                                            options = "--config"
+
+                        - insert:
+                            change_media_source = "/tmp/cdrom/old.iso"
+                            action = "--insert "
+                            check_file = "old"
+                            init_iso =
+                            variants:
+                                - options:
+                                    variants:
+                                        - none:
+                                            options = " "
+                                        - current:
+                                            options = "--current"
+                                        - live:
+                                            options = "--live"
+                                        - force:
+                                            options = "--force"
+                                        - config:
+                                            options = "--config"
+                        - update:
+                            change_media_source = "/tmp/cdrom/new.iso"
+                            action = "--update "
+                            check_file = "new"
+                            init_iso = "/tmp/cdrom/old.iso"
+                            variants:
+                                - options:
+                                    variants:
+                                        - none:
+                                            options = " "
+                                        - current:
+                                            options = "--current"
+                                        - live:
+                                            options = "--live"
+                                        - force:
+                                            options = "--force"
+                                        - config:
+                                            options = "--config"
+                - shutoff_guest:
+                    start_vm = "no"
+                    variants:
+                        - eject:
+                            change_media_source =
+                            action = "--eject "
+                            check_file =
+                            init_iso = "/tmp/cdrom/old.iso"
+                            variants:
+                                - options:
+                                    variants:
+                                        - none:
+                                            options = " "
+                                        - current:
+                                            options = "--current"
+                                        - force:
+                                            options = "--force"
+                                        - config:
+                                            options = "--config"
+
+                        - insert:
+                            change_media_source = "/tmp/cdrom/old.iso"
+                            action = "--insert "
+                            check_file = "old"
+                            init_iso =
+                            variants:
+                                - options:
+                                    variants:
+                                        - none:
+                                            options = " "
+                                        - current:
+                                            options = "--current"
+                                        - force:
+                                            options = "--force"
+                                        - config:
+                                            options = "--config"
+                        - update:
+                            change_media_source = "/tmp/cdrom/new.iso"
+                            action = "--update "
+                            check_file = "new"
+                            init_iso = "/tmp/cdrom/old.iso"
+                            variants:
+                                - options:
+                                    variants:
+                                        - none:
+                                            options =  " "
+                                        - current:
+                                            options = "--current"
+                                        - force:
+                                            options = "--force"
+                                        - config:
+                                            options = "--config"
+
+
+
+        - negative_test:
+            status_error = "yes"
+            start_vm = "no"
+            variants:
+                - eject:
+                    action = "--eject "
+                    options = "--current"
+                    variants:
+                        - no_name:
+                            vm_ref = " "
+                        - unexpect_option:
+                            vm_ref = "\#"
+                        - invalid_option:
+                            options = "xyz"
+                        - with_libvirtd_stop:
+                            libvirtd = "off"
+                        - shutoff_guest_with_live:
+                            options = "--live"
+
+                - insert:
+                    action = "--insert "
+                    options = "--current"
+                    variants:
+                        - no_option:
+                            options = " "
+                        - no_name:
+                            vm_ref = " "
+                        - unexpect_option:
+                            vm_ref = "\#"
+                        - invalid_option:
+                            options = "xyz"
+                        - with_libvirtd_stop:
+                            libvirtd = "off"
+                        - shutoff_guest_with_live:
+                            options = "--live"
+                - update:
+                    action = "--update "
+                    options = "--current"
+                    variants:
+                        - no_name:
+                            vm_ref = " "
+                        - unexpect_option:
+                            vm_ref = "\#"
+                        - invalid_option:
+                            options = "xyz"
+                        - with_libvirtd_stop:
+                            libvirtd = "off"
+                        - shutoff_guest_with_live:
+                            options = "--live"
+


--
Best Regards
Yu Mingfei

_______________________________________________
Virt-test-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-test-devel

Reply via email to