Skip to content

Commit

Permalink
Merge pull request #49 from Jimdo/syslog_logging
Browse files Browse the repository at this point in the history
Add support for Syslog logging
  • Loading branch information
seiffert authored May 31, 2018
2 parents b66fce4 + bf37f4e commit 481e59c
Show file tree
Hide file tree
Showing 47 changed files with 7,871 additions and 4,941 deletions.
190 changes: 135 additions & 55 deletions library/fastly_service.py

Large diffs are not rendered by default.

50 changes: 25 additions & 25 deletions tests/fixtures/cassettes/TestFastlyCacheSettings_tearDown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,82 +6,82 @@ interactions:
method: GET
uri: https://api.fastly.com/service/search?name=Fastly%20Ansible%20Module%20Test
response:
body: {string: !!python/unicode '{"name":"Fastly Ansible Module Test","deleted_at":null,"versions":[{"testing":false,"locked":false,"number":1,"active":false,"service_id":"5RPRT0ug3oh6PWUBXrjSAH","staging":false,"created_at":"2018-05-29T21:39:00Z","deleted_at":null,"comment":"","updated_at":"2018-05-29T21:39:00Z","deployed":false},{"testing":false,"locked":true,"number":2,"active":false,"service_id":"5RPRT0ug3oh6PWUBXrjSAH","staging":false,"created_at":"2018-05-29T21:39:00Z","deleted_at":null,"comment":"","updated_at":"2018-05-29T21:43:09Z","deployed":false},{"testing":false,"staging":false,"updated_at":"2018-05-29T21:43:09Z","active":true,"number":3,"service_id":"5RPRT0ug3oh6PWUBXrjSAH","deployed":false,"locked":true,"deleted_at":null,"created_at":"2018-05-29T21:42:58Z","comment":""}],"created_at":"2018-05-29T21:39:00Z","customer_id":"31RPDMBpiruA1yfGA2djLm","comment":"","updated_at":"2018-05-29T21:39:00Z","id":"5RPRT0ug3oh6PWUBXrjSAH"}'}
body: {string: !!python/unicode '{"name":"Fastly Ansible Module Test","deleted_at":null,"versions":[{"testing":false,"locked":false,"number":1,"active":false,"service_id":"5Uofg7tBxthwFe9v68mLyq","staging":false,"created_at":"2018-05-30T14:42:41Z","deleted_at":null,"comment":"","updated_at":"2018-05-30T14:42:41Z","deployed":false},{"testing":false,"staging":false,"updated_at":"2018-05-30T15:01:24Z","active":true,"number":2,"service_id":"5Uofg7tBxthwFe9v68mLyq","deployed":false,"locked":true,"deleted_at":null,"created_at":"2018-05-30T15:01:15Z","comment":""}],"created_at":"2018-05-30T14:42:41Z","customer_id":"31RPDMBpiruA1yfGA2djLm","comment":"","updated_at":"2018-05-30T14:42:41Z","id":"5Uofg7tBxthwFe9v68mLyq"}'}
headers:
accept-ranges: [bytes]
age: ['0']
cache-control: [no-cache]
connection: [keep-alive]
content-length: ['918']
content-length: ['686']
content-type: [application/json]
date: ['Tue, 29 May 2018 21:43:11 GMT']
date: ['Wed, 30 May 2018 15:01:26 GMT']
status: [200 OK]
vary: [Accept-Encoding]
via: [1.1 varnish, 1.1 varnish]
x-cache: ['MISS, MISS']
x-cache-hits: ['0, 0']
x-served-by: ['app-slwdc9051-SL, cache-ams4129-AMS']
x-timer: ['S1527630191.996520,VS0,VE143']
x-served-by: ['app-slwdc9051-SL, cache-fra19145-FRA']
x-timer: ['S1527692486.161424,VS0,VE182']
status: {code: 200, message: OK}
- request:
body: null
headers:
Content-Type: [application/json]
method: GET
uri: https://api.fastly.com/service/5RPRT0ug3oh6PWUBXrjSAH/details
uri: https://api.fastly.com/service/5Uofg7tBxthwFe9v68mLyq/details
response:
body: {string: !!python/unicode '{"name":"Fastly Ansible Module Test","deleted_at":null,"versions":[{"testing":false,"locked":false,"number":1,"active":false,"service_id":"5RPRT0ug3oh6PWUBXrjSAH","staging":false,"created_at":"2018-05-29T21:39:00Z","deleted_at":null,"comment":"","updated_at":"2018-05-29T21:39:00Z","deployed":false},{"testing":false,"locked":true,"number":2,"active":false,"service_id":"5RPRT0ug3oh6PWUBXrjSAH","staging":false,"created_at":"2018-05-29T21:39:00Z","deleted_at":null,"comment":"","updated_at":"2018-05-29T21:43:09Z","deployed":false},{"testing":false,"locked":true,"number":3,"active":true,"service_id":"5RPRT0ug3oh6PWUBXrjSAH","staging":false,"created_at":"2018-05-29T21:42:58Z","deleted_at":null,"comment":"","updated_at":"2018-05-29T21:43:09Z","deployed":false}],"created_at":"2018-05-29T21:39:00Z","customer_id":"31RPDMBpiruA1yfGA2djLm","comment":"","updated_at":"2018-05-29T21:39:00Z","id":"5RPRT0ug3oh6PWUBXrjSAH","version":{"testing":false,"staging":false,"updated_at":"2018-05-29T21:43:09Z","active":true,"number":3,"service_id":"5RPRT0ug3oh6PWUBXrjSAH","deployed":false,"locked":true,"deleted_at":null,"created_at":"2018-05-29T21:42:58Z","comment":"","acls":[],"backends":[{"max_tls_version":null,"ssl_ca_cert":null,"auto_loadbalance":false,"ssl_check_cert":true,"shield":null,"hostname":null,"ssl_client_cert":null,"error_threshold":0,"request_condition":"","first_byte_timeout":15000,"ssl_cert_hostname":null,"weight":100,"client_cert":null,"address":"127.0.0.1","ssl_hostname":null,"ssl_sni_hostname":null,"min_tls_version":null,"ipv6":null,"ipv4":"127.0.0.1","connect_timeout":1000,"ssl_ciphers":null,"name":"localhost","healthcheck":null,"port":80,"max_conn":200,"use_ssl":false,"comment":"","between_bytes_timeout":10000,"ssl_client_key":null}],"cache_settings":[{"stale_ttl":"10","ttl":null,"name":"cache-settings-config-name","action":null,"cache_condition":""}],"conditions":[],"dictionaries":[],"directors":[],"domains":[{"comment":"","name":"example8000.com"}],"gzips":[],"headers":[{"priority":"100","src":"\"https://u.jimcdn.com\"
body: {string: !!python/unicode '{"name":"Fastly Ansible Module Test","deleted_at":null,"versions":[{"testing":false,"locked":false,"number":1,"active":false,"service_id":"5Uofg7tBxthwFe9v68mLyq","staging":false,"created_at":"2018-05-30T14:42:41Z","deleted_at":null,"comment":"","updated_at":"2018-05-30T14:42:41Z","deployed":false},{"testing":false,"locked":true,"number":2,"active":true,"service_id":"5Uofg7tBxthwFe9v68mLyq","staging":false,"created_at":"2018-05-30T15:01:15Z","deleted_at":null,"comment":"","updated_at":"2018-05-30T15:01:24Z","deployed":false}],"created_at":"2018-05-30T14:42:41Z","customer_id":"31RPDMBpiruA1yfGA2djLm","comment":"","updated_at":"2018-05-30T14:42:41Z","id":"5Uofg7tBxthwFe9v68mLyq","version":{"testing":false,"staging":false,"updated_at":"2018-05-30T15:01:24Z","active":true,"number":2,"service_id":"5Uofg7tBxthwFe9v68mLyq","deployed":false,"locked":true,"deleted_at":null,"created_at":"2018-05-30T15:01:15Z","comment":"","acls":[],"backends":[{"max_tls_version":null,"ssl_ca_cert":null,"auto_loadbalance":false,"ssl_check_cert":true,"shield":null,"hostname":null,"ssl_client_cert":null,"error_threshold":0,"request_condition":"","first_byte_timeout":15000,"ssl_cert_hostname":null,"weight":100,"client_cert":null,"address":"127.0.0.1","ssl_hostname":null,"ssl_sni_hostname":null,"min_tls_version":null,"ipv6":null,"ipv4":"127.0.0.1","connect_timeout":1000,"ssl_ciphers":null,"name":"localhost","healthcheck":null,"port":80,"max_conn":200,"use_ssl":false,"comment":"","between_bytes_timeout":10000,"ssl_client_key":null}],"cache_settings":[{"stale_ttl":"10","ttl":null,"name":"cache-settings-config-name","action":null,"cache_condition":""}],"conditions":[],"dictionaries":[],"directors":[],"domains":[{"comment":"","name":"example8000.com"}],"gzips":[],"headers":[{"priority":"100","src":"\"https://u.jimcdn.com\"
req.url.path","name":"Set Location header","substitution":"","ignore_if_set":"0","cache_condition":null,"request_condition":null,"regex":"","response_condition":null,"action":"set","type":"response","dst":"http.Location"}],"healthchecks":[],"request_settings":[],"response_objects":[{"request_condition":"","content_type":"","status":"200","response":"Ok","name":"Set
200 status code","content":"","cache_condition":""}],"snippets":[],"vcls":[],"wordpress":[],"settings":{"general.stale_if_error_ttl":43200,"general.stale_if_error":false,"general.default_ttl":3600,"general.default_host":"","general.default_pci":0}},"active_version":{"testing":false,"staging":false,"updated_at":"2018-05-29T21:43:09Z","active":true,"number":3,"service_id":"5RPRT0ug3oh6PWUBXrjSAH","deployed":false,"locked":true,"deleted_at":null,"created_at":"2018-05-29T21:42:58Z","comment":"","acls":[],"backends":[{"max_tls_version":null,"ssl_ca_cert":null,"auto_loadbalance":false,"ssl_check_cert":true,"shield":null,"hostname":null,"ssl_client_cert":null,"error_threshold":0,"request_condition":"","first_byte_timeout":15000,"ssl_cert_hostname":null,"weight":100,"client_cert":null,"address":"127.0.0.1","ssl_hostname":null,"ssl_sni_hostname":null,"min_tls_version":null,"ipv6":null,"ipv4":"127.0.0.1","connect_timeout":1000,"ssl_ciphers":null,"name":"localhost","healthcheck":null,"port":80,"max_conn":200,"use_ssl":false,"comment":"","between_bytes_timeout":10000,"ssl_client_key":null}],"cache_settings":[{"stale_ttl":"10","ttl":null,"name":"cache-settings-config-name","action":null,"cache_condition":""}],"conditions":[],"dictionaries":[],"directors":[],"domains":[{"comment":"","name":"example8000.com"}],"gzips":[],"headers":[{"priority":"100","src":"\"https://u.jimcdn.com\"
200 status code","content":"","cache_condition":""}],"snippets":[],"vcls":[],"wordpress":[],"settings":{"general.stale_if_error_ttl":43200,"general.stale_if_error":false,"general.default_ttl":3600,"general.default_host":"","general.default_pci":0}},"active_version":{"testing":false,"staging":false,"updated_at":"2018-05-30T15:01:24Z","active":true,"number":2,"service_id":"5Uofg7tBxthwFe9v68mLyq","deployed":false,"locked":true,"deleted_at":null,"created_at":"2018-05-30T15:01:15Z","comment":"","acls":[],"backends":[{"max_tls_version":null,"ssl_ca_cert":null,"auto_loadbalance":false,"ssl_check_cert":true,"shield":null,"hostname":null,"ssl_client_cert":null,"error_threshold":0,"request_condition":"","first_byte_timeout":15000,"ssl_cert_hostname":null,"weight":100,"client_cert":null,"address":"127.0.0.1","ssl_hostname":null,"ssl_sni_hostname":null,"min_tls_version":null,"ipv6":null,"ipv4":"127.0.0.1","connect_timeout":1000,"ssl_ciphers":null,"name":"localhost","healthcheck":null,"port":80,"max_conn":200,"use_ssl":false,"comment":"","between_bytes_timeout":10000,"ssl_client_key":null}],"cache_settings":[{"stale_ttl":"10","ttl":null,"name":"cache-settings-config-name","action":null,"cache_condition":""}],"conditions":[],"dictionaries":[],"directors":[],"domains":[{"comment":"","name":"example8000.com"}],"gzips":[],"headers":[{"priority":"100","src":"\"https://u.jimcdn.com\"
req.url.path","name":"Set Location header","substitution":"","ignore_if_set":"0","cache_condition":null,"request_condition":null,"regex":"","response_condition":null,"action":"set","type":"response","dst":"http.Location"}],"healthchecks":[],"request_settings":[],"response_objects":[{"request_condition":"","content_type":"","status":"200","response":"Ok","name":"Set
200 status code","content":"","cache_condition":""}],"snippets":[],"vcls":[],"wordpress":[],"settings":{"general.stale_if_error_ttl":43200,"general.stale_if_error":false,"general.default_ttl":3600,"general.default_host":"","general.default_pci":0}}}'}
headers:
accept-ranges: [bytes]
age: ['0']
cache-control: [no-cache]
connection: [keep-alive]
content-length: ['4425']
content-length: ['4193']
content-type: [application/json]
date: ['Tue, 29 May 2018 21:43:11 GMT']
date: ['Wed, 30 May 2018 15:01:26 GMT']
status: [200 OK]
vary: [Accept-Encoding]
via: [1.1 varnish, 1.1 varnish]
x-cache: ['MISS, MISS']
x-cache-hits: ['0, 0']
x-served-by: ['app-slwdc9051-SL, cache-ams4130-AMS']
x-timer: ['S1527630191.216085,VS0,VE111']
x-served-by: ['app-slwdc9051-SL, cache-fra19147-FRA']
x-timer: ['S1527692486.401075,VS0,VE116']
status: {code: 200, message: OK}
- request:
body: null
headers:
Content-Type: [application/json]
method: PUT
uri: https://api.fastly.com/service/5RPRT0ug3oh6PWUBXrjSAH/version/3/deactivate
uri: https://api.fastly.com/service/5Uofg7tBxthwFe9v68mLyq/version/2/deactivate
response:
body: {string: !!python/unicode '{"testing":false,"locked":true,"number":3,"active":false,"service_id":"5RPRT0ug3oh6PWUBXrjSAH","staging":false,"created_at":"2018-05-29T21:42:58Z","deleted_at":null,"comment":"","updated_at":"2018-05-29T21:43:09Z","deployed":false}'}
body: {string: !!python/unicode '{"testing":false,"locked":true,"number":2,"active":false,"service_id":"5Uofg7tBxthwFe9v68mLyq","staging":false,"created_at":"2018-05-30T15:01:15Z","deleted_at":null,"comment":"","updated_at":"2018-05-30T15:01:24Z","deployed":false}'}
headers:
accept-ranges: [bytes]
cache-control: [no-cache]
connection: [keep-alive]
content-length: ['231']
content-type: [application/json]
date: ['Tue, 29 May 2018 21:43:11 GMT']
fastly-ratelimit-remaining: ['956']
fastly-ratelimit-reset: ['1527631200']
date: ['Wed, 30 May 2018 15:01:27 GMT']
fastly-ratelimit-remaining: ['991']
fastly-ratelimit-reset: ['1527696000']
status: [200 OK]
vary: [Accept-Encoding]
via: [1.1 varnish, 1.1 varnish]
x-cache: ['MISS, MISS']
x-cache-hits: ['0, 0']
x-served-by: ['app-slwdc9051-SL, cache-ams4128-AMS']
x-timer: ['S1527630191.399244,VS0,VE547']
x-served-by: ['app-slwdc9051-SL, cache-fra19151-FRA']
x-timer: ['S1527692487.575606,VS0,VE491']
status: {code: 200, message: OK}
- request:
body: null
headers:
Content-Type: [application/json]
method: DELETE
uri: https://api.fastly.com/service/5RPRT0ug3oh6PWUBXrjSAH
uri: https://api.fastly.com/service/5Uofg7tBxthwFe9v68mLyq
response:
body: {string: !!python/unicode '{"status":"ok"}'}
headers:
Expand All @@ -90,15 +90,15 @@ interactions:
connection: [keep-alive]
content-length: ['15']
content-type: [application/json]
date: ['Tue, 29 May 2018 21:43:12 GMT']
fastly-ratelimit-remaining: ['955']
fastly-ratelimit-reset: ['1527631200']
date: ['Wed, 30 May 2018 15:01:27 GMT']
fastly-ratelimit-remaining: ['990']
fastly-ratelimit-reset: ['1527696000']
status: [200 OK]
vary: [Accept-Encoding]
via: [1.1 varnish, 1.1 varnish]
x-cache: ['MISS, MISS']
x-cache-hits: ['0, 0']
x-served-by: ['app-slwdc9051-SL, cache-ams4451-AMS']
x-timer: ['S1527630192.028156,VS0,VE389']
x-served-by: ['app-slwdc9051-SL, cache-fra19132-FRA']
x-timer: ['S1527692487.125148,VS0,VE144']
status: {code: 200, message: OK}
version: 1
Loading

0 comments on commit 481e59c

Please sign in to comment.