'Used to rename an interface.'

def rename_interface(self, names):

    (name, newname) = names
    if (name not in self.interfaces):
        raise CX(_(('Interface    %s    does    not    exist' % name)))
    if (newname in self.interfaces):
        raise CX(_(('Interface    %s    already    exists' % newname)))
    else:
        self.interfaces[newname] = self.interfaces[name]
        del self.interfaces[name]
