def save(self): self.collection().find_one_and_replace( {"cluster_id": self.cluster_id}, { "cluster_id": self.cluster_id, "global_vars": generic.dot_escape(self.global_vars), "host_vars": generic.dot_escape(self.host_vars) }, upsert=True)
def save(self): self.collection().find_one_and_replace( {"cluster_id": self.cluster_id}, { "cluster_id": self.cluster_id, "global_vars": generic.dot_escape(self.global_vars), "host_vars": generic.dot_escape(self.host_vars) }, upsert=True )
def make_db_document_specific_fields(self): return { "name": self.name, "initiator_id": self.initiator_id, "playbook_id": self.playbook_id, "cluster_id": self.cluster_id, "configuration": generic.dot_escape(self.configuration) }
def save(self): self.collection().find_one_and_replace( {"cluster_id": self.cluster_id}, { "cluster_id": self.cluster_id, "keyrings": generic.dot_escape(self.keyrings), "config": self.config }, upsert=True )
def make_db_document_specific_fields(self): return { "name": self.name, "username": self.username, "fqdn": self.fqdn, "ip": self.ip, "state": self.state.name, "initiator_id": self.initiator_id, "cluster_id": self.cluster_id, "facts": generic.dot_escape(self.facts), "lock": self.lock }