Skip to content

Commit

Permalink
latest
Browse files Browse the repository at this point in the history
  • Loading branch information
“Erick committed Oct 28, 2021
1 parent 19a04e2 commit ca49910
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Snap-Tool/modules/FormClass.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def createRepository(self):
compress_repository = True
else:
compress_repository = False
snap_tool_conf = self.utils.readYamlFile(self.path_conf_file, 'r')
snap_tool_conf = self.utils.readYamlFile(self.configuration.conf_file, 'r')
conn_es = self.elastic.getConnectionElastic()
self.elastic.createRepositoryFS(conn_es, repository_name, path_repository, compress_repository)
message_create_repository = self.telegram.getMessageCreateRepository(repository_name, path_repository, compress_repository)
Expand Down Expand Up @@ -419,7 +419,7 @@ def deleteRepository(self):
if len(list_aux_repositories) == 0:
self.d.msgbox(text = "\nThere are no repositories created.", height = 7, width = 50, title = "Notification Message")
else:
snap_tool_conf = self.utils.readYamlFile(self.path_conf_file, 'r')
snap_tool_conf = self.utils.readYamlFile(self.configuration.conf_file, 'r')
list_all_repositories = self.utils.convertListToCheckOrRadioList(list_aux_repositories, "Repository Name")
opt_repos = self.getDataCheckList("Select a option:", list_all_repositories, "Repositories")
confirm_delete_repos = self.getDataYesOrNo("\nAre you sure to delete the following repository(s)?", "Delete repositories")
Expand Down Expand Up @@ -464,7 +464,7 @@ def createSnapshot(self):
if len(list_aux_repositories) == 0:
self.d.msgbox(text = "\nThere are no repositories.", height = 7, width = 50, title = "Notification Message")
else:
snap_tool_conf = self.utils.readYamlFile(self.path_conf_file, 'r')
snap_tool_conf = self.utils.readYamlFile(self.configuration.conf_file, 'r')
list_all_repositories = self.utils.convertListToCheckOrRadioList(list_aux_repositories, "Repository name")
opt_repo = self.getDataRadioList("Select a option:", list_all_repositories, "Repositories")
self.elastic.createSnapshot(conn_es, opt_repo, opt_index)
Expand Down Expand Up @@ -529,7 +529,7 @@ def deleteSnapshot(self):
if len(list_aux_snapshots) == 0:
self.d.msgbox(text = "\nThere are no snapshots created.", height = 7, width = 50, title = "Notification Message")
else:
snap_tool_conf = self.utils.readYamlFile(self.path_conf_file, 'r')
snap_tool_conf = self.utils.readYamlFile(self.configuration.conf_file, 'r')
list_all_snapshots = self.utils.convertListToCheckOrRadioList(list_aux_snapshots, "Snapshot Name")
opt_snapshots = self.getDataCheckList("Select one or more options:", list_all_snapshots, "Snapshots")
delete_snapshot = self.getDataYesOrNo("\nAre you sure to delete the selected snapshot(s)?", "Delete Snapshot(s)")
Expand Down Expand Up @@ -573,7 +573,7 @@ def restoreSnapshot(self):
if len(list_aux_snapshots) == 0:
self.d.msgbox(text = "\nThere are no snapshots created.", height = 7, width = 50, title = "Notification Message")
else:
snap_tool_conf = self.utils.readYamlFile(self.path_conf_file, 'r')
snap_tool_conf = self.utils.readYamlFile(self.configuration.conf_file, 'r')
list_all_snapshots = self.utils.convertListToCheckOrRadioList(list_aux_snapshots, "Snapshot Name")
opt_snapshot = self.getDataRadioList("Select a option:", list_all_snapshots, "Snapshots")
self.elastic.restoreSnapshot(conn_es, opt_repo, opt_snapshot)
Expand Down Expand Up @@ -613,7 +613,7 @@ def mountSearchableSnapshot(self):
if len(list_aux_snapshots) == 0:
self.d.msgbox(text = "\nThere are no snapshots created.", height = 7, width = 50, title = "Notification Message")
else:
snap_tool_conf = self.utils.readYamlFile(self.path_conf_file, 'r')
snap_tool_conf = self.utils.readYamlFile(self.configuration.conf_file, 'r')
list_all_snapshots = self.utils.convertListToCheckOrRadioList(list_aux_snapshots, "Snapshot Name")
opt_snapshot = self.getDataRadioList("Select a option:", list_all_snapshots, "Snapshots")
self.elastic.mountSearchableSnapshot(conn_es, opt_repo, opt_snapshot)
Expand Down Expand Up @@ -651,7 +651,7 @@ def deleteIndices(self):
opt_indices = self.getDataCheckList("Select a option:", list_all_indices, "Indices")
confirm_delete_indices = self.getDataYesOrNo("\nAre you sure to delete the selected indices?", "Delete indices")
if confirm_delete_indices == "ok":
snap_tool_conf = self.utils.readYamlFile(self.path_conf_file, 'r')
snap_tool_conf = self.utils.readYamlFile(self.configuration.conf_file, 'r')
message_to_display = "\nIndices removed:\n"
for index_name in opt_indices:
self.elastic.deleteIndex(conn_es, index_name)
Expand Down

0 comments on commit ca49910

Please sign in to comment.