Exemplo n.º 1
0
 def noderule_create(self, action, metadata=None, query=""):
     data = json.dumps({
         "Action": action,
         "Metadata": metadata,
         "Query": query
     })
     r = self.request("/api/noderule", method="POST", data=data)
     return NodeRule.from_object(r)
Exemplo n.º 2
0
 def noderule_list(self):
     objs = self.request("/api/noderule")
     return [NodeRule.from_object(o) for o in objs.values()]