Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)

            @staticmethod
    def getCredentials(runnable):

        if AuthnFactory._useLocalHostCredentials(runnable):
            return LocalhostCredentialsConnector(runnable)
        
        try:
            usernamePasswordCredentials = runnable.username and runnable.password
        except AttributeError:
            usernamePasswordCredentials = False
        try:
            pemCredentials = runnable.pemCertificate and runnable.pemKey
        except AttributeError:
            pemCredentials = False
        
        if usernamePasswordCredentials:
            return UsernamePasswordCredentialsConnector(runnable)
        if pemCredentials:
            return CertificateCredentialsConnector(runnable)
        
        raise ValueError('Missing credentials')
        


src/s/t/stratuslab-client-14.03.0/stratuslab/Creator.py   stratuslab-client(Download)
        self.stderr = open('/tmp/stratuslab_%s.err' % dateNow, 'a')
 
        credentials = AuthnFactory.getCredentials(self)
        self.cloud = CloudConnectorFactory.getCloud(credentials)
        self.cloud.setEndpoint(self.endpoint)