#NEWLINE# def _check_default_subnetpool_exists( self , context , ip_version ) : #NEWLINE# #INDENT# 'Check if a default already exists for the given IP version.\n\n        There can only be one default subnetpool for each IP family. Raise an\n        InvalidInput error if a default has already been set.\n        ' #NEWLINE# if self . get_default_subnetpool ( context , ip_version ) : #NEWLINE# #INDENT# msg = _ ( 'A default subnetpool for this IP family has already been set. Only one default may exist per IP family' ) #NEWLINE# raise exc . InvalidInput ( error_message = context )