iscsi.py 文件源码

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

项目:JovianDSS-Cinder 作者: open-e 项目源码 文件源码
def _get_provider_auth(self):
        """Get provider authentication for the volume.

        :return: string of auth method and credentials
        """
        if not self.jovian_chap_auth:
            return None

        field = string.lowercase + string.uppercase + string.digits
        chap_password = ''.join(random.sample(field,
                                              int(self.jovian_chap_pass_len)))

        if self.jovian_chap_username is not None:
            return '%(auth)s %(user)s %(pass)s' % {
                'auth': 'CHAP',
                'user': self.jovian_chap_username,
                'pass': chap_password
            }

        return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号