merged list devices (no impact)

This commit is contained in:
Quentin WEPHRE
2026-03-26 09:43:17 +01:00
parent fcc8c811cc
commit ea013e4eca
3 changed files with 51 additions and 14 deletions

View File

@@ -19,10 +19,10 @@ def resource_path(relative_path):
dotenv_path = resource_path('.env')
load_dotenv(dotenv_path=dotenv_path)
ip_address_prefix = "10.188.10."
ip_address_prefix = "10.84.195."
ssh_command = "hostname"
csv_filename = "HOOHANA_01.csv"
csv_filename = "ANTWERP_01.csv"
ENV_SSH = {
"DEFAULT_CUBE_LINUX_ADMIN_USER": os.getenv("DEFAULT_CUBE_LINUX_ADMIN_USER"),
@@ -91,7 +91,7 @@ def main():
writer = csv.writer(file)
writer.writerow(["Number", "IP address", "Cube ID", "Environment", "Correct configuration"])
numbers = range(133, 157) #133 to 156
numbers = range(129, 139)
for i in numbers:
ip_address = f"{ip_address_prefix}{i}"
print(f"Activating SSH for {ip_address}:", end=" ")
@@ -143,6 +143,12 @@ def main():
migration = "NONE"
status = "INCORRECT"
try:
print(f"restarting cloud agent on {ip_address}")
restart_cloudagent(ip_address)
except Exception as e:
print(e)
writer.writerow([i, ip_address, cube_id, migration, status])
file.flush()