syneto_api 0.2.30__tar.gz → 0.2.32__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: syneto-api
3
- Version: 0.2.30
3
+ Version: 0.2.32
4
4
  Summary: Syneto Client API library
5
5
  Home-page: https://github.com/SynetoNet/syneto-api
6
6
  License: Proprietary
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "syneto_api"
3
- version = "0.2.30"
3
+ version = "0.2.32"
4
4
  description = "Syneto Client API library"
5
5
  authors = ["Your Name <you@example.com>"]
6
6
  license = "Proprietary"
@@ -20,7 +20,7 @@ install_requires = \
20
20
 
21
21
  setup_kwargs = {
22
22
  'name': 'syneto-api',
23
- 'version': '0.2.30',
23
+ 'version': '0.2.32',
24
24
  'description': 'Syneto Client API library',
25
25
  'long_description': '# Syneto API\n\nSyneto Client API library: authentication, storage, virtualization and protection\n\n# Installation\n\n```\n$ pip install syneto-api\n```\n\n# Basic Usage\n\n```\nfrom syneto_api import Authentication, Virtualization, Storage, Protection\n\nauth_api = Authentication(url_base="https://syneto-instance-ip-address/api/auth", insecure_ssl=True)\nresponse = auth_api.login(username="admin", password="admin")\njwt = response[\'jwt\']\n\nvirt_api = Virtualization(url_base="https://syneto-instance-ip-address/api/virtualization", insecure_ssl=True)\nvirt_api.set_auth_jwt(jwt)\nprint(virt_api.get_vms())\n\nstorage_api = Storage(url_base="https://syneto-instance-ip-address/api/storage", insecure_ssl=True)\nstorage_api.set_auth_jwt(jwt)\nprint(storage_api.get_pools())\n```\n\n# Environment Variables\n\nFor conveninence, the base urls for the api endpoints are also accepted as environment variables, please see below.\n\n```\nAUTH_SERVICE=https://syneto-instance-ip-address/api/auth\nVIRTUALIZATION_SERVICE=https://syneto-instance-ip-address/api/virtualization\nSTORAGE_SERVICE=https://syneto-instance-ip-address/api/storage\nPROTECTION_SERVICE=https://syneto-instance-ip-address/api/protection\n```\n\nIf you are using self-signed SSL certificates, set the following env. so that the http request library does not perform ssl verification. \n\n```\nALLOW_INSECURE_SSL=True\n```\n',
26
26
  'author': 'Your Name',
@@ -157,8 +157,22 @@ class Storage(APIClientBase):
157
157
  snapshot_name=snapshot_name,
158
158
  )
159
159
 
160
- def get_volume_files(self, volume_id: str):
161
- return self.get_request("/volumes/{volume_id}/files", volume_id=volume_id)
160
+ def get_volume_files(
161
+ self,
162
+ volume_id: str,
163
+ path: str = "",
164
+ recursive: bool = False,
165
+ match_pattern: str = "",
166
+ ):
167
+ return self.get_request(
168
+ "/volumes/{volume_id}/files",
169
+ volume_id=volume_id,
170
+ query_args={
171
+ "path": path,
172
+ "recursive": recursive,
173
+ "match_pattern": match_pattern,
174
+ },
175
+ )
162
176
 
163
177
  def delete_volume_files(
164
178
  self, volume_id: str, file_path: str = None, pattern: str = None
@@ -166,7 +180,7 @@ class Storage(APIClientBase):
166
180
  return self.delete_request(
167
181
  "/volumes/{volume_id}/files",
168
182
  volume_id=volume_id,
169
- query_args={"file_path": file_path, "pattern": pattern},
183
+ body={"volume_id": volume_id, "file_path": file_path, "pattern": pattern},
170
184
  )
171
185
 
172
186
  def get_volume_file_content(self, volume_id: str, file_path: str):
File without changes