(self, cmdp)
return self.STATUS_OK
rmi: delete an image in the local repository
        rmi [options] <repo/image:tag>
        -f                          :force removal
rmi: delete an image in the local repository
        rmi [options] <repo/image:tag>
        -f                          :force removal
rmi : delete an image in the local repository rmi [ options ] <repo / image : tag > - f : force removal
def do_rmi(self, cmdp):
        """
        rmi: delete an image in the local repository
        rmi [options] <repo/image:tag>
        -f                          :force removal
        """
        force = cmdp.get("-f")
        imagespec = str(cmdp.get("P1"))
        if cmdp.missing_options():               # syntax error
            return self.STATUS_ERROR

        (imagerepo, tag) = self._check_imagespec(imagespec)
        if not imagerepo:
            return self.STATUS_ERROR

        if self.localrepo.isprotected_imagerepo(imagerepo, tag):
            Msg().err("Error: image repository is protected")
            return self.STATUS_ERROR

        Msg().out("Info: deleting image:", imagespec, l=Msg.INF)
        if not self.localrepo.del_imagerepo(imagerepo, tag, force):
            Msg().err("Error: deleting image")
            return self.STATUS_ERROR

        return self.STATUS_OK
def do_rmi ( self , cmdp ) : force = cmdp . get ( "-f" ) imagespec = str ( cmdp . get ( "P1" ) ) if cmdp . missing_options ( ) : # syntax error return self . STATUS_ERROR ( imagerepo , tag ) = self . _check_imagespec ( imagespec ) if not imagerepo : return self . STATUS_ERROR if self . localrepo . isprotected_imagerepo ( imagerepo , tag ) : Msg ( ) . err ( "Error: image repository is protected" ) return self . STATUS_ERROR Msg ( ) . out ( "Info: deleting image:" , imagespec , l = Msg . INF ) if not self . localrepo . del_imagerepo ( imagerepo , tag , force ) : Msg ( ) . err ( "Error: deleting image" ) return self . STATUS_ERROR return self . STATUS_OK