gnetclisdk 1.0.38__tar.gz → 1.0.40__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {gnetclisdk-1.0.38 → gnetclisdk-1.0.40}/PKG-INFO +1 -1
- {gnetclisdk-1.0.38 → gnetclisdk-1.0.40}/gnetclisdk/client.py +12 -5
- {gnetclisdk-1.0.38 → gnetclisdk-1.0.40}/gnetclisdk.egg-info/PKG-INFO +1 -1
- {gnetclisdk-1.0.38 → gnetclisdk-1.0.40}/MANIFEST.in +0 -0
- {gnetclisdk-1.0.38 → gnetclisdk-1.0.40}/README.md +0 -0
- {gnetclisdk-1.0.38 → gnetclisdk-1.0.40}/gnetclisdk/auth.py +0 -0
- {gnetclisdk-1.0.38 → gnetclisdk-1.0.40}/gnetclisdk/exceptions.py +0 -0
- {gnetclisdk-1.0.38 → gnetclisdk-1.0.40}/gnetclisdk/interceptors.py +0 -0
- {gnetclisdk-1.0.38 → gnetclisdk-1.0.40}/gnetclisdk/proto/server_pb2.py +0 -0
- {gnetclisdk-1.0.38 → gnetclisdk-1.0.40}/gnetclisdk/proto/server_pb2.pyi +0 -0
- {gnetclisdk-1.0.38 → gnetclisdk-1.0.40}/gnetclisdk/proto/server_pb2_grpc.py +0 -0
- {gnetclisdk-1.0.38 → gnetclisdk-1.0.40}/gnetclisdk.egg-info/SOURCES.txt +0 -0
- {gnetclisdk-1.0.38 → gnetclisdk-1.0.40}/gnetclisdk.egg-info/dependency_links.txt +0 -0
- {gnetclisdk-1.0.38 → gnetclisdk-1.0.40}/gnetclisdk.egg-info/requires.txt +0 -0
- {gnetclisdk-1.0.38 → gnetclisdk-1.0.40}/gnetclisdk.egg-info/top_level.txt +0 -0
- {gnetclisdk-1.0.38 → gnetclisdk-1.0.40}/pyproject.toml +0 -0
- {gnetclisdk-1.0.38 → gnetclisdk-1.0.40}/requirements.txt +0 -0
- {gnetclisdk-1.0.38 → gnetclisdk-1.0.40}/setup.cfg +0 -0
- {gnetclisdk-1.0.38 → gnetclisdk-1.0.40}/setup.py +0 -0
@@ -235,7 +235,8 @@ class Gnetcli:
|
|
235
235
|
host=hostname,
|
236
236
|
port=params.port,
|
237
237
|
credentials=params.credentials.make_pb(),
|
238
|
-
device=params.device
|
238
|
+
device=params.device,
|
239
|
+
)
|
239
240
|
_logger.debug("connect to %s", self._server)
|
240
241
|
async with self._grpc_channel_fn(self._server, options=self._options) as channel:
|
241
242
|
_logger.debug("set params for %s", hostname)
|
@@ -243,8 +244,11 @@ class Gnetcli:
|
|
243
244
|
await grpc_call_wrapper(stub.SetupHostParams, pbcmd)
|
244
245
|
return
|
245
246
|
|
246
|
-
async def upload(self, hostname: str, files: Dict[str, File]) -> None:
|
247
|
-
|
247
|
+
async def upload(self, hostname: str, files: Dict[str, File], host_params: Optional[HostParams] = None) -> None:
|
248
|
+
host_params_pb: Optional[server_pb2.HostParams] = None
|
249
|
+
if host_params:
|
250
|
+
host_params_pb = host_params.make_pb()
|
251
|
+
pbcmd = server_pb2.FileUploadRequest(host=hostname, files=make_files_request(files), host_params=host_params_pb)
|
248
252
|
_logger.debug("connect to %s", self._server)
|
249
253
|
async with self._grpc_channel_fn(self._server, options=self._options) as channel:
|
250
254
|
_logger.debug("upload %s to %s", files.keys(), hostname)
|
@@ -253,8 +257,11 @@ class Gnetcli:
|
|
253
257
|
_logger.debug("upload res %s", response)
|
254
258
|
return
|
255
259
|
|
256
|
-
async def download(self, hostname: str, paths: List[str]) -> Dict[str, File]:
|
257
|
-
|
260
|
+
async def download(self, hostname: str, paths: List[str], host_params: Optional[HostParams] = None) -> Dict[str, File]:
|
261
|
+
host_params_pb: Optional[server_pb2.HostParams] = None
|
262
|
+
if host_params:
|
263
|
+
host_params_pb = host_params.make_pb()
|
264
|
+
pbcmd = server_pb2.FileDownloadRequest(host=hostname, paths=paths, host_params=host_params_pb)
|
258
265
|
_logger.debug("connect to %s", self._server)
|
259
266
|
async with self._grpc_channel_fn(self._server, options=self._options) as channel:
|
260
267
|
_logger.debug("download %s from %s", paths, hostname)
|
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
|
File without changes
|