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

« back to all changes in this revision

Viewing changes to src/hed/acc/ldap/ServiceEndpointRetrieverPluginEGIIS.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:
31
31
    
32
32
    std::string::size_type pos2 = service.find(":", pos1 + 3);
33
33
    std::string::size_type pos3 = service.find("/", pos1 + 3);
34
 
    if (pos3 == std::string::npos) {
35
 
      if (pos2 == std::string::npos)
36
 
        service += ":2135";
37
 
      service += "/Mds-Vo-name=NorduGrid, o=Grid";
 
34
    if (pos2 == std::string::npos && pos3 == std::string::npos) {
 
35
      service.append(":2135");
38
36
    }
39
 
    else if (pos2 == std::string::npos || pos2 > pos3)
 
37
    else if (pos2 == std::string::npos || pos2 > pos3) {
40
38
      service.insert(pos3, ":2135");
41
 
      
 
39
    }
 
40
 
42
41
    return service;
43
42
  }
44
43
 
56
55
      return s;
57
56
    }
58
57
 
 
58
    DataBuffer buffer;
59
59
    DataHandle handler(url, uc);
60
 
    DataBuffer buffer;
61
60
 
62
61
    if (!handler) {
63
62
      logger.msg(INFO, "Can't create information handle - is the ARC ldap DMC plugin available?");
92
91
        if ((std::string)itMds->Child(i)["Mds-Reg-status"] == "PURGED") {
93
92
          continue;
94
93
        }
 
94
        if (itMds->Child(i).Name() != "Mds-Vo-name" &&
 
95
            itMds->Child(i).Name() != "nordugrid-cluster-name" &&
 
96
            itMds->Child(i).Name() != "nordugrid-se-name") {
 
97
          // Unknown entry
 
98
          logger.msg(DEBUG, "Unknown entry in EGIIS (%s)", itMds->Child(i).Name());
 
99
          continue;
 
100
        }
 
101
            
 
102
        if (!itMds->Child(i)["Mds-Service-type"] ||
 
103
            !itMds->Child(i)["Mds-Service-hn"] ||
 
104
            !itMds->Child(i)["Mds-Service-port"] ||
 
105
            !itMds->Child(i)["Mds-Service-Ldap-suffix"]) {
 
106
          logger.msg(DEBUG, "Entry in EGIIS is missing one or more of the attributes 'Mds-Service-type', 'Mds-Service-hn', 'Mds-Service-port' and/or 'Mds-Service-Ldap-suffix'");
 
107
          continue;
 
108
        }
 
109
        
95
110
        Endpoint se((std::string)itMds->Child(i)["Mds-Service-type"] + "://" +
96
111
                           (std::string)itMds->Child(i)["Mds-Service-hn"] + ":" +
97
112
                           (std::string)itMds->Child(i)["Mds-Service-port"] + "/" +