// Config returns the provided machine's configuration.
Config returns the provided machine's configuration.
// Config returns the provided machine ' s configuration .
func Config(machine *clusterv1.Machine) (*baremetalspecv1.BareMetalMachineProviderSpec, error) {
	codec, err := baremetalspecv1.NewCodec()
	if err != nil {
		return nil, err
	}
	machineSpec, err := codec.MachineProviderFromProviderSpec(machine.Spec.ProviderSpec)
	if err != nil {
		return nil, apierrors.InvalidMachineConfiguration("Cannot unmarshal machine's providerSpec field: %v", err)
	}
	return machineSpec, err
}
func Config ( machine * clusterv1 . Machine ) ( * baremetalspecv1 . BareMetalMachineProviderSpec , error ) { codec , err := baremetalspecv1 . NewCodec ( ) if err != nil { return nil , err } machineSpec , err := codec . MachineProviderFromProviderSpec ( machine . Spec . ProviderSpec ) if err != nil { return nil , apierrors . InvalidMachineConfiguration ( " " , err ) } return machineSpec , err }
Config returns the provided machine's configuration.
Config returns the provided machine ' s configuration .