def rename(ctx, cn, newCn): """change netgroup name""" netgroup = Netgroup(cn) if netgroup.exists: netgroup.rename(args.get('newCn')) else: click.echo("Group %s does not exist." % cn) sys.exit(1)