hbp_service_client/storage_service/api.py
def copy_file_content(self, file_id, source_file):
        '''Copy file content from source file to target file.

        Args:
            file_id (str): The UUID of the file whose content is written.
            source_file (str): The UUID of the file whose content is copied.

        Returns:
            None

        Raises:
        StorageArgumentException: Invalid arguments
        StorageForbiddenException: Server response code 403
        StorageNotFoundException: Server response code 404
        StorageException: other 400-600 error codes
        '''
        if not is_valid_uuid(file_id):
            raise StorageArgumentException(
                'Invalid UUID for file_id: {0}'.format(file_id))

        if not is_valid_uuid(source_file):
            raise StorageArgumentException(
                'Invalid UUID for source_file: {0}'.format(source_file))

        self._authenticated_request \
            .to_endpoint('file/{}/content/'.format(file_id)) \
            .with_headers({'X-Copy-From': source_file}) \
            .put()
def copy_file_content(self, file_id, source_file):
        '''Copy file content from source file to target file.

        Args:
            file_id (str): The UUID of the file whose content is written.
            source_file (str): The UUID of the file whose content is copied.

        Returns:
            None

        Raises:
        StorageArgumentException: Invalid arguments
        StorageForbiddenException: Server response code 403
        StorageNotFoundException: Server response code 404
        StorageException: other 400-600 error codes
        '''
        if not is_valid_uuid(file_id):
            raise StorageArgumentException(
                'Invalid UUID for file_id: {0}'.format(file_id))

        if not is_valid_uuid(source_file):
            raise StorageArgumentException(
                'Invalid UUID for source_file: {0}'.format(source_file))

        self._authenticated_request \
            .to_endpoint('file/{}/content/'.format(file_id)) \
            .with_headers({'X-Copy-From': source_file}) \
            .put()
def copy_file_content ( self , file_id , source_file ) : if not is_valid_uuid ( file_id ) : raise StorageArgumentException ( 'Invalid UUID for file_id: {0}' . format ( file_id ) ) if not is_valid_uuid ( source_file ) : raise StorageArgumentException ( 'Invalid UUID for source_file: {0}' . format ( source_file ) ) self . _authenticated_request . to_endpoint ( 'file/{}/content/' . format ( file_id ) ) . with_headers ( { 'X-Copy-From' : source_file } ) . put ( )
Copy file content from source file to target file.

        Args:
            file_id (str): The UUID of the file whose content is written.
            source_file (str): The UUID of the file whose content is copied.

        Returns:
            None

        Raises:
        StorageArgumentException: Invalid arguments
        StorageForbiddenException: Server response code 403
        StorageNotFoundException: Server response code 404
        StorageException: other 400-600 error codes
Copy file content from source file to target file .