| 761 | |
| 762 | # Tested |
| 763 | def rehash_existing_instances(self, instance_list): |
| 764 | result = [] |
| 765 | for instance in instance_list: |
| 766 | prev_hash = instance.hash |
| 767 | instance.hash_instance() |
| 768 | new_hash = instance.hash |
| 769 | if prev_hash != new_hash: |
| 770 | logger.info( |
| 771 | 'Warning: Hashing algorithm upgrade Instance ID: {} has changed \n from: {} \n to: {}'.format( |
| 772 | instance.id, |
| 773 | prev_hash, |
| 774 | new_hash |
| 775 | )) |
| 776 | self.system_upgrade_hash_changes.append([prev_hash, new_hash]) |
| 777 | self.session.add(instance) |
| 778 | result.append(instance) |
| 779 | |
| 780 | return result |
| 781 | |
| 782 | def init_existing_instances(self): |
| 783 | |