diff options
| author | Zuul <zuul@review.opendev.org> | 2020-01-03 17:21:54 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2020-01-03 17:21:54 +0000 |
| commit | 7c116653e311d2a9ef769bb9227acd0ce9d3ad7a (patch) | |
| tree | a27ae992276cc392b13044ebc1f8baaf3f1159b5 | |
| parent | 5dbe87912c06a0db5108c67cbb7f127a57860598 (diff) | |
| parent | 73a1d006e44d21693a85b2ff848a0507ba3d8629 (diff) | |
| download | kolla-7c116653e311d2a9ef769bb9227acd0ce9d3ad7a.tar.gz kolla-7c116653e311d2a9ef769bb9227acd0ce9d3ad7a.zip | |
Merge "Add '--quiet' switch"
| -rwxr-xr-x | kolla/common/config.py | 4 | ||||
| -rw-r--r-- | kolla/common/utils.py | 2 | ||||
| -rwxr-xr-x | kolla/image/build.py | 3 | ||||
| -rw-r--r-- | releasenotes/notes/add-quiet-mode-4f386acd4bc043a5.yaml | 4 |
4 files changed, 10 insertions, 3 deletions
diff --git a/kolla/common/config.py b/kolla/common/config.py index f713c29c8..7ce8d26e1 100755 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -256,7 +256,9 @@ _CLI_OPTS = [ cfg.StrOpt('openstack-branch', default='master', help='Branch for source images'), cfg.BoolOpt('docker-healthchecks', default=True, - help='Add Kolla docker healthcheck scripts in the image') + help='Add Kolla docker healthcheck scripts in the image'), + cfg.BoolOpt('quiet', short='q', default=False, + help='Do not print image logs') ] _BASE_OPTS = [ diff --git a/kolla/common/utils.py b/kolla/common/utils.py index 8913b132e..9cd8ecca9 100644 --- a/kolla/common/utils.py +++ b/kolla/common/utils.py @@ -32,6 +32,8 @@ def make_a_logger(conf=None, image_name=None): log.addHandler(handler) if conf is not None and conf.debug: log.setLevel(logging.DEBUG) + elif conf is not None and conf.quiet and image_name: + log.setLevel(logging.CRITICAL) else: log.setLevel(logging.INFO) return log diff --git a/kolla/image/build.py b/kolla/image/build.py index a5db92984..5711a0f93 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -310,8 +310,7 @@ class PushIntoQueueTask(task.Task): @property def name(self): - return 'PushIntoQueueTask(%s=>%s)' % (self.push_task.name, - self.push_queue) + return 'PushIntoQueueTask(%s)' % (self.push_task.name) def run(self): self.push_queue.put(self.push_task) diff --git a/releasenotes/notes/add-quiet-mode-4f386acd4bc043a5.yaml b/releasenotes/notes/add-quiet-mode-4f386acd4bc043a5.yaml new file mode 100644 index 000000000..f06db63c9 --- /dev/null +++ b/releasenotes/notes/add-quiet-mode-4f386acd4bc043a5.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Adds '--quiet' switch to disable printing of image build log. |
