Exemple #1
0
    def _make_fetcher(self) -> IPMIFetcher:
        if not self.credentials:
            raise MKAgentError("Missing credentials")

        if self.ipaddress is None:
            raise MKAgentError("Missing IP address")

        return IPMIFetcher(
            self._make_file_cache(),
            address=self.ipaddress,
            username=self.credentials["username"],
            password=self.credentials["password"],
        )
Exemple #2
0
    def _make_fetcher(self) -> IPMIFetcher:
        if self.ipaddress is None:
            raise MKAgentError("Missing IP address")

        return IPMIFetcher(
            self._make_file_cache(),
            cluster_nodes=self.host_config.nodes or (),
            address=self.ipaddress,
            username=self.credentials.get("username"),
            password=self.credentials.get("password"),
        )
Exemple #3
0
 def test_summarize_MKAgentError_exception(self, summarizer, mode):
     assert summarizer.summarize_failure(MKAgentError(), mode=mode) == (2, "(!!)")
Exemple #4
0
 def test_summarize_MKAgentError_exception(self, summarizer, mode):
     assert summarizer.summarize_failure(MKAgentError(), mode=mode) == [ActiveCheckResult(2)]