def from_arguments(cls, args: argparse.Namespace): adapter: auth.AuthAdapter = auth.make_auth_adapter(args.auth) dss_client = infrastructure.DSSTestSession(args.dss, adapter) area: s2sphere.LatLngRect = geo.make_latlng_rect(args.area) start_time = datetime.datetime.fromisoformat(args.start_time) end_time = start_time + datetime.timedelta(hours=args.trace_hours) logger = tracerlog.Logger( args.output_folder) if args.output_folder else None return ResourceSet(dss_client, area, logger, start_time, end_time)
def __init__(self, name: str, config: InjectionTargetConfiguration, auth_spec: str): self.name = name self.config = config self.client = infrastructure.DSSTestSession( self.config.injection_base_url, auth.make_auth_adapter(auth_spec)) # Flights injected by this target. # Key: flight name # Value: flight id self.created_flight_ids: Dict[str, str] = {}
def main() -> int: args = parseArgs() adapter = auth.make_auth_adapter(args.auth) dss_clients: Dict[str, infrastructure.DSSTestSession] = {} for dss in args.DSS: dss_clients[dss] = infrastructure.DSSTestSession(dss, adapter) # Begin Tests tests = InterOpTestSuite(dss_clients) tests.startTest() return os.EX_OK
def from_arguments(cls, args: argparse.Namespace): adapter: auth.AuthAdapter = auth.make_auth_adapter(args.auth) dss_client = infrastructure.DSSTestSession(args.dss, adapter) area: s2sphere.LatLngRect = geo.make_latlng_rect(args.area) start_time = datetime.datetime.fromisoformat(args.start_time) end_time = start_time + datetime.timedelta(hours=args.trace_hours) if args.kml_server and args.kml_folder is None: raise ValueError( 'If --kml-server is specified, --kml-folder must also be specified' ) kml_session = infrastructure.KMLGenerationSession( args.kml_server, args.kml_folder) if args.kml_server else None logger = tracerlog.Logger(args.output_folder, kml_session) if args.output_folder else None return ResourceSet(dss_client, area, logger, start_time, end_time)
def make_session(pytestconfig, endpoint_suffix: str, auth_option: Optional[str] = None ) -> Optional[infrastructure.DSSTestSession]: dss_endpoint = pytestconfig.getoption('dss_endpoint') if dss_endpoint is None: pytest.skip('dss-endpoint option not set') auth_adapter = None if auth_option: auth_spec = pytestconfig.getoption(auth_option) if not auth_spec: pytest.skip('%s option not set' % auth_option) auth_adapter = auth.make_auth_adapter(auth_spec) s = infrastructure.DSSTestSession(dss_endpoint + endpoint_suffix, auth_adapter) return s
from monitoring.monitorlib import auth, infrastructure from monitoring.mock_uss import webapp from . import config utm_client = infrastructure.DSSTestSession( webapp.config[config.KEY_DSS_URL], auth.make_auth_adapter(webapp.config[config.KEY_AUTH_SPEC]))
from monitoring.monitorlib import auth, infrastructure from monitoring.mock_ridsp import webapp from . import config dss_client = infrastructure.DSSTestSession( webapp.config.get(config.KEY_DSS_URL), auth.make_auth_adapter(webapp.config.get(config.KEY_AUTH_SPEC)))