Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Commit 481e59c

Browse files
authored
Merge pull request #49 from Jimdo/syslog_logging
Add support for Syslog logging
2 parents b66fce4 + bf37f4e commit 481e59c

File tree

47 files changed

+7871
-4941
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+7871
-4941
lines changed

library/fastly_service.py

Lines changed: 135 additions & 55 deletions
Large diffs are not rendered by default.

tests/fixtures/cassettes/TestFastlyCacheSettings_tearDown.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,82 +6,82 @@ interactions:
66
method: GET
77
uri: https://api.fastly.com/service/search?name=Fastly%20Ansible%20Module%20Test
88
response:
9-
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"}'}
9+
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"}'}
1010
headers:
1111
accept-ranges: [bytes]
1212
age: ['0']
1313
cache-control: [no-cache]
1414
connection: [keep-alive]
15-
content-length: ['918']
15+
content-length: ['686']
1616
content-type: [application/json]
17-
date: ['Tue, 29 May 2018 21:43:11 GMT']
17+
date: ['Wed, 30 May 2018 15:01:26 GMT']
1818
status: [200 OK]
1919
vary: [Accept-Encoding]
2020
via: [1.1 varnish, 1.1 varnish]
2121
x-cache: ['MISS, MISS']
2222
x-cache-hits: ['0, 0']
23-
x-served-by: ['app-slwdc9051-SL, cache-ams4129-AMS']
24-
x-timer: ['S1527630191.996520,VS0,VE143']
23+
x-served-by: ['app-slwdc9051-SL, cache-fra19145-FRA']
24+
x-timer: ['S1527692486.161424,VS0,VE182']
2525
status: {code: 200, message: OK}
2626
- request:
2727
body: null
2828
headers:
2929
Content-Type: [application/json]
3030
method: GET
31-
uri: https://api.fastly.com/service/5RPRT0ug3oh6PWUBXrjSAH/details
31+
uri: https://api.fastly.com/service/5Uofg7tBxthwFe9v68mLyq/details
3232
response:
33-
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\"
33+
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\"
3434
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
35-
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\"
35+
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\"
3636
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
3737
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}}}'}
3838
headers:
3939
accept-ranges: [bytes]
4040
age: ['0']
4141
cache-control: [no-cache]
4242
connection: [keep-alive]
43-
content-length: ['4425']
43+
content-length: ['4193']
4444
content-type: [application/json]
45-
date: ['Tue, 29 May 2018 21:43:11 GMT']
45+
date: ['Wed, 30 May 2018 15:01:26 GMT']
4646
status: [200 OK]
4747
vary: [Accept-Encoding]
4848
via: [1.1 varnish, 1.1 varnish]
4949
x-cache: ['MISS, MISS']
5050
x-cache-hits: ['0, 0']
51-
x-served-by: ['app-slwdc9051-SL, cache-ams4130-AMS']
52-
x-timer: ['S1527630191.216085,VS0,VE111']
51+
x-served-by: ['app-slwdc9051-SL, cache-fra19147-FRA']
52+
x-timer: ['S1527692486.401075,VS0,VE116']
5353
status: {code: 200, message: OK}
5454
- request:
5555
body: null
5656
headers:
5757
Content-Type: [application/json]
5858
method: PUT
59-
uri: https://api.fastly.com/service/5RPRT0ug3oh6PWUBXrjSAH/version/3/deactivate
59+
uri: https://api.fastly.com/service/5Uofg7tBxthwFe9v68mLyq/version/2/deactivate
6060
response:
61-
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}'}
61+
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}'}
6262
headers:
6363
accept-ranges: [bytes]
6464
cache-control: [no-cache]
6565
connection: [keep-alive]
6666
content-length: ['231']
6767
content-type: [application/json]
68-
date: ['Tue, 29 May 2018 21:43:11 GMT']
69-
fastly-ratelimit-remaining: ['956']
70-
fastly-ratelimit-reset: ['1527631200']
68+
date: ['Wed, 30 May 2018 15:01:27 GMT']
69+
fastly-ratelimit-remaining: ['991']
70+
fastly-ratelimit-reset: ['1527696000']
7171
status: [200 OK]
7272
vary: [Accept-Encoding]
7373
via: [1.1 varnish, 1.1 varnish]
7474
x-cache: ['MISS, MISS']
7575
x-cache-hits: ['0, 0']
76-
x-served-by: ['app-slwdc9051-SL, cache-ams4128-AMS']
77-
x-timer: ['S1527630191.399244,VS0,VE547']
76+
x-served-by: ['app-slwdc9051-SL, cache-fra19151-FRA']
77+
x-timer: ['S1527692487.575606,VS0,VE491']
7878
status: {code: 200, message: OK}
7979
- request:
8080
body: null
8181
headers:
8282
Content-Type: [application/json]
8383
method: DELETE
84-
uri: https://api.fastly.com/service/5RPRT0ug3oh6PWUBXrjSAH
84+
uri: https://api.fastly.com/service/5Uofg7tBxthwFe9v68mLyq
8585
response:
8686
body: {string: !!python/unicode '{"status":"ok"}'}
8787
headers:
@@ -90,15 +90,15 @@ interactions:
9090
connection: [keep-alive]
9191
content-length: ['15']
9292
content-type: [application/json]
93-
date: ['Tue, 29 May 2018 21:43:12 GMT']
94-
fastly-ratelimit-remaining: ['955']
95-
fastly-ratelimit-reset: ['1527631200']
93+
date: ['Wed, 30 May 2018 15:01:27 GMT']
94+
fastly-ratelimit-remaining: ['990']
95+
fastly-ratelimit-reset: ['1527696000']
9696
status: [200 OK]
9797
vary: [Accept-Encoding]
9898
via: [1.1 varnish, 1.1 varnish]
9999
x-cache: ['MISS, MISS']
100100
x-cache-hits: ['0, 0']
101-
x-served-by: ['app-slwdc9051-SL, cache-ams4451-AMS']
102-
x-timer: ['S1527630192.028156,VS0,VE389']
101+
x-served-by: ['app-slwdc9051-SL, cache-fra19132-FRA']
102+
x-timer: ['S1527692487.125148,VS0,VE144']
103103
status: {code: 200, message: OK}
104104
version: 1

0 commit comments

Comments
 (0)