/**
   * Creates a new vCenter. Discovery is initiated after the vCenter is created.
   *
   * @param createParam the parameter that has the attributes of the vCenter to be created.
   * @param validateConnection specifies if the connection to the vCenter to be validated before
   *     creating the vCenter or not. Default value is "false", so connection to the vCenter will
   *     not be validated if it is not specified.
   * @return the vCenter discovery async task.
   */
  @POST
  @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
  @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
  @CheckPermission(roles = {Role.SYSTEM_ADMIN, Role.TENANT_ADMIN})
  public TaskResourceRep createVcenter(
      VcenterCreateParam createParam,
      @QueryParam("validate_connection") @DefaultValue("false") final Boolean validateConnection) {
    validateVcenter(createParam, null, validateConnection);

    // create and persist the vcenter
    Vcenter vcenter = createNewVcenter(null, createParam);
    vcenter.setRegistrationStatus(DiscoveredDataObject.RegistrationStatus.REGISTERED.toString());
    _dbClient.createObject(vcenter);
    auditOp(OperationTypeEnum.CREATE_VCENTER, true, null, vcenter.auditParameters());

    return doDiscoverVcenter(queryObject(Vcenter.class, vcenter.getId(), true));
  }