Пример #1
0
 def create(self):
     node = Node()
     self.populate_obj(node)
     node.id = None
     try:
         node.check_and_save()
         node.deploy_async()
         return True
     except IntegrityError as e:
         logger.error(str(e))
         self.hostname.errors.append(e.message)
Пример #2
0
 def update(self, id):
     node = Node().get(Node.id == id)
     self.populate_obj(node)
     node.check_and_save()