driver/driver_config_builder.py
def from_file(self, config_path: str) -> BaseDriverConfigBuilder:
        """build config options from config file"""
        with open(config_path, "r", encoding="utf-8") as config_file:
            data = yaml.safe_load(config_file)
            if not isinstance(data, dict):
                raise ValueError("Invalid data in the driver configuration YAML file")

            try:
                partial_config_from_file: PartialConfigFromFile = (
                    PartialConfigFromFile(**data)
                )
            except ValidationError as ex:
                msg = (
                    "Invalid driver configuration for On-Prem deployment: "
                    "the driver option from file is missing or invalid"
                )
                raise DriverConfigException(msg, ex) from ex
            self.config.update(partial_config_from_file)
        return self
build config options from config file
build config options from config file
build config options from config file
def from_file(self, config_path: str) -> BaseDriverConfigBuilder:
        with open(config_path, "r", encoding="utf-8") as config_file:
            data = yaml.safe_load(config_file)
            if not isinstance(data, dict):
                raise ValueError("Invalid data in the driver configuration YAML file")
            try:
                partial_config_from_file: PartialConfigFromFile = (
                    PartialConfigFromFile(**data)
                )
            except ValidationError as ex:
                msg = (
                    "Invalid driver configuration for On-Prem deployment: "
                    "the driver option from file is missing or invalid"
                )
                raise DriverConfigException(msg, ex) from ex
            self.config.update(partial_config_from_file)
        return self
def from_file ( self , config_path : str ) -> BaseDriverConfigBuilder : with open ( config_path , "r" , encoding = "utf-8" ) as config_file : data = yaml . safe_load ( config_file ) if not isinstance ( data , dict ) : raise ValueError ( "Invalid data in the driver configuration YAML file" ) try : partial_config_from_file : PartialConfigFromFile = ( PartialConfigFromFile ( ** data ) ) except ValidationError as ex : msg = ( "Invalid driver configuration for On-Prem deployment: " "the driver option from file is missing or invalid" ) raise DriverConfigException ( msg , ex ) from ex self . config . update ( partial_config_from_file ) return self
build config options from config file
build config options from config file
"""build config options from config file"""
self
config_path
str