Skip to content

Commit

Permalink
Revert "MGMT-17246: add support for ignoring clusters that already ex…
Browse files Browse the repository at this point in the history
…ist on j…" (#2455)

This reverts commit 084f5b3.
  • Loading branch information
omer-vishlitzky committed Jun 5, 2024
1 parent 084f5b3 commit c64d3f9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
10 changes: 0 additions & 10 deletions src/assisted_test_infra/download_logs/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ def main():
log.info("No clusters were found")
return

if args.clusters_to_filter_out_file:
with open(args.clusters_to_filter_out_file, "r") as file:
clusters_to_filter_out = set(line.strip() for line in file)
clusters = [cluster for cluster in clusters if cluster["id"] not in clusters_to_filter_out]

for cluster in clusters:
if args.download_all or should_download_logs(cluster):
download_cluster_logs(client, cluster, args.dest, args.must_gather, args.update_by_events)
Expand All @@ -81,11 +76,6 @@ def handle_arguments():

parser.add_argument("inventory_url", help="URL of remote inventory", type=str)
parser.add_argument("dest", help="Destination to download logs", type=str)
parser.add_argument(
"clusters_to_filter_out_file",
help="A file containing a list of clusters to ignore, delimeted by a new line",
type=str,
)
parser.add_argument("--cluster-id", help="Cluster id to download its logs", type=str, default=None, nargs="?")
parser.add_argument("--download-all", help="Download logs from all clusters", action="store_true")
parser.add_argument("--must-gather", help="must-gather logs", action="store_true")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ class BaseNodesConfig(BaseConfig, ABC):
base_cluster_domain: Optional[str] = None

network_mtu: int = None
tf_platform: str = (
None # todo - make all tf dependent platforms (e.g. vsphere, nutanix) inherit from BaseTerraformConfig # noqa E501
)
tf_platform: str = None # todo - make all tf dependent platforms (e.g. vsphere, nutanix) inherit from BaseTerraformConfig # noqa E501

@property
def nodes_count(self):
Expand Down
9 changes: 1 addition & 8 deletions src/service_client/assisted_service_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,7 @@ def refresh_api_key(config: Configuration) -> None:
}

log.info("Refreshing API key")
try:
sso_url = os.environ["SSO_URL"]
except KeyError:
log.error("The environment variable SSO_URL is mandatory but was not supplied")
raise
else:
response = requests.post(sso_url, data=params)

response = requests.post(os.environ.get("SSO_URL"), data=params)
response.raise_for_status()

config.api_key["Authorization"] = response.json()["access_token"]
Expand Down

0 comments on commit c64d3f9

Please sign in to comment.