def delete(self, container_id=None, sudo=None):
    '''delete an instance based on container_id.

       Parameters
       ==========
       container_id: the container_id to delete
       sudo: whether to issue the command with sudo (or not)
             a container started with sudo will belong to the root user
             If started by a user, the user needs to control deleting it
             if the user doesn't set to True/False, we use client self.sudo

       Returns
       =======
       return_code: the return code from the delete command. 0 indicates a
                    successful delete, 255 indicates not.
    '''
    sudo = self._get_sudo(sudo)
    container_id = self.get_container_id(container_id)

    # singularity oci delete
    cmd = self._init_command('delete')

    # Add the container_id
    cmd.append(container_id)

    # Delete the container, return code goes to user (message to screen)
    return self._run_and_return(cmd, sudo=sudo)
def delete ( self , container_id = None , sudo = None ) : sudo = self . _get_sudo ( sudo ) container_id = self . get_container_id ( container_id ) cmd = self . _init_command ( 'delete' ) cmd . append ( container_id ) return self . _run_and_return ( cmd , sudo = sudo )
delete an instance based on container_id.

       Parameters
       ==========
       container_id: the container_id to delete
       sudo: whether to issue the command with sudo (or not)
             a container started with sudo will belong to the root user
             If started by a user, the user needs to control deleting it
             if the user doesn't set to True/False, we use client self.sudo

       Returns
       =======
       return_code: the return code from the delete command. 0 indicates a
                    successful delete, 255 indicates not.