Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Api600 resources #344

Merged
merged 8 commits into from
Jan 23, 2018
Merged

Api600 resources #344

merged 8 commits into from
Jan 23, 2018

Conversation

soodpr
Copy link
Member

@soodpr soodpr commented Jan 22, 2018

Description

Extending SDK support for REST Api600 for following resources:

  • Enclosure Groups
  • Ethernet Networks
  • Logical Switches
  • Uplink Sets
  • Sas Interconnect types
  • Switch types

Issues Resolved

[List any issues this PR will resolve. e.g., Fixes #1]

Check List

  • New functionality includes testing.
    • All tests pass for Python 2.7+ & 3.4+($ tox).
  • [] New functionality has been documented in the README if applicable.
    • New functionality has been thoroughly documented in the examples (please include helpful comments).
    • New endpoints supported are updated in the endpoints-support.md file.
  • Changes are documented in the CHANGELOG.

# Get Enclosure Group by scope_uris
if oneview_client.api_version == 600:
eg_by_scope_uris = oneview_client.enclosure_groups.get_all(scope_uris="\"'/rest/scopes/cd237b60-09e2-45c4-829e-082e318a6d2a'\"")
if len(eg_by_scope_uris) > 0:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Pythonic way to check for an empty list.
a = []
if not a:
print("Empty")
else:
print("Not empty")

Copy link
Member Author

Choose a reason for hiding this comment

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

As discussed offline, we are using this explicit check for an empty list at many places in our code. May be we can take it as an enhancement later on.

Copy link
Collaborator

@sijeesh sijeesh left a comment

Choose a reason for hiding this comment

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

Looks Good.

@soodpr soodpr merged commit 0b1aa27 into master Jan 23, 2018
@soodpr soodpr deleted the API600_resources branch January 23, 2018 07:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backup - Error in settings.py
2 participants