'Rename nickname of LD.'

def changeldname(self, ldn, new_name, old_name=None):

    if (old_name is None):
        cmd = ('iSMcfg    nickname    -ldn    %(ldn)d    -newname    %(newname)s    -immediate' % {'ldn': ldn, 'newname': new_name})
        self._execute(cmd)
    else:
        cmd = ('iSMcfg    nickname    -ldname    %(ldname)s    -newname    %(newname)s' % {'ldname': old_name, 'newname': new_name})
        self._execute(cmd)
