diff --git a/bowling_ball/rolling_restart.py b/bowling_ball/rolling_restart.py index 965f7f84..333c2e6a 100644 --- a/bowling_ball/rolling_restart.py +++ b/bowling_ball/rolling_restart.py @@ -154,5 +154,6 @@ def main(): rolling_restart(containers, inventory, wait) + if __name__ == "__main__": main() diff --git a/leap-upgrades/upgrade-utilities-liberty/scripts/add_new_neutron_env.py b/leap-upgrades/upgrade-utilities-liberty/scripts/add_new_neutron_env.py index 7a2b9dc7..43fe542f 100755 --- a/leap-upgrades/upgrade-utilities-liberty/scripts/add_new_neutron_env.py +++ b/leap-upgrades/upgrade-utilities-liberty/scripts/add_new_neutron_env.py @@ -41,6 +41,7 @@ def add_new_dict_data(original, new): add_new_dict_data(original[key], new[key]) + if __name__ == '__main__': repo_root = sys.argv[1] diff --git a/leap-upgrades/upgrade-utilities-liberty/scripts/fix_ceilometer_env.py b/leap-upgrades/upgrade-utilities-liberty/scripts/fix_ceilometer_env.py index cb37f999..b8b80b1e 100755 --- a/leap-upgrades/upgrade-utilities-liberty/scripts/fix_ceilometer_env.py +++ b/leap-upgrades/upgrade-utilities-liberty/scripts/fix_ceilometer_env.py @@ -40,6 +40,7 @@ def clean_vars(): f.write(yaml.safe_dump(environment, default_flow_style=False, width=1000)) + if __name__ == '__main__': clean_vars() with open('/etc/openstack_deploy.KILO/CEILOMETER_MIGRATED', 'w') as f: diff --git a/leap-upgrades/upgrade-utilities-liberty/scripts/migrate_openstack_vars.py b/leap-upgrades/upgrade-utilities-liberty/scripts/migrate_openstack_vars.py index 672d2716..8d9e5fc7 100755 --- a/leap-upgrades/upgrade-utilities-liberty/scripts/migrate_openstack_vars.py +++ b/leap-upgrades/upgrade-utilities-liberty/scripts/migrate_openstack_vars.py @@ -79,6 +79,7 @@ def main(filename): with open(filename, 'w') as f: f.write(''.join(new_contents)) + if __name__ == '__main__': if len(sys.argv) < 3: sys.exit("Filename and flag file reference required.") diff --git a/leap-upgrades/upgrade-utilities-mitaka/scripts/migrate_openstack_vars.py b/leap-upgrades/upgrade-utilities-mitaka/scripts/migrate_openstack_vars.py index e3243562..3b6a1f82 100755 --- a/leap-upgrades/upgrade-utilities-mitaka/scripts/migrate_openstack_vars.py +++ b/leap-upgrades/upgrade-utilities-mitaka/scripts/migrate_openstack_vars.py @@ -57,6 +57,7 @@ def main(filename): with open(filename, 'w') as f: f.write(''.join(new_contents)) + if __name__ == '__main__': if len(sys.argv) < 3: sys.exit("Filename and flag file reference required.") diff --git a/leap-upgrades/upgrade-utilities-newton/scripts/migrate_openstack_vars.py b/leap-upgrades/upgrade-utilities-newton/scripts/migrate_openstack_vars.py index 739baa86..c6dfb4e7 100755 --- a/leap-upgrades/upgrade-utilities-newton/scripts/migrate_openstack_vars.py +++ b/leap-upgrades/upgrade-utilities-newton/scripts/migrate_openstack_vars.py @@ -57,6 +57,7 @@ def main(filename): with open(filename, 'w') as f: f.write(''.join(new_contents)) + if __name__ == '__main__': if len(sys.argv) < 3: sys.exit("Filename and flag file reference required.")