Beispiel #1
0
 def set_filter_policy(self, client) :
     try :
         obj = filterpolicy()
         obj.name = "f2"
         obj.rule = "method == post && url == /testsite/*"
         filterpolicy.update(client, obj)
         print("set_filter_policy - Done")
     except nitro_exception as e :
         print("Exception::set_filter_policy::errorcode="+str(e.errorcode)+",message="+ e.message)
     except Exception as e:
         print("Exception::set_filter_policy::message="+str(e.args))
Beispiel #2
0
 def add_filter_pol(self, client) :
     try :
         obj = filterpolicy()
         obj.name = "f1"
         obj.rule = "method == get && url == /testsite/*"
         obj.reqaction = "DROP"
         filterpolicy.add(client, obj)
         print("add_filter_pol - Done")
     except nitro_exception as e :
         print("Exception::add_filter_pol::errorcode="+str(e.errorcode)+",message="+ e.message)
     except Exception as e:
         print("Exception::add_filter_pol::message="+str(e.args))