~ubuntu-branches/debian/sid/nordugrid-arc/sid

« back to all changes in this revision

Viewing changes to src/hed/acc/ldap/TargetInformationRetrieverPluginLDAPNG.cpp

  • Committer: Package Import Robot
  • Author(s): Mattias Ellert
  • Date: 2012-12-13 16:41:31 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20121213164131-0fumka0jar8mxm07
Tags: 2.0.1-1
* 2.0.1 Release
* Drop patches accepted upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
    if (pos3 == std::string::npos) {
44
44
      if (pos2 == std::string::npos)
45
45
        service += ":2135";
46
 
      service += "/Mds-Vo-name=local, o=Grid";
 
46
      service += "/Mds-Vo-name=local,o=Grid";
47
47
    }
48
48
    else if (pos2 == std::string::npos || pos2 > pos3)
49
49
      service.insert(pos3, ":2135");
64
64
 
65
65
    //Create credential object in order to get the user DN
66
66
    std::string emptycadir, emptycafile;
67
 
    Credential credential(uc.ProxyPath().empty() ? uc.ProxyPath() : uc.CertificatePath(), "", emptycadir, emptycafile);
 
67
    Credential credential(!uc.ProxyPath().empty() ? uc.ProxyPath() : uc.CertificatePath(), "", emptycadir, emptycafile);
68
68
    std::string escaped_dn = escape_chars(credential.GetIdentityName(), filter_esc, '\\', false, escape_hex);
69
69
 
70
70
    url.ChangeLDAPFilter("(|(objectclass=nordugrid-cluster)"
71
71
                         "(objectclass=nordugrid-queue)"
72
72
                         "(nordugrid-authuser-sn=" + escaped_dn + "))");
73
73
 
 
74
    DataBuffer buffer;
74
75
    DataHandle handler(url, uc);
75
 
    DataBuffer buffer;
76
76
 
77
77
    if (!handler) {
78
78
      logger.msg(INFO, "Can't create information handle - "
108
108
      LocationType& Location = cs.Location;
109
109
 
110
110
      cs->Cluster = url;
 
111
      cs->Cluster.ChangeLDAPScope(URL::base); // Reset scope
 
112
      cs->Cluster.ChangeLDAPFilter(""); // and filter.
 
113
 
111
114
      cs->OriginalEndpoint = cie;
112
115
      // Computing Service attributes
113
116
      if ((*it)["nordugrid-cluster-name"]) {
197
200
        if (queue["nordugrid-queue-defaultwalltime"]) {
198
201
          ComputingShare->DefaultWallTime = Period((std::string)queue["nordugrid-queue-defaultwalltime"], PeriodMinutes);
199
202
        }
 
203
        if (queue["nordugrid-queue-maxtotalcputime"]) {
 
204
          ComputingShare->MaxTotalCPUTime = Period((std::string)queue["nordugrid-queue-maxtotalcputime"], PeriodMinutes);
 
205
        }
200
206
        if (queue["nordugrid-queue-maxcputime"]) {
201
207
          ComputingShare->MaxCPUTime = Period((std::string)queue["nordugrid-queue-maxcputime"], PeriodMinutes);
202
208
        }
214
220
        }
215
221
        EntryToInt(url, queue["nordugrid-queue-nodememory"], ComputingShare->MaxVirtualMemory) || 
216
222
          EntryToInt(url, (*it)["nordugrid-cluster-nodememory"], ComputingShare->MaxVirtualMemory);
 
223
        EntryToInt(url, queue["nordugrid-queue-nodememory"], ComputingShare->MaxMainMemory) || 
 
224
          EntryToInt(url, (*it)["nordugrid-cluster-nodememory"], ComputingShare->MaxMainMemory);
217
225
        EntryToInt(url, authuser["nordugrid-authuser-diskspace"], ComputingShare->MaxDiskSpace);
218
226
        if ((*it)["nordugrid-cluster-localse"]) {
219
227
          ComputingShare->DefaultStorageService = (std::string)(*it)["nordugrid-cluster-localse"];