pyPreservica 2.3.2__tar.gz → 2.4.0__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.
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/PKG-INFO +1 -1
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/pyPreservica/__init__.py +1 -1
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/pyPreservica/common.py +2 -2
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/pyPreservica/uploadAPI.py +6 -0
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/pyPreservica/webHooksAPI.py +1 -0
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/pyPreservica.egg-info/PKG-INFO +1 -1
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/setup.py +1 -1
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/LICENSE.txt +0 -0
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/README.md +0 -0
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/pyPreservica/adminAPI.py +0 -0
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/pyPreservica/authorityAPI.py +0 -0
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/pyPreservica/contentAPI.py +0 -0
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/pyPreservica/entityAPI.py +0 -0
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/pyPreservica/monitorAPI.py +0 -0
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/pyPreservica/opex.py +0 -0
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/pyPreservica/parAPI.py +0 -0
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/pyPreservica/retentionAPI.py +0 -0
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/pyPreservica/workflowAPI.py +0 -0
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/pyPreservica.egg-info/SOURCES.txt +0 -0
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/pyPreservica.egg-info/dependency_links.txt +0 -0
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/pyPreservica.egg-info/requires.txt +0 -0
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/pyPreservica.egg-info/top_level.txt +0 -0
- {pyPreservica-2.3.2 → pyPreservica-2.4.0}/setup.cfg +0 -0
|
@@ -742,7 +742,7 @@ class AuthenticatedAPI:
|
|
|
742
742
|
RuntimeError(request.status_code, "version number failed")
|
|
743
743
|
|
|
744
744
|
def __str__(self):
|
|
745
|
-
return f"pyPreservica version: {pyPreservica.__version__} (Preservica 6.
|
|
745
|
+
return f"pyPreservica version: {pyPreservica.__version__} (Preservica 6.12 Compatible) " \
|
|
746
746
|
f"Connected to: {self.server} Preservica version: {self.version} as {self.username} " \
|
|
747
747
|
f"in tenancy {self.tenant}"
|
|
748
748
|
|
|
@@ -769,7 +769,7 @@ class AuthenticatedAPI:
|
|
|
769
769
|
logger.error(msg)
|
|
770
770
|
logger.error(response.status_code)
|
|
771
771
|
logger.error(str(response.content))
|
|
772
|
-
RuntimeError(response.status_code, "Could not generate valid manager approval
|
|
772
|
+
RuntimeError(response.status_code, "Could not generate valid manager approval token")
|
|
773
773
|
|
|
774
774
|
def __token__(self):
|
|
775
775
|
logger.debug("Token Expired Requesting New Token")
|
|
@@ -1853,9 +1853,13 @@ class UploadAPI(AuthenticatedAPI):
|
|
|
1853
1853
|
raise RuntimeError("This call [upload_zip_package_to_S3] is only available against v6.5 systems and above")
|
|
1854
1854
|
|
|
1855
1855
|
if (self.major_version > 5) and (self.minor_version > 4):
|
|
1856
|
+
logger.debug("Finding Upload Locations")
|
|
1857
|
+
self.token = self.__token__()
|
|
1856
1858
|
locations = self.upload_locations()
|
|
1857
1859
|
for location in locations:
|
|
1858
1860
|
if location['containerName'] == bucket_name:
|
|
1861
|
+
logger.debug(f"Found Upload Location {location['containerName']}")
|
|
1862
|
+
logger.debug(f"Fetching Upload Credentials for {location['containerName']}")
|
|
1859
1863
|
credentials = self.upload_credentials(location['apiId'])
|
|
1860
1864
|
access_key = credentials['key']
|
|
1861
1865
|
secret_key = credentials['secret']
|
|
@@ -1866,6 +1870,8 @@ class UploadAPI(AuthenticatedAPI):
|
|
|
1866
1870
|
aws_session_token=session_token)
|
|
1867
1871
|
s3 = session.resource(service_name="s3")
|
|
1868
1872
|
|
|
1873
|
+
logger.debug(f"S3 Session: {s3}")
|
|
1874
|
+
|
|
1869
1875
|
upload_key = str(uuid.uuid4())
|
|
1870
1876
|
s3_object = s3.Object(bucket_name, upload_key)
|
|
1871
1877
|
metadata = {'key': upload_key, 'name': upload_key + ".zip", 'bucket': bucket_name,
|
|
@@ -21,7 +21,7 @@ if sys.argv[-1] == 'publish':
|
|
|
21
21
|
# This call to setup() does all the work
|
|
22
22
|
setup(
|
|
23
23
|
name=PKG,
|
|
24
|
-
version="2.
|
|
24
|
+
version="2.4.0",
|
|
25
25
|
description="Python library for the Preservica API",
|
|
26
26
|
long_description=README,
|
|
27
27
|
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
|
|
File without changes
|