func (s *servers) getImplementationByProviderID(providerID string) Servers {
	if strings.HasPrefix(providerID, ProviderName+"://"+InstanceTypeBaremtal) {
		return s.baremetal
	}
	return s.instances
}
getImplementationByProviderID returns the corresponding cloudprovider.Instances implementation
At scaleway, the new baremetal offer is not integrated with instance API.
package scaleway
import (
	"context"
	"fmt"
	"regexp"
	"strings"
	v1 "k8s.io/api/core/v1"
	"k8s.io/apimachinery/pkg/types"
	cloudprovider "k8s.io/cloud-provider"
	"k8s.io/klog/v2"
)
const (
	InstanceTypeInstance = "instance"
	InstanceTypeBaremtal = "baremetal"
	nodeLabelDisableLifeCycle = "k8s.scw.cloud/disable-lifecycle"
	nodeLabelNodePublicIP = "k8s.scw.cloud/node-public-ip"
)
type Servers interface {
	cloudprovider.Instances
	cloudprovider.InstancesV2
	GetZoneByProviderID(ctx context.Context, providerID string) (cloudprovider.Zone, error)
	GetZoneByNodeName(ctx context.Context, nodeName types.NodeName) (cloudprovider.Zone, error)
}
type servers struct {
	instances Servers
	baremetal Servers
}
func newServers(client *client) Servers {
	return &servers{
		instances: newInstances(client),
		baremetal: newBaremetal(client),
	}
}
var (
	regexpProduct      = "product"
	regexpLocalization = "localization"
	regexpUUID         = "uuid"
	providerIDRegexp   = regexp.MustCompile(fmt.Sprintf("%s://((?P<%s>.*?)/(?P<%s>.*?)/(?P<%s>.*)|(?P<%s>.*))", ProviderName, regexpProduct, regexpLocalization, regexpUUID, regexpUUID))
)
func ServerInfoFromProviderID(providerID string) (string, string, string, error) {
	if !providerIDRegexp.MatchString(providerID) {
		return "", "", "", BadProviderID
	}
	match := providerIDRegexp.FindStringSubmatch(providerID)
	result := make(map[string]string)
	for i, name := range providerIDRegexp.SubexpNames() {
		if i != 0 && name != "" {
			if match[i] != "" {
				result[name] = match[i]
			}
		}
	}
	if _, ok := result[regexpProduct]; !ok {
		result[regexpProduct] = InstanceTypeInstance
	}
	return result[regexpProduct], result[regexpLocalization], result[regexpUUID], nil
}
func BuildProviderID(product, localization, id string) string {
	return fmt.Sprintf("%s://%s/%s/%s", ProviderName, product, localization, id)
}