#NEWLINE# @ utils . supported_filters ( ADDED_FIELDS , optional_support_keys = OPTIONAL_ADDED_FIELDS , ignore_support_keys = IGNORE_FIELDS ) #NEWLINE# @ utils . input_validates ( subnet = _check_subnet ) #NEWLINE# @ database . run_in_session ( ) #NEWLINE# @ user_api . check_user_permission ( permission . PERMISSION_ADD_SUBNET ) #NEWLINE# @ utils . wrap_to_dict ( RESP_FIELDS ) #NEWLINE# def add_subnet( exception_when_existing = True , subnet = None , user = None , session = None , **kwargs ) : #NEWLINE# #INDENT# 'Create a subnet.' #NEWLINE# return utils . add_db_object ( session , models . Subnet , exception_when_existing , subnet , ** kwargs )