def delete_rax_cbs(args):
 print ("--- Cleaning Cloud Block Storage matching '%s'" % args.match_re)
 for region in pyrax.identity.services.network.regions:
  cbs = pyrax.connect_to_cloud_blockstorage(region=region)
  for volume in cbs.list():
   if re.search(args.match_re, volume.name):
    prompt_and_delete(volume, ('Delete matching %s? [y/n]: ' % volume), args.assumeyes)

def delete_rax_cbs ( args ) : print ( "--- Cleaning Cloud Block Storage matching '%s'" % args . match_re ) for region in pyrax . identity . services . network . regions : cbs = pyrax . connect_to_cloud_blockstorage ( region = region ) for volume in cbs . list ( ) : if re . search ( args . match_re , volume . name ) : prompt_and_delete ( volume , ( 'Delete matching %s? [y/n]: ' % volume ) , args . assumeyes )
function for deleting cloud networks .