hbp_service_client/storage_service/client.py
def __validate_storage_path(cls, path, projects_allowed=True):
        '''Validate a string as a valid storage path'''

        if not path or not isinstance(path, str) or path[0] != '/' or path == '/':
            raise StorageArgumentException(
                'The path must be a string, start with a slash (/), and be longer'
                ' than 1 character.')
        if not projects_allowed and len([elem for elem in path.split('/') if elem]) == 1:
            raise StorageArgumentException(
                'This method does not accept projects in the path.')
def __validate_storage_path(cls, path, projects_allowed=True):
        '''Validate a string as a valid storage path'''

        if not path or not isinstance(path, str) or path[0] != '/' or path == '/':
            raise StorageArgumentException(
                'The path must be a string, start with a slash (/), and be longer'
                ' than 1 character.')
        if not projects_allowed and len([elem for elem in path.split('/') if elem]) == 1:
            raise StorageArgumentException(
                'This method does not accept projects in the path.')
def __validate_storage_path ( cls , path , projects_allowed = True ) : if not path or not isinstance ( path , str ) or path [ 0 ] != '/' or path == '/' : raise StorageArgumentException ( 'The path must be a string, start with a slash (/), and be longer' ' than 1 character.' ) if not projects_allowed and len ( [ elem for elem in path . split ( '/' ) if elem ] ) == 1 : raise StorageArgumentException ( 'This method does not accept projects in the path.' )
Validate a string as a valid storage path
Validate a string as a valid storage path