beaker_provisioner.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:infrared 作者: redhat-openstack 项目源码 文件源码
def create_session(self):
        """
        Creates a session and get some details on the machine.
        """
        self.session = requests.Session()
        self.session.auth = self.auth

        # whether verify the SSL certificate or not
        self.session.verify = self.ca_cert or False

        if self.disable_warnings:
            requests.packages.urllib3.disable_warnings()

        if self.web_service == 'rpc':
            self.session.cookies = requests.cookies.cookiejar_from_dict(
                self._xml_rpc_auth())
        else:
            # cookie workaround - consider changing with _get_last_activity()
            self.list_systems(limit=1)

        self.details = self.get_system_details()
评论列表


问题


面经


文章

微信
公众号

扫码关注公众号