コード例 #1
0
 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)
コード例 #2
0
 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
     )
コード例 #3
0
 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)
     }
コード例 #4
0
 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)
     }
コード例 #5
0
 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
     )
コード例 #6
0
 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
     }