def cleanup_cloud_resources_main(args, base_path, top_level):
 options = CleanupCloudResourcesOptions()
 try:
  options.parseOptions(args)
 except UsageError as e:
  sys.stderr.write(u'{}\nUsage Error: {}: {}\n'.format(unicode(options), base_path.basename(), e).encode('utf-8'))
  raise SystemExit(1)
 node_actions = CleanAcceptanceNodes(lag=options['node-lag'], prefixes=options['node-name-prefixes']).start(config=options['config-file'])
 volume_actions = CleanVolumes(lag=options['volume-lag'], marker=options['marker']).start(config=options['config-file'])
 all_actions = [node_actions, volume_actions]
 print_actions(all_actions)
 if (not options['dry-run']):
  perform_all_actions(all_actions)
 do_exit(all_actions)

def cleanup_cloud_resources_main ( args , base_path , top_level ) : options = CleanupCloudResourcesOptions ( ) try : options . parseOptions ( args ) except UsageError as e : sys . stderr . write ( u'{}\nUsage Error: {}: {}\n' . format ( unicode ( options ) , base_path . basename ( ) , e ) . encode ( 'utf-8' ) ) raise SystemExit ( 1 ) node_actions = CleanAcceptanceNodes ( lag = options [ 'node-lag' ] , prefixes = options [ 'node-name-prefixes' ] ) . start ( config = options [ 'config-file' ] ) volume_actions = CleanVolumes ( lag = options [ 'volume-lag' ] , marker = options [ 'marker' ] ) . start ( config = options [ 'config-file' ] ) all_actions = [ node_actions , volume_actions ] print_actions ( all_actions ) if ( not options [ 'dry-run' ] ) : perform_all_actions ( all_actions ) do_exit ( all_actions )
the main entry point for cleanup_cloud_resources .