-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Conversation
@@ -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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
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.
LGTM
data = { | ||
'name': self.name, | ||
'labels': self.labels, | ||
'parent': self.parent |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
'parent': { | ||
'type': 'organization', | ||
'id': '433637338579' | ||
} |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@waprin Don't merge until CI is green |
* Add Parent Field to Resource Manager
* Add Parent Field to Resource Manager
Fixes #2940 by including parent field in the update.