dummy.py 文件源码

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

项目:linchpin 作者: CentOS-PaaS-SIG 项目源码 文件源码
def __init__(self):

        self.DUMMY_FILE = '{0}/dummy.hosts'.format(tempfile.gettempdir())
        pass

#    def generate_hostname(self, minlen=5, maxlen=20):
#        """
#        Generate a random hostname between minlen and maxlen, appending
#        '.example.net' (eg. oskpijsrss7.example.net)
#
#        :param minlen: minimum length of the hostname (default: 5)
#
#        :param maxlen: maximum length of the hostname (default: 20)
#        """
#
#        len = random.randint(minlen, maxlen)
#
#        host_str = ''.join(
#            random.choice(string.ascii_lowercase) for _ in range(len -1))
#
#        host_str = '{0}{1}.example.net'.format(
#                host_str, random.choice(string.digits))
#
#        return host_str
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号