Merge pull request #1897 from qzio/log-opt/address-to-syslog-address

log_opt: change address to syslog-address
This commit is contained in:
mnowster 2015-08-21 10:43:02 +01:00
commit 59d024f4f2
3 changed files with 4 additions and 11 deletions

View File

@ -56,16 +56,9 @@
"image": {"type": "string"}, "image": {"type": "string"},
"labels": {"$ref": "#/definitions/list_or_dict"}, "labels": {"$ref": "#/definitions/list_or_dict"},
"links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, "links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
"log_driver": {"type": "string"}, "log_driver": {"type": "string"},
"log_opt": {"type": "object"},
"log_opt": {
"type": "object",
"properties": {
"address": {"type": "string"}
},
"required": ["address"]
},
"mac_address": {"type": "string"}, "mac_address": {"type": "string"},
"mem_limit": { "mem_limit": {

View File

@ -301,7 +301,7 @@ Logging options are key value pairs. An example of `syslog` options:
log_driver: "syslog" log_driver: "syslog"
log_opt: log_opt:
address: "tcp://192.168.0.42:123" syslog-address: "tcp://192.168.0.42:123"
### net ### net

View File

@ -113,7 +113,7 @@ class ServiceTest(unittest.TestCase):
self.assertEqual(opts['host_config']['Memory'], 1000000000) self.assertEqual(opts['host_config']['Memory'], 1000000000)
def test_log_opt(self): 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) 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 = [] self.mock_client.containers.return_value = []
opts = service._get_container_create_options({'some': 'overrides'}, 1) opts = service._get_container_create_options({'some': 'overrides'}, 1)