11
11
import logging
12
12
from abc import ABC , abstractmethod
13
13
14
- from frequenz .client .microgrid import ApiClient , Location , Metadata
14
+ from frequenz .client .microgrid import Location , Metadata , MicrogridApiClient
15
15
16
16
from .component_graph import ComponentGraph , _MicrogridComponentGraph
17
17
@@ -41,8 +41,8 @@ def server_url(self) -> str:
41
41
42
42
@property
43
43
@abstractmethod
44
- def api_client (self ) -> ApiClient :
45
- """Get ApiClient .
44
+ def api_client (self ) -> MicrogridApiClient :
45
+ """Get the MicrogridApiClient .
46
46
47
47
Returns:
48
48
api client
@@ -97,7 +97,7 @@ def __init__(self, server_url: str) -> None:
97
97
`grpc://localhost:1090?ssl=true`.
98
98
"""
99
99
super ().__init__ (server_url )
100
- self ._api = ApiClient (server_url )
100
+ self ._api = MicrogridApiClient (server_url )
101
101
# To create graph from the api we need await.
102
102
# So create empty graph here, and update it in `run` method.
103
103
self ._graph = _MicrogridComponentGraph ()
@@ -106,8 +106,8 @@ def __init__(self, server_url: str) -> None:
106
106
"""The metadata of the microgrid."""
107
107
108
108
@property
109
- def api_client (self ) -> ApiClient :
110
- """Get ApiClient .
109
+ def api_client (self ) -> MicrogridApiClient :
110
+ """Get the MicrogridApiClient .
111
111
112
112
Returns:
113
113
api client
@@ -154,7 +154,7 @@ async def _update_api(self, server_url: str) -> None:
154
154
"""
155
155
await super ()._update_api (server_url ) # pylint: disable=protected-access
156
156
157
- self ._api = ApiClient (server_url )
157
+ self ._api = MicrogridApiClient (server_url )
158
158
await self ._initialize ()
159
159
160
160
async def _initialize (self ) -> None :
0 commit comments