def parse_get_access_point_result()

in oss2/xml_utils.py [0:0]


def parse_get_access_point_result(result, body):
    root = ElementTree.fromstring(body)
    result.access_point_name = _find_tag_with_default(root, "AccessPointName", None)
    result.bucket = _find_tag_with_default(root, "Bucket", None)
    result.account_id = _find_tag_with_default(root, "AccountId", None)
    result.network_origin = _find_tag_with_default(root, "NetworkOrigin", None)
    vpc_node = root.find('VpcConfiguration')
    if vpc_node is not None:
        vpc = AccessPointVpcConfiguration()
        vpc.vpc_id = _find_tag_with_default(vpc_node, "VpcId", None)
        result.vpc = vpc

    result.access_point_arn = _find_tag_with_default(root, "AccessPointArn", None)
    result.creation_date = _find_tag_with_default(root, "CreationDate", None)
    result.alias = _find_tag_with_default(root, "Alias", None)
    result.access_point_status = _find_tag_with_default(root, "Status", None)
    endpoint_node = root.find('Endpoints')
    if endpoint_node is not None:
        endpoint = AccessPointEndpoints()
        endpoint.public_endpoint = _find_tag_with_default(endpoint_node, "PublicEndpoint", None)
        endpoint.internal_endpoint = _find_tag_with_default(endpoint_node, "InternalEndpoint", None)
        result.endpoints = endpoint

    block_node = root.find('PublicAccessBlockConfiguration')
    if block_node is not None:
        block = PublicAccessBlockConfiguration()
        if block_node.find('BlockPublicAccess') is not None:
            block.block_public_access = _find_bool(block_node, "BlockPublicAccess")
            result.public_access_block_configuration = block