in oss2/xml_utils.py [0:0]
def parse_list_access_point_result(result, body):
root = ElementTree.fromstring(body)
result.account_id = _find_tag_with_default(root, 'AccountId', None)
result.marker = _find_tag_with_default(root, 'Marker', None)
result.max_keys = _find_int(root, 'MaxKeys')
result.is_truncated = _find_bool(root, 'IsTruncated')
if result.is_truncated is not None:
result.next_continuation_token = _find_tag_with_default(root, 'NextContinuationToken', None)
access_points = root.findall('AccessPoints/AccessPoint')
for access_point in access_points:
tmp = AccessPointInfo()
tmp.bucket = _find_tag(access_point, 'Bucket')
tmp.access_point_name = _find_tag(access_point, 'AccessPointName')
tmp.alias = _find_tag(access_point, 'Alias')
tmp.status = _find_tag(access_point, 'Status')
tmp.network_origin = _find_tag(access_point, 'NetworkOrigin')
vpc_node = access_point.find('VpcConfiguration')
if vpc_node is not None:
vpc = AccessPointVpcConfiguration()
vpc.vpc_id = _find_tag_with_default(vpc_node, "VpcId", None)
tmp.vpc = vpc
result.access_points.append(tmp)
return result