def __init__()

in cvm-attestation/src/AttestationProvider.py [0:0]


  def __init__(self, logger: Logger, isolation: IsolationType, endpoint: str, api_key: str):
    # Validate the isolation type
    if not isinstance(isolation, IsolationType):
      raise ValueError(f"Unsupported isolation type: {isolation}. Supported types: {list(IsolationType)}")

      # Validate the endpoint
    parsed_endpoint = urlparse(endpoint)
    if not parsed_endpoint.scheme or not parsed_endpoint.netloc:
      raise ValueError(f"Invalid endpoint: {endpoint}. Endpoint must be a valid URL.")

    self.log = logger
    self.isolation = isolation
    self.endpoint = endpoint
    self.api_key = api_key