예제 #1
0
    def exportXMLRPC(self, fusion):
        data = Object.exportXMLRPC(self, fusion)
        data['type'] = self.type
        data['allow_child'] = self.allow_child
        data['interface'] = self.interface.id
        data['is_generic'] = self.isGeneric()
        if self.parent and issubclass(self.parent.__class__, Resource):
            data['parent'] = self.parent.id

        children = []
        for child in self.iterChildren():
            children.append(child.exportXMLRPC(fusion))
        if children:
            data['children'] = children
        return data
예제 #2
0
 def exportXMLRPC(self, fusion):
     attr = Object.exportXMLRPC(self, fusion)
     attr['interface'] = self.interface.id
     return attr