def setCredentials(self, creds):
        """Set values in UserKeyCredential or UserPassCredential."""

        if isinstance(creds, UserKeyCredential):
            self.setUserKeyCredentials(creds.username, creds.public_key, creds.private_key)
        elif isinstance(creds, UserPassCredential):
            self.setUserPasswdCredentials(creds.username, creds.password)
def setCredentials ( self , creds ) : if isinstance ( creds , UserKeyCredential ) : self . setUserKeyCredentials ( creds . username , creds . public_key , creds . private_key ) elif isinstance ( creds , UserPassCredential ) : self . setUserPasswdCredentials ( creds . username , creds . password )
Set values in UserKeyCredential or UserPassCredential.