
seeing following issue now - FilterList - 01_enum.py: PASS -------------------------------------------------------------------- FilterList - 02_assoc.py: FAIL ERROR - CIMError : (1, u'CIM_ERR_FAILED: Failed to load the Provider Manager for interface type "CMPI" from library "".') Traceback (most recent call last): File "/tmp/remove_me/cimtest/suites/libvirt-cim/lib/XenKvmLib/const.py", line 141, in do_try rc = f() File "02_assoc.py", line 50, in main cim_filters = _test.cim_entries_in_filter_lists() File "/tmp/remove_me/cimtest/suites/libvirt-cim/cimtest/FilterList/helper.py", line 269, in cim_entries_in_filter_lists l.extend(self.Associators(n, result_class="CIM_FilterEntryBase")) File "/tmp/remove_me/cimtest/suites/libvirt-cim/cimtest/FilterList/helper.py", line 88, in Associators return self.wbem.Associators(typed_class, **kargs) File "/usr/lib/python2.6/site-packages/pywbem/cim_operations.py", line 696, in Associators **params) File "/usr/lib/python2.6/site-packages/pywbem/cim_operations.py", line 219, in imethodcall raise CIMError(code, tt[1]['DESCRIPTION']) CIMError: (1, u'CIM_ERR_FAILED: Failed to load the Provider Manager for interface type "CMPI" from library "".') ERROR - None -------------------------------------------------------------------- FilterList - 03_create.py: PASS -Sharad On Mon, 2012-01-30 at 21:57 -0200, Eduardo Lima (Etrunko) wrote:
From: "Eduardo Lima (Etrunko)" <eblima@br.ibm.com>
According to libvirt network filters specification, new values have been added:
Since 0.9.0: - reject
Since 0.9.7: - return - continue
Signed-off-by: Eduardo Lima (Etrunko) <eblima@br.ibm.com> --- schema/FilterEntry.mof | 8 ++++---- src/Virt_FilterEntry.c | 10 ++++++++-- 2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/schema/FilterEntry.mof b/schema/FilterEntry.mof index f60abae..b5f695f 100644 --- a/schema/FilterEntry.mof +++ b/schema/FilterEntry.mof @@ -6,8 +6,8 @@ class KVM_Hdr8021Filter : CIM_Hdr8021Filter "This defines whether the action should be to forward or " "deny traffic meeting the match condition specified in " "this filter." ), - ValueMap { "1", "2" }, - Values { "Permit", "Deny" }] + ValueMap { "1", "2", "3", "4", "5" }, + Values { "Permit", "Deny", "Reject", "Return", "Continue" }] uint16 Action;
[Description("This defines whether the Filter is used for input, " @@ -44,8 +44,8 @@ class KVM_IPHeadersFilter : CIM_IPHeadersFilter "This defines whether the action should be to forward or " "deny traffic meeting the match condition specified in " "this filter." ), - ValueMap { "1", "2" }, - Values { "Permit", "Deny" }] + ValueMap { "1", "2", "3", "4", "5" }, + Values { "Permit", "Deny", "Reject", "Return", "Continue" }] uint16 Action;
[Description("This defines whether the Filter is used for input, " diff --git a/src/Virt_FilterEntry.c b/src/Virt_FilterEntry.c index c058b5e..2ff354a 100644 --- a/src/Virt_FilterEntry.c +++ b/src/Virt_FilterEntry.c @@ -202,13 +202,19 @@ int convert_priority(const char *s)
static int convert_action(const char *s) { - enum {NONE=0, ACCEPT, DENY} action = NONE; + enum {NONE=0, ACCEPT, DENY, REJECT, RETURN, CONTINUE} action = NONE;
if (s != NULL) { if (STREQC(s, "accept")) action = ACCEPT; - else if (STREQC(s, "drop") || STREQC(s, "reject")) + else if (STREQC(s, "drop")) action = DENY; + else if (STREQC(s, "reject")) + action = REJECT; + else if (STREQC(s, "return")) + action = RETURN; + else if (STREQC(s, "continue")) + action = CONTINUE; } return action; }