provider/vsphere/vsphere_discover.go
func newRestSession(ctx context.Context, u *url.URL, insecure bool) (*tags.RestClient, error) {
	logger.Printf("[DEBUG] Creating new CIS REST API session on endpoint %s", u.Host)
	client := tags.NewClient(u, insecure, "")
	if err := client.Login(ctx); err != nil {
		return nil, fmt.Errorf("error connecting to CIS REST endpoint: %s", err)
	}

	logger.Println("[DEBUG] CIS REST API session creation successful")
	return client, nil
}
func newRestSession(ctx context.Context, u *url.URL, insecure bool) (*tags.RestClient, error) {
	logger.Printf("[DEBUG] Creating new CIS REST API session on endpoint %s", u.Host)
	client := tags.NewClient(u, insecure, "")
	if err := client.Login(ctx); err != nil {
		return nil, fmt.Errorf("error connecting to CIS REST endpoint: %s", err)
	}

	logger.Println("[DEBUG] CIS REST API session creation successful")
	return client, nil
}
// newRestSession connects to the vSphere REST API endpoint, necessary for
// tags.