Skip to content

Commit 43f90cc

Browse files
authored
added new OCI regions (RKT, SHJ, RUH, EBB, EBL)
1 parent a0536c8 commit 43f90cc

File tree

3 files changed

+85
-0
lines changed

3 files changed

+85
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
All notable changes to this project will be documented in this file.
33
The format is based on [Keep a Changelog](http://keepachangelog.com/).
44

5+
## Unreleased
6+
7+
### Added
8+
- Cloud only: added new OCI regions (RKT, SHJ, RUH, EBB, EBL)
9+
510
## [5.4.15] 2024-06-05
611

712
### Added

driver/src/main/java/oracle/nosql/driver/Region.java

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,13 @@ public class Region {
6161
private static final Map<String, Region> OC20_REGIONS = new HashMap<>();
6262
private static final Map<String, Region> OC21_REGIONS = new HashMap<>();
6363
private static final Map<String, Region> OC22_REGIONS = new HashMap<>();
64+
private static final Map<String, Region> OC23_REGIONS = new HashMap<>();
6465
private static final Map<String, Region> OC24_REGIONS = new HashMap<>();
6566
private static final Map<String, Region> OC25_REGIONS = new HashMap<>();
6667
private static final Map<String, Region> OC26_REGIONS = new HashMap<>();
6768
private static final Map<String, Region> OC27_REGIONS = new HashMap<>();
6869
private static final Map<String, Region> OC28_REGIONS = new HashMap<>();
70+
private static final Map<String, Region> OC29_REGIONS = new HashMap<>();
6971
private static final Map<String, Region> OC31_REGIONS = new HashMap<>();
7072

7173
/* OC1 */
@@ -118,6 +120,8 @@ public class Region {
118120
public static final Region ME_ABUDHABI_1 = new Region("me-abudhabi-1");
119121
/** DXB */
120122
public static final Region ME_DUBAI_1 = new Region("me-dubai-1");
123+
/** RUH */
124+
public static final Region ME_RIYADH_1 = new Region("me-riyadh-1");
121125
/** JED */
122126
public static final Region ME_JEDDAH_1 = new Region("me-jeddah-1");
123127

@@ -242,6 +246,12 @@ public class Region {
242246
/** NAP */
243247
public static final Region EU_DCC_ROME_1 = new Region("eu-dcc-rome-1");
244248

249+
/* OC23 */
250+
/** EBB */
251+
public static final Region US_SOMERSET_1 = new Region("us-somerset-1");
252+
/** EBL */
253+
public static final Region US_THAMES_1 = new Region("us-thames-1");
254+
245255
/* OC24 */
246256
/** AVZ */
247257
public static final Region EU_DCC_ZURICH_1 = new Region("eu-dcc-zurich-1");
@@ -264,6 +274,12 @@ public class Region {
264274
/** DRS */
265275
public static final Region US_DCC_SWJORDAN_2 = new Region("us-dcc-swjordan-2");
266276

277+
/* OC29 */
278+
/** RKT */
279+
public static final Region ME_ABUDHABI_2 = new Region("me-abudhabi-2");
280+
/** SHJ */
281+
public static final Region ME_ABUDHABI_4 = new Region("me-abudhabi-4");
282+
267283
/* OC31 */
268284
/** IZQ */
269285
public static final Region AP_HOBSONVILLE_1 = new Region("ap-hobsonville-1");
@@ -301,6 +317,7 @@ public class Region {
301317
OC1_REGIONS.put(ME_ABUDHABI_1.getRegionId(), ME_ABUDHABI_1);
302318
OC1_REGIONS.put(ME_DUBAI_1.getRegionId(), ME_DUBAI_1);
303319
OC1_REGIONS.put(ME_JEDDAH_1.getRegionId(), ME_JEDDAH_1);
320+
OC1_REGIONS.put(ME_RIYADH_1.getRegionId(), ME_RIYADH_1);
304321

305322
OC1_REGIONS.put(MX_QUERETARO_1.getRegionId(), MX_QUERETARO_1);
306323
OC1_REGIONS.put(MX_MONTERREY_1.getRegionId(), MX_MONTERREY_1);
@@ -382,6 +399,10 @@ public class Region {
382399
/* OC22 */
383400
OC22_REGIONS.put(EU_DCC_ROME_1.getRegionId(), EU_DCC_ROME_1);
384401

402+
/* OC23 */
403+
OC23_REGIONS.put(US_SOMERSET_1.getRegionId(), US_SOMERSET_1);
404+
OC23_REGIONS.put(US_THAMES_1.getRegionId(), US_THAMES_1);
405+
385406
/* OC24 */
386407
OC24_REGIONS.put(EU_DCC_ZURICH_1.getRegionId(), EU_DCC_ZURICH_1);
387408

@@ -398,6 +419,10 @@ public class Region {
398419
/* OC28 */
399420
OC28_REGIONS.put(US_DCC_SWJORDAN_2.getRegionId(), US_DCC_SWJORDAN_2);
400421

422+
/* OC29 */
423+
OC29_REGIONS.put(ME_ABUDHABI_2.getRegionId(), ME_ABUDHABI_2);
424+
OC29_REGIONS.put(ME_ABUDHABI_4.getRegionId(), ME_ABUDHABI_4);
425+
401426
/* OC31 */
402427
OC31_REGIONS.put(AP_HOBSONVILLE_1.getRegionId(), AP_HOBSONVILLE_1);
403428
}
@@ -432,6 +457,8 @@ public class Region {
432457
"https://nosql.{0}.oci.oraclecloud21.com");
433458
private final static MessageFormat OC22_EP_BASE = new MessageFormat(
434459
"https://nosql.{0}.oci.psn-pco.it");
460+
private final static MessageFormat OC23_EP_BASE = new MessageFormat(
461+
"https://nosql.{0}.oci.oraclecloud23.com");
435462
private final static MessageFormat OC24_EP_BASE = new MessageFormat(
436463
"https://nosql.{0}.oci.oraclecloud24.com");
437464
private final static MessageFormat OC25_EP_BASE = new MessageFormat(
@@ -442,6 +469,8 @@ public class Region {
442469
"https://nosql.{0}.oci.oraclecloud27.com");
443470
private final static MessageFormat OC28_EP_BASE = new MessageFormat(
444471
"https://nosql.{0}.oci.oraclecloud28.com");
472+
private final static MessageFormat OC29_EP_BASE = new MessageFormat(
473+
"https://nosql.{0}.oci.oraclecloud29.com");
445474
private final static MessageFormat OC31_EP_BASE = new MessageFormat(
446475
"https://nosql.{0}.oci.sovereigncloud.nz");
447476

@@ -501,6 +530,9 @@ public String endpoint() {
501530
if (isOC22Region(regionId)) {
502531
return OC22_EP_BASE.format(new Object[] { regionId });
503532
}
533+
if (isOC23Region(regionId)) {
534+
return OC23_EP_BASE.format(new Object[] { regionId });
535+
}
504536
if (isOC24Region(regionId)) {
505537
return OC24_EP_BASE.format(new Object[] { regionId });
506538
}
@@ -516,6 +548,9 @@ public String endpoint() {
516548
if (isOC28Region(regionId)) {
517549
return OC28_EP_BASE.format(new Object[] { regionId });
518550
}
551+
if (isOC29Region(regionId)) {
552+
return OC29_EP_BASE.format(new Object[] { regionId });
553+
}
519554
if (isOC31Region(regionId)) {
520555
return OC31_EP_BASE.format(new Object[] { regionId });
521556
}
@@ -579,6 +614,9 @@ public static Region fromRegionId(String regionId) {
579614
if (region == null) {
580615
region = OC22_REGIONS.get(regionId);
581616
}
617+
if (region == null) {
618+
region = OC23_REGIONS.get(regionId);
619+
}
582620
if (region == null) {
583621
region = OC24_REGIONS.get(regionId);
584622
}
@@ -594,6 +632,9 @@ public static Region fromRegionId(String regionId) {
594632
if (region == null) {
595633
region = OC28_REGIONS.get(regionId);
596634
}
635+
if (region == null) {
636+
region = OC29_REGIONS.get(regionId);
637+
}
597638
if (region == null) {
598639
region = OC31_REGIONS.get(regionId);
599640
}
@@ -760,6 +801,16 @@ public static boolean isOC22Region(String regionId) {
760801
return (OC22_REGIONS.get(regionId) != null);
761802
}
762803

804+
/**
805+
* @hidden
806+
* Internal use only
807+
* @param regionId the region id
808+
* @return the value
809+
*/
810+
public static boolean isOC23Region(String regionId) {
811+
return (OC23_REGIONS.get(regionId) != null);
812+
}
813+
763814
/**
764815
* @hidden
765816
* Internal use only
@@ -810,6 +861,16 @@ public static boolean isOC28Region(String regionId) {
810861
return (OC28_REGIONS.get(regionId) != null);
811862
}
812863

864+
/**
865+
* @hidden
866+
* Internal use only
867+
* @param regionId the region id
868+
* @return the value
869+
*/
870+
public static boolean isOC29Region(String regionId) {
871+
return (OC29_REGIONS.get(regionId) != null);
872+
}
873+
813874
/**
814875
* @hidden
815876
* Internal use only

driver/src/main/java/oracle/nosql/driver/iam/Utils.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ class Utils {
128128
"https://auth.{0}.oraclecloud21.com");
129129
private final static MessageFormat OC22_EP_BASE = new MessageFormat(
130130
"https://auth.{0}.psn-pco.it");
131+
private final static MessageFormat OC23_EP_BASE = new MessageFormat(
132+
"https://auth.{0}.oraclecloud23.com");
131133
private final static MessageFormat OC24_EP_BASE = new MessageFormat(
132134
"https://auth.{0}.oraclecloud24.com");
133135
private final static MessageFormat OC25_EP_BASE = new MessageFormat(
@@ -138,6 +140,8 @@ class Utils {
138140
"https://auth.{0}.oraclecloud27.com");
139141
private final static MessageFormat OC28_EP_BASE = new MessageFormat(
140142
"https://auth.{0}.oraclecloud28.com");
143+
private final static MessageFormat OC29_EP_BASE = new MessageFormat(
144+
"https://auth.{0}.oraclecloud29.com");
141145
private final static MessageFormat OC31_EP_BASE = new MessageFormat(
142146
"https://auth.{0}.sovereigncloud.nz");
143147

@@ -171,6 +175,7 @@ class Utils {
171175
IAM_URI.put("auh", OC1_EP_BASE.format(new Object[] {"me-abudhabi-1"}));
172176
IAM_URI.put("dxb", OC1_EP_BASE.format(new Object[] {"me-dubai-1"}));
173177
IAM_URI.put("jed", OC1_EP_BASE.format(new Object[] {"me-jeddah-1"}));
178+
IAM_URI.put("ruh", OC1_EP_BASE.format(new Object[] {"me-riyadh-1"}));
174179

175180
IAM_URI.put("qro", OC1_EP_BASE.format(new Object[] {"mx-queretaro-1"}));
176181
IAM_URI.put("mty", OC1_EP_BASE.format(new Object[] {"mx-monterrey-1"}));
@@ -250,6 +255,10 @@ class Utils {
250255
/* OC22 */
251256
IAM_URI.put("nap", OC22_EP_BASE.format(new Object[] {"eu-dcc-rome-1"}));
252257

258+
/* OC23 */
259+
IAM_URI.put("ebb", OC23_EP_BASE.format(new Object[] {"us-somerset-1"}));
260+
IAM_URI.put("ebl", OC23_EP_BASE.format(new Object[] {"us-thames-1"}));
261+
253262
/* OC24 */
254263
IAM_URI.put("avz", OC24_EP_BASE.format(new Object[] {"eu-dcc-zurich-1"}));
255264

@@ -266,6 +275,10 @@ class Utils {
266275
/* OC28 */
267276
IAM_URI.put("drs", OC28_EP_BASE.format(new Object[] {"us-dcc-swjordan-2"}));
268277

278+
/* OC29 */
279+
IAM_URI.put("rkt", OC29_EP_BASE.format(new Object[] {"me-abudhabi-2"}));
280+
IAM_URI.put("shj", OC29_EP_BASE.format(new Object[] {"me-abudhabi-4"}));
281+
269282
/* OC31 */
270283
IAM_URI.put("izq", OC31_EP_BASE.format(new Object[] {"ap-hobsonville-1"}));
271284
}
@@ -318,6 +331,9 @@ static String getIAMURL(String regionIdOrCode) {
318331
if (Region.isOC22Region(regionIdOrCode)) {
319332
return OC22_EP_BASE.format(new Object[] {regionIdOrCode});
320333
}
334+
if (Region.isOC23Region(regionIdOrCode)) {
335+
return OC23_EP_BASE.format(new Object[] {regionIdOrCode});
336+
}
321337
if (Region.isOC24Region(regionIdOrCode)) {
322338
return OC24_EP_BASE.format(new Object[] {regionIdOrCode});
323339
}
@@ -333,6 +349,9 @@ static String getIAMURL(String regionIdOrCode) {
333349
if (Region.isOC28Region(regionIdOrCode)) {
334350
return OC28_EP_BASE.format(new Object[] {regionIdOrCode});
335351
}
352+
if (Region.isOC29Region(regionIdOrCode)) {
353+
return OC29_EP_BASE.format(new Object[] {regionIdOrCode});
354+
}
336355
if (Region.isOC31Region(regionIdOrCode)) {
337356
return OC31_EP_BASE.format(new Object[] {regionIdOrCode});
338357
}

0 commit comments

Comments
 (0)