Skip to content

BigTable: Add admin app profile methods on Instance - #5315

Merged
tseaver merged 11 commits into
googleapis:masterfrom
zakons:feature/add_admin_app_profile_methods_to_instance
May 31, 2018
Merged

tseaver merged 11 commits into
googleapis:masterfrom
zakons:feature/add_admin_app_profile_methods_to_instance

Conversation

@aneepct

@aneepct aneepct commented May 9, 2018

Copy link
Copy Markdown
Contributor

Add methods to the Instance class to manage app profiles:

  1. create_app_profile
  2. get_app_profile
  3. list_app_profiles
  4. update_app_profile
  5. delete_app_profile

@aneepct
aneepct requested a review from lukesneeringer as a code owner May 9, 2018 09:56
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 9, 2018
@tseaver tseaver added the api: bigtable Issues related to the Bigtable API. label May 10, 2018

@sduskis sduskis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aneepct, can you please add a system test? Please test the create and update paths with both "single cluster" and "all clusters" variants.

:type: app_profile_id: str
:param app_profile_id: The unique name for the new app profile.

:type: etag: str

This comment was marked as spam.

creating the app profile.

:type: metadata: [Sequence[Tuple[str, str]]]
:param: metadata: (Optional) Additional metadata that is provided to

This comment was marked as spam.

:param: metadata: (Optional) Additional metadata that is provided to
the method.

:type: routing_policy_type: int

This comment was marked as spam.


def update_app_profile(self, app_profile_id, update_mask, etag='',
description='', ignore_warnings=None, metadata=None,
routing_policy_type=ROUTING_POLICY_TYPE_ANY,

This comment was marked as spam.

:param: ignore_warnings: (Optional) If true, ignore safety checks when
creating the app profile.

:type: metadata: [Sequence[Tuple[str, str]]]

This comment was marked as spam.

@sduskis sduskis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, I have concerns about the way the create / update protobuf objects are created. Can you please add unit tests to make sure that the protobuf requests objects are what you would expect, and also add system tests to make sure that the end-to-end functionality works as expected?

:param: routing_policy_type: There are two routing policies
ROUTING_POLICY_TYPE_ANY = 1 and
ROUTING_POLICY_TYPE_SINGLE = 2.
By default it is ROUTING_POLICY_TYPE_ANY

This comment was marked as spam.

:param: routing_policy_type: There are two routing policies
ROUTING_POLICY_TYPE_ANY = 1 and
ROUTING_POLICY_TYPE_SINGLE = 2.
By default it is ROUTING_POLICY_TYPE_ANY

This comment was marked as spam.


app_profile = instance_pb2.AppProfile(
name=name, description=description,
multi_cluster_routing_use_any=multi_cluster_routing_use_any,

This comment was marked as spam.

Comment thread bigtable/tests/unit/test_instance.py Outdated
# Perform the method and check the result.
app_profile_id = 'appProfileId1262094415'
result = instance.create_app_profile(app_profile_id=app_profile_id,
routing_policy_type=1)

This comment was marked as spam.

This comment was marked as spam.

Comment thread bigtable/tests/unit/test_instance.py Outdated

# Perform the method and check the result.
app_profile_id = 'appProfileId1262094415'
result = instance.create_app_profile(app_profile_id=app_profile_id,

This comment was marked as spam.

This comment was marked as spam.

@tseaver
tseaver merged commit 4f586b6 into googleapis:master May 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigtable Issues related to the Bigtable API. 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