Skip to content

Commit 00e0d34

Browse files
committed
Releasing version 1.2.33
1 parent 39afed3 commit 00e0d34

File tree

84 files changed

+6160
-89
lines changed

Some content is hidden

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

84 files changed

+6160
-89
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
1313
### Added
1414
- N/A
1515

16+
## 1.2.33 - 2018-03-27
17+
18+
### Added
19+
- Added support for remote VCN peering across regions. See [here](https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/RemotePeeringConnectionExample.java) for a sample
20+
- Added support for calling Oracle Cloud Infrastructure services in the uk-london-1 (LHR) region
21+
- Added a version of the Java SDK library that bundles several of its dependencies in shaded form
22+
1623
## 1.2.29 - 2018-03-08
1724

1825
### Added

bmc-audit/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.oracle.oci.sdk</groupId>
77
<artifactId>oci-java-sdk</artifactId>
8-
<version>1.2.29</version>
8+
<version>1.2.33</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

@@ -18,7 +18,7 @@
1818
<dependency>
1919
<groupId>com.oracle.oci.sdk</groupId>
2020
<artifactId>oci-java-sdk-common</artifactId>
21-
<version>1.2.29</version>
21+
<version>1.2.33</version>
2222
</dependency>
2323
</dependencies>
2424

bmc-audit/src/main/java/com/oracle/bmc/audit/AuditAsyncClient.java

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,34 @@ public AuditAsyncClient(
102102
com.oracle.bmc.http.ClientConfigurator clientConfigurator,
103103
com.oracle.bmc.http.signing.RequestSignerFactory requestSignerFactory,
104104
java.util.List<com.oracle.bmc.http.ClientConfigurator> additionalClientConfigurators) {
105+
this(
106+
authenticationDetailsProvider,
107+
configuration,
108+
clientConfigurator,
109+
requestSignerFactory,
110+
additionalClientConfigurators,
111+
null);
112+
}
113+
114+
/**
115+
* Creates a new service instance using the given authentication provider and client configuration. Additionally,
116+
* a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
117+
* <p>
118+
* This is an advanced constructor for clients that want to take control over how requests are signed.
119+
* @param authenticationDetailsProvider The authentication details provider, required.
120+
* @param configuration The client configuration, optional.
121+
* @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional.
122+
* @param requestSignerFactory The request signer factory used to create the request signer for this service.
123+
* @param additionalClientConfigurators Additional client configurators to be run after the primary configurator.
124+
* @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider})
125+
*/
126+
public AuditAsyncClient(
127+
com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
128+
com.oracle.bmc.ClientConfiguration configuration,
129+
com.oracle.bmc.http.ClientConfigurator clientConfigurator,
130+
com.oracle.bmc.http.signing.RequestSignerFactory requestSignerFactory,
131+
java.util.List<com.oracle.bmc.http.ClientConfigurator> additionalClientConfigurators,
132+
String endpoint) {
105133
this.authenticationDetailsProvider = authenticationDetailsProvider;
106134
com.oracle.bmc.http.internal.RestClientFactory restClientFactory =
107135
com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()
@@ -119,8 +147,17 @@ public AuditAsyncClient(
119147

120148
if (provider.getRegion() != null) {
121149
this.setRegion(provider.getRegion());
150+
if (endpoint != null) {
151+
LOG.info(
152+
"Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.",
153+
provider.getRegion(),
154+
endpoint);
155+
}
122156
}
123157
}
158+
if (endpoint != null) {
159+
setEndpoint(endpoint);
160+
}
124161
}
125162

126163
/**
@@ -143,6 +180,7 @@ public static class Builder {
143180
protected com.oracle.bmc.http.signing.RequestSignerFactory requestSignerFactory =
144181
new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory(
145182
com.oracle.bmc.http.signing.SigningStrategy.STANDARD);
183+
protected String endpoint;
146184

147185
private Builder() {}
148186

@@ -207,6 +245,51 @@ public Builder requestSignerFactory(
207245
return this;
208246
}
209247

248+
/**
249+
* Set the endpoint for the client to be created.
250+
* @param endpoint endpoint
251+
* @return this builder
252+
*/
253+
public Builder endpoint(String endpoint) {
254+
this.endpoint = endpoint;
255+
return this;
256+
}
257+
258+
/**
259+
* Set the region for the client to be created.
260+
* @param region region
261+
* @return this builder
262+
*/
263+
public Builder region(com.oracle.bmc.Region region) {
264+
com.google.common.base.Optional<String> endpoint = region.getEndpoint(SERVICE);
265+
if (endpoint.isPresent()) {
266+
endpoint(endpoint.get());
267+
} else {
268+
throw new IllegalArgumentException(
269+
"Endpoint for " + SERVICE + " is not known in region " + region);
270+
}
271+
return this;
272+
}
273+
274+
/**
275+
* Set the region for the client to be created.
276+
* @param region region
277+
* @return this builder
278+
*/
279+
public Builder region(String regionId) {
280+
regionId = regionId.toLowerCase(Locale.ENGLISH);
281+
try {
282+
com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId);
283+
return region(region);
284+
} catch (IllegalArgumentException e) {
285+
LOG.info(
286+
"Unknown regionId '{}', falling back to default endpoint format", regionId);
287+
String endpoint =
288+
com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId);
289+
return endpoint(endpoint);
290+
}
291+
}
292+
210293
/**
211294
* Build the client, with the authentication details provider.
212295
* @param authenticationDetailsProvider authentication details provider
@@ -221,7 +304,8 @@ public AuditAsyncClient build(
221304
configuration,
222305
clientConfigurator,
223306
requestSignerFactory,
224-
additionalClientConfigurators);
307+
additionalClientConfigurators,
308+
endpoint);
225309
}
226310
}
227311

bmc-audit/src/main/java/com/oracle/bmc/audit/AuditClient.java

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,34 @@ public AuditClient(
106106
com.oracle.bmc.http.ClientConfigurator clientConfigurator,
107107
com.oracle.bmc.http.signing.RequestSignerFactory requestSignerFactory,
108108
java.util.List<com.oracle.bmc.http.ClientConfigurator> additionalClientConfigurators) {
109+
this(
110+
authenticationDetailsProvider,
111+
configuration,
112+
clientConfigurator,
113+
requestSignerFactory,
114+
additionalClientConfigurators,
115+
null);
116+
}
117+
118+
/**
119+
* Creates a new service instance using the given authentication provider and client configuration. Additionally,
120+
* a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
121+
* <p>
122+
* This is an advanced constructor for clients that want to take control over how requests are signed.
123+
* @param authenticationDetailsProvider The authentication details provider, required.
124+
* @param configuration The client configuration, optional.
125+
* @param clientConfigurator ClientConfigurator that will be invoked for additional configuration of a REST client, optional.
126+
* @param requestSignerFactory The request signer factory used to create the request signer for this service.
127+
* @param additionalClientConfigurators Additional client configurators to be run after the primary configurator.
128+
* @param endpoint Endpoint, or null to leave unset (note, may be overridden by {@code authenticationDetailsProvider})
129+
*/
130+
public AuditClient(
131+
com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
132+
com.oracle.bmc.ClientConfiguration configuration,
133+
com.oracle.bmc.http.ClientConfigurator clientConfigurator,
134+
com.oracle.bmc.http.signing.RequestSignerFactory requestSignerFactory,
135+
java.util.List<com.oracle.bmc.http.ClientConfigurator> additionalClientConfigurators,
136+
String endpoint) {
109137
this.authenticationDetailsProvider = authenticationDetailsProvider;
110138
com.oracle.bmc.http.internal.RestClientFactory restClientFactory =
111139
com.oracle.bmc.http.internal.RestClientFactoryBuilder.builder()
@@ -125,8 +153,17 @@ public AuditClient(
125153

126154
if (provider.getRegion() != null) {
127155
this.setRegion(provider.getRegion());
156+
if (endpoint != null) {
157+
LOG.info(
158+
"Authentication details provider configured for region '{}', but endpoint specifically set to '{}'. Using endpoint setting instead of region.",
159+
provider.getRegion(),
160+
endpoint);
161+
}
128162
}
129163
}
164+
if (endpoint != null) {
165+
setEndpoint(endpoint);
166+
}
130167
}
131168

132169
/**
@@ -149,6 +186,7 @@ public static class Builder {
149186
protected com.oracle.bmc.http.signing.RequestSignerFactory requestSignerFactory =
150187
new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory(
151188
com.oracle.bmc.http.signing.SigningStrategy.STANDARD);
189+
protected String endpoint;
152190

153191
private Builder() {}
154192

@@ -213,6 +251,51 @@ public Builder requestSignerFactory(
213251
return this;
214252
}
215253

254+
/**
255+
* Set the endpoint for the client to be created.
256+
* @param endpoint endpoint
257+
* @return this builder
258+
*/
259+
public Builder endpoint(String endpoint) {
260+
this.endpoint = endpoint;
261+
return this;
262+
}
263+
264+
/**
265+
* Set the region for the client to be created.
266+
* @param region region
267+
* @return this builder
268+
*/
269+
public Builder region(com.oracle.bmc.Region region) {
270+
com.google.common.base.Optional<String> endpoint = region.getEndpoint(SERVICE);
271+
if (endpoint.isPresent()) {
272+
endpoint(endpoint.get());
273+
} else {
274+
throw new IllegalArgumentException(
275+
"Endpoint for " + SERVICE + " is not known in region " + region);
276+
}
277+
return this;
278+
}
279+
280+
/**
281+
* Set the region for the client to be created.
282+
* @param region region
283+
* @return this builder
284+
*/
285+
public Builder region(String regionId) {
286+
regionId = regionId.toLowerCase(Locale.ENGLISH);
287+
try {
288+
com.oracle.bmc.Region region = com.oracle.bmc.Region.fromRegionId(regionId);
289+
return region(region);
290+
} catch (IllegalArgumentException e) {
291+
LOG.info(
292+
"Unknown regionId '{}', falling back to default endpoint format", regionId);
293+
String endpoint =
294+
com.oracle.bmc.Region.formatDefaultRegionEndpoint(SERVICE, regionId);
295+
return endpoint(endpoint);
296+
}
297+
}
298+
216299
/**
217300
* Set the authentication details provider. Once this is called, the builder can build the client.
218301
* @param authenticationDetailsProvider authentication details provider
@@ -227,7 +310,8 @@ public AuditClient build(
227310
configuration,
228311
clientConfigurator,
229312
requestSignerFactory,
230-
additionalClientConfigurators);
313+
additionalClientConfigurators,
314+
endpoint);
231315
}
232316
}
233317

bmc-bom/pom.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.oracle.oci.sdk</groupId>
77
<artifactId>oci-java-sdk</artifactId>
8-
<version>1.2.29</version>
8+
<version>1.2.33</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111
<artifactId>oci-java-sdk-bom</artifactId>
@@ -19,62 +19,62 @@
1919
<dependency>
2020
<groupId>com.oracle.oci.sdk</groupId>
2121
<artifactId>oci-java-sdk-common</artifactId>
22-
<version>1.2.29</version>
22+
<version>1.2.33</version>
2323
<optional>false</optional>
2424
</dependency>
2525
<!-- Service modules, alpha sorted -->
2626
<dependency>
2727
<groupId>com.oracle.oci.sdk</groupId>
2828
<artifactId>oci-java-sdk-audit</artifactId>
29-
<version>1.2.29</version>
29+
<version>1.2.33</version>
3030
<optional>false</optional>
3131
</dependency>
3232
<dependency>
3333
<groupId>com.oracle.oci.sdk</groupId>
3434
<artifactId>oci-java-sdk-core</artifactId>
35-
<version>1.2.29</version>
35+
<version>1.2.33</version>
3636
<optional>false</optional>
3737
</dependency>
3838
<dependency>
3939
<groupId>com.oracle.oci.sdk</groupId>
4040
<artifactId>oci-java-sdk-database</artifactId>
41-
<version>1.2.29</version>
41+
<version>1.2.33</version>
4242
<optional>false</optional>
4343
</dependency>
4444
<dependency>
4545
<groupId>com.oracle.oci.sdk</groupId>
4646
<artifactId>oci-java-sdk-dns</artifactId>
47-
<version>1.2.29</version>
47+
<version>1.2.33</version>
4848
<optional>false</optional>
4949
</dependency>
5050
<dependency>
5151
<groupId>com.oracle.oci.sdk</groupId>
5252
<artifactId>oci-java-sdk-email</artifactId>
53-
<version>1.2.29</version>
53+
<version>1.2.33</version>
5454
<optional>false</optional>
5555
</dependency>
5656
<dependency>
5757
<groupId>com.oracle.oci.sdk</groupId>
5858
<artifactId>oci-java-sdk-filestorage</artifactId>
59-
<version>1.2.29</version>
59+
<version>1.2.33</version>
6060
<optional>false</optional>
6161
</dependency>
6262
<dependency>
6363
<groupId>com.oracle.oci.sdk</groupId>
6464
<artifactId>oci-java-sdk-identity</artifactId>
65-
<version>1.2.29</version>
65+
<version>1.2.33</version>
6666
<optional>false</optional>
6767
</dependency>
6868
<dependency>
6969
<groupId>com.oracle.oci.sdk</groupId>
7070
<artifactId>oci-java-sdk-loadbalancer</artifactId>
71-
<version>1.2.29</version>
71+
<version>1.2.33</version>
7272
<optional>false</optional>
7373
</dependency>
7474
<dependency>
7575
<groupId>com.oracle.oci.sdk</groupId>
7676
<artifactId>oci-java-sdk-objectstorage</artifactId>
77-
<version>1.2.29</version>
77+
<version>1.2.33</version>
7878
<optional>false</optional>
7979
</dependency>
8080
</dependencies>

bmc-common/pom.xml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.oracle.oci.sdk</groupId>
77
<artifactId>oci-java-sdk</artifactId>
8-
<version>1.2.29</version>
8+
<version>1.2.33</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

@@ -84,11 +84,6 @@
8484
<artifactId>nimbus-jose-jwt</artifactId>
8585
<version>4.9</version>
8686
</dependency>
87-
<dependency>
88-
<groupId>com.nimbusds</groupId>
89-
<artifactId>nimbus-jose-jwt</artifactId>
90-
<version>4.9</version>
91-
</dependency>
9287
</dependencies>
9388

9489
</project>

0 commit comments

Comments
 (0)