Skip to content

Commit 692ccfb

Browse files
authored
Merge pull request #17 from oracle/release_2020-08-04
Releasing version 1.4.0
2 parents 5e6113e + 326ef2b commit 692ccfb

File tree

2,474 files changed

+19532
-9258
lines changed

Some content is hidden

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

2,474 files changed

+19532
-9258
lines changed

CHANGELOG.md

+14
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@ 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.4.0 - 2020-08-04
7+
### Added
8+
- Support for calling Oracle Cloud Infrastructure services in the uk-gov-cardiff-1 region
9+
- Support for creating and managing private endpoints in the Data Flow service
10+
- Support for changing instance shapes and restarting nodes in the Big Data service
11+
- Support for additional versions (for example CSQL) in the Big Data service
12+
- Support for creating stacks from compartments in the Resource Manager service
13+
- Support for retry mechanism
14+
15+
16+
### Breaking
17+
- Updated the property of `LifeCycleDetails` to `LifecycleDetails` from the model of `BlockchainPlatformSummary` and `BlockchainPlatformByHostname` in the blockchain service
18+
- Change all enums to pascal case.
19+
620
## 1.3.0 - 2020-07-28
721
### Added
822
- Support for calling Oracle Cloud Infrastructure services in the us-sanjose-1 region

examples/javascript/containerengine-cluster.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ async function createVcn(client, compartmentId) {
153153
const getVcnRequest = { vcnId: response.vcn.id };
154154
const getVcnResponse = await VirtualNetworkWaiter.forVcn(
155155
getVcnRequest,
156-
core.models.Vcn.LifecycleState.AVAILABLE
156+
core.models.Vcn.LifecycleState.Available
157157
);
158158
return getVcnResponse.vcn;
159159
}
@@ -228,7 +228,7 @@ async function waitForWorkRequestFinished(client, workRequestId) {
228228
async function isWorkRequestInSuccessState(workRequestResponse) {
229229
let inSuccessState = false;
230230
const workRequestStatus = workRequestResponse.workRequest.status;
231-
if (workRequestStatus === oke.models.WorkRequestStatus.SUCCEEDED) {
231+
if (workRequestStatus === oke.models.WorkRequestStatus.Succeeded) {
232232
inSuccessState = true;
233233
}
234234
return inSuccessState;
@@ -284,7 +284,7 @@ async function deleteSubnet(client, subnet) {
284284
// // Wait for some time for subnet lifecycle staus changed to terminated.
285285
// await VirtualNetworkWaiter.forSubnet(
286286
// getSubnetRequest,
287-
// core.models.Subnet.LifecycleState.TERMINATED
287+
// core.models.Subnet.LifecycleState.Terminated
288288
// );
289289
}
290290

@@ -293,7 +293,7 @@ async function deleteVcn(client, vcn) {
293293
await client.deleteVcn(request);
294294
const getVcnRequest = { vcnId: vcn.id };
295295
// Wait for some time for VCN lifecycle staus changed to terminated.
296-
// await VirtualNetworkWaiter.forVcn(getVcnRequest, core.models.Vcn.LifecycleState.TERMINATED);
296+
// await VirtualNetworkWaiter.forVcn(getVcnRequest, core.models.Vcn.LifecycleState.Terminated);
297297
}
298298

299299
const run = main();

examples/javascript/custom-retry.js

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/**
2+
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
3+
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4+
5+
@param args Arguments to provide to the example. The following arguments are expected:
6+
* <ul>
7+
* <li>The first argument is the OCID of the tenancy.</li>
8+
* <li>The second argument is the OCID of the compartment.</li>
9+
* <li>The third argument is region.</li>
10+
* </ul>
11+
*/
12+
13+
const identity = require("oci-identity");
14+
const common = require("oci-common");
15+
16+
const configurationFilePath = "~/.oci/config";
17+
const configProfile = "DEFAULT";
18+
19+
const provider = new common.ConfigFileAuthenticationDetailsProvider(
20+
configurationFilePath,
21+
configProfile
22+
);
23+
const args = process.argv.slice(2);
24+
console.log(args);
25+
if (args.length !== 3) {
26+
console.error(
27+
"Unexpected number of arguments received. Consult the script header comments for expected arguments"
28+
);
29+
process.exit(-1);
30+
}
31+
32+
const tenancyId = args[0];
33+
const compartmentId = args[1];
34+
const region = args[2];
35+
36+
let subnetId = null;
37+
let vcnId = null;
38+
let instanceId = null;
39+
40+
const identityClient = new identity.IdentityClient({
41+
authenticationDetailsProvider: provider
42+
});
43+
identityClient.regionId = region;
44+
45+
async function getAvailabilityDomain() {
46+
const request = {
47+
compartmentId: tenancyId
48+
};
49+
50+
identityClient.clientConfiguration = {
51+
retryConfiguration: {
52+
terminationStrategy: new common.MaxTimeTerminationStrategy(200),
53+
delayStrategy: new common.ExponentialBackoffDelayStrategy(30),
54+
retryCondition: response => {
55+
return response.status === 409;
56+
}
57+
}
58+
};
59+
request.retryConfiguration = {
60+
terminationStrategy: new common.MaxAttemptsTerminationStrategy(5),
61+
delayStrategy: new common.ExponentialBackoffDelayStrategy(80),
62+
retryCondition: response => {
63+
return response.status === 405;
64+
}
65+
};
66+
const response = await identityClient.listAvailabilityDomains(request);
67+
return response.items[0];
68+
}
69+
70+
(async () => {
71+
try {
72+
const availabilityDomain = await getAvailabilityDomain();
73+
console.log("Availability Domain :" + availabilityDomain.name);
74+
} catch (error) {
75+
console.log("Error executing example" + error);
76+
}
77+
})();

examples/javascript/database.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ async function deleteSubnet() {
8585

8686
await virtualNetworkWaiter.forSubnet(
8787
getSubnetRequest,
88-
core.models.Subnet.LifecycleState.TERMINATED
88+
core.models.Subnet.LifecycleState.Terminated
8989
);
9090

9191
subnetId = null;
@@ -108,7 +108,7 @@ async function deleteVcn() {
108108
vcnId: vcnId
109109
};
110110

111-
await virtualNetworkWaiter.forVcn(getVcnRequest, core.models.Vcn.LifecycleState.TERMINATED);
111+
await virtualNetworkWaiter.forVcn(getVcnRequest, core.models.Vcn.LifecycleState.Terminated);
112112

113113
vcnId = null;
114114
}
@@ -132,7 +132,7 @@ async function terminateDbSystem() {
132132

133133
await databaseWaiter.forDbSystem(
134134
getDbSystemRequest,
135-
database.models.DbSystem.LifecycleState.TERMINATED
135+
database.models.DbSystem.LifecycleState.Terminated
136136
);
137137

138138
dbSystemId = null;
@@ -165,7 +165,7 @@ async function terminateDbSystem() {
165165

166166
const getVcnResponse = await virtualNetworkWaiter.forVcn(
167167
getVcnRequest,
168-
core.models.Vcn.LifecycleState.AVAILABLE
168+
core.models.Vcn.LifecycleState.Available
169169
);
170170

171171
vcnId = getVcnResponse.vcn.id;
@@ -188,7 +188,7 @@ async function terminateDbSystem() {
188188

189189
const getSubnetResponse = await virtualNetworkWaiter.forSubnet(
190190
getSubnetRequest,
191-
core.models.Subnet.LifecycleState.AVAILABLE
191+
core.models.Subnet.LifecycleState.Available
192192
);
193193

194194
subnetId = getSubnetResponse.subnet.id;
@@ -205,7 +205,7 @@ async function terminateDbSystem() {
205205
},
206206
compartmentId: compartmentId,
207207
cpuCoreCount: 4,
208-
databaseEdition: database.models.LaunchDbSystemDetails.DatabaseEdition.ENTERPRISEEDITION,
208+
databaseEdition: database.models.LaunchDbSystemDetails.DatabaseEdition.EnterpriseEdition,
209209
displayName: "typescript database",
210210
hostname: "typescript-sdk-example-db-host",
211211
shape: "BM.DenseIO1.36",
@@ -228,7 +228,7 @@ async function terminateDbSystem() {
228228

229229
const getDbSystemResponse = await databaseWaiter.forDbSystem(
230230
getDbSystemRequest,
231-
database.models.DbSystem.LifecycleState.AVAILABLE
231+
database.models.DbSystem.LifecycleState.Available
232232
);
233233
dbSystemId = getDbSystemResponse.dbSystem.id;
234234
} catch (error) {

examples/javascript/filestorage.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ async function createVcn(client, compartmentId) {
205205
const getVcnRequest = { vcnId: response.vcn.id };
206206
const getVcnResponse = await vcnWaiter.forVcn(
207207
getVcnRequest,
208-
core.models.Vcn.LifecycleState.AVAILABLE
208+
core.models.Vcn.LifecycleState.Available
209209
);
210210
return getVcnResponse.vcn;
211211
}
@@ -234,7 +234,7 @@ async function createSubnet(client, compartmentId, availabilityDomain, vcnId) {
234234
const getSubnetRequest = { subnetId: response.subnet.id };
235235
const getSubnetResponse = await vcnWaiter.forSubnet(
236236
getSubnetRequest,
237-
core.models.Subnet.LifecycleState.AVAILABLE
237+
core.models.Subnet.LifecycleState.Available
238238
);
239239
return getSubnetResponse.subnet;
240240
}
@@ -275,7 +275,7 @@ async function createFileSystem(client, compartmentId, fileSystemDisplayName, ad
275275
};
276276
const getFileSystemResponse = await filestorageWaiter.forFileSystem(
277277
getFsSyetemRequest,
278-
fs.models.FileSystem.LifecycleState.ACTIVE
278+
fs.models.FileSystem.LifecycleState.Active
279279
);
280280
/*
281281
* If we try and send through the same request with the same retry token then this will not create a
@@ -350,7 +350,7 @@ async function createMountTarget(
350350
};
351351
const getMountTargetResponse = await filestorageWaiter.forMountTarget(
352352
getMtTargetRequest,
353-
fs.models.MountTarget.LifecycleState.ACTIVE
353+
fs.models.MountTarget.LifecycleState.Active
354354
);
355355

356356
/*
@@ -445,7 +445,7 @@ async function createExport(client, fileSystemId, exportSetId) {
445445
const getExportRequest = { exportId: response.export.id };
446446
const getExportResponse = await filestorageWaiter.forExport(
447447
getExportRequest,
448-
fs.models.Export.LifecycleState.ACTIVE
448+
fs.models.Export.LifecycleState.Active
449449
);
450450
/*
451451
* If we try and send through the same request with the same retry token then this will not create a
@@ -551,7 +551,7 @@ async function createSnapshot(client, fileSystem) {
551551

552552
const getSnapShotResponse = await filestorageWaiter.forSnapshot(
553553
getSnapShotRequest,
554-
fs.models.Snapshot.LifecycleState.ACTIVE
554+
fs.models.Snapshot.LifecycleState.Active
555555
);
556556

557557
/*
@@ -587,7 +587,7 @@ async function deleteSnapshot(client, snapshot) {
587587
const getSnapshotRequest = { snapshotId: snapshot.id };
588588
await filestorageWaiter.forSnapshot(
589589
getSnapshotRequest,
590-
fs.models.Snapshot.LifecycleState.DELETED
590+
fs.models.Snapshot.LifecycleState.Deleted
591591
);
592592
}
593593

@@ -602,7 +602,7 @@ async function deleteExport(client, exportModel) {
602602
await client.deleteExport(request);
603603
// Waiting for export to be deleted
604604
const getExportRequest = { exportId: exportModel.id };
605-
await filestorageWaiter.forExport(getExportRequest, fs.models.Export.LifecycleState.DELETED);
605+
await filestorageWaiter.forExport(getExportRequest, fs.models.Export.LifecycleState.Deleted);
606606
}
607607

608608
/**
@@ -623,7 +623,7 @@ async function deleteMountTarget(client, mountTarget) {
623623
};
624624
await filestorageWaiter.forMountTarget(
625625
getMountTargetRequest,
626-
fs.models.MountTarget.LifecycleState.DELETED
626+
fs.models.MountTarget.LifecycleState.Deleted
627627
);
628628
}
629629

@@ -640,7 +640,7 @@ async function deleteFileSystem(client, fileSystem) {
640640
const getFileSystemRequest = { fileSystemId: fileSystem.id };
641641
await filestorageWaiter.forFileSystem(
642642
getFileSystemRequest,
643-
fs.models.FileSystem.LifecycleState.DELETED
643+
fs.models.FileSystem.LifecycleState.Deleted
644644
);
645645
}
646646

@@ -688,7 +688,7 @@ async function deleteVcn(client, vcn) {
688688
// wait for VCN to be deleted
689689
// NOTE: Not needed because VCN gets delete already. When getting the Request, it won't be found.
690690
// const getVcnRequest = { vcnId: vcn.id };
691-
// await vcnWaiter.forVcn(getVcnRequest, core.models.Vcn.LifecycleState.TERMINATED);
691+
// await vcnWaiter.forVcn(getVcnRequest, core.models.Vcn.LifecycleState.Terminated);
692692
}
693693

694694
/**

0 commit comments

Comments
 (0)