#NEWLINE# @ classmethod #NEWLINE# def validate( cls , data ) : #NEWLINE# #INDENT# d = cls . validate_json ( data ) #NEWLINE# cls . validate_schema ( d , networks . NETWORK_GROUP ) #NEWLINE# node_group = objects . NodeGroup . get_by_uid ( d . get ( 'group_id' ) ) #NEWLINE# if ( not d ) : #NEWLINE# #INDENT# raise errors . InvalidData ( 'Node group with ID {0} does not exist' . format ( d . get ( 'group_id' ) ) ) #NEWLINE# #UNINDENT# cls . _check_duplicate_network_name ( node_group , d . get ( 'name' ) ) #NEWLINE# return d