Skip to content
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

WIP: Instance admin client #3497

Closed

Conversation

spollapally
Copy link

For model review. Needs documentation, unit tests and cleanup.

@spollapally spollapally requested a review from pongad as a code owner July 24, 2018 03:58
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 24, 2018
@igorbernstein2 igorbernstein2 changed the title Instance admin client WIP: Instance admin client Jul 24, 2018
}

if (listInstancesResponse.getFailedLocationsList().size() > 0) {
throw new FailedLocationException("Failed to list all locations", succeededLocations,

This comment was marked as spam.

import com.google.protobuf.FieldMask;

@BetaApi
public final class InstanceAdminRequests {

This comment was marked as spam.

.getPermissionsList();
}

/** compose proto request helpers * */

This comment was marked as spam.

return appProfiles;
}

/** Can be removed after https://github.com/googleapis/gax-java/issues/552 is handled */

This comment was marked as spam.

return new CreateInstance(projectName, instance, cluster);
}

public static Instance convertToInstance(com.google.bigtable.admin.v2.Instance protoInstance) {

This comment was marked as spam.

protoUpdateProfile.setMultiClusterRoutingUseAny(
com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.newBuilder().build());
protoUpdateProfile.clearSingleClusterRouting();
replacefields.add(MULTI_CLUSTER_FIELDMASK);

This comment was marked as spam.

public static class UpdateAppProfile {
private static final String DESCRIPTION_FIELDMASK = "description";
private static final String MULTI_CLUSTER_FIELDMASK = "multi_cluster_routing_use_any";
private static final String SINGLE_CLUSTER__FIELDMASK = "single_cluster_routing";

This comment was marked as spam.

RoutingPolicyCase name();
}

public static class RoutingPolicyNotSet implements RoutingPolicy {

This comment was marked as spam.

}

public RoutingPolicy getRoutingPolicy() {
if (RoutingPolicyCase.MULTI_CLUSTER_ROUTING_USE_ANY

This comment was marked as spam.

public static final class Policy {
private com.google.iam.v1.Policy.Builder protoPolicy = com.google.iam.v1.Policy.newBuilder();

public static Policy of(int version, Role role, List<String> members) {

This comment was marked as spam.

@igorbernstein2
Copy link

@kevinsi4508 can you take a look as well?

@kevinsi4508
Copy link

I am going to take a look at high level.

@kevinsi4508
Copy link

A few concerns:

  • Handling partial error.
  • It is not all consist on what need to passed to these API calls and the location of the request validation logic.
  • Handling responses in InstanceAdminRequests.

@igorbernstein2
Copy link

@spollapally thanks for all of your work. I've broken up this PR into:
#3569 #3612 #3619
(plus an upcoming PR for iam)

So I'm going to close this now

@spollapally
Copy link
Author

spollapally commented Sep 5, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants