def delete_rax_clb(args):
 print ("--- Cleaning Cloud Load Balancers matching '%s'" % args.match_re)
 for region in pyrax.identity.services.load_balancer.regions:
  clb = pyrax.connect_to_cloud_loadbalancers(region=region)
  for lb in rax_list_iterator(clb):
   if re.search(args.match_re, lb.name):
    prompt_and_delete(lb, ('Delete matching %s? [y/n]: ' % lb), args.assumeyes)

def delete_rax_clb ( args ) : print ( "--- Cleaning Cloud Load Balancers matching '%s'" % args . match_re ) for region in pyrax . identity . services . load_balancer . regions : clb = pyrax . connect_to_cloud_loadbalancers ( region = region ) for lb in rax_list_iterator ( clb ) : if re . search ( args . match_re , lb . name ) : prompt_and_delete ( lb , ( 'Delete matching %s? [y/n]: ' % lb ) , args . assumeyes )
function for deleting cloud load balancers .