Skip to content

Commit ac3e6f1

Browse files
committed
review feedback
1 parent a097e8a commit ac3e6f1

File tree

1 file changed

+40
-36
lines changed

1 file changed

+40
-36
lines changed

examples/sfs/src/main/java/cloud/stackit/sdk/sfs/examples/SfsExample.java

Lines changed: 40 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static void main(String[] args) throws IOException {
6969
for (PerformanceClass performanceClass :
7070
listPerformanceClassesResponse.getPerformanceClasses()) {
7171
System.out.println("*************************");
72-
System.out.println("* Performance class name: " + performanceClass.getName());
72+
System.out.println("* Performance Class Name: " + performanceClass.getName());
7373
System.out.println("* IOPS: " + performanceClass.getIops());
7474
System.out.println("* Throughput: " + performanceClass.getThroughput());
7575
}
@@ -118,7 +118,7 @@ public static void main(String[] args) throws IOException {
118118

119119
// Check if it's in an error state
120120
if (ERROR_STATE.equals(getResourcePoolResponse.getResourcePool().getState())) {
121-
System.err.println("created resource pool is in error state");
121+
System.err.println("Created resource pool is in error state");
122122
return;
123123
}
124124

@@ -130,7 +130,8 @@ public static void main(String[] args) throws IOException {
130130
/* print details of the created resource pool */
131131
System.out.println("\nResource pool details:");
132132
System.out.println("* ID: " + getResourcePoolResponse.getResourcePool().getId());
133-
System.out.println("* Name: " + getResourcePoolResponse.getResourcePool().getName());
133+
System.out.println(
134+
"* Resource Pool Name: " + getResourcePoolResponse.getResourcePool().getName());
134135
System.out.println(
135136
"* Mount Path: " + getResourcePoolResponse.getResourcePool().getMountPath());
136137
System.out.println(
@@ -160,7 +161,7 @@ public static void main(String[] args) throws IOException {
160161
for (ResourcePool resourcePool : listResourcePools.getResourcePools()) {
161162
System.out.println("*************************");
162163
System.out.println("* ID: " + resourcePool.getId());
163-
System.out.println("* Name: " + resourcePool.getName());
164+
System.out.println("* Resource Pool Name: " + resourcePool.getName());
164165
System.out.println("* Mount Path: " + resourcePool.getMountPath());
165166
System.out.println("* Availability Zone: " + resourcePool.getAvailabilityZone());
166167
Objects.requireNonNull(resourcePool.getPerformanceClass());
@@ -207,7 +208,7 @@ public static void main(String[] args) throws IOException {
207208

208209
// Check if it's in an error state
209210
if (ERROR_STATE.equals(getResourcePoolResponse.getResourcePool().getState())) {
210-
System.err.println("updated resource pool is in error state");
211+
System.err.println("Updated resource pool is in error state");
211212
return;
212213
}
213214

@@ -219,7 +220,8 @@ public static void main(String[] args) throws IOException {
219220
/* print details of the updated resource pool*/
220221
System.out.println("\nUpdated resource pool details:");
221222
System.out.println("* ID: " + getResourcePoolResponse.getResourcePool().getId());
222-
System.out.println("* Name: " + getResourcePoolResponse.getResourcePool().getName());
223+
System.out.println(
224+
"* Resource Pool Name: " + getResourcePoolResponse.getResourcePool().getName());
223225
System.out.println(
224226
"* Mount Path: " + getResourcePoolResponse.getResourcePool().getMountPath());
225227
System.out.println(
@@ -258,7 +260,7 @@ public static void main(String[] args) throws IOException {
258260
.comment("my first snapshot"));
259261
Objects.requireNonNull(createResourcePoolSnapshotResponse.getResourcePoolSnapshot());
260262
System.out.println(
261-
"* Snapshot name: "
263+
"* Snapshot Name: "
262264
+ createResourcePoolSnapshotResponse
263265
.getResourcePoolSnapshot()
264266
.getSnapshotName());
@@ -268,7 +270,7 @@ public static void main(String[] args) throws IOException {
268270
.getResourcePoolSnapshot()
269271
.getComment());
270272
System.out.println(
271-
"* Resource pool ID: "
273+
"* Resource Pool ID: "
272274
+ createResourcePoolSnapshotResponse
273275
.getResourcePoolSnapshot()
274276
.getResourcePoolId());
@@ -281,11 +283,11 @@ public static void main(String[] args) throws IOException {
281283
for (ResourcePoolSnapshot snapshot :
282284
listResourcePoolsSnapshots.getResourcePoolSnapshots()) {
283285
System.out.println("*************************");
284-
System.out.println("* Snapshot name: " + snapshot.getSnapshotName());
286+
System.out.println("* Snapshot Name: " + snapshot.getSnapshotName());
285287
System.out.println("* Comment: " + snapshot.getComment());
286288
System.out.println("* Size (in Gigabytes): " + snapshot.getSizeGigabytes());
287-
System.out.println("* Created at: " + snapshot.getCreatedAt());
288-
System.out.println("* Resource pool ID: " + snapshot.getResourcePoolId());
289+
System.out.println("* Created At: " + snapshot.getCreatedAt());
290+
System.out.println("* Resource Pool ID: " + snapshot.getResourcePoolId());
289291
}
290292

291293
/* delete the created snapshot */
@@ -332,19 +334,20 @@ public static void main(String[] args) throws IOException {
332334
System.out.println("\nCreated new share export policy:");
333335
Objects.requireNonNull(createShareExportPolicyResponse.getShareExportPolicy());
334336
System.out.println(
335-
"* Share export policy ID: "
337+
"* Share Export Policy ID: "
336338
+ createShareExportPolicyResponse.getShareExportPolicy().getId());
337339
System.out.println(
338-
"* Name: " + createShareExportPolicyResponse.getShareExportPolicy().getName());
340+
"* Share Export Policy Name: "
341+
+ createShareExportPolicyResponse.getShareExportPolicy().getName());
339342
System.out.println(
340-
"* Shares using export policy: "
343+
"* Shares using Export Policy: "
341344
+ createShareExportPolicyResponse
342345
.getShareExportPolicy()
343346
.getSharesUsingExportPolicy());
344347
Objects.requireNonNull(
345348
createShareExportPolicyResponse.getShareExportPolicy().getRules());
346349
System.out.println(
347-
"* Rules amount: "
350+
"* Rules Amount: "
348351
+ createShareExportPolicyResponse
349352
.getShareExportPolicy()
350353
.getRules()
@@ -372,19 +375,20 @@ public static void main(String[] args) throws IOException {
372375
System.out.println("\nUpdated the created export policy:");
373376
Objects.requireNonNull(updateShareExportPolicyResponse.getShareExportPolicy());
374377
System.out.println(
375-
"* Share export policy ID: "
378+
"* Share Export Policy ID: "
376379
+ updateShareExportPolicyResponse.getShareExportPolicy().getId());
377380
System.out.println(
378-
"* Name: " + updateShareExportPolicyResponse.getShareExportPolicy().getName());
381+
"* Share Export Policy Name: "
382+
+ updateShareExportPolicyResponse.getShareExportPolicy().getName());
379383
System.out.println(
380-
"* Shares using export policy: "
384+
"* Shares using Export Policy: "
381385
+ updateShareExportPolicyResponse
382386
.getShareExportPolicy()
383387
.getSharesUsingExportPolicy());
384388
Objects.requireNonNull(
385389
updateShareExportPolicyResponse.getShareExportPolicy().getRules());
386390
System.out.println(
387-
"* Rules amount: "
391+
"* Rules Amount: "
388392
+ updateShareExportPolicyResponse
389393
.getShareExportPolicy()
390394
.getRules()
@@ -398,13 +402,13 @@ public static void main(String[] args) throws IOException {
398402
for (ShareExportPolicy shareExportPolicy :
399403
listShareExportPoliciesResponse.getShareExportPolicies()) {
400404
System.out.println("*************************");
401-
System.out.println("Share export policy ID: " + shareExportPolicy.getId());
405+
System.out.println("Share Export Policy ID: " + shareExportPolicy.getId());
402406
System.out.println("* Name: " + shareExportPolicy.getName());
403407
System.out.println(
404-
"* Shares using export policy: "
408+
"* Shares using Export Policy: "
405409
+ shareExportPolicy.getSharesUsingExportPolicy());
406410
Objects.requireNonNull(shareExportPolicy.getRules());
407-
System.out.println("* Rules amount: " + shareExportPolicy.getRules().size());
411+
System.out.println("* Rules Amount: " + shareExportPolicy.getRules().size());
408412
}
409413

410414
/*
@@ -451,7 +455,7 @@ public static void main(String[] args) throws IOException {
451455

452456
// Check if it's in an error state
453457
if (ERROR_STATE.equals(getShareResponse.getShare().getState())) {
454-
System.err.println("created share is in error state");
458+
System.err.println("Created share is in error state");
455459
return;
456460
}
457461

@@ -463,16 +467,16 @@ public static void main(String[] args) throws IOException {
463467
/* print details of the created share */
464468
System.out.println("\nCreated share details:");
465469
System.out.println("* Share ID: " + getShareResponse.getShare().getId());
466-
System.out.println("* Name: " + getShareResponse.getShare().getName());
470+
System.out.println("* Share Name: " + getShareResponse.getShare().getName());
467471
System.out.println("* Mount Path: " + getShareResponse.getShare().getMountPath());
468472
System.out.println(
469-
"* Space hard limit (in Gigabytes): "
473+
"* Space Hard Limit (in Gigabytes): "
470474
+ getShareResponse.getShare().getSpaceHardLimitGigabytes());
471475
Objects.requireNonNull(getShareResponse.getShare().getExportPolicy());
472476
System.out.println(
473-
"* Export policy: " + getShareResponse.getShare().getExportPolicy().getName());
477+
"* Export Policy: " + getShareResponse.getShare().getExportPolicy().getName());
474478
System.out.println("* State: " + getShareResponse.getShare().getState());
475-
System.out.println("* Created at: " + getShareResponse.getShare().getCreatedAt());
479+
System.out.println("* Created At: " + getShareResponse.getShare().getCreatedAt());
476480

477481
/* update the created share */
478482
System.out.println("\nTrigger update of share:");
@@ -510,7 +514,7 @@ public static void main(String[] args) throws IOException {
510514

511515
// Check if it's in an error state
512516
if (ERROR_STATE.equals(getShareResponse.getShare().getState())) {
513-
System.err.println("updated share is in error state");
517+
System.err.println("Updated share is in error state");
514518
return;
515519
}
516520

@@ -520,20 +524,20 @@ public static void main(String[] args) throws IOException {
520524
System.out.println("Update of share finished");
521525

522526
/* print details of the update share */
523-
System.out.println("\nUpdated share:");
527+
System.out.println("\nUpdated Share:");
524528
System.out.println("* Share ID: " + getShareResponse.getShare().getId());
525-
System.out.println("* Name: " + getShareResponse.getShare().getName());
529+
System.out.println("* Share Name: " + getShareResponse.getShare().getName());
526530
System.out.println("* Mount Path: " + getShareResponse.getShare().getMountPath());
527531
System.out.println(
528-
"* Space hard limit (in Gigabytes): "
532+
"* Space Hard Limit (in Gigabytes): "
529533
+ getShareResponse.getShare().getSpaceHardLimitGigabytes());
530534
if (getShareResponse.getShare().getExportPolicy() != null) {
531535
System.out.println(
532-
"* Export policy: "
536+
"* Export Policy: "
533537
+ getShareResponse.getShare().getExportPolicy().getName());
534538
}
535539
System.out.println("* State: " + getShareResponse.getShare().getState());
536-
System.out.println("* Created at: " + getShareResponse.getShare().getCreatedAt());
540+
System.out.println("* Created At: " + getShareResponse.getShare().getCreatedAt());
537541

538542
/* list all shares of the created resource pool */
539543
System.out.println("\nList all shares of the resource pool:");
@@ -543,12 +547,12 @@ public static void main(String[] args) throws IOException {
543547
for (Share share : listSharesResponse.getShares()) {
544548
System.out.println("*************************");
545549
System.out.println("* Share ID: " + share.getId());
546-
System.out.println("* Name: " + share.getName());
550+
System.out.println("* Share Name: " + share.getName());
547551
System.out.println("* Mount Path: " + share.getMountPath());
548552
System.out.println(
549-
"* Space hard limit (in Gigabytes): " + share.getSpaceHardLimitGigabytes());
553+
"* Space Hard Limit (in Gigabytes): " + share.getSpaceHardLimitGigabytes());
550554
if (share.getExportPolicy() != null) {
551-
System.out.println("* Export policy: " + share.getExportPolicy().getName());
555+
System.out.println("* Export Policy: " + share.getExportPolicy().getName());
552556
}
553557
System.out.println("* State: " + share.getState());
554558
System.out.println("* Created at: " + share.getCreatedAt());

0 commit comments

Comments
 (0)