(self, cmdp)
return self.STATUS_ERROR
protect: protect a container or image against deletion
        protect <container-id or repo/image:tag>
protect: protect a container or image against deletion
        protect <container-id or repo/image:tag>
protect : protect a container or image against deletion protect <container - id or repo / image : tag >
def do_protect(self, cmdp):
        """
        protect: protect a container or image against deletion
        protect <container-id or repo/image:tag>
        """
        arg = cmdp.get("P1")
        if cmdp.missing_options():               # syntax error
            return self.STATUS_ERROR

        if self.localrepo.get_container_id(arg):
            if not self.localrepo.protect_container(arg):
                Msg().err("Error: protect container failed")
                return self.STATUS_ERROR
            return self.STATUS_OK

        (imagerepo, tag) = self._check_imagespec(arg)
        if imagerepo:
            if self.localrepo.protect_imagerepo(imagerepo, tag):
                return self.STATUS_OK

        Msg().err("Error: protect image failed")
        return self.STATUS_ERROR
def do_protect ( self , cmdp ) : arg = cmdp . get ( "P1" ) if cmdp . missing_options ( ) : # syntax error return self . STATUS_ERROR if self . localrepo . get_container_id ( arg ) : if not self . localrepo . protect_container ( arg ) : Msg ( ) . err ( "Error: protect container failed" ) return self . STATUS_ERROR return self . STATUS_OK ( imagerepo , tag ) = self . _check_imagespec ( arg ) if imagerepo : if self . localrepo . protect_imagerepo ( imagerepo , tag ) : return self . STATUS_OK Msg ( ) . err ( "Error: protect image failed" ) return self . STATUS_ERROR