(
self,
system: SystemForReporter,
cephx: Dict[str, Any],
reporter_scheme: str = "https",
reporter_hostname: str = "",
reporter_port: str = "443",
reporter_endpoint: str = "/node-proxy/data",
max_retries: int = DEFAULT_MAX_RETRIES,
)
| 13 | |
| 14 | class Reporter(BaseThread): |
| 15 | def __init__( |
| 16 | self, |
| 17 | system: SystemForReporter, |
| 18 | cephx: Dict[str, Any], |
| 19 | reporter_scheme: str = "https", |
| 20 | reporter_hostname: str = "", |
| 21 | reporter_port: str = "443", |
| 22 | reporter_endpoint: str = "/node-proxy/data", |
| 23 | max_retries: int = DEFAULT_MAX_RETRIES, |
| 24 | ) -> None: |
| 25 | super().__init__() |
| 26 | self.system = system |
| 27 | self.data: Dict[str, Any] = {} |
| 28 | self.stop: bool = False |
| 29 | self.cephx = cephx |
| 30 | self.data["cephx"] = self.cephx["cephx"] |
| 31 | self.reporter_scheme: str = reporter_scheme |
| 32 | self.reporter_hostname: str = reporter_hostname |
| 33 | self.reporter_port: str = reporter_port |
| 34 | self.reporter_endpoint: str = reporter_endpoint |
| 35 | self.max_retries: int = max_retries |
| 36 | self.log = get_logger(__name__) |
| 37 | self.reporter_url: str = ( |
| 38 | f"{reporter_scheme}://{reporter_hostname}:" |
| 39 | f"{reporter_port}{reporter_endpoint}" |
| 40 | ) |
| 41 | self.log.info(f"Reporter url set to {self.reporter_url}") |
| 42 | |
| 43 | def _send_with_retries(self) -> bool: |
| 44 | """Send data to mgr. Returns True on success, False after max_retries failures.""" |
nothing calls this directly
no test coverage detected