Skip to content
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Extends support of the SDK to OneView REST API version 1600 (OneView v5.20).
- Hypervisor Managers
- Interconnects
- Interconnect Types
- Logical Enclosures
- Logical Interconnects
- Logical Interconnect Groups
- Network set
Expand Down
22 changes: 11 additions & 11 deletions endpoints-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,17 @@
|<sub>/rest/internal-link-sets</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/internal-link-sets/{id}</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| **Logical Enclosures**
|<sub>/rest/logical-enclosures</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/logical-enclosures</sub> | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/logical-enclosures/{id}</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/logical-enclosures/{id}</sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/logical-enclosures/{id}</sub> | PATCH | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/logical-enclosures/{id}</sub> | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/logical-enclosures/{id}/configuration</sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/logical-enclosures/{id}/script</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/logical-enclosures/{id}/script</sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/logical-enclosures/{id}/support-dumps</sub> | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/logical-enclosures/{id}/updateFromGroup</sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/logical-enclosures</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/logical-enclosures</sub> | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/logical-enclosures/{id}</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/logical-enclosures/{id}</sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/logical-enclosures/{id}</sub> | PATCH | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/logical-enclosures/{id}</sub> | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/logical-enclosures/{id}/configuration</sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/logical-enclosures/{id}/script</sub> | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |
|<sub>/rest/logical-enclosures/{id}/script</sub> | PUT | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |
|<sub>/rest/logical-enclosures/{id}/support-dumps</sub> | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/logical-enclosures/{id}/updateFromGroup</sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| **Logical Interconnect Groups**
|<sub>/rest/logical-interconnect-groups</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub>/rest/logical-interconnect-groups</sub> | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
Expand Down
15 changes: 8 additions & 7 deletions examples/logical_enclosures.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
###
# (C) Copyright [2019] Hewlett Packard Enterprise Development LP
# (C) Copyright [2020] Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -107,6 +107,7 @@
(logical_enclosure.data['uri'], logical_enclosure.data['name']))

print("Reset name")
resource = logical_enclosure.data.copy()
resource["name"] = previous_name
logical_enclosure.update(resource)
print(" Done. uri: '%s', 'name': '%s'" %
Expand All @@ -119,12 +120,12 @@
print(" Done.")

# Update and get script
print("Update script")
script = "# TEST COMMAND"
logical_enclosure_updated = logical_enclosure.update_script(
logical_enclosure.data['uri'], script)
print(" updated script: '{}'".format(
logical_enclosure.get_script()))
# This method is available for API version 300
if oneview_client.api_version == 300:
print("Update script")
script = "# TEST COMMAND"
logical_enclosure_updated = logical_enclosure.update_script(logical_enclosure.data['uri'], script)
print(" updated script: '{}'".format(logical_enclosure.get_script()))

# Create support dumps
print("Generate support dump")
Expand Down