Ejemplo n.º 1
0
def get_account_metadata(acc_path):
    containers = []
    container_count = 0
    containers, container_count = get_account_details(acc_path)
    metadata = {X_TYPE: ACCOUNT,
                X_TIMESTAMP: normalize_timestamp(
                    do_getctime(acc_path)),
                X_PUT_TIMESTAMP: normalize_timestamp(
                    do_getmtime(acc_path)),
                X_OBJECTS_COUNT: 0,
                X_BYTES_USED: 0,
                X_CONTAINER_COUNT: container_count}
    return _add_timestamp(metadata)
Ejemplo n.º 2
0
def get_account_metadata(acc_path):
    containers = []
    container_count = 0
    containers, container_count = get_account_details(acc_path)
    metadata = {
        X_TYPE: ACCOUNT,
        X_TIMESTAMP: normalize_timestamp(do_getctime(acc_path)),
        X_PUT_TIMESTAMP: normalize_timestamp(do_getmtime(acc_path)),
        X_OBJECTS_COUNT: 0,
        X_BYTES_USED: 0,
        X_CONTAINER_COUNT: container_count
    }
    return _add_timestamp(metadata)
Ejemplo n.º 3
0
def get_container_metadata(cont_path):
    objects = []
    object_count = 0
    bytes_used = 0
    objects, object_count, bytes_used = get_container_details(cont_path)
    metadata = {X_TYPE: CONTAINER,
                X_TIMESTAMP: normalize_timestamp(
                    do_getctime(cont_path)),
                X_PUT_TIMESTAMP: normalize_timestamp(
                    do_getmtime(cont_path)),
                X_OBJECTS_COUNT: object_count,
                X_BYTES_USED: bytes_used}
    return _add_timestamp(metadata)
Ejemplo n.º 4
0
def get_container_metadata(cont_path):
    objects = []
    object_count = 0
    bytes_used = 0
    objects, object_count, bytes_used = get_container_details(cont_path)
    metadata = {
        X_TYPE: CONTAINER,
        X_TIMESTAMP: normalize_timestamp(do_getctime(cont_path)),
        X_PUT_TIMESTAMP: normalize_timestamp(do_getmtime(cont_path)),
        X_OBJECTS_COUNT: object_count,
        X_BYTES_USED: bytes_used
    }
    return _add_timestamp(metadata)