Skip to content

Commit

Permalink
header prints removed
Browse files Browse the repository at this point in the history
  • Loading branch information
KatHellg committed Nov 15, 2024
1 parent f285468 commit 581cfbc
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 33 deletions.
4 changes: 0 additions & 4 deletions fedn/cli/client_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ def list_clients(ctx, protocol: str, host: str, port: str, token: str = None, n_
if _token:
headers["Authorization"] = _token

click.echo(f"\nListing clients: {url}\n")
click.echo(f"Headers: {headers}")

try:
response = requests.get(url, headers=headers)
Expand Down Expand Up @@ -95,8 +93,6 @@ def get_client(ctx, protocol: str, host: str, port: str, token: str = None, id:
url = f"{url}{id}"


click.echo(f"\nRetrieving client: {url}\n")
click.echo(f"Headers: {headers}")
try:
response = requests.get(url, headers=headers)
print_response(response, "client", id)
Expand Down
4 changes: 0 additions & 4 deletions fedn/cli/combiner_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ def list_combiners(ctx, protocol: str, host: str, port: str, token: str = None,
headers["Authorization"] = _token


click.echo(f"\nListing combiners: {url}\n")
click.echo(f"Headers: {headers}")
try:
response = requests.get(url, headers=headers)
print_response(response, "combiners", None)
Expand Down Expand Up @@ -124,8 +122,6 @@ def get_combiner(ctx, protocol: str, host: str, port: str, token: str = None, id
url = f"{url}{id}"


click.echo(f"\nRetrieving combiner: {url}\n")
click.echo(f"Headers: {headers}")
try:
response = requests.get(url, headers=headers)
print_response(response, "combiner", id)
Expand Down
6 changes: 2 additions & 4 deletions fedn/cli/model_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ def list_models(ctx, protocol: str, host: str, port: str, token: str = None, ses
if session_id:
url = f"{url}?session_id={session_id}"

click.echo(f"\nListing models: {url}\n")
click.echo(f"Headers: {headers}")

try:
response = requests.get(url, headers=headers)
print_response(response, "models", None)
Expand Down Expand Up @@ -80,8 +79,7 @@ def get_model(ctx, protocol: str, host: str, port: str, token: str = None, id: s
if id:
url = f"{url}{id}"

click.echo(f"\nRetrieving model: {url}\n")
click.echo(f"Headers: {headers}")

try:
response = requests.get(url, headers=headers)
print_response(response, "model", id)
Expand Down
4 changes: 0 additions & 4 deletions fedn/cli/package_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ def list_packages(ctx, protocol: str, host: str, port: str, token: str = None, n
headers["Authorization"] = _token


click.echo(f"\nListing packages: {url}\n")
click.echo(f"Headers: {headers}")
try:
response = requests.get(url, headers=headers)
print_response(response, "packages", None)
Expand Down Expand Up @@ -102,8 +100,6 @@ def get_package(ctx, protocol: str, host: str, port: str, token: str = None, id:
url = f"{url}{id}"


click.echo(f"\nRetrieving package: {url}\n")
click.echo(f"Headers: {headers}")
try:
response = requests.get(url, headers=headers)
print_response(response, "package", id)
Expand Down
5 changes: 1 addition & 4 deletions fedn/cli/round_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ def list_rounds(ctx, protocol: str, host: str, port: str, token: str = None, ses
if session_id:
url = f"{url}?round_config.session_id={session_id}"

click.echo(f"\nListing rounds: {url}\n")
click.echo(f"Headers: {headers}")

try:
response = requests.get(url, headers=headers)
print_response(response, "rounds", None)
Expand Down Expand Up @@ -80,8 +79,6 @@ def get_round(ctx, protocol: str, host: str, port: str, token: str = None, id: s
url = f"{url}{id}"


click.echo(f"\nRetrieving round: {url}\n")
click.echo(f"Headers: {headers}")
try:
response = requests.get(url, headers=headers)
print_response(response, "round", id)
Expand Down
4 changes: 0 additions & 4 deletions fedn/cli/session_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ def list_sessions(ctx, protocol: str, host: str, port: str, token: str = None, n
headers["Authorization"] = _token


click.echo(f"\nListing sessions: {url}\n")
click.echo(f"Headers: {headers}")
try:
response = requests.get(url, headers=headers)
print_response(response, "sessions", None)
Expand Down Expand Up @@ -73,8 +71,6 @@ def get_session(ctx, protocol: str, host: str, port: str, token: str = None, id:
url = f"{url}{id}"


click.echo(f"\nRetrieving session: {url}\n")
click.echo(f"Headers: {headers}")
try:
response = requests.get(url, headers=headers)
print_response(response, "session", id)
Expand Down
2 changes: 1 addition & 1 deletion fedn/cli/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def print_response(response, entity_name: str, so):
description: name of entity
:param so:
type: boolean
desriptions: single output format (y/n)
desriptions: single output format
return: None
"""
if response.status_code == 200:
Expand Down
5 changes: 1 addition & 4 deletions fedn/cli/status_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ def list_statuses(ctx, protocol: str, host: str, port: str, token: str = None, s
url = f"{url}?sessionId={session_id}"


click.echo(f"\nListing statuses: {url}\n")
click.echo(f"Headers: {headers}")
try:
response = requests.get(url, headers=headers)
print_response(response, "statuses", None)
Expand Down Expand Up @@ -76,8 +74,7 @@ def get_status(ctx, protocol: str, host: str, port: str, token: str = None, id:
if id:
url = f"{url}{id}"

click.echo(f"\nRetrieving status: {url}\n")
click.echo(f"Headers: {headers}")

try:
response = requests.get(url, headers=headers)
print_response(response, "status", id)
Expand Down
5 changes: 1 addition & 4 deletions fedn/cli/validation_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ def list_validations(ctx, protocol: str, host: str, port: str, token: str = None
if session_id:
url = f"{url}?sessionId={session_id}"

click.echo(f"\nListing validations: {url}\n")
click.echo(f"Headers: {headers}")

try:
response = requests.get(url, headers=headers)
print_response(response, "validations", None)
Expand Down Expand Up @@ -76,8 +75,6 @@ def get_validation(ctx, protocol: str, host: str, port: str, token: str = None,
url = f"{url}{id}"


click.echo(f"\nRetrieving validation: {url}\n")
click.echo(f"Headers: {headers}")
try:
response = requests.get(url, headers=headers)
print_response(response, "validation", id)
Expand Down

0 comments on commit 581cfbc

Please sign in to comment.