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

Add Parent Field to Resource Manager #2941

Merged
merged 5 commits into from
Jan 18, 2017
Merged

Conversation

waprin
Copy link
Contributor

@waprin waprin commented Jan 18, 2017

Fixes #2940 by including parent field in the update.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 18, 2017
@@ -57,18 +59,22 @@ def test_from_api_repr(self):
PROJECT_NUMBER = 12345678
PROJECT_LABELS = {'env': 'prod'}
PROJECT_LIFECYCLE_STATE = 'ACTIVE'
PARENT = {'type': 'organization', 'id': 433637338579}

This comment was marked as spam.

This comment was marked as spam.

@daspecster daspecster added the api: cloudresourcemanager Issues related to the Resource Manager API. label Jan 18, 2017
@@ -202,7 +205,16 @@ def update(self, client=None):
"""
client = self._require_client(client)

data = {'name': self.name, 'labels': self.labels}
data = {}

This comment was marked as spam.

This comment was marked as spam.

Copy link
Contributor

@dhermes dhermes left a comment

Choose a reason for hiding this comment

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

LGTM

data = {
'name': self.name,
'labels': self.labels,
'parent': self.parent

This comment was marked as spam.

This comment was marked as spam.

@@ -85,6 +86,8 @@ def set_properties_from_api_repr(self, resource):
self.number = resource['projectNumber']
self.labels = resource.get('labels', {})
self.status = resource['lifecycleState']
if 'parent' in resource:
self.parent = resource['parent']

This comment was marked as spam.

This comment was marked as spam.

@@ -291,6 +321,10 @@ def test_undelete_with_reload_data(self):
'name': 'Project Name',
'labels': {'env': 'prod'},
'lifecycleState': 'DELETE_REQUESTED',
'parent': {
'type': 'organization',
'id': '433637338579'

This comment was marked as spam.

This comment was marked as spam.

'parent': {
'type': 'organization',
'id': '433637338579'
}

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Jan 18, 2017

@waprin Don't merge until CI is green

@waprin waprin merged commit e9b503a into googleapis:master Jan 18, 2017
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
* Add Parent Field to Resource Manager
parthea pushed a commit that referenced this pull request Jun 4, 2023
* Add Parent Field to Resource Manager
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: cloudresourcemanager Issues related to the Resource Manager API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants