code: def cli(env, **args):
      
  
      vsi = SoftLayer.VSManager(env.client)
      _validate_args(env, args)
      create_args = _parse_create_args(env.client, args)
      test = args.get('test', False)
      do_create = not (args.get('export') or test)
  
      if do_create:
          if not (env.skip_confirmations or formatting.confirm(
                  "This action will incur charges on your account. Continue?")):
              raise exceptions.CLIAbort('Aborting virtual server order.')
  
      if args.get('export'):
          export_file = args.pop('export')
          template.export_to_template(export_file, args, exclude=['wait', 'test'])
          env.fout('Successfully exported options to a template file.')
  
      else:
          result = vsi.order_guest(create_args, test)
          output = _build_receipt_table(result, args.get('billing'), test)
  
          if do_create:
              env.fout(_build_guest_table(result))
          env.fout(output)
  
          if args.get('wait'):
              virtual_guests = utils.lookup(result, 'orderDetails', 'virtualGuests')
              guest_id = virtual_guests[0]['id']
              click.secho("Waiting for %s to finish provisioning..." % guest_id, fg='green')
              ready = vsi.wait_for_ready(guest_id, args.get('wait') or 1)
              if ready is False:
                  env.out(env.fmt(output))
                  raise exceptions.CLIHalt(code=1)
docs: Order/create virtual servers.