Python fabric.api.env 模块,warn_only() 实例源码

我们从Python开源项目中,提取了以下4个代码示例,用于说明如何使用fabric.api.env.warn_only()

项目:znappy    作者:eBayClassifiedsGroup    | 项目源码 | 文件源码
def _config_fabric(self):
        env.host_string = 'localhost'
        env.warn_only   = True

        for c in output.keys():
            output[c] = False
项目:kuberdock-platform    作者:cloudlinux    | 项目源码 | 文件源码
def setup_fabric():
    env.user = 'root'
    env.abort_exception = UpgradeError
    env.key_filename = settings.SSH_KEY_FILENAME
    env.warn_only = True
    output.stdout = False
    output.aborts = False
项目:kuberdock-platform    作者:cloudlinux    | 项目源码 | 文件源码
def pre_start_hook(app):
    from ..nodes.models import Node
    # env.warn_only = True
    env.user = 'root'
    env.key_filename = SSH_KEY_FILENAME
    output.stdout = False
    output.running = False
    PLUGIN_DIR = '/usr/libexec/kubernetes/kubelet-plugins/net/exec/kuberdock/'
    with app.app_context():
        for node in Node.query.all():
            env.host_string = node.hostname
            put('./node_network_plugin.sh', PLUGIN_DIR + 'kuberdock')
            put('./node_network_plugin.py', PLUGIN_DIR + 'kuberdock.py')
            run('systemctl restart kuberdock-watcher')
            print 'Kuberdock node parts are updated'
项目:charm-nova-compute-proxy    作者:openstack    | 项目源码 | 文件源码
def _init_fabric(self):
        env.warn_only = True
        env.connection_attempts = 10
        env.timeout = 10
        env.user = self.user
        env.key_filename = self.key_filename
        env.hosts = self.hosts
        env.password = self.password