Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Added deep coverage zone routing percentage to the Traffic Portal dashboard.
- Added a `traffic_ops/app/bin/osversions-convert.pl` script to convert the `osversions.cfg` file from Perl to JSON as part of the `/osversions` endpoint rewrite.
- Added [Experimental] - Emulated Vault suppling a HTTP server mimicking RIAK behavior for usage as traffic-control vault.
- Added Traffic Ops Client function that returns a Delivery Service Nullable Response when requesting for a Delivery Service by XMLID

### Changed
- Traffic Router: TR will now allow steering DSs and steering target DSs to have RGB enabled. (fixes #3910)
Expand Down
11 changes: 11 additions & 0 deletions traffic_ops/client/deliveryservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func (to *Session) GetDeliveryServicesByServer(id int) ([]tc.DeliveryService, Re
return data.Response, reqInf, nil
}

// Deprecated: This function is deprecated and GetDeliveryServiceByXMLIDNullable will be used in the future.
func (to *Session) GetDeliveryServiceByXMLID(XMLID string) ([]tc.DeliveryService, ReqInf, error) {
var data tc.GetDeliveryServiceResponse
reqInf, err := get(to, deliveryServicesByXMLID(XMLID), &data)
Expand Down Expand Up @@ -123,6 +124,16 @@ func (to *Session) GetDeliveryServiceNullable(id string) (*tc.DeliveryServiceNul
return &data.Response[0], reqInf, nil
}

func (to *Session) GetDeliveryServiceByXMLIDNullable(XMLID string) ([]tc.DeliveryServiceNullable, ReqInf, error) {
var data tc.DeliveryServicesNullableResponse
reqInf, err := get(to, deliveryServicesByXMLID(XMLID), &data)
if err != nil {
return nil, reqInf, err
}

return data.Response, reqInf, nil
}

// CreateDeliveryService creates the DeliveryService it's passed
func (to *Session) CreateDeliveryService(ds *tc.DeliveryService) (*tc.CreateDeliveryServiceResponse, error) {
if ds.TypeID == 0 && ds.Type.String() != "" {
Expand Down