adding the sql code for the template
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
This commit is contained in:
@@ -90,31 +90,32 @@ def all_operations(wanted_state,list_machine):
|
||||
return ""
|
||||
|
||||
def main():
|
||||
|
||||
generated_db = DB_generation(credentials.sql.url, credentials.sql.port, credentials.sql.user, credentials.sql.password,credentials.sql.database)
|
||||
print(generated_db)
|
||||
##operation:
|
||||
|
||||
## Server(s) supposed to be UP
|
||||
Check_server_supposed_XXX(generated_db, "up", Give_current_hour())
|
||||
|
||||
###operation:
|
||||
|
||||
## Server(s) supposed to be UP
|
||||
list_servers_up = Check_server_supposed_XXX(generated_db, "up", Give_current_hour())
|
||||
print("------------------------------------------")
|
||||
print("-----------------UP-----------------------")
|
||||
print("------------------------------------------")
|
||||
print(list_servers_up)
|
||||
print(all_operations("running", list_servers_up))
|
||||
|
||||
|
||||
## Server(s) supposed to be DOWN
|
||||
list_servers_down = Check_server_supposed_XXX(generated_db, "down", Give_current_hour())
|
||||
|
||||
print("------------------------------------------")
|
||||
print("----------------DOWN----------------------")
|
||||
print("------------------------------------------")
|
||||
print(list_servers_down)
|
||||
print(all_operations("stopped",list_servers_down))
|
||||
|
||||
|
||||
# disconnect from server
|
||||
# print("------------------------------------------")
|
||||
# print("-----------------UP-----------------------")
|
||||
# print("------------------------------------------")
|
||||
# print(list_servers_up)
|
||||
# print(all_operations("running", list_servers_up))
|
||||
#
|
||||
#
|
||||
# ## Server(s) supposed to be DOWN
|
||||
# list_servers_down = Check_server_supposed_XXX(generated_db, "down", Give_current_hour())
|
||||
#
|
||||
# print("------------------------------------------")
|
||||
# print("----------------DOWN----------------------")
|
||||
# print("------------------------------------------")
|
||||
# print(list_servers_down)
|
||||
# print(all_operations("stopped",list_servers_down))
|
||||
#
|
||||
#
|
||||
# # disconnect from server
|
||||
generated_db.close()
|
||||
|
||||
#print(Is_the_server_already_wanted_state(112, "stopped"))
|
||||
|
||||
Reference in New Issue
Block a user