Skip to content

Commit 14957ff

Browse files
authored
Merge pull request #78 from oracle/release_2021-06-22
Releasing version 1.21.1
2 parents 9ab06a4 + 073783c commit 14957ff

File tree

118 files changed

+2264
-98
lines changed

Some content is hidden

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

118 files changed

+2264
-98
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
33

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

6+
## 1.21.1 - 2021-06-22
7+
### Added
8+
- Support for virtual machine and bare metal pluggable databases in the Database service
9+
610
## 1.21.0 - 2021-06-15
711
### Added
812
- Support for elastic storage on Exadata Infrastructure resources for Cloud at Customer in the Database service

lib/ailanguage/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-ailanguage",
3-
"version": "1.21.0",
3+
"version": "1.21.1",
44
"description": "OCI NodeJS client for Ai Language Service",
55
"repository": {
66
"type": "git",

lib/analytics/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-analytics",
3-
"version": "1.21.0",
3+
"version": "1.21.1",
44
"description": "OCI NodeJS client for Analytics Service",
55
"repository": {
66
"type": "git",

lib/announcementsservice/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-announcementsservice",
3-
"version": "1.21.0",
3+
"version": "1.21.1",
44
"description": "OCI NodeJS client for Announcement Service",
55
"repository": {
66
"type": "git",

lib/apigateway/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-apigateway",
3-
"version": "1.21.0",
3+
"version": "1.21.1",
44
"description": "OCI NodeJS client for API gateway service",
55
"repository": {
66
"type": "git",

lib/apmcontrolplane/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-apmcontrolplane",
3-
"version": "1.21.0",
3+
"version": "1.21.1",
44
"description": "OCI NodeJS client for Apm Control Plane Service",
55
"repository": {
66
"type": "git",

lib/apmsynthetics/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-apmsynthetics",
3-
"version": "1.21.0",
3+
"version": "1.21.1",
44
"description": "OCI NodeJS client for Apm Synthetics Service",
55
"repository": {
66
"type": "git",

lib/apmtraces/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-apmtraces",
3-
"version": "1.21.0",
3+
"version": "1.21.1",
44
"description": "OCI NodeJS client for Apm Traces Service",
55
"repository": {
66
"type": "git",

lib/applicationmigration/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-applicationmigration",
3-
"version": "1.21.0",
3+
"version": "1.21.1",
44
"description": "OCI NodeJS client for Application Migration service",
55
"repository": {
66
"type": "git",

lib/artifacts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-artifacts",
3-
"version": "1.21.0",
3+
"version": "1.21.1",
44
"description": "OCI NodeJS client for Artifacts Service",
55
"repository": {
66
"type": "git",

lib/audit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-audit",
3-
"version": "1.21.0",
3+
"version": "1.21.1",
44
"description": "OCI NodeJS client for Audit Service",
55
"repository": {
66
"type": "git",

lib/autoscaling/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-autoscaling",
3-
"version": "1.21.0",
3+
"version": "1.21.1",
44
"description": "OCI NodeJS client for Autoscaling Service",
55
"repository": {
66
"type": "git",

lib/bastion/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-bastion",
3-
"version": "1.21.0",
3+
"version": "1.21.1",
44
"description": "OCI NodeJS client for Bastion Service",
55
"repository": {
66
"type": "git",

lib/bds/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-bds",
3-
"version": "1.21.0",
3+
"version": "1.21.1",
44
"description": "OCI NodeJS client for BDS Service",
55
"repository": {
66
"type": "git",

lib/blockchain/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-blockchain",
3-
"version": "1.21.0",
3+
"version": "1.21.1",
44
"description": "OCI NodeJS client for Blockchain Service",
55
"repository": {
66
"type": "git",

lib/budget/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-budget",
3-
"version": "1.21.0",
3+
"version": "1.21.1",
44
"description": "OCI NodeJS client for Budget Service",
55
"repository": {
66
"type": "git",

lib/cims/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-cims",
3-
"version": "1.21.0",
3+
"version": "1.21.1",
44
"description": "OCI NodeJS client for Cims ",
55
"repository": {
66
"type": "git",

lib/cloudguard/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-cloudguard",
3-
"version": "1.21.0",
3+
"version": "1.21.1",
44
"description": "OCI NodeJS client for Cloud Guard Service",
55
"repository": {
66
"type": "git",

lib/common/lib/region.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export class Region {
6767
private static hasUsedConfigFile: boolean = false;
6868
private static hasUsedEnvVar: boolean = false;
6969
private static imdsRegionMetadata: RegionMetadataSchema | undefined;
70+
private static hasWarnedAboutValuesWithoutInstanceMetadataService: boolean = false;
7071

7172
private static REGIONS_CONFIG_FILE_PATH: string = "~/.oci/regions-config.json";
7273
private static OCI_REGION_METADATA_ENV_VAR: string = "OCI_REGION_METADATA";
@@ -124,6 +125,39 @@ export class Region {
124125
// OC8
125126
public static AP_CHIYODA_1: Region = Region.register("ap-chiyoda-1", Realm.OC8);
126127

128+
/**
129+
* Return all known Regions in this version of the SDK, except possibly the region returned by IMDS (Instance Metadata
130+
* Service, only available on OCI instances), since IMDS is not automatically contacted by this method.
131+
*
132+
* To ensure that this method also returns the region provided by IMDS, call {@link Region#enableInstanceMetadata()}
133+
* explicitly before calling {@link Region#values()}.
134+
*
135+
*/
136+
public static values(): Region[] {
137+
if (!Region.hasCalledForImds && !Region.hasWarnedAboutValuesWithoutInstanceMetadataService) {
138+
console.log(
139+
"Call to Regions.values() without having contacted IMDS (Instance Metadata Service, only available on OCI instances); if you do need the region from IMDS, call Region.enableInstanceMetadata() before calling Region.values()"
140+
);
141+
Region.hasWarnedAboutValuesWithoutInstanceMetadataService = true;
142+
}
143+
Region.registerAllRegions();
144+
145+
return Array.from(this.KNOWN_REGIONS.values());
146+
}
147+
148+
/**
149+
* Register all regions and sets status
150+
*/
151+
private static registerAllRegions(): void {
152+
if (!Region.hasUsedConfigFile) {
153+
Region.addRegionsFromConfigFile();
154+
}
155+
156+
if (!Region.hasUsedEnvVar) {
157+
Region.addRegionFromEnvVar();
158+
}
159+
}
160+
127161
public static fromRegionId(regionId: string): Region {
128162
/*
129163
* load provided region from already registered regions if it exists

lib/common/lib/request-generator.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,16 @@ import {
1212
} from "./helper";
1313

1414
interface Params {
15-
[key: string]: string | Date | Range | string[] | number | number[] | boolean | undefined;
15+
[key: string]:
16+
| string
17+
| Date
18+
| Range
19+
| string[]
20+
| number
21+
| number[]
22+
| boolean
23+
| boolean[]
24+
| undefined;
1625
}
1726
export type Method =
1827
| "GET"

lib/common/lib/retrier.ts

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,18 @@ class DefaultRetryCondition {
4444
* NOTE : Retries are not supported for requests that have binary or stream bodies
4545
*/
4646
private static RETRYABLE_SERVICE_ERRORS: Map<number, string> = new Map([
47-
[401, "NotAuthenticated"],
48-
[404, "NotAuthorizedOrNotFound"],
4947
[409, "IncorrectState"],
50-
[409, "NotAuthorizedOrResourceAlreadyExists"],
51-
[429, "TooManyRequests"],
52-
[500, "InternalServerError"],
53-
[401, "NotAuthenticated"],
54-
[404, "NotAuthorizedOrNotFound"],
55-
[409, "IncorrectState"],
56-
[409, "NotAuthorizedOrResourceAlreadyExists"],
57-
[429, "TooManyRequests"],
58-
[500, "InternalServerError"]
48+
[429, "TooManyRequests"]
5949
]);
6050

6151
static shouldBeRetried(error: OciError): boolean {
6252
return (
63-
error.statusCode >= 500 ||
53+
error.statusCode === 500 ||
54+
error.statusCode === 502 ||
55+
error.statusCode === 503 ||
56+
error.statusCode === 504 ||
57+
error.statusCode == -1 ||
58+
isNaN(error.statusCode) ||
6459
(DefaultRetryCondition.RETRYABLE_SERVICE_ERRORS.has(error.statusCode) &&
6560
DefaultRetryCondition.RETRYABLE_SERVICE_ERRORS.get(error.statusCode) === error.serviceCode)
6661
);

lib/common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-common",
3-
"version": "1.21.0",
3+
"version": "1.21.1",
44
"description": "OCI Common module for NodeJS",
55
"repository": {
66
"type": "git",

lib/common/tests/region.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,11 @@ describe("Test Region", () => {
7979
);
8080
});
8181
});
82+
83+
it("should return all the regions registered in SDK", function() {
84+
const regionsList = Region.values();
85+
expect(regionsList).to.be.an("array");
86+
expect(regionsList.map(e => e.regionId)).to.include("us-phoenix-1");
87+
expect(regionsList.map(e => e.realm)).to.include(Realm.OC1);
88+
});
8289
});

lib/computeinstanceagent/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-computeinstanceagent",
3-
"version": "1.21.0",
3+
"version": "1.21.1",
44
"description": "OCI NodeJS client for Compute Instance Agent Service",
55
"repository": {
66
"type": "git",

lib/containerengine/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-containerengine",
3-
"version": "1.21.0",
3+
"version": "1.21.1",
44
"description": "OCI NodeJS client for Container Engine",
55
"repository": {
66
"type": "git",

lib/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oci-core",
3-
"version": "1.21.0",
3+
"version": "1.21.1",
44
"description": "OCI NodeJS client for Core",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)