From a7a01a6a19f91fccb0bda1c60454ebe2cc848d2d Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Tue, 27 Oct 2009 03:23:12 +0000 Subject: [PATCH] More bug fixes... --- sfatables/processors/legacy-restrict-to-nodes.xsl | 4 ++-- sfatables/processors/max_link_bandwidth.xsl | 2 +- sfatables/processors/restrict_to_nodes.xsl | 5 +++-- sfatables/runtime.py | 6 ++++-- sfatables/test.sfarspec | 1 + 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/sfatables/processors/legacy-restrict-to-nodes.xsl b/sfatables/processors/legacy-restrict-to-nodes.xsl index 5e231847..b761a298 100644 --- a/sfatables/processors/legacy-restrict-to-nodes.xsl +++ b/sfatables/processors/legacy-restrict-to-nodes.xsl @@ -9,8 +9,8 @@ - - + + diff --git a/sfatables/processors/max_link_bandwidth.xsl b/sfatables/processors/max_link_bandwidth.xsl index 42b57113..4cfa4cf8 100644 --- a/sfatables/processors/max_link_bandwidth.xsl +++ b/sfatables/processors/max_link_bandwidth.xsl @@ -11,7 +11,7 @@ - + diff --git a/sfatables/processors/restrict_to_nodes.xsl b/sfatables/processors/restrict_to_nodes.xsl index b6a3eba7..4d8f6480 100644 --- a/sfatables/processors/restrict_to_nodes.xsl +++ b/sfatables/processors/restrict_to_nodes.xsl @@ -9,11 +9,12 @@ - - + + + diff --git a/sfatables/runtime.py b/sfatables/runtime.py index 69dd6655..f9263fb1 100644 --- a/sfatables/runtime.py +++ b/sfatables/runtime.py @@ -50,7 +50,9 @@ class SFATablesRules: childNode = self.create_xml_node(k, context_dict[k]) node.addChild(childNode) else: - node.addContent(context_dict[k]) + childNode = libxml2.newNode(k) + childNode.addContent(context_dict[k]) + node.addChild(childNode) return node def add_request_context_to_rspec(self, doc): @@ -86,7 +88,7 @@ class SFATablesRules: def main(): incoming = SFATablesRules('INCOMING') - incoming.set_context({'sfa':{'user':{'hrn':'ple.princeton.sapanb'}}}) + incoming.set_context({'sfa':{'user':{'hrn':'plc.princeton.sapanb'}}}) outgoing = SFATablesRules('OUTGOING') print "%d rules loaded for INCOMING chain"%len(incoming.sorted_rule_list) diff --git a/sfatables/test.sfarspec b/sfatables/test.sfarspec index b84bec4c..ca39017e 100644 --- a/sfatables/test.sfarspec +++ b/sfatables/test.sfarspec @@ -3,6 +3,7 @@ plc.princeton.sapanb user-hrnplc.princeton.sapanb + blacklistplc.tp -- 2.43.0