libvirt: Add test for virsh screenshot

Add test case and cfg for virsh screenshot command.

Signed-off-by: Wayne Sun <gsun@redhat.com>
libvirt.tests: Add virsh nwfilter define case

- Add virsh nwfilter define case
  The case support process multiple rules for define one filter xml.

  Only check whether the filter config xml exist or not after define
  and check the filter is in nwfilter-list command output.

  Why not strict check each attribue in xml:
    1. each attribute in xml might have default value if not set.
    2. if the attribute value is out of boundary (not valid value),
       define action will omit the attribute.
    3. protocols have different attributes which is a super big
       matrix to check each detail one

- Add virsh nwfilter define cfg
  25 positive cases including 1 update define case and 24 protocol
  type xml test.
  include 3 negative cases.

  The rule parameter in cfg should be like:
  for only 1 rule:
    rule = "rule_action=accept rule_direction=out protocol=mac EOL"
  each rule should end with string 'EOL' for split.

  Test Data:
    TESTS: 28
    CLEANUP: PASS (0.00 s)
    TOTAL TIME: 26.68 s
    TESTS PASSED: 28
    TESTS FAILED: 0
    SUCCESS RATE: 100.00 %

Signed-off-by: Wayne Sun <gsun@redhat.com>
libvirt.tests: Add virsh nwfilter-dumpxml test

v1:
Simply dump network filter xml with normal and error test.

v2:
Only accept filter name from cfg as filter uuid may differ on
different host.
For check the dumpxml result, extract uuid and name from output
and compare with nwfilter-list to confirm.

v3:
Add nwfilter dumpxml using filter uuid after using filter name
Only given filter name in cfg, run 2 time dumpxml to cover both
name and uuid option.

Signed-off-by: Wayne Sun <gsun@redhat.com>
libvirt.tests: add virsh nwfilter list test

The test simply list filters and check the filter cfg file exist
under network filter config path

Signed-off-by: Wayne Sun <gsun@redhat.com>
libvirt.tests: Add nwfilter-undefine test case

Undefine network filter using given filter name or uuid in cfg.
If the filter is valid, backup filter xml before undefine and
define the filter back after undefine succeed.

Signed-off-by: Wayne Sun <gsun@redhat.com>
libvirt.tests: Add nwfilter-edit test case

Add the case and cfg file for nwfilter-edit.
In the cfg file, 4 scenarios included, 2 for positive and 2 for
negative testing.

TODO: Cover test with readonly mode and update invalid value in xml
This two scenarios need shell interactive session to return false
when "Failed. Try again? [y,n,f,?]:" prompt.

Signed-off-by: Wayne Sun <gsun@redhat.com>
libvirt.tests: Add virsh domblklist test

v1:
Add virsh domblklist test and cfg

v2:
Change detach-disk on running domain with --config flag when use
domblkinfo with --inactive flag, this change is due to bug 1049529
fixed the --config flag problem when domain is running

v3:
Replace disk_type with type_name

Signed-off-by: Wayne Sun <gsun@redhat.com>
libvirt.tests: Add virsh itself command test

v1:
Add test case for command 'cd', 'pwd', 'echo', 'exit' and 'quit' in
virsh interactive mode.

v2:
Add readonly support

v3 - v4:
Change to use virshPersistent and wrapped command functions in virsh

Signed-off-by: Wayne Sun <gsun@redhat.com>
Merge pull request #2 from waynesun09/virsh_screenshot

libvirt: Add test for virsh screenshot
Merge pull request #3 from waynesun09/virsh_nwfilter_group

libvirt.tests: Add virsh nwfilter group tests
libvirt.tests.svirt_install: Correct unattended_install import

Now key tests, such as unattended_install were moved to
the virttest.tests namespace. Fix the import link.

CC: Feng Yang <fyang@redhat.com>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Merge pull request #6 from autotest/fix-svirt-install

libvirt.tests.svirt_install: Correct unattended_install import
Merge pull request #4 from waynesun09/virsh_domblklist

libvirt.tests: Add virsh domblklist test
Merge pull request #5 from waynesun09/virsh_itself

libvirt.tests: Add virsh itself command test
lvsb: Add a testcase for security options

Signed-off-by: Alex Jia <ajia@redhat.com>
Merge pull request #7 from autotest/security-options-testcase

lvsb: Add a testcase for security options
libvirt.virsh_change_media: Fix a ShellCmdError bug and add env recover to 'try finally'

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
Merge pull request #8 from autotest/1286

libvirt.virsh_change_media: Fix a ShellCmdError bug and add env recover ...
Add test for virsh send-key

1. cover all codeset that provided
2. test several sysrq

Signed-off-by: Kyla Zhang <weizhan@redhat.com>
Merge pull request #9 from autotest/virsh-sendkey

Add test for virsh send-key