Coverage for lobster/tools/codebeamer/config.py: 100%
26 statements
« prev ^ index » next coverage.py v7.10.7, created at 2026-09-22 04:43 +0000
« prev ^ index » next coverage.py v7.10.7, created at 2026-09-22 04:43 +0000
1# LOBSTER - Lightweight Open BMW Software Traceability Evidence Report
2# Copyright (C) 2025-2026 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
3#
4# This program is free software: you can redistribute it and/or modify
5# it under the terms of the GNU Affero General Public License as
6# published by the Free Software Foundation, either version 3 of the
7# License, or (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful, but
10# WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12# Affero General Public License for more details.
13#
14# You should have received a copy of the GNU Affero General Public
15# License along with this program. If not, see
16# <https://www.gnu.org/licenses/>.
18from dataclasses import dataclass
19from typing import Callable, Optional, List, Union
22@dataclass
23class AuthenticationConfig:
24 token: Optional[str]
25 user: Optional[str]
26 password: Optional[str]
27 root: str
30@dataclass
31class Config:
32 num_request_retry: int
33 retry_error_codes: List
34 references: dict
35 import_tagged: str
36 import_query: Union[str, int]
37 baseline_id: Optional[int]
38 verify_ssl: bool
39 page_size: int
40 schema: str
41 timeout: int
42 out: str
43 cb_auth_conf: AuthenticationConfig
44 item_to_text: Optional[Callable[[dict], Optional[str]]] = None
46 @property
47 def base(self) -> str:
48 return f"{self.cb_auth_conf.root}/api/v3"