Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiops #295

Merged
merged 7 commits into from
Jan 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions hsds/attr_dn.py
Original file line number Diff line number Diff line change
@@ -196,6 +196,7 @@ async def POST_Attributes(request):
attr_list.append(des_attr)

resp_json = {"attributes": attr_list}
log.debug(f"POST attributes returning: {resp_json}")
resp = json_response(resp_json)
log.response(request, resp=resp)
return resp
@@ -253,7 +254,6 @@ async def PUT_Attributes(request):
raise HTTPBadRequest(message="body expected")

body = await request.json()
log.debug(f"PUT Attribute body: {body}") # remove this to avoid verbosity
if "bucket" in params:
bucket = params["bucket"]
elif "bucket" in body:
@@ -284,7 +284,7 @@ async def PUT_Attributes(request):
if "value" in body:
attribute["value"] = body["value"]
items[attr_name] = attribute

# validate input
for attr_name in items:
validateAttributeName(attr_name)
@@ -328,7 +328,7 @@ async def PUT_Attributes(request):
log.debug(f"new attribute {attr_name}")
attribute["created"] = create_time
new_attribute = True

# ok - all set, create the attributes
for attr_name in items:
log.debug(f"adding attribute {attr_name}")
@@ -349,6 +349,7 @@ async def PUT_Attributes(request):
log.response(request, resp=resp)
return resp


async def DELETE_Attribute(request):
"""HTTP DELETE method for /(obj)/<id>/attributes/<name>
"""
Loading
Loading