From 61936f6b88e8e859b23dcf933246675185aaeabd Mon Sep 17 00:00:00 2001 From: Joel Hansson Date: Thu, 20 Aug 2015 16:38:43 +0200 Subject: [PATCH 1/2] log_opt: change address to syslog-address Signed-off-by: Joel Hansson --- compose/config/schema.json | 4 ++-- docs/yml.md | 2 +- tests/unit/service_test.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compose/config/schema.json b/compose/config/schema.json index 073a0da65..17e1445a6 100644 --- a/compose/config/schema.json +++ b/compose/config/schema.json @@ -62,9 +62,9 @@ "type": "object", "properties": { - "address": {"type": "string"} + "syslog-address": {"type": "string"} }, - "required": ["address"] + "required": ["syslog-address"] }, "mac_address": {"type": "string"}, diff --git a/docs/yml.md b/docs/yml.md index bad9c9bc1..966220864 100644 --- a/docs/yml.md +++ b/docs/yml.md @@ -301,7 +301,7 @@ Logging options are key value pairs. An example of `syslog` options: log_driver: "syslog" log_opt: - address: "tcp://192.168.0.42:123" + syslog-address: "tcp://192.168.0.42:123" ### net diff --git a/tests/unit/service_test.py b/tests/unit/service_test.py index 8b39a63ef..2965d6c89 100644 --- a/tests/unit/service_test.py +++ b/tests/unit/service_test.py @@ -113,7 +113,7 @@ class ServiceTest(unittest.TestCase): self.assertEqual(opts['host_config']['Memory'], 1000000000) def test_log_opt(self): - log_opt = {'address': 'tcp://192.168.0.42:123'} + log_opt = {'syslog-address': 'tcp://192.168.0.42:123'} service = Service(name='foo', image='foo', hostname='name', client=self.mock_client, log_driver='syslog', log_opt=log_opt) self.mock_client.containers.return_value = [] opts = service._get_container_create_options({'some': 'overrides'}, 1) From 8caaee9eac0032e74b44c8f65bea28fff73630ff Mon Sep 17 00:00:00 2001 From: Joel Hansson Date: Fri, 21 Aug 2015 08:36:03 +0200 Subject: [PATCH 2/2] schema.json: remove specific log_opt properties Signed-off-by: Joel Hansson --- compose/config/schema.json | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/compose/config/schema.json b/compose/config/schema.json index 17e1445a6..8e9b79fb6 100644 --- a/compose/config/schema.json +++ b/compose/config/schema.json @@ -56,16 +56,9 @@ "image": {"type": "string"}, "labels": {"$ref": "#/definitions/list_or_dict"}, "links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, + "log_driver": {"type": "string"}, - - "log_opt": { - "type": "object", - - "properties": { - "syslog-address": {"type": "string"} - }, - "required": ["syslog-address"] - }, + "log_opt": {"type": "object"}, "mac_address": {"type": "string"}, "mem_limit": {