You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by mi...@apache.org on 2018/07/24 14:51:12 UTC

[trafficcontrol] branch master updated: Make anonymousBlockingEnabled an optional field in the DS API

This is an automated email from the ASF dual-hosted git repository.

mitchell852 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new dca0338  Make anonymousBlockingEnabled an optional field in the DS API
dca0338 is described below

commit dca03383c97a52c71c2b8ff5afc516339fbaae8b
Author: Rawlin Peters <ra...@comcast.com>
AuthorDate: Tue Jul 24 08:39:00 2018 -0600

    Make anonymousBlockingEnabled an optional field in the DS API
    
    The field cannot be required unless the API major version is
    incremented, so make it optional instead by setting it to the default
    value of false. This prevents client breakage.
---
 lib/go-tc/deliveryservices.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/go-tc/deliveryservices.go b/lib/go-tc/deliveryservices.go
index 1a5d1e4..384cffb 100644
--- a/lib/go-tc/deliveryservices.go
+++ b/lib/go-tc/deliveryservices.go
@@ -239,6 +239,9 @@ func (ds *DeliveryServiceNullableV12) Sanitize() {
 	if ds.RoutingName == nil || *ds.RoutingName == "" {
 		ds.RoutingName = util.StrPtr(DefaultRoutingName)
 	}
+	if ds.AnonymousBlockingEnabled == nil {
+		ds.AnonymousBlockingEnabled = util.BoolPtr(false)
+	}
 }
 
 // getTypeData returns the type's name and use_in_table, true/false if the query returned data, and any error