source/code/build-ops-automator-template.py [120:137]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    def fix_resource_references(resources, old, new):

        def update_list(l, old_name, new_name):
            for item in l:
                if isinstance(item, dict):
                    fix_resource_references(item, old_name, new_name)
                elif isinstance(item, list):
                    update_list(item, old_name, new_name)

        for key in resources:
            val = resources[key]
            if key == "Ref" and val == old:
                resources[key] = new
            if isinstance(val, dict):
                fix_resource_references(val, old, new)

            elif isinstance(val, list):
                update_list(val, old, new)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



source/code/testing/task_test_runner.py [315:332]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        def fix_resource_references(resources, old, new):

            def update_list(l, old_name, new_name):
                for item in l:
                    if isinstance(item, dict):
                        fix_resource_references(item, old_name, new_name)
                    elif isinstance(item, list):
                        update_list(item, old_name, new_name)

            for key in resources:
                val = resources[key]
                if key == "Ref" and val == old:
                    resources[key] = new
                if isinstance(val, dict):
                    fix_resource_references(val, old, new)

                elif isinstance(val, list):
                    update_list(val, old, new)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



