vsphere/internal/virtualdevice/virtual_machine_network_interface_subresource.go
func (r *NetworkInterfaceSubresource) ValidateDiff() error {
	log.Printf("[DEBUG] %s: Beginning diff validation", r)

	// Ensure that network resource allocation options are only set on vSphere
	// 6.0 and higher.
	version := viapi.ParseVersionFromClient(r.client)
	if version.Older(viapi.VSphereVersion{Product: version.Product, Major: 6}) {
		if err := r.restrictResourceAllocationSettings(); err != nil {
			return err
		}
	}

	log.Printf("[DEBUG] %s: Diff validation complete", r)
	return nil
}
func (r *NetworkInterfaceSubresource) ValidateDiff() error {
	log.Printf("[DEBUG] %s: Beginning diff validation", r)

	// Ensure that network resource allocation options are only set on vSphere
	// 6.0 and higher.
	version := viapi.ParseVersionFromClient(r.client)
	if version.Older(viapi.VSphereVersion{Product: version.Product, Major: 6}) {
		if err := r.restrictResourceAllocationSettings(); err != nil {
			return err
		}
	}

	log.Printf("[DEBUG] %s: Diff validation complete", r)
	return nil
}
func ( r * NetworkInterfaceSubresource ) ValidateDiff ( ) error { log . Printf ( " " , r ) // Ensure that network resource allocation options are only set on vSphere // 6.0 and higher. version := viapi . ParseVersionFromClient ( r . client ) if version . Older ( viapi . VSphereVersion { Product : version . Product , Major : 6 } ) { if err := r . restrictResourceAllocationSettings ( ) ; err != nil { return err } } log . Printf ( " " , r ) return nil }
// ValidateDiff performs any complex validation of an individual
// network_interface sub-resource that can't be done in schema alone.
ValidateDiff performs any complex validation of an individual network_interface sub - resource that can t be done in schema alone .