Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jgstew committed Feb 28, 2024
1 parent cef1a9b commit 60d0ebe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/rest_cmd_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,18 @@ def main():
parser = argparse.ArgumentParser(
description="Provde command line arguments for REST URL, username, and password"
)
parser.add_argument("-r", "--rest-url", help="Specify the REST URL", required=True)
parser.add_argument(
"-besserver", "--besserver", help="Specify the BES URL", required=False
)
parser.add_argument("-r", "--rest-url", help="Specify the REST URL", required=True)
parser.add_argument("-u", "--user", help="Specify the username", required=True)
parser.add_argument("-p", "--password", help="Specify the password", required=True)
# allow unknown args to be parsed instead of throwing an error:
args, _unknown = parser.parse_known_args()

rest_url = args.rest_url

# normalize url to https://HostOrIP:52311
if rest_url.endswith("/api"):
rest_url = rest_url.replace("/api", "")

Expand All @@ -41,6 +42,7 @@ def main():
# print(args.besserver)
bes_conn = besapi.besapi.BESConnection(args.user, args.password, args.besserver)

# get unique device OSes
session_relevance = 'unique values of (it as trimmed string) of (preceding text of last " (" of it | it) of operating systems of bes computers'

data = {"output": "json", "relevance": session_relevance}
Expand Down

0 comments on commit 60d0ebe

Please sign in to comment.