-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(compute): add compute consistency group disks list #9687
base: main
Are you sure you want to change the base?
Conversation
…group_delete samples, created test
Here is the summary of changes. You are about to add 4 region tags.
This comment is generated by snippet-bot.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for submission. Because the comments are the same as in #9682, please address them before resubmitting.
// If your disk has zonal location uncomment these lines | ||
// try (DisksClient disksClient = DisksClient.create()) { | ||
// AddResourcePoliciesDiskRequest request = | ||
// AddResourcePoliciesDiskRequest.newBuilder() | ||
// .setDisk(diskName) | ||
// .setDisksAddResourcePoliciesRequestResource( | ||
// DisksAddResourcePoliciesRequest.newBuilder() | ||
// .addAllResourcePolicies(Arrays.asList(consistencyGroupUrl)) | ||
// .build()) | ||
// .setProject(project) | ||
// .setZone(location) | ||
// .build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this becomes a pattern (see #9682). Please create a stand-alone code sample or remove these comments. They aren't instrumental for using with documentation.
if (response.hasError()) { | ||
return null; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is anti-pattern. replace with throwing exception with error information.
if (response.hasError()) { | ||
return null; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto: replace with throwing exception with error information.
if (response.hasError()) { | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto: replace with throwing exception with error information.
System.out.println( | ||
"Disk consistency group resource policy deleted successfully: " | ||
+ consistencyGroupName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for this in the code sample
//If your disk has zonal location uncomment these lines | ||
//try (DisksClient disksClient = DisksClient.create()) { | ||
// ListDisksRequest request = | ||
// ListDisksRequest.newBuilder() | ||
// .setProject(project) | ||
// .setZone(disksLocation) | ||
// .build(); | ||
// DisksClient.ListPagedResponse response = disksClient.list(request); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete the lines. if required, create a stand alone code sample.
} | ||
|
||
@Test | ||
@Order(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please parallel the tests or replace it with mocked behavior.
Description
Please review this PR after #9646
Fixes #
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
pom.xml
parent set to latestshared-configuration
mvn clean verify
requiredmvn -P lint checkstyle:check
requiredmvn -P lint clean compile pmd:cpd-check spotbugs:check
advisory only