hbp_service_client/storage_service/client.py
def get_parent(self, path):
        '''Get the parent entity of the entity pointed by the given path.

        Args:
            path (str): The path of the entity whose parent is needed

        Returns:
            A JSON object of the parent entity if found.

        Raises:
            StorageArgumentException: Invalid arguments
            StorageForbiddenException: Server response code 403
            StorageNotFoundException: Server response code 404
            StorageException: other 400-600 error codes
        '''

        self.__validate_storage_path(path, projects_allowed=False)
        path_steps = [step for step in path.split('/') if step]
        del path_steps[-1]
        parent_path = '/{0}'.format('/'.join(path_steps))
        return self.api_client.get_entity_by_query(path=parent_path)
def get_parent(self, path):
        '''Get the parent entity of the entity pointed by the given path.

        Args:
            path (str): The path of the entity whose parent is needed

        Returns:
            A JSON object of the parent entity if found.

        Raises:
            StorageArgumentException: Invalid arguments
            StorageForbiddenException: Server response code 403
            StorageNotFoundException: Server response code 404
            StorageException: other 400-600 error codes
        '''

        self.__validate_storage_path(path, projects_allowed=False)
        path_steps = [step for step in path.split('/') if step]
        del path_steps[-1]
        parent_path = '/{0}'.format('/'.join(path_steps))
        return self.api_client.get_entity_by_query(path=parent_path)
Get the parent entity of the entity pointed by the given path.

        Args:
            path (str): The path of the entity whose parent is needed

        Returns:
            A JSON object of the parent entity if found.

        Raises:
            StorageArgumentException: Invalid arguments
            StorageForbiddenException: Server response code 403
            StorageNotFoundException: Server response code 404
            StorageException: other 400-600 error codes