Skip to content

Commit 81a1059

Browse files
author
Joanna Grycz
committed
improvemnt: extend compute_hyperdisk_pool_create
1 parent 2a47751 commit 81a1059

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

compute/disks/createComputeHyperdiskPool.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ async function main() {
4949
const provisionedIops = 10000;
5050
// The throughput in MBps to provision for the storage pool.
5151
const provisionedThroughput = 1024;
52+
// Optional: The performance provisioning type of the storage pool.
53+
// The allowed values are advanced and standard. If not specified, the value advanced is used.
54+
const performanceProvisioningType = 'advanced';
5255

5356
async function callCreateComputeHyperdiskPool() {
5457
// Create a storagePool.
@@ -58,6 +61,7 @@ async function main() {
5861
poolProvisionedIops: provisionedIops,
5962
poolProvisionedThroughput: provisionedThroughput,
6063
storagePoolType,
64+
performanceProvisioningType,
6165
capacityProvisioningType,
6266
zone,
6367
});

compute/test/createComputeHyperdiskFromPool.test.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
'use strict';
1818

1919
const path = require('path');
20-
const {assert} = require('chai');
20+
const {assert, expect} = require('chai');
2121
const {after, before, describe, it} = require('mocha');
2222
const cp = require('child_process');
2323
const {DisksClient, StoragePoolsClient, ZoneOperationsClient} =
@@ -95,7 +95,16 @@ describe('Create compute hyperdisk from pool', async () => {
9595
})
9696
);
9797

98-
assert.equal(response.name, storagePoolName);
98+
expect(response).to.include({
99+
name: storagePoolName,
100+
poolProvisionedCapacityGb: '10240',
101+
poolProvisionedIops: '10000',
102+
poolProvisionedThroughput: '1024',
103+
storagePoolType: `https://www.googleapis.com/compute/v1/projects/${projectId}/zones/${zone}/storagePoolTypes/hyperdisk-balanced`,
104+
performanceProvisioningType: 'ADVANCED',
105+
capacityProvisioningType: 'ADVANCED',
106+
zone: `https://www.googleapis.com/compute/v1/projects/${projectId}/zones/${zone}`,
107+
});
99108
});
100109

101110
it('should create a new hyperdisk from pool', () => {

0 commit comments

Comments
 (0)