func decodeMachineIDFromProviderID(providerID string) (string, error) {
	if providerID == "" {
		return "", errors.New("providerID cannot be empty")
	}

	if !strings.HasPrefix(providerID, constants.ProviderName+"://") {
		return "", fmt.Errorf("unexpected providerID format %q, format should be %q or %q", providerID, constants.ProviderName+"://<machine-id>", constants.ProviderName+"://<partition-id>/<machine-id>")
	}

	idparts := strings.Split(providerID, "/")
	return idparts[len(idparts)-1], nil
}
// machineIDFromProviderID returns a machine's ID from providerID.
//
// The providerID spec should be retrievable from the Kubernetes
// node object. The expected format is: metal://partition-id/machine-id.
machineIDFromProviderID returns a machine's ID from providerID.

The providerID spec should be retrievable from the Kubernetes
node object. The expected format is: metal://partition-id/machine-id.
// machineIDFromProviderID returns a machine ' s ID from providerID . // // The providerID spec should be retrievable from the Kubernetes // node object . The expected format is : metal : // partition - id / machine - id .
func decodeMachineIDFromProviderID(providerID string) (string, error) {
	if providerID == "" {
		return "", errors.New("providerID cannot be empty")
	}
	if !strings.HasPrefix(providerID, constants.ProviderName+"://") {
		return "", fmt.Errorf("unexpected providerID format %q, format should be %q or %q", providerID, constants.ProviderName+"://<machine-id>", constants.ProviderName+"://<partition-id>/<machine-id>")
	}
	idparts := strings.Split(providerID, "/")
	return idparts[len(idparts)-1], nil
}
func decodeMachineIDFromProviderID ( providerID string ) ( string , error ) { if providerID == " " { return " " , errors . New ( " " ) } if ! strings . HasPrefix ( providerID , constants . ProviderName + " " ) { return " " , fmt . Errorf ( " " , providerID , constants . ProviderName + " " , constants . ProviderName + " " ) } idparts := strings . Split ( providerID , " " ) return idparts [ len ( idparts ) - 1 ] , nil }
machineIDFromProviderID returns a machine's ID from providerID.
machineIDFromProviderID returns a machine ' s ID from providerID .