Skip to content

Commit

Permalink
Adding log_delivery parameter to CDN create_service
Browse files Browse the repository at this point in the history
  • Loading branch information
vikomall committed Sep 10, 2015
1 parent 469bd18 commit 32b6c34
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pyrax/cloudcdn.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,15 @@ def delete_assets(self, url=None, all=False):
class CloudCDNServiceManager(BaseManager):

def create(self, name, flavor_id, domains, origins,
restrictions=None, caching=None):
restrictions=None, caching=None, log_delivery=None):

body = {"name": name,
"flavor_id": flavor_id,
"domains": domains,
"origins": origins,
"restrictions": restrictions or [],
"caching": caching or []}
"caching": caching or [],
"log_delivery": log_delivery or {"enabled": False}}
resp, resp_body = self.api.method_post("/%s" % self.uri_base,
body=body)

Expand Down Expand Up @@ -150,7 +151,7 @@ def get_service(self, service_id):
return self._services_manager.get(service_id)

def create_service(self, name, flavor_id, domains, origins,
restrictions=None, caching=None):
restrictions=None, caching=None, log_delivery=None):
"""Create a new CDN service.
Arguments:
Expand All @@ -168,7 +169,8 @@ def create_service(self, name, flavor_id, domains, origins,
"""
return self._services_manager.create(name, flavor_id, domains, origins,
restrictions, caching)
restrictions, caching,
log_delivery)

def patch_service(self, service_id, changes):
"""Update a CDN service with a patch
Expand Down

0 comments on commit 32b6c34

Please sign in to comment.