#NEWLINE# def validate( dic , option_list ) : #NEWLINE# #INDENT# '\n\timage actions command validation\n\t' #NEWLINE# for key in dic . viewkeys ( ) : #NEWLINE# #INDENT# if ( key in option_list ) : #NEWLINE# #INDENT# for option in option_list : #NEWLINE# #INDENT# if ( option != key ) : #NEWLINE# #INDENT# if ( dic [ option ] and dic [ key ] ) : #NEWLINE# #INDENT# raise click . UsageError ( ( 'Invalid option combination --%s \t\t\t\t\t\t\tcannot be used with --%s' % ( option , key ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if ( ( dic [ 'transfer' ] and ( not dic [ 'region' ] ) ) or ( dic [ 'region' ] and ( not dic [ 'transfer' ] ) ) ) : #NEWLINE# #INDENT# raise click . UsageError ( '--transfer option requires --region' ) #NEWLINE# #UNINDENT# if ( ( dic [ 'action' ] and ( not dic [ 'action_id' ] ) ) or ( dic [ 'action_id' ] and ( not dic [ 'action' ] ) ) ) : #NEWLINE# #INDENT# raise click . UsageError ( '--action option requires --action-id' ) #NEWLINE# #UNINDENT# return True