def validate(dic, option_list):
	for key in dic.viewkeys():
		if key in option_list:
			for option in option_list:
				if option != key:
					if dic[option] and dic[key]:
						raise click.UsageError('Invalid option combination --%s \
							cannot be used with --%s' % (option, key))

	if dic['getlist'] and dic['name']:
		raise click.UsageError('Invalid option combination --getlist cannot be \
			used with --name')

	if dic['getlist'] and dic['ip']:
		raise click.UsageError('Invalid option combination --getlist cannot be \
			used with --ip')

	if dic['name'] and dic['detail']:
		raise click.UsageError('Invalid option combination --name or -n cannot be \
			used with --detail')

	if dic['ip'] and dic['detail']:
		raise click.UsageError('Invalid option combination --ip or -i cannot be \
			used with --detail')

	if dic['name'] and dic['delete']:
		raise click.UsageError('Invalid option combination --name or -n cannot be \
			used with --delete')

	if dic['ip'] and dic['delete']:
		raise click.UsageError('Invalid option combination --ip or -i cannot be \
			used with --delete')

	if dic['create'] and dic['ip'] and not dic['name']:
		raise click.UsageError('--name or -n domain name missing')

	if dic['create'] and dic['name'] and not dic['ip']:
		raise click.UsageError('--ip or -i domain ip missing')

	if dic['name'] and not dic['create']:
		raise click.UsageError('--create or -c domain create option missing')

	if dic['ip'] and not dic['create']:
		raise click.UsageError('--create or -c domain create option missing')

	return True
domain command option validation
dataset/ETHPy150Open yspanchal/docli/docli/commands/domain.py/validate