|
11 | 11 | from rich.table import Table
|
12 | 12 |
|
13 | 13 | from wherobots.db import connect, connect_direct
|
14 |
| -from wherobots.db.constants import DEFAULT_ENDPOINT |
| 14 | +from wherobots.db.constants import DEFAULT_ENDPOINT, DEFAULT_SESSION_TYPE |
15 | 15 | from wherobots.db.connection import Connection
|
16 | 16 | from wherobots.db.region import Region
|
| 17 | +from wherobots.db.session_type import SessionType |
17 | 18 |
|
18 | 19 | if __name__ == "__main__":
|
19 | 20 | parser = argparse.ArgumentParser()
|
20 | 21 | parser.add_argument("--api-key-file", help="File containing the API key")
|
21 | 22 | parser.add_argument("--token-file", help="File containing the token")
|
22 | 23 | parser.add_argument("--region", help="Region to connect to (ie. aws-us-west-2)")
|
| 24 | + parser.add_argument( |
| 25 | + "--session-type", |
| 26 | + help="Type of session to create", |
| 27 | + default=DEFAULT_SESSION_TYPE, |
| 28 | + choices=[st.value for st in SessionType], |
| 29 | + ) |
23 | 30 | parser.add_argument(
|
24 | 31 | "--debug",
|
25 | 32 | help="Enable debug logging",
|
|
76 | 83 | shutdown_after_inactive_seconds=args.shutdown_after_inactive_seconds,
|
77 | 84 | wait_timeout=900,
|
78 | 85 | region=Region(args.region) if args.region else Region.AWS_US_WEST_2,
|
| 86 | + session_type=SessionType(args.session_type), |
79 | 87 | )
|
80 | 88 |
|
81 | 89 | def render(results: pandas.DataFrame) -> None:
|
|
0 commit comments