code: func buildVSphereFromConfig(cfg VSphereConfig) (*VSphere, error) {
  	isSecretInfoProvided := false
  	if cfg.Global.SecretName != "" && cfg.Global.SecretNamespace != "" {
  		isSecretInfoProvided = true
  	}
  
  	if cfg.Disk.SCSIControllerType == "" {
  		cfg.Disk.SCSIControllerType = vclib.PVSCSIControllerType
  	} else if !vclib.CheckControllerSupported(cfg.Disk.SCSIControllerType) {
  		klog.Errorf("%v is not a supported SCSI Controller type. Please configure 'lsilogic-sas' OR 'pvscsi'", cfg.Disk.SCSIControllerType)
  		return nil, errors.New("Controller type not supported. Please configure 'lsilogic-sas' OR 'pvscsi'")
  	}
  	if cfg.Global.WorkingDir != "" {
  		cfg.Global.WorkingDir = path.Clean(cfg.Global.WorkingDir)
  	}
  	if cfg.Global.RoundTripperCount == 0 {
  		cfg.Global.RoundTripperCount = RoundTripperDefaultCount
  	}
  	if cfg.Global.VCenterPort == "" {
  		cfg.Global.VCenterPort = "443"
  	}
  
  	vsphereInstanceMap, err := populateVsphereInstanceMap(&cfg)
  	if err != nil {
  		return nil, err
  	}
  
  	vs := VSphere{
  		vsphereInstanceMap: vsphereInstanceMap,
  		nodeManager: &NodeManager{
  			vsphereInstanceMap: vsphereInstanceMap,
  			nodeInfoMap:        make(map[string]*NodeInfo),
  			registeredNodes:    make(map[string]*v1.Node),
  		},
  		isSecretInfoProvided: isSecretInfoProvided,
  		cfg:                  &cfg,
  	}
  	return &vs, nil
  }
docs: // Initializes vSphere from vSphere CloudProvider Configuration