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

check for property access value of READ_WRITE on any platform #99

Merged
merged 3 commits into from
Jan 24, 2017
Merged

check for property access value of READ_WRITE on any platform #99

merged 3 commits into from
Jan 24, 2017

Conversation

waghswapnil
Copy link
Member

Signed-off-by: Swapnil Wagh waghswapnil@gmail.com

Signed-off-by: Swapnil Wagh <waghswapnil@gmail.com>
@@ -751,6 +752,18 @@ def validate_property_value(mo, prop, value):
return False


def validate_property_access(mo, prop, platform=None):
Copy link
Member

Choose a reason for hiding this comment

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

validate_property_access -> is_writable_prop

platform)
if prop_:
access_list.append(prop_.access)
return MoPropertyMeta.READ_WRITE in access_list
Copy link
Member

Choose a reason for hiding this comment

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

the list is not required.. just return True in the loop and false outside of it.

@@ -181,7 +181,7 @@ def __set_prop(self, name, value, mark_dirty=True, forced=False):
return
if not forced:
prop = imccoreutils.get_prop_meta(self, name)
if prop.access != imccoremeta.MoPropertyMeta.READ_WRITE:
if not imccoreutils.validate_property_access(self, name):
Copy link
Member

Choose a reason for hiding this comment

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

name change.. as per above.

Copy link
Member

@vvb vvb left a comment

Choose a reason for hiding this comment

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

Please take care of the comments.

Signed-off-by: Swapnil Wagh <waghswapnil@gmail.com>
Signed-off-by: Swapnil Wagh <waghswapnil@gmail.com>
Copy link
Member

@vvb vvb left a comment

Choose a reason for hiding this comment

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

LGTM

@vvb vvb merged commit a869e26 into CiscoUcs:master Jan 24, 2017
@waghswapnil waghswapnil deleted the prop_access branch January 24, 2017 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants