gnetclisdk 1.0.2__tar.gz → 1.0.32__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {gnetclisdk-1.0.2 → gnetclisdk-1.0.32}/PKG-INFO +1 -1
- {gnetclisdk-1.0.2 → gnetclisdk-1.0.32}/gnetclisdk/client.py +18 -0
- {gnetclisdk-1.0.2 → gnetclisdk-1.0.32}/gnetclisdk.egg-info/PKG-INFO +1 -1
- {gnetclisdk-1.0.2 → gnetclisdk-1.0.32}/setup.py +2 -1
- {gnetclisdk-1.0.2 → gnetclisdk-1.0.32}/MANIFEST.in +0 -0
- {gnetclisdk-1.0.2 → gnetclisdk-1.0.32}/README.md +0 -0
- {gnetclisdk-1.0.2 → gnetclisdk-1.0.32}/gnetclisdk/auth.py +0 -0
- {gnetclisdk-1.0.2 → gnetclisdk-1.0.32}/gnetclisdk/exceptions.py +0 -0
- {gnetclisdk-1.0.2 → gnetclisdk-1.0.32}/gnetclisdk/interceptors.py +0 -0
- {gnetclisdk-1.0.2 → gnetclisdk-1.0.32}/gnetclisdk/proto/server_pb2.py +0 -0
- {gnetclisdk-1.0.2 → gnetclisdk-1.0.32}/gnetclisdk/proto/server_pb2.pyi +0 -0
- {gnetclisdk-1.0.2 → gnetclisdk-1.0.32}/gnetclisdk/proto/server_pb2_grpc.py +0 -0
- {gnetclisdk-1.0.2 → gnetclisdk-1.0.32}/gnetclisdk.egg-info/SOURCES.txt +0 -0
- {gnetclisdk-1.0.2 → gnetclisdk-1.0.32}/gnetclisdk.egg-info/dependency_links.txt +0 -0
- {gnetclisdk-1.0.2 → gnetclisdk-1.0.32}/gnetclisdk.egg-info/requires.txt +0 -0
- {gnetclisdk-1.0.2 → gnetclisdk-1.0.32}/gnetclisdk.egg-info/top_level.txt +0 -0
- {gnetclisdk-1.0.2 → gnetclisdk-1.0.32}/pyproject.toml +0 -0
- {gnetclisdk-1.0.2 → gnetclisdk-1.0.32}/requirements.txt +0 -0
- {gnetclisdk-1.0.2 → gnetclisdk-1.0.32}/setup.cfg +0 -0
@@ -59,7 +59,19 @@ class File:
|
|
59
59
|
class HostParams:
|
60
60
|
device: str
|
61
61
|
port: Optional[int] = None
|
62
|
+
hostname: Optional[str] = None
|
62
63
|
credentials: Optional[Credentials] = None
|
64
|
+
ip: Optional[str] = None
|
65
|
+
|
66
|
+
def make_pb(self) -> Message:
|
67
|
+
pbcmd = server_pb2.HostParams(
|
68
|
+
host=self.hostname,
|
69
|
+
port=self.port,
|
70
|
+
credentials=self.credentials.make_pb(),
|
71
|
+
device=self.device,
|
72
|
+
ip=self.ip,
|
73
|
+
)
|
74
|
+
return pbcmd
|
63
75
|
|
64
76
|
|
65
77
|
def make_auth(auth_token: str) -> ClientAuthentication:
|
@@ -119,6 +131,7 @@ class Gnetcli:
|
|
119
131
|
qa: Optional[List[QA]] = None,
|
120
132
|
read_timeout: float = 0.0,
|
121
133
|
cmd_timeout: float = 0.0,
|
134
|
+
host_params: Optional[HostParams] = None,
|
122
135
|
) -> Message:
|
123
136
|
pbcmd = make_cmd(
|
124
137
|
hostname=hostname,
|
@@ -127,6 +140,7 @@ class Gnetcli:
|
|
127
140
|
qa=qa,
|
128
141
|
read_timeout=read_timeout,
|
129
142
|
cmd_timeout=cmd_timeout,
|
143
|
+
host_params=host_params,
|
130
144
|
)
|
131
145
|
if self._channel is None:
|
132
146
|
_logger.debug("connect to %s", self._server)
|
@@ -342,6 +356,7 @@ class GnetcliSessionCmd(GnetcliSession):
|
|
342
356
|
qa: Optional[List[QA]] = None,
|
343
357
|
cmd_timeout: float = 0.0,
|
344
358
|
read_timeout: float = 0.0,
|
359
|
+
host_params: Optional[HostParams] = None,
|
345
360
|
) -> Message:
|
346
361
|
_logger.debug("session cmd %r", cmd)
|
347
362
|
pbcmd = make_cmd(
|
@@ -351,6 +366,7 @@ class GnetcliSessionCmd(GnetcliSession):
|
|
351
366
|
qa=qa,
|
352
367
|
read_timeout=read_timeout,
|
353
368
|
cmd_timeout=cmd_timeout,
|
369
|
+
host_params=host_params,
|
354
370
|
)
|
355
371
|
return await self._cmd(pbcmd)
|
356
372
|
|
@@ -437,6 +453,7 @@ def make_cmd(
|
|
437
453
|
qa: Optional[List[QA]] = None,
|
438
454
|
read_timeout: float = 0.0,
|
439
455
|
cmd_timeout: float = 0.0,
|
456
|
+
host_params: Optional[HostParams] = None,
|
440
457
|
) -> Message:
|
441
458
|
qa_cmd: List[Message] = []
|
442
459
|
if qa:
|
@@ -452,6 +469,7 @@ def make_cmd(
|
|
452
469
|
qa=qa_cmd,
|
453
470
|
read_timeout=read_timeout,
|
454
471
|
cmd_timeout=cmd_timeout,
|
472
|
+
host_params=host_params.make_pb(),
|
455
473
|
)
|
456
474
|
return res # type: ignore
|
457
475
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import os
|
1
2
|
from setuptools import setup
|
2
3
|
|
3
4
|
with open("README.md") as f:
|
@@ -8,7 +9,7 @@ with open("requirements.txt") as f:
|
|
8
9
|
|
9
10
|
setup(
|
10
11
|
name="gnetclisdk",
|
11
|
-
version="
|
12
|
+
version=os.getenv("VERSION", "0.0").strip("v"),
|
12
13
|
description="Client for Gnetcli GRPC-server",
|
13
14
|
long_description=readme,
|
14
15
|
long_description_content_type="text/markdown",
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|