hbp_service_client/storage_service/api.py
def get_metadata(self, entity_type, entity_id):
        '''Get metadata of an entity.

        Args:
            entity_type (str): Type of the entity. Admitted values: ['project',
                'folder', 'file'].
            entity_id (str): The UUID of the entity to be modified.

        Returns:
            A dictionary of the metadata::

                {
                    u'bar': u'200',
                    u'foo': u'100'
                }

        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(entity_id):
            raise StorageArgumentException(
                'Invalid UUID for entity_id: {0}'.format(entity_id))

        return self._authenticated_request \
            .to_endpoint('{}/{}/metadata/'.format(entity_type, entity_id)) \
            .return_body() \
            .get()
def get_metadata(self, entity_type, entity_id):
        '''Get metadata of an entity.

        Args:
            entity_type (str): Type of the entity. Admitted values: ['project',
                'folder', 'file'].
            entity_id (str): The UUID of the entity to be modified.

        Returns:
            A dictionary of the metadata::

                {
                    u'bar': u'200',
                    u'foo': u'100'
                }

        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(entity_id):
            raise StorageArgumentException(
                'Invalid UUID for entity_id: {0}'.format(entity_id))

        return self._authenticated_request \
            .to_endpoint('{}/{}/metadata/'.format(entity_type, entity_id)) \
            .return_body() \
            .get()
def get_metadata ( self , entity_type , entity_id ) : if not is_valid_uuid ( entity_id ) : raise StorageArgumentException ( 'Invalid UUID for entity_id: {0}' . format ( entity_id ) ) return self . _authenticated_request . to_endpoint ( '{}/{}/metadata/' . format ( entity_type , entity_id ) ) . return_body ( ) . get ( )
Get metadata of an entity.

        Args:
            entity_type (str): Type of the entity. Admitted values: ['project',
                'folder', 'file'].
            entity_id (str): The UUID of the entity to be modified.

        Returns:
            A dictionary of the metadata::

                {
                    u'bar': u'200',
                    u'foo': u'100'
                }

        Raises:
            StorageArgumentException: Invalid arguments
            StorageForbiddenException: Server response code 403
            StorageNotFoundException: Server response code 404
            StorageException: other 400-600 error codes
Get metadata of an entity .