Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
Domain Data Mgmt Services
Wellbore
Lib
Wellbore-cloud
Wellbore-aws-lib
Commits
1be63d23
Commit
1be63d23
authored
Jul 15, 2021
by
Yunhua Koglin
Browse files
add prefix
parent
d8d1b7ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
osdu_aws/__init__.py
View file @
1be63d23
...
...
@@ -12,5 +12,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
__version__
=
'2.0.
10
'
__version__
=
'2.0.
2
'
osdu_aws/storage/storage_aws.py
View file @
1be63d23
...
...
@@ -217,9 +217,9 @@ class AwsStorage(BlobStorageBase):
await
self
.
getCredentials
(
tenant
)
bucket
=
tenant
.
bucket_name
object_name
=
f
"
{
bucket
}
/
{
object_name
}
"
encoded_object_name
=
quote
(
object_name
,
safe
=
''
)
#
encoded_object_name = quote(object_name, safe='')
print
(
"delete
:
object_name
\n\n
"
)
print
(
"delete
_
object_name
_in_storage:
\n\n
"
)
print
(
object_name
)
s3_client
=
boto3
.
client
(
...
...
@@ -231,7 +231,7 @@ class AwsStorage(BlobStorageBase):
)
response
=
s3_client
.
delete_object
(
Bucket
=
self
.
_bucket_name
,
Key
=
encoded_
object_name
Key
=
object_name
)
return
response
...
...
@@ -300,14 +300,15 @@ class AwsStorage(BlobStorageBase):
kwargs
=
{
'Bucket'
:
self
.
_bucket_name
}
if
prefix
is
not
None
:
prefix_name
=
prefix_name
+
prefix
prefix_name
=
f
"
{
bucket
}
/
{
prefix
}
"
if
max_result
is
not
None
:
kwargs
[
'MaxKeys'
]
=
max_result
kwargs
[
'Prefix'
]
=
prefix_name
print
(
"list_objects, prefix is
\n\n
"
)
print
(
prefix
)
print
(
"list_objects_prefix_is
\n\n
"
)
print
(
prefix_name
)
print
(
"end_list_objects
\n\n
"
)
s3_client
=
boto3
.
client
(
's3'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment