Ejemplo n.º 1
0
    def save(self, this, new=False):
        if new:
            self.context.submit_task(
                'volume.dataset.create',
                self.parent.entity['name'],
                this.entity['name'],
                this.entity['type'],
                exclude(this.entity, 'name', 'type'),
                callback=lambda s: post_save(this, s)
            )
            return

        self.context.submit_task(
            'volume.dataset.update',
            self.parent.entity['name'],
            this.entity['name'],
            this.get_diff(),
            callback=lambda s: post_save(this, s)
        )
Ejemplo n.º 2
0
    def save(self, this, new=False):
        if new:
            self.context.submit_task(
                "volume.dataset.create",
                self.parent.entity["name"],
                this.entity["name"],
                this.entity["type"],
                exclude(this.entity, "name", "type"),
                callback=lambda s: post_save(this, s),
            )
            return

        self.context.submit_task(
            "volume.dataset.update",
            self.parent.entity["name"],
            this.entity["name"],
            this.get_diff(),
            callback=lambda s: post_save(this, s),
        )
Ejemplo n.º 3
0
 def __process_system(self, args):
     if args["subsystem"] == "HOSTNAME":
         if args["type"] == "CHANGE":
             params = exclude(args, "system", "subsystem", "type")
             params["description"] = "System hostname changed"
             self.emit_event("system.hostname.change", **params)
Ejemplo n.º 4
0
 def __process_system(self, args):
     if args["subsystem"] == "HOSTNAME":
         if args["type"] == "CHANGE":
             params = exclude(args, "system", "subsystem", "type")
             params["description"] = "System hostname changed"
             self.emit_event("system.hostname.change", **params)