@@ -248,6 +248,8 @@ class Region(object):
248
248
OC17_EP_BASE = 'https://nosql.{0}.oci.oraclecloud17.com'
249
249
OC19_EP_BASE = 'https://nosql.{0}.oci.oraclecloud.eu'
250
250
OC20_EP_BASE = 'https://nosql.{0}.oci.oraclecloud20.com'
251
+ OC22_EP_BASE = 'https://nosql.{0}.oci.oraclecloud22.com'
252
+ OC24_EP_BASE = 'https://nosql.{0}.oci.oraclecloud24.com'
251
253
252
254
def __init__ (self , region_id ):
253
255
self ._region_id = region_id
@@ -288,6 +290,10 @@ def endpoint(self):
288
290
return str .format (Region .OC19_EP_BASE , self ._region_id )
289
291
if self ._is_oc20_region ():
290
292
return str .format (Region .OC20_EP_BASE , self ._region_id )
293
+ if self ._is_oc22_region ():
294
+ return str .format (Region .OC22_EP_BASE , self ._region_id )
295
+ if self ._is_oc24_region ():
296
+ return str .format (Region .OC24_EP_BASE , self ._region_id )
291
297
raise IllegalArgumentException (
292
298
'Unable to find endpoint for unknown region ' + self ._region_id )
293
299
@@ -354,6 +360,14 @@ def _is_oc20_region(self):
354
360
# Internal use only
355
361
return Regions .OC20_REGIONS .get (self ._region_id ) is not None
356
362
363
+ def _is_oc22_region (self ):
364
+ # Internal use only
365
+ return Regions .OC22_REGIONS .get (self ._region_id ) is not None
366
+
367
+ def _is_oc24_region (self ):
368
+ # Internal use only
369
+ return Regions .OC24_REGIONS .get (self ._region_id ) is not None
370
+
357
371
358
372
class Regions (object ):
359
373
"""
@@ -455,12 +469,14 @@ class Regions(object):
455
469
456
470
US_ASHBURN_1 = Region ('us-ashburn-1' )
457
471
"""Region Location: Ashburn, VA"""
472
+ US_CHICAGO_1 = Region ('us-chicago-1' )
473
+ """Region Location: Chicago, IL """
458
474
US_PHOENIX_1 = Region ('us-phoenix-1' )
459
475
"""Region Location: Phoenix, AZ"""
476
+ US_SALTLAKE_2 = Region ('us-saltlake-2' )
477
+ """Region Location: Salt Lake City, UT """
460
478
US_SANJOSE_1 = Region ('us-sanjose-1' )
461
- """Region Location: Phoenix, AZ """
462
- US_CHICAGO_1 = Region ('us-chicago-1' )
463
- """Region Location: Chicago, IL """
479
+ """Region Location: San Jose, CA, AZ """
464
480
CA_MONTREAL_1 = Region ('ca-montreal-1' )
465
481
"""Region Location: Montreal, Canada"""
466
482
CA_TORONTO_1 = Region ('ca-toronto-1' )
@@ -470,6 +486,8 @@ class Regions(object):
470
486
"""Region Location: Santiago, Chile"""
471
487
SA_SAOPAULO_1 = Region ('sa-saopaulo-1' )
472
488
"""Region Location: Sao Paulo, Brazil"""
489
+ SA_VALPARAISO_1 = Region ('sa-valparaiso-1' )
490
+ """Region Location: Valparaiso, Chile"""
473
491
SA_VINHEDO_1 = Region ('sa-vinhedo-1' )
474
492
"""Region Location: Vinhedo, Brazil"""
475
493
@@ -547,6 +565,14 @@ class Regions(object):
547
565
EU_JOVANOVAC_1 = Region ('eu-jovanovac-1' )
548
566
"""Region Location: Serbia"""
549
567
568
+ # OC22
569
+ EU_DCC_ROME_1 = Region ('eu-dcc-rome-1' )
570
+ """Region Location: Rome, Italy"""
571
+
572
+ # OC24
573
+ EU_DCC_ZURICH_1 = Region ('eu-dcc-zurich-1' )
574
+ """Region Location: Zurich, Switzerland"""
575
+
550
576
# OC1
551
577
OC1_REGIONS = dict ()
552
578
"""A dict containing the OC1 regions."""
@@ -581,14 +607,16 @@ class Regions(object):
581
607
# LAD
582
608
OC1_REGIONS [SA_SANTIAGO_1 .get_region_id ()] = SA_SANTIAGO_1
583
609
OC1_REGIONS [SA_SAOPAULO_1 .get_region_id ()] = SA_SAOPAULO_1
610
+ OC1_REGIONS [SA_VALPARAISO_1 .get_region_id ()] = SA_VALPARAISO_1
584
611
OC1_REGIONS [SA_VINHEDO_1 .get_region_id ()] = SA_VINHEDO_1
585
612
586
613
# North America
587
614
OC1_REGIONS [US_ASHBURN_1 .get_region_id ()] = US_ASHBURN_1
588
615
OC1_REGIONS [CA_MONTREAL_1 .get_region_id ()] = CA_MONTREAL_1
616
+ OC1_REGIONS [US_CHICAGO_1 .get_region_id ()] = US_CHICAGO_1
589
617
OC1_REGIONS [US_PHOENIX_1 .get_region_id ()] = US_PHOENIX_1
590
618
OC1_REGIONS [US_SANJOSE_1 .get_region_id ()] = US_SANJOSE_1
591
- OC1_REGIONS [US_CHICAGO_1 .get_region_id ()] = US_CHICAGO_1
619
+ OC1_REGIONS [US_SALTLAKE_2 .get_region_id ()] = US_SALTLAKE_2
592
620
OC1_REGIONS [CA_TORONTO_1 .get_region_id ()] = CA_TORONTO_1
593
621
OC1_REGIONS [MX_QUERETARO_1 .get_region_id ()] = MX_QUERETARO_1
594
622
OC1_REGIONS [MX_MONTERREY_1 .get_region_id ()] = MX_MONTERREY_1
@@ -666,6 +694,16 @@ class Regions(object):
666
694
"""A dict containing the OC20 regions."""
667
695
OC20_REGIONS [EU_JOVANOVAC_1 .get_region_id ()] = EU_JOVANOVAC_1
668
696
697
+ # OC22
698
+ OC22_REGIONS = dict ()
699
+ """A dict containing the OC22 regions."""
700
+ OC22_REGIONS [EU_DCC_ROME_1 .get_region_id ()] = EU_DCC_ROME_1
701
+
702
+ # OC24
703
+ OC24_REGIONS = dict ()
704
+ """A dict containing the OC22 regions."""
705
+ OC24_REGIONS [EU_DCC_ZURICH_1 .get_region_id ()] = EU_DCC_ZURICH_1
706
+
669
707
@staticmethod
670
708
def get_oc1_regions ():
671
709
# Internal use only
@@ -731,6 +769,16 @@ def get_oc20_regions():
731
769
# Internal use only
732
770
return Regions .OC20_REGIONS .values ()
733
771
772
+ @staticmethod
773
+ def get_oc22_regions ():
774
+ # Internal use only
775
+ return Regions .OC22_REGIONS .values ()
776
+
777
+ @staticmethod
778
+ def get_oc24_regions ():
779
+ # Internal use only
780
+ return Regions .OC24_REGIONS .values ()
781
+
734
782
@staticmethod
735
783
def from_region_id (region_id ):
736
784
"""
@@ -771,6 +819,10 @@ def from_region_id(region_id):
771
819
region = Regions .OC19_REGIONS .get (region_id )
772
820
if region is None :
773
821
region = Regions .OC20_REGIONS .get (region_id )
822
+ if region is None :
823
+ region = Regions .OC22_REGIONS .get (region_id )
824
+ if region is None :
825
+ region = Regions .OC24_REGIONS .get (region_id )
774
826
return region
775
827
776
828
0 commit comments