samba.py 文件源码

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

项目:charm-glusterfs 作者: openstack 项目源码 文件源码
def render_samba_configuration(f: TextIOBase, volume_name: str) -> int:
    """
    Write the samba configuration file out to disk

    :param f: TextIOBase handle to the sambe config file
    :param volume_name: str
    :return: int of bytes written
    """
    bytes_written = 0
    bytes_written += f.write("[{}]\n".format(volume_name))
    bytes_written += f.write(b"path = /mnt/glusterfs\n"
                             b"read only = no\n"
                             b"guest ok = yes\n"
                             b"kernel share modes = no\n"
                             b"kernel oplocks = no\n"
                             b"map archive = no\n"
                             b"map hidden = no\n"
                             b"map read only = no\n"
                             b"map system = no\n"
                             b"store dos attributes = yes\n")
    return bytes_written
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号