Exemple #1
0
 def expand(self, deployment):
     result = deployment.get_hash()
     result['machine'] = deployment.machine.get_hash()
     result['profile'] = deployment.profile.get_hash()
     result['tags'] = []
     result['tag_ids'] = []
     for tag in deployment.tags:
         result['tags'].append(tag.get_hash())
         result['tag_ids'].append(tag.id)
     return result
Exemple #2
0
 def expand(self, machine):
     result = machine.get_hash()
     result["profile"] = machine.profile.get_hash()
     result["profile"]["distribution"] = machine.profile.distribution.get_hash()
     result["tags"] = []
     result["tag_ids"] = []
     for tag in machine.tags:
         result["tags"].append(tag.get_hash())
         result["tag_ids"].append(tag.id)
     return result