def delete_rax(args):
 print ("--- Cleaning CloudServers matching '%s'" % args.match_re)
 search_opts = dict(name=('^%s' % args.match_re))
 for region in pyrax.identity.services.compute.regions:
  cs = pyrax.connect_to_cloudservers(region=region)
  servers = rax_list_iterator(cs.servers, search_opts=search_opts)
  for server in servers:
   prompt_and_delete(server, ('Delete matching %s? [y/n]: ' % server), args.assumeyes)

def delete_rax ( args ) : print ( "--- Cleaning CloudServers matching '%s'" % args . match_re ) search_opts = dict ( name = ( '^%s' % args . match_re ) ) for region in pyrax . identity . services . compute . regions : cs = pyrax . connect_to_cloudservers ( region = region ) servers = rax_list_iterator ( cs . servers , search_opts = search_opts ) for server in servers : prompt_and_delete ( server , ( 'Delete matching %s? [y/n]: ' % server ) , args . assumeyes )
function for deleting cloudservers .