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

Fixes for Issue_81 #82

Merged
merged 3 commits into from
Aug 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 5.4.0(Unreleased)
#### Notes
Extends support of the SDK to OneView REST API version 1800 (OneView v5.30).

#### Bug fixes & Enhancements
- [#81](https://github.com/HewlettPackard/oneview-python/issues/81) EthernetNetworks Update does not work.

# 5.3.0
#### Notes
Extends support of the SDK to OneView REST API version 1800 (OneView v5.30).
Expand Down
11 changes: 6 additions & 5 deletions examples/ethernet_networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

from config_loader import try_load_from_file
from hpOneView.oneview_client import OneViewClient
from copy import deepcopy

# To run this example fill the ip and the credentials below or use a configuration file
config = {
Expand Down Expand Up @@ -114,16 +115,16 @@

# Create bulk ethernet networks
print("\nCreate bulk ethernet networks")
ethernet_nets_bulk = ethernet_networks.create_bulk(options_bulk_delete)
ethernet_nets_bulk = ethernet_networks.create_bulk(options_bulk)
pprint(ethernet_nets_bulk)

# Update purpose recently created network
print("\nUpdate the purpose attribute from the recently created network")
ethernet_data = ethernet_network.data
ethernet_data['purpose'] = 'Management'
ethernet_network = ethernet_network.update(ethernet_data)
ethernet_data_copy = deepcopy(ethernet_network.data)
ethernet_data_copy['purpose'] = 'Management'
ethernet_network_update = ethernet_network.update(ethernet_data_copy)
print("Updated ethernet-network '{name}' successfully.\n uri = '{uri}'\n with attribute ['purpose': {purpose}]"
.format(**ethernet_network.data))
.format(**ethernet_network_update.data))

# Get URIs of associated profiles
print("\nGet associated profiles uri(s)")
Expand Down