diff --git a/org_status/org_status.py b/org_status/org_status.py index 067b371..fc8cc79 100644 --- a/org_status/org_status.py +++ b/org_status/org_status.py @@ -73,6 +73,8 @@ def get_argument_parser(): parser.add_argument('--threads', type=int, default=2) parser.add_argument('--no-color', action='store_true') parser.add_argument('--verbose', '-v', action='store_true') + parser.add_argument('--hosts-only', action='store_true') + parser.add_argument('--skip-host-checks', action='store_true') return parser @@ -87,14 +89,18 @@ def main(): for Host, org in generate_fetch_jobs(args.orgs): token = None - try: - if not Host.get_host_status(): - print(styled(f'{Host.HostName} is currently down', 'red')) - continue - else: - verbose(f'{Host.HostName} is up') - except NotImplementedError: - verbose(f'{Host.HostName} does not support checking host status') + if not args.skip_host_checks: + try: + if not Host.get_host_status(): + print(styled(f'{Host.HostName} is currently down', 'red')) + continue + else: + verbose(f'{Host.HostName} is up') + except NotImplementedError: + verbose(f'{Host.HostName} does not support checking host status') + + if args.hosts_only: + continue if (args.verbose): print(f'processing org {Host.HostName}:{org}')