Пример #1
0
def convert(
    owner_name: str,
    project_name: str,
    run_name: str,
    run_uuid: str,
    content: str,
    default_auth: bool,
) -> Dict:
    polypod_config = PolypodConfig()
    compiled_operation = CompiledOperationSpecification.read(content)

    polypod_config.resolve(compiled_operation=compiled_operation)
    return converter.convert(
        compiled_operation=compiled_operation,
        owner_name=owner_name,
        project_name=project_name,
        run_name=run_name,
        run_uuid=run_uuid,
        namespace=polypod_config.namespace,
        polyaxon_init=polypod_config.polyaxon_init,
        polyaxon_sidecar=polypod_config.polyaxon_sidecar,
        run_path=run_uuid,
        artifacts_store=polypod_config.artifacts_store,
        connection_by_names=polypod_config.connection_by_names,
        secrets=polypod_config.secrets,
        config_maps=polypod_config.config_maps,
        default_sa=polypod_config.default_sa,
        converters=PLATFORM_CONVERTERS,
        default_auth=default_auth,
    )
Пример #2
0
 def resolve_connections(self):
     polypod_config = PolypodConfig()
     polypod_config.resolve(compiled_operation=self.compiled_operation,
                            agent_config=self.agent_config)
     self.polyaxon_sidecar = polypod_config.polyaxon_sidecar
     self.polyaxon_init = polypod_config.polyaxon_init
     self.namespace = polypod_config.namespace
     self.secrets = polypod_config.secrets
     self.config_maps = polypod_config.config_maps
     self.connection_by_names = polypod_config.connection_by_names
     self.artifacts_store = polypod_config.artifacts_store