public void deleteNfsDatastore(FileShareRestRep fileSystem,URI datacenterId,Datastore datastore){
  String datastoreName=datastore.getName();
  List<HostSystem> hosts=getHostsForDatastore(datastore);
  if (hosts.isEmpty()) {
    throw new IllegalStateException("Datastore is not mounted by any hosts");
  }
  enterMaintenanceMode(datastore);
  setStorageIOControl(datastore,false);
  for (  HostSystem host : hosts) {
    execute(new DeleteDatastore(host,datastore));
  }
  removeNfsDatastoreTag(fileSystem,datacenterId,datastoreName);
}

public void deleteNfsDatastore ( FileShareRestRep fileSystem , URI datacenterId , Datastore datastore ) { String datastoreName = datastore . getName ( ) ; List < HostSystem > hosts = getHostsForDatastore ( datastore ) ; if ( hosts . isEmpty ( ) ) { throw new IllegalStateException ( "Datastore is not mounted by any hosts" ) ; } enterMaintenanceMode ( datastore ) ; setStorageIOControl ( datastore , false ) ; for ( HostSystem host : hosts ) { execute ( new DeleteDatastore ( host , datastore ) ) ; } removeNfsDatastoreTag ( fileSystem , datacenterId , datastoreName ) ; }
deletes an nfs datastore . the datastore will be removed from all hosts .
