-
Notifications
You must be signed in to change notification settings - Fork 27
updated resource label #138
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
Conversation
examples/labels.py
Outdated
|
|
||
| config = { | ||
| "ip": "172.16.102.59", | ||
| "ip": "10.1.20.1", |
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.
can you give dummy credentials rather than our dcs credentials?
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.
done
hpeOneView/oneview_client.py
Outdated
| Labels: | ||
| """ | ||
| if not self.__labels: | ||
| '''if not self.__labels: |
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.
you can remove these commented lines (977 to 979)
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.
done
| """ | ||
| return self._client.get(id_or_uri=id_or_uri) | ||
| uri = self.URI + self.RESOURCES_PATH | ||
| resource_data = self._helper.create(resource, uri=uri, timeout=timeout) |
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.
instead of using the create method in resource_helper class, you can try using it from resource class itself as mentioned below. And you can remove below 2 lines.
return super(Labels, self).create(data, uri=uri, timeout=timeout)
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.
done
| """ | ||
| uri = self.URI + self.RESOURCES_PATH + '/' + resource_uri | ||
| return self._client.get(id_or_uri=uri) | ||
| return self.get_by_uri(uri) |
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.
we usually use super class as below.
return super(Labels, self).get_by_uri(uri)
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.
done
Description
updated resource label
Issues Resolved
[List any issues this PR will resolve. e.g., Fixes #1]
Check List
$ tox).