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) )
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), )
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)