gnetclisdk 1.0.58__py3-none-any.whl → 1.0.59__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- gnetclisdk/client.py +34 -2
- {gnetclisdk-1.0.58.dist-info → gnetclisdk-1.0.59.dist-info}/METADATA +1 -1
- {gnetclisdk-1.0.58.dist-info → gnetclisdk-1.0.59.dist-info}/RECORD +5 -5
- {gnetclisdk-1.0.58.dist-info → gnetclisdk-1.0.59.dist-info}/WHEEL +0 -0
- {gnetclisdk-1.0.58.dist-info → gnetclisdk-1.0.59.dist-info}/top_level.txt +0 -0
gnetclisdk/client.py
CHANGED
@@ -200,10 +200,14 @@ class Gnetcli:
|
|
200
200
|
return response
|
201
201
|
|
202
202
|
@asynccontextmanager
|
203
|
-
async def cmd_session(
|
203
|
+
async def cmd_session(
|
204
|
+
self,
|
205
|
+
hostname: str,
|
206
|
+
host_params: Optional[HostParams] = None) -> AsyncIterator["GnetcliSessionCmd"]:
|
204
207
|
sess = GnetcliSessionCmd(
|
205
208
|
hostname,
|
206
209
|
server=self._server,
|
210
|
+
host_params=host_params,
|
207
211
|
channel=self._channel,
|
208
212
|
target_name_override=self._target_name_override,
|
209
213
|
user_agent=self._user_agent,
|
@@ -374,6 +378,34 @@ class GnetcliSession(ABC):
|
|
374
378
|
|
375
379
|
|
376
380
|
class GnetcliSessionCmd(GnetcliSession):
|
381
|
+
def __init__(
|
382
|
+
self,
|
383
|
+
hostname: str,
|
384
|
+
token: str | None = None,
|
385
|
+
server: str = DEFAULT_SERVER,
|
386
|
+
target_name_override: Optional[str] = None,
|
387
|
+
cert_file: Optional[str] = None,
|
388
|
+
user_agent: str = DEFAULT_USER_AGENT,
|
389
|
+
insecure_grpc: bool = False,
|
390
|
+
channel: Optional[grpc.aio.Channel] = None,
|
391
|
+
credentials: Optional[Credentials] = None,
|
392
|
+
host_params: Optional[HostParams] = None,
|
393
|
+
_grpc_channel_fn: Optional[Callable] = None,
|
394
|
+
):
|
395
|
+
super(GnetcliSessionCmd, self).__init__(
|
396
|
+
hostname,
|
397
|
+
token,
|
398
|
+
server,
|
399
|
+
target_name_override,
|
400
|
+
cert_file,
|
401
|
+
user_agent,
|
402
|
+
insecure_grpc,
|
403
|
+
channel,
|
404
|
+
credentials,
|
405
|
+
_grpc_channel_fn,
|
406
|
+
)
|
407
|
+
self.host_params = host_params
|
408
|
+
|
377
409
|
async def cmd(
|
378
410
|
self,
|
379
411
|
cmd: str,
|
@@ -391,7 +423,7 @@ class GnetcliSessionCmd(GnetcliSession):
|
|
391
423
|
qa=qa,
|
392
424
|
read_timeout=read_timeout,
|
393
425
|
cmd_timeout=cmd_timeout,
|
394
|
-
host_params=host_params,
|
426
|
+
host_params=host_params if host_params else self.host_params,
|
395
427
|
)
|
396
428
|
return await self._cmd(pbcmd)
|
397
429
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
gnetclisdk/auth.py,sha256=GwM7H7Ecb-gwqUTkQorifNB_mtnZfgeS46gOW2Vx1U4,1246
|
2
|
-
gnetclisdk/client.py,sha256=
|
2
|
+
gnetclisdk/client.py,sha256=VjbXL11xAUYRX5e6tnedTt6X7_lvvhysYm04EFbhtl8,19773
|
3
3
|
gnetclisdk/exceptions.py,sha256=d0Bcq8tnAzemCuCCrGJEmL_A1IQxCCLFRCwDhr9zvkU,2683
|
4
4
|
gnetclisdk/interceptors.py,sha256=apj3l4lnR2ZcsA49odptrBC0kTDmP6Mp0EzYkeEJz9Y,7010
|
5
5
|
gnetclisdk/proto/server_pb2.py,sha256=OQsW6Oh38zf-h1ctcNyeOyxjl5wzWm_D9SRT2Usx5q4,8083
|
6
6
|
gnetclisdk/proto/server_pb2.pyi,sha256=th-HnFVkR1ZEY-XmFmk8VMfDj_4uFAoSAXH61mSlVec,8295
|
7
7
|
gnetclisdk/proto/server_pb2_grpc.py,sha256=H_CmevWcjvGTvp4TmzEV-TJRPq2SsQ6UgoCDc-hosyo,12805
|
8
|
-
gnetclisdk-1.0.
|
9
|
-
gnetclisdk-1.0.
|
10
|
-
gnetclisdk-1.0.
|
11
|
-
gnetclisdk-1.0.
|
8
|
+
gnetclisdk-1.0.59.dist-info/METADATA,sha256=eZB1bNIeSnB2X8d_9f8_0Mwh3fEB1jrWvXR8TRtkXmE,1793
|
9
|
+
gnetclisdk-1.0.59.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
10
|
+
gnetclisdk-1.0.59.dist-info/top_level.txt,sha256=MNjS8LEt6d2rZ-dUbV2cnqkuTMu3EqEL2eiSvUZuUlA,11
|
11
|
+
gnetclisdk-1.0.59.dist-info/RECORD,,
|
File without changes
|
File without changes
|