示例#1
0
 def edgerule_create(self, src, dst, metadata):
     data = json.dumps(
         {
             "Src": src,
             "Dst": dst,
             "Metadata": metadata
         }
     )
     r = self.request("/api/edgerule", method="POST", data=data)
     return EdgeRule.from_object(r)
示例#2
0
 def edgerule_list(self):
     objs = self.request("/api/edgerule")
     return [EdgeRule.from_object(o) for o in objs.values()]