(self, cmdp)
return self.STATUS_OK
rename: change a name alias
        name <container-name> <new-container-name>
rename: change a name alias
        name <container-name> <new-container-name>
rename : change a name alias name <container - name > <new - container - name >
def do_rename(self, cmdp):
        """
        rename: change a name alias
        name <container-name> <new-container-name>
        """
        name = cmdp.get("P1")
        new_name = cmdp.get("P2")
        if cmdp.missing_options():               # syntax error
            return self.STATUS_ERROR
        container_id = self.localrepo.get_container_id(name)
        if not container_id:
            Msg().err("Error: container does not exist")
            return self.STATUS_ERROR
        if self.localrepo.get_container_id(new_name):
            Msg().err("Error: new name already exists")
            return self.STATUS_ERROR
        if not self.localrepo.del_container_name(name):
            Msg().err("Error: name does not exist")
            return self.STATUS_ERROR
        if not self.localrepo.set_container_name(container_id, new_name):
            Msg().err("Error: setting new name")
            self.localrepo.set_container_name(container_id, name)
            return self.STATUS_ERROR

        return self.STATUS_OK
def do_rename ( self , cmdp ) : name = cmdp . get ( "P1" ) new_name = cmdp . get ( "P2" ) if cmdp . missing_options ( ) : # syntax error return self . STATUS_ERROR container_id = self . localrepo . get_container_id ( name ) if not container_id : Msg ( ) . err ( "Error: container does not exist" ) return self . STATUS_ERROR if self . localrepo . get_container_id ( new_name ) : Msg ( ) . err ( "Error: new name already exists" ) return self . STATUS_ERROR if not self . localrepo . del_container_name ( name ) : Msg ( ) . err ( "Error: name does not exist" ) return self . STATUS_ERROR if not self . localrepo . set_container_name ( container_id , new_name ) : Msg ( ) . err ( "Error: setting new name" ) self . localrepo . set_container_name ( container_id , name ) return self . STATUS_ERROR return self . STATUS_OK