Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/frequenz/sdk/microgrid/connection_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
component graph.
"""

import logging
from abc import ABC, abstractmethod
from typing import Optional

Expand All @@ -21,6 +22,8 @@
_DEFAULT_MICROGRID_HOST = "[::1]"
_DEFAULT_MICROGRID_PORT = 443

_logger = logging.getLogger(__name__)


class ConnectionManager(ABC):
"""Creates and stores core features."""
Expand Down Expand Up @@ -157,6 +160,8 @@ async def initialize(host: str, port: int) -> None:
if _CONNECTION_MANAGER is not None:
raise AssertionError("MicrogridApi was already initialized.")

_logger.info("Connecting to microgrid at %s:%s", host, port)

microgrid_api = _InsecureConnectionManager(host, port)
await microgrid_api._initialize() # pylint: disable=protected-access

Expand Down