diff options
author | Stefan Berger <stefanb@us.ibm.com> | 2010-10-07 06:43:35 -0400 |
---|---|---|
committer | Stefan Berger <stefanb@us.ibm.com> | 2010-10-07 06:43:35 -0400 |
commit | 5c6405a0586ae2c30217fb501f5860fa14206985 (patch) | |
tree | 37204204a698faad2f3108f0dda92a2d41373f81 /tests/nwfilterxml2xmlout | |
parent | nwfilter: Instantiate state match in ip(6)tables rules (diff) | |
download | libvirt-5c6405a0586ae2c30217fb501f5860fa14206985.tar.gz libvirt-5c6405a0586ae2c30217fb501f5860fa14206985.tar.bz2 libvirt-5c6405a0586ae2c30217fb501f5860fa14206985.zip |
nwfilter: Add test case for testing the state attribute
This patch adds a test case for testing the XML parser's and instantiator's
support of the state attribute. The other test case tests existing
capabilities. Both test cases will be used in TCK again.
Diffstat (limited to 'tests/nwfilterxml2xmlout')
-rw-r--r-- | tests/nwfilterxml2xmlout/example-1.xml | 15 | ||||
-rw-r--r-- | tests/nwfilterxml2xmlout/example-2.xml | 21 |
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/nwfilterxml2xmlout/example-1.xml b/tests/nwfilterxml2xmlout/example-1.xml new file mode 100644 index 000000000..dd0ef94d9 --- /dev/null +++ b/tests/nwfilterxml2xmlout/example-1.xml @@ -0,0 +1,15 @@ +<filter name='testcase' chain='root'> + <uuid>01a992d2-f8c8-7c27-f69b-ab0a9d377379</uuid> + <rule action='accept' direction='in' priority='100'> + <tcp dstportstart='22'/> + </rule> + <rule action='accept' direction='in' priority='200'> + <icmp/> + </rule> + <rule action='accept' direction='in' priority='300'> + <all/> + </rule> + <rule action='drop' direction='inout' priority='1000'> + <all/> + </rule> +</filter> diff --git a/tests/nwfilterxml2xmlout/example-2.xml b/tests/nwfilterxml2xmlout/example-2.xml new file mode 100644 index 000000000..a3f0bf9b3 --- /dev/null +++ b/tests/nwfilterxml2xmlout/example-2.xml @@ -0,0 +1,21 @@ +<filter name='testcase' chain='root'> + <uuid>01a992d2-f8c8-7c27-f69b-ab0a9d377379</uuid> + <rule action='accept' direction='out' priority='100'> + <all state='ESTABLISHED,RELATED' comment='out: existing and related (ftp) connections'/> + </rule> + <rule action='accept' direction='in' priority='100'> + <all state='ESTABLISHED' comment='in: existing connections'/> + </rule> + <rule action='accept' direction='in' priority='200'> + <tcp state='NEW' dstportstart='21' dstportend='22' comment='in: ftp and ssh'/> + </rule> + <rule action='accept' direction='in' priority='300'> + <icmp state='NEW' comment='in: icmp'/> + </rule> + <rule action='accept' direction='out' priority='300'> + <udp state='NEW' dstportstart='53' comment='out: DNS lookups'/> + </rule> + <rule action='drop' direction='inout' priority='1000'> + <all comment='inout: drop all non-accepted traffic'/> + </rule> +</filter> |