Python paramiko 模块,OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED 实例源码

我们从Python开源项目中,提取了以下4个代码示例,用于说明如何使用paramiko.OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED

项目:PyHack    作者:lanxia    | 项目源码 | 文件源码
def check_channel_request(self, kind, chanid):
        if kind == "session":
            return paramiko.OPEN_SUCCEEDED

        return paramiko.OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED

        def check_auth_password(self, username, password):
            if (username == "ubuntu") and (password == "lanxia2372615"):
                return paramiko.AUTH_SUCCESSFUL

            return paramiko.AUTH_FAILED
项目:obsoleted-vpduserv    作者:InfraSIM    | 项目源码 | 文件源码
def check_channel_request(self, kind, chanid):
        if kind == 'bogus':
            return OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED
        return OPEN_SUCCEEDED
项目:obsoleted-vpduserv    作者:InfraSIM    | 项目源码 | 文件源码
def test_8_channel_exception(self):
        """
        verify that ChannelException is thrown for a bad open-channel request.
        """
        self.setup_test_server()
        try:
            chan = self.tc.open_channel('bogus')
            self.fail('expected exception')
        except ChannelException as e:
            self.assertTrue(e.code == OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED)
项目:trojan    作者:Hackerl    | 项目源码 | 文件源码
def check_channel_request(self,kind,chanid):
        if kind == 'session':
            return paramiko.OPEN_SUCCEEDED
        return paramiko.OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED
    #õ¼?????