#NEWLINE# def detach_subnets( name , subnets , region = None , key = None , keyid = None , profile = None ) : #NEWLINE# #INDENT# '\n    Detach ELB from subnets.\n\n    CLI example:\n\n    .. code-block:: bash\n\n        salt myminion boto_elb.detach_subnets myelb \'["mysubnet"]\'\n    ' #NEWLINE# conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) #NEWLINE# if isinstance ( subnets , string_types ) : #NEWLINE# #INDENT# subnets = json . loads ( subnets ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# conn . detach_lb_from_subnets ( name , subnets ) #NEWLINE# msg = 'Detached ELB {0} from subnets.' . format ( name ) #NEWLINE# log . info ( msg ) #NEWLINE# return True #NEWLINE# #UNINDENT# except boto . exception . BotoServerError as error : #NEWLINE# #INDENT# log . debug ( error ) #NEWLINE# msg = 'Failed to detach ELB {0} from subnets: {1}' . format ( name , error ) #NEWLINE# log . error ( msg ) #NEWLINE# return False