apply.py 文件源码

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

项目:armada 作者: att-comdev 项目源码 文件源码
def invoke(self):

        if not self.ctx.obj.get('api', False):
            with open(self.filename) as f:
                armada = Armada(
                    list(yaml.safe_load_all(f.read())),
                    self.disable_update_pre,
                    self.disable_update_post,
                    self.enable_chart_cleanup,
                    self.dry_run,
                    self.set,
                    self.wait,
                    self.timeout,
                    self.tiller_host,
                    self.tiller_port,
                    self.values)

                resp = armada.sync()
                self.output(resp)
        else:
            query = {
                'disable_update_post': self.disable_update_post,
                'disable_update_pre': self.disable_update_pre,
                'dry_run': self.dry_run,
                'enable_chart_cleanup': self.enable_chart_cleanup,
                'tiller_host': self.tiller_host,
                'tiller_port': self.tiller_port,
                'timeout': self.timeout,
                'wait': self.wait
            }

            client = self.ctx.obj.get('CLIENT')

            with open(self.filename, 'r') as f:
                resp = client.post_apply(
                    manifest=f.read(), values=self.values, set=self.set,
                    query=query)
                self.output(resp.get('message'))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号