Skip to content

Commit

Permalink
fix: validate env when switch_config_applied is false
Browse files Browse the repository at this point in the history
Change-Id: I95f309ec1670860b96a9bcc31e0e46822b0f7fae
  • Loading branch information
grafuls committed Apr 3, 2023
1 parent bea1be1 commit 63f3845
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions quads/tools/validate_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,15 @@ async def post_network_test(self):
for host in self.hosts:
if not host.switch_config_applied:
current_schedule = Schedule.current_schedule(
host=host, cloud=host.cloud.name
host=host, cloud=host.cloud
).first()
previous_cloud = host.default_cloud.name
previous_schedule = Schedule.objects(
host=host.name, end=current_schedule.start
host=host, end=current_schedule.start
).first()
if previous_schedule:
previous_cloud = previous_schedule.cloud.name
result = switch_config(host, previous_cloud, host.cloud.name)
result = switch_config(host.name, previous_cloud, host.cloud.name)
if result:
host.update(switch_config_applied=True)
else:
Expand Down

0 comments on commit 63f3845

Please sign in to comment.