示例#1
0
 def get_oauth_server(self):
     oauth_server = None
     if self.has_option(ConfigFile.OAUTH_SECTION, ConfigFile.SERVER_OPTION):
         oauth_server = self.get(ConfigFile.OAUTH_SECTION,
                                 ConfigFile.SERVER_OPTION)
         if oauth_server == '':
             oauth_server = None
         else:
             if oauth_server == "localhost":
                 oauth_server = gcmu.public_hostname()
     elif self.get_security_identity_method() == \
             ConfigFile.IDENTITY_METHOD_CILOGON:
         oauth_server = "cilogon.org"
     return oauth_server
 def get_oauth_server(self):
     oauth_server = None
     if self.has_option(ConfigFile.OAUTH_SECTION,
             ConfigFile.SERVER_OPTION):
         oauth_server = self.get(ConfigFile.OAUTH_SECTION,
                 ConfigFile.SERVER_OPTION)
         if oauth_server == '':
             oauth_server = None
         else:
             if oauth_server == "localhost":
                 oauth_server = gcmu.public_hostname()
     elif self.get_security_identity_method() == \
             ConfigFile.IDENTITY_METHOD_CILOGON:
         oauth_server = "cilogon.org"
     return oauth_server
 def get_myproxy_server(self):
     myproxy_server = None
     if self.has_option(ConfigFile.MYPROXY_SECTION,
             ConfigFile.SERVER_OPTION):
         myproxy_server = self.get(ConfigFile.MYPROXY_SECTION,
                 ConfigFile.SERVER_OPTION)
         if myproxy_server == '':
             myproxy_server = None
         else:
             name = None
             if "://" in myproxy_server:
                 url = urlparse.urlparse(myproxy_server)
                 if ":" in url.netloc:
                     name = url.netloc.split(":")[0]
                 else:
                     name = url.netloc
             elif ":" in myproxy_server:
                 name = myproxy_server.split(":")[0]
             if name == "localhost":
                 myproxy_server = gcmu.public_hostname()
     return myproxy_server
示例#4
0
 def get_myproxy_server(self):
     myproxy_server = None
     if self.has_option(ConfigFile.MYPROXY_SECTION,
                        ConfigFile.SERVER_OPTION):
         myproxy_server = self.get(ConfigFile.MYPROXY_SECTION,
                                   ConfigFile.SERVER_OPTION)
         if myproxy_server == '':
             myproxy_server = None
         else:
             name = None
             if "://" in myproxy_server:
                 url = urlparse.urlparse(myproxy_server)
                 if ":" in url.netloc:
                     name = url.netloc.split(":")[0]
                 else:
                     name = url.netloc
             elif ":" in myproxy_server:
                 name = myproxy_server.split(":")[0]
             if name == "localhost":
                 myproxy_server = gcmu.public_hostname()
     return myproxy_server
示例#5
0
    def get_gridftp_server(self):
        server = None
        if self.has_option(ConfigFile.GRIDFTP_SECTION,
                           ConfigFile.SERVER_OPTION):
            server = self.get(ConfigFile.GRIDFTP_SECTION,
                              ConfigFile.SERVER_OPTION)
        if server == '':
            server = None
        elif server is not None:
            name = None
            if "://" in server:
                url = urlparse.urlparse(server)
                if ":" in url.netloc:
                    name = url.netloc.split(":")[0]
                else:
                    name = url.netloc
            elif ":" in server:
                name = server.split(":")[0]
            if name == "localhost":
                server = gcmu.public_hostname()

        return server
    def get_gridftp_server(self):
        server = None
        if self.has_option(
                ConfigFile.GRIDFTP_SECTION,
                ConfigFile.SERVER_OPTION):
            server = self.get(
                ConfigFile.GRIDFTP_SECTION,
                ConfigFile.SERVER_OPTION)
        if server == '':
            server = None
        elif server is not None:
            name = None
            if "://" in server:
                url = urlparse.urlparse(server)
                if ":" in url.netloc:
                    name = url.netloc.split(":")[0]
                else:
                    name = url.netloc
            elif ":" in server:
                name = server.split(":")[0]
            if name == "localhost":
                server = gcmu.public_hostname()

        return server