Skip to content

Commit 070cae6

Browse files
author
Rajesh Deshpande
authored
Merge pull request #159 from oracle/release_2019-03-26
GO SDK 5.1.0 Release
2 parents 3238fbe + 07028e1 commit 070cae6

File tree

103 files changed

+935
-595
lines changed

Some content is hidden

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

103 files changed

+935
-595
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66

7+
## 5.1.0 - 2019-03-26
8+
### Added
9+
- Support for glob patterns and exclusions for object lifecycle management in the Object Storage service
10+
- Documentation enhancements and corrections for traffic management in the DNS service
11+
12+
### Fixed
13+
- The 'tag' info is always ignored in the returned string of Version() function [Github issue 157](https://github.com/oracle/oci-go-sdk/issues/157)
14+
715
## 5.0.0 - 2019-03-19
816
### Added
917

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ type ConfigurationProvider interface {
5555
}
5656
```
5757

58-
### Making a request
58+
### Making a Request
5959
To make a request to an Oracle Cloud Infrastructure service, create a client for the service and then use the client to call a function from the service.
6060

6161
- *Creating a client*: All packages provide a function to create clients, using the naming convention `New<ServiceName>ClientWithConfigurationProvider`,
@@ -132,8 +132,8 @@ See [CHANGELOG](/CHANGELOG.md).
132132
## Known Issues
133133
You can find information on any known issues with the SDK here and under the [Issues](https://github.com/oracle/oci-go-sdk/issues) tab of this project's GitHub repository.
134134

135-
## Building and testing
136-
### Dev dependencies
135+
## Building and Testing
136+
### Dev Dependencies
137137
- Install [Testify](https://github.com/stretchr/testify) with the command:
138138
```sh
139139
go get github.com/stretchr/testify

cmd/genver/version_template.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/http.go

+5
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,11 @@ func addToBody(request *http.Request, value reflect.Value, field reflect.StructF
263263
if e != nil {
264264
return
265265
}
266+
267+
if defaultLogger.LogLevel() == verboseLogging {
268+
Debugf("Marshaled body is: %s\n", string(marshaled))
269+
}
270+
266271
bodyBytes := bytes.NewReader(marshaled)
267272
request.ContentLength = int64(bodyBytes.Len())
268273
request.Header.Set(requestHeaderContentLength, strconv.FormatInt(request.ContentLength, 10))

common/version.go

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dns/create_steering_policy_attachment_details.go

+3-7
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,8 @@ import (
1414
)
1515

1616
// CreateSteeringPolicyAttachmentDetails The body for defining an attachment between a steering policy and a domain.
17-
// An attachment occludes all records at its domain that are of a covered rtype, constructing
18-
// DNS responses from its steering policy rather than from those domain records.
19-
// The attachment will cover every rtype that matches the rtype of an answer in its policy, and
20-
// will cover all address rtypes (e.g., A and AAAA) if the policy includes at least one CNAME
21-
// answer.
22-
// A domain can have at most one attachment covering any given rtype.
17+
//
18+
// **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
2319
type CreateSteeringPolicyAttachmentDetails struct {
2420

2521
// The OCID of the attached steering policy.
@@ -32,7 +28,7 @@ type CreateSteeringPolicyAttachmentDetails struct {
3228
DomainName *string `mandatory:"true" json:"domainName"`
3329

3430
// A user-friendly name for the steering policy attachment.
35-
// Does not have to be unique, and it's changeable.
31+
// Does not have to be unique and can be changed.
3632
// Avoid entering confidential information.
3733
DisplayName *string `mandatory:"false" json:"displayName"`
3834
}

dns/create_steering_policy_details.go

+50-51
Original file line numberDiff line numberDiff line change
@@ -15,82 +15,81 @@ import (
1515
)
1616

1717
// CreateSteeringPolicyDetails The body for defining a new steering policy.
18-
// *Warning:* Oracle recommends that you avoid using any confidential information when you supply string values using the API.
18+
// **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
1919
type CreateSteeringPolicyDetails struct {
2020

2121
// The OCID of the compartment containing the steering policy.
2222
CompartmentId *string `mandatory:"true" json:"compartmentId"`
2323

24-
// A user-friendly name for the steering policy.
25-
// Does not have to be unique, and it's changeable.
24+
// A user-friendly name for the steering policy. Does not have to be unique and can be changed.
2625
// Avoid entering confidential information.
2726
DisplayName *string `mandatory:"true" json:"displayName"`
2827

29-
// The common pattern (or lack thereof) to which the steering policy adheres. This
30-
// value restricts the possible configurations of rules, but thereby supports
31-
// specifically tailored interfaces. Values other than "CUSTOM" require the rules to
32-
// begin with an unconditional FILTER that keeps answers contingent upon
33-
// `answer.isDisabled != true`, followed
34-
// _if and only if the policy references a health check monitor_ by an unconditional
35-
// HEALTH rule, and require the last rule to be an unconditional LIMIT.
36-
// What must precede the LIMIT rule is determined by the template value:
37-
// - FAILOVER requires exactly an unconditional PRIORITY rule that ranks answers by pool.
38-
// Each answer pool must have a unique priority value assigned to it. Answer data must
39-
// be defined in the `defaultAnswerData` property for the rule and the `cases` property
40-
// must not be defined.
41-
// - LOAD_BALANCE requires exactly an unconditional WEIGHTED rule that shuffles answers
42-
// by name. Answer data must be defined in the `defaultAnswerData` property for the
43-
// rule and the `cases` property must not be defined.
44-
// - ROUTE_BY_GEO requires exactly one PRIORITY rule that ranks answers by pool using the
45-
// geographical location of the client as a condition. Within that rule you may only
46-
// use `query.client.geoKey` in the `caseCondition` expressions for defining the cases.
47-
// For each case in the PRIORITY rule each answer pool must have a unique priority
48-
// value assigned to it. Answer data can only be defined within cases and
49-
// `defaultAnswerData` cannot be used in the PRIORITY rule.
50-
// - ROUTE_BY_ASN requires exactly one PRIORITY rule that ranks answers by pool using the
51-
// ASN of the client as a condition. Within that rule you may only use
52-
// `query.client.asn` in the `caseCondition` expressions for defining the cases.
53-
// For each case in the PRIORITY rule each answer pool must have a unique priority
54-
// value assigned to it. Answer data can only be defined within cases and
55-
// `defaultAnswerData` cannot be used in the PRIORITY rule.
56-
// - ROUTE_BY_IP requires exactly one PRIORITY rule that ranks answers by pool using the
57-
// IP subnet of the client as a condition. Within that rule you may only use
58-
// `query.client.address` in the `caseCondition` expressions for defining the cases.
59-
// For each case in the PRIORITY rule each answer pool must have a unique priority
60-
// value assigned to it. Answer data can only be defined within cases and
61-
// `defaultAnswerData` cannot be used in the PRIORITY rule.
62-
// - CUSTOM allows an arbitrary configuration of rules.
63-
// For an existing steering policy, the template value may be changed to any of the
64-
// supported options but the resulting policy must conform to the requirements for the
65-
// new template type or else a Bad Request error will be returned.
28+
// A set of predefined rules based on the desired purpose of the steering policy. Each
29+
// template utilizes Traffic Management's rules in a different order to produce the desired
30+
// results when answering DNS queries.
31+
//
32+
// **Example:** The `FAILOVER` template determines answers by filtering the policy's answers
33+
// using the `FILTER` rule first, then the following rules in succession: `HEALTH`, `PRIORITY`,
34+
// and `LIMIT`. This gives the domain dynamic failover capability.
35+
//
36+
// It is **strongly recommended** to use a template other than `CUSTOM` when creating
37+
// a steering policy.
38+
//
39+
// All templates require the rule order to begin with an unconditional `FILTER` rule that keeps
40+
// answers contingent upon `answer.isDisabled != true`, except for `CUSTOM`. A defined
41+
// `HEALTH` rule must follow the `FILTER` rule if the policy references a `healthCheckMonitorId`.
42+
// The last rule of a template must must be a `LIMIT` rule. For more information about templates
43+
// and code examples, see Traffic Management API Guide (https://docs.cloud.oracle.com/iaas/Content/TrafficManagement/Concepts/trafficmanagementapi.htm).
44+
// **Template Types**
45+
// * `FAILOVER` - Uses health check information on your endpoints to determine which DNS answers
46+
// to serve. If an endpoint fails a health check, the answer for that endpoint will be removed
47+
// from the list of available answers until the endpoint is detected as healthy.
48+
//
49+
// * `LOAD_BALANCE` - Distributes web traffic to specified endpoints based on defined weights.
50+
//
51+
// * `ROUTE_BY_GEO` - Answers DNS queries based on the query's geographic location. For a list of geographic
52+
// locations to route by, see Traffic Management Geographic Locations (https://docs.cloud.oracle.com/iaas/Content/TrafficManagement/Reference/trafficmanagementgeo.htm).
53+
//
54+
// * `ROUTE_BY_ASN` - Answers DNS queries based on the query's originating ASN.
55+
//
56+
// * `ROUTE_BY_IP` - Answers DNS queries based on the query's IP address.
57+
//
58+
// * `CUSTOM` - Allows a customized configuration of rules.
6659
Template CreateSteeringPolicyDetailsTemplateEnum `mandatory:"true" json:"template"`
6760

68-
// The Time To Live for responses from the steering policy, in seconds.
61+
// The Time To Live (TTL) for responses from the steering policy, in seconds.
6962
// If not specified during creation, a value of 30 seconds will be used.
7063
Ttl *int `mandatory:"false" json:"ttl"`
7164

7265
// The OCID of the health check monitor providing health data about the answers of the
73-
// steering policy.
74-
// A steering policy answer with `rdata` matching a monitored endpoint will use the health
75-
// data of that endpoint.
76-
// A steering policy answer with `rdata` not matching any monitored endpoint will be assumed
77-
// healthy.
66+
// steering policy. A steering policy answer with `rdata` matching a monitored endpoint
67+
// will use the health data of that endpoint. A steering policy answer with `rdata` not
68+
// matching any monitored endpoint will be assumed healthy.
69+
//
70+
// **Note:** To use the Health Check monitoring feature in a steering policy, a monitor
71+
// must be created using the Health Checks service first. For more information on how to
72+
// create a monitor, please see Managing Health Checks (https://docs.cloud.oracle.com/iaas/Content/HealthChecks/Tasks/managinghealthchecks.htm).
7873
HealthCheckMonitorId *string `mandatory:"false" json:"healthCheckMonitorId"`
7974

80-
// Simple key-value pair that is applied without any predefined name, type, or scope.
75+
// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
8176
// For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
82-
// Example: `{"bar-key": "value"}`
77+
//
78+
// **Example:** `{"Department": "Finance"}`
8379
FreeformTags map[string]string `mandatory:"false" json:"freeformTags"`
8480

85-
// Usage of predefined tag keys. These predefined keys are scoped to a namespace.
86-
// Example: `{"foo-namespace": {"bar-key": "value"}}`
81+
// Defined tags for this resource. Each key is predefined and scoped to a namespace.
82+
// For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
83+
//
84+
// **Example:** `{"Operations": {"CostCenter": "42"}}`
8785
DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"`
8886

8987
// The set of all answers that can potentially issue from the steering policy.
9088
Answers []SteeringPolicyAnswer `mandatory:"false" json:"answers"`
9189

92-
// The pipeline of rules that will be processed in sequence to reduce the pool of answers
90+
// The series of rules that will be processed in sequence to reduce the pool of answers
9391
// to a response for any given request.
92+
//
9493
// The first rule receives a shuffled list of all answers, and every other rule receives
9594
// the list of answers emitted by the one preceding it. The last rule populates the
9695
// response.

dns/create_zone_details.go

+8-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
)
1515

1616
// CreateZoneDetails The body for defining a new zone.
17-
// *Warning:* Oracle recommends that you avoid using any confidential information when you supply string values using the API.
17+
// **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
1818
type CreateZoneDetails struct {
1919

2020
// The name of the zone.
@@ -26,13 +26,16 @@ type CreateZoneDetails struct {
2626
// The OCID of the compartment containing the zone.
2727
CompartmentId *string `mandatory:"true" json:"compartmentId"`
2828

29-
// Simple key-value pair that is applied without any predefined name, type, or scope.
29+
// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
3030
// For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
31-
// Example: `{"bar-key": "value"}`
31+
//
32+
// **Example:** `{"Department": "Finance"}`
3233
FreeformTags map[string]string `mandatory:"false" json:"freeformTags"`
3334

34-
// Usage of predefined tag keys. These predefined keys are scoped to a namespace.
35-
// Example: `{"foo-namespace": {"bar-key": "value"}}`
35+
// Defined tags for this resource. Each key is predefined and scoped to a namespace.
36+
// For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
37+
//
38+
// **Example:** `{"Operations": {"CostCenter": "42"}}`
3639
DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"`
3740

3841
// External master servers for the zone. `externalMasters` becomes a

dns/dns_client.go

+13-6
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ func (client *DnsClient) ConfigurationProvider() *common.ConfigurationProvider {
5959
return client.config
6060
}
6161

62-
// CreateSteeringPolicy Creates a new steering policy in the specified compartment.
62+
// CreateSteeringPolicy Creates a new steering policy in the specified compartment. For more information on
63+
// creating policies with templates, see Traffic Management API Guide (https://docs.cloud.oracle.com/iaas/Content/TrafficManagement/Concepts/trafficmanagementapi.htm).
6364
func (client DnsClient) CreateSteeringPolicy(ctx context.Context, request CreateSteeringPolicyRequest) (response CreateSteeringPolicyResponse, err error) {
6465
var ociResponse common.OCIResponse
6566
policy := common.NoRetryPolicy()
@@ -106,9 +107,11 @@ func (client DnsClient) createSteeringPolicy(ctx context.Context, request common
106107
return response, err
107108
}
108109

109-
// CreateSteeringPolicyAttachment Creates a new attachment between a steering policy and a domain.
110+
// CreateSteeringPolicyAttachment Creates a new attachment between a steering policy and a domain, giving the
111+
// policy permission to answer queries for the specified domain. A steering policy must
112+
// be attached to a domain for the policy to answer DNS queries for that domain.
110113
// For the purposes of access control, the attachment is automatically placed
111-
// into the same compartment as the containing zone of the domain.
114+
// into the same compartment as the domain's zone.
112115
func (client DnsClient) CreateSteeringPolicyAttachment(ctx context.Context, request CreateSteeringPolicyAttachmentRequest) (response CreateSteeringPolicyAttachmentResponse, err error) {
113116
var ociResponse common.OCIResponse
114117
policy := common.NoRetryPolicy()
@@ -285,7 +288,8 @@ func (client DnsClient) deleteRRSet(ctx context.Context, request common.OCIReque
285288

286289
// DeleteSteeringPolicy Deletes the specified steering policy.
287290
// A `204` response indicates that the delete has been successful.
288-
// Deletion will fail if the policy is attached to any zones.
291+
// Deletion will fail if the policy is attached to any zones. To detach a
292+
// policy from a zone, see `DeleteSteeringPolicyAttachment`.
289293
func (client DnsClient) DeleteSteeringPolicy(ctx context.Context, request DeleteSteeringPolicyRequest) (response DeleteSteeringPolicyResponse, err error) {
290294
var ociResponse common.OCIResponse
291295
policy := common.NoRetryPolicy()
@@ -798,7 +802,10 @@ func (client DnsClient) listZones(ctx context.Context, request common.OCIRequest
798802
return response, err
799803
}
800804

801-
// PatchDomainRecords Updates records in the specified zone at a domain. You can update one record or all records for the specified zone depending on the changes provided in the request body. You can also add or remove records using this function.
805+
// PatchDomainRecords Updates records in the specified zone at a domain. You can update
806+
// one record or all records for the specified zone depending on the changes
807+
// provided in the request body. You can also add or remove records using this
808+
// function.
802809
func (client DnsClient) PatchDomainRecords(ctx context.Context, request PatchDomainRecordsRequest) (response PatchDomainRecordsResponse, err error) {
803810
var ociResponse common.OCIResponse
804811
policy := common.NoRetryPolicy()
@@ -1016,7 +1023,7 @@ func (client DnsClient) updateRRSet(ctx context.Context, request common.OCIReque
10161023
return response, err
10171024
}
10181025

1019-
// UpdateSteeringPolicy Updates the specified steering policy with your new information.
1026+
// UpdateSteeringPolicy Updates the configuration of the specified steering policy.
10201027
func (client DnsClient) UpdateSteeringPolicy(ctx context.Context, request UpdateSteeringPolicyRequest) (response UpdateSteeringPolicyResponse, err error) {
10211028
var ociResponse common.OCIResponse
10221029
policy := common.NoRetryPolicy()

dns/list_steering_policies_request_response.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type ListSteeringPoliciesRequest struct {
3131
DisplayNameContains *string `mandatory:"false" contributesTo:"query" name:"displayNameContains"`
3232

3333
// Search by health check monitor OCID.
34-
// Will match any resource whose health check monitor id matches the provided value.
34+
// Will match any resource whose health check monitor ID matches the provided value.
3535
HealthCheckMonitorId *string `mandatory:"false" contributesTo:"query" name:"healthCheckMonitorId"`
3636

3737
// An RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) timestamp that states
@@ -42,14 +42,14 @@ type ListSteeringPoliciesRequest struct {
4242
// all returned resources were created before the indicated time.
4343
TimeCreatedLessThan *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeCreatedLessThan"`
4444

45-
// Search by template type.
45+
// Search by steering template type.
4646
// Will match any resource whose template type matches the provided value.
4747
Template *string `mandatory:"false" contributesTo:"query" name:"template"`
4848

4949
// The state of a resource.
5050
LifecycleState SteeringPolicySummaryLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"`
5151

52-
// The field by which to sort steering policies.
52+
// The field by which to sort steering policies. If unspecified, defaults to `timeCreated`.
5353
SortBy ListSteeringPoliciesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"`
5454

5555
// The order to sort the resources.

0 commit comments

Comments
 (0)