virttest.libvirt_xml.devices.librarian: Add network filter types

Add multiple network filter protocol types into device list, use
the librarian module to load network filter specific protocol
type modules.

Signed-off-by: Wayne Sun <gsun@redhat.com>
virttest.libvirt_xml.devices: Add network filter rule protocol modules

Add 24 libvirt nwfilter protocols modules for supported types.

This is for cover nwfilter rule protocols in page:
http://libvirt.org/formatnwfilter.html#nwfelemsRulesProto

Note:
Total number of libvirt supported protocols is 25, only igmp-ipv6
(fail for define, need confirm bug) is not included in this commit.

Signed-off-by: Wayne Sun <gsun@redhat.com>
virttest.libvirt_xml: Add nwfilter xml module

Module simplifying manipulation of XML described at
http://libvirt.org/formatnwfilter.html

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.test: 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.

Signed-off-by: Wayne Sun <gsun@redhat.com>