ecs.py 文件源码

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

项目:deployfish 作者: caltechads 项目源码 文件源码
def __get_volumes(self):
        """
        Generate the "volumes" argument for the ``register_task_definition()`` call.

        :rtype: dict
        """
        volume_names = set()
        volumes = []
        for c in self.containers:
            for v in c.volumes:
                host_path = v.split(':')[0]
                name = self.mount_from_host_path(host_path)
                if name not in volume_names:
                    volumes.append({
                        'name': name,
                        'host': {'sourcePath': host_path}
                    })
                    volume_names.add(name)
        return volumes
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号