Skip to content

Commit

Permalink
Merge pull request #105 from HewlettPackard/Release_5-5-0
Browse files Browse the repository at this point in the history
release PR 5.5.0
  • Loading branch information
VenkateshRavula authored Nov 4, 2020
2 parents 72e6f0f + 6e116cf commit 386eff2
Show file tree
Hide file tree
Showing 12 changed files with 393 additions and 361 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ jobs:
- name: Login to Docker Hub
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Build the tagged Docker image
run: docker build . --file Dockerfile --tag hewlettpackardenterprise/hpe-oneview-sdk-for-python:${{ env.RELEASE_VERSION }}-OV5.4
run: docker build . --file Dockerfile --tag hewlettpackardenterprise/hpe-oneview-sdk-for-python:${{ env.RELEASE_VERSION }}-OV5.5
- name: Push the tagged Docker image
run: docker push hewlettpackardenterprise/hpe-oneview-sdk-for-python:${{ env.RELEASE_VERSION }}-OV5.4
run: docker push hewlettpackardenterprise/hpe-oneview-sdk-for-python:${{ env.RELEASE_VERSION }}-OV5.5
38 changes: 36 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,44 @@
# 5.5.0(Unreleased)
# 5.5.0
#### Notes
Extends support of the SDK to OneView REST API version 2200 (OneView v5.50).
Extends support of the SDK to OneView REST API version 2200 (OneView v5.50) and ImageStreamer REST API version 2000 (I3S v5.40).

#### Bug fixes & Enhancements
- [#103] (https://github.com/HewlettPackard/oneview-python/issues/103) enclosure_groups.create() Does not take valid data and returns JSON error.

#### Features supported with the current release
- Appliance SNMPv1 Trap Destinations
- Artifact Bundles
- Certificates Server
- Connection Templates
- Deployment plan
- Enclosures
- Enclosure Groups
- Ethernet Network
- FC Network
- FCoE Network
- Firmware Drivers
- Hypervisor Cluster Profiles
- Hypervisor Managers
- Interconnect Types
- Interconnects
- Logical Enclosures
- Logical Interconnect Groups
- Logical Interconnects
- Network Sets
- Restores
- Scopes
- Server Hardware
- Server Hardware Types
- Server Profile Templates
- Server Profiles
- Storage Pools
- Storage Systems
- Storage Templates
- Storage Volume Attachments
- Storage Volumes
- Tasks
- Uplink Sets

# 5.4.0
#### Notes
Extends support of the SDK to OneView REST API version 2000 (OneView v5.40).
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## Build Status

| 5.40 Branch | 5.30 Branch | 5.20 Branch | 5.00 Branch |
| ------------- |:-------------:| -------------:| -------------:|
| 5.50 Branch | 5.40 Branch | 5.30 Branch | 5.20 Branch | 5.00 Branch |
| ------------- |:-------------:| -------------:| -------------:| -------------:|
| ![Build status](https://ci.appveyor.com/api/projects/status/u84505l6syp70013?svg=true)| ![Build status](https://ci.appveyor.com/api/projects/status/u84505l6syp70013?svg=true)| ![Build status](https://ci.appveyor.com/api/projects/status/u84505l6syp70013?svg=true)| ![Build status](https://ci.appveyor.com/api/projects/status/u84505l6syp70013?svg=true)


Expand All @@ -22,7 +22,7 @@ Latest version of the OneView Python [SDK Documentation](https://hewlettpackard.

## What's New

HPE OneView Python library extends support of the SDK to OneView REST API version 2000 (OneView v5.40)
HPE OneView Python library extends support of the SDK to OneView REST API version 2200 (OneView v5.50)

Please refer to [notes](https://github.com/HewlettPackard/oneview-python/blob/master/CHANGELOG.md) for more information on the changes , features supported and issues fixed in this version

Expand Down Expand Up @@ -73,10 +73,10 @@ HPE OneView SDK for Python can be installed from Source,Pypi and Docker containe
The Docker Store image tag consist of two sections: <sdk_version-OV_version>

Download and store a local copy of hpe-oneview-sdk-for-python and use it as a Docker image. <br />
$ docker pull hewlettpackardenterprise/hpe-oneview-sdk-for-python:v5.2.0-OV5.2
$ docker pull hewlettpackardenterprise/hpe-oneview-sdk-for-python:v5.5.0-OV5.5

Run docker commands and this will in turn create sh session where you can create files, issue commands and execute the tests <br />
$ docker run -it hewlettpackardenterprise/hpe-oneview-sdk-for-python:v5.2.0-OV5.2 /bin/sh
$ docker run -it hewlettpackardenterprise/hpe-oneview-sdk-for-python:v5.5.0-OV5.5 /bin/sh

## Configuration

Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@
# built documents.
#
# The short X.Y version.
version = u'5.4.0'
version = u'5.5.0'
# The full version, including alpha/beta/rc tags.
release = u'5.4.0'
release = u'5.5.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
590 changes: 295 additions & 295 deletions endpoints-support.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions examples/certificates_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
print("\nSuccessfully deleted server certificate")

# Create server certificate for automation
options['certificateDetails'][0]['base64Data'] = ca_certificate
options['certificateDetails'][0]['type'] = remote_server_cert.data['certificateDetails'][0]['type']
server_certificate = certificate_server.create(data=options)
print("\nAdded a server certificate with aliasName: {}.\n uri = {}".format(
server_certificate.data['certificateDetails'][0]['aliasName'], server_certificate.data['uri']))
43 changes: 19 additions & 24 deletions examples/enclosure_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,19 @@
else:
print("No Enclosure Group found.")

# Get by name
enclosure_group = enclosure_groups.get_by_name(eg_options["name"])
if not enclosure_group:
# Create a Enclosure Group
print("Create a Enclosure Group")
if oneview_client.api_version <= 500:
options = {"stackingMode": "Enclosure"}
options.update(eg_options)
enclosure_group = enclosure_groups.create(options)
else:
enclosure_group = enclosure_groups.create(eg_options)
print("Created enclosure group of name - '{}' with uri - '{}'".format(enclosure_group.data['name'], enclosure_group.data['uri']))

# Get all, with default
print("Get all Enclosure Groups")
egs = enclosure_groups.get_all()
Expand All @@ -99,27 +112,6 @@
eg_byuri = enclosure_groups.get_by_uri(egs[0]["uri"])
pprint(eg_byuri.data)

# Get by name


def createEnclosureGroup():
enclosure_group = enclosure_groups.get_by_name(eg_options["name"])
if not enclosure_group:
# Create a Enclosure Group
print("Create a Enclosure Group")
if oneview_client.api_version <= 500:
options = {"stackingMode": "Enclosure"}
options.update(eg_options)
enclosure_group = enclosure_groups.create(options)
else:
enclosure_group = enclosure_groups.create(eg_options)
print("Created enclosure group of name - '{}' with uri - '{}'".format(enclosure_group.data['name'], enclosure_group.data['uri']))
return enclosure_group


enclosure_group = createEnclosureGroup()


# Update an Enclosure Group
resource = {"name": "Renamed EG"}
print("Renaming the enclosure Group")
Expand All @@ -146,7 +138,10 @@ def createEnclosureGroup():
print("Successfully deleted Enclosure Group")
scope.delete()

# Create EG for automation
createEnclosureGroup()
# Create EG & EG-2 for automation
enclosure_group = enclosure_groups.create(eg_options)
print("Created enclosure group of name - '{}' with uri - '{}'".format(enclosure_group.data['name'], enclosure_group.data['uri']))

eg_options['name'] = "EG-2"
createEnclosureGroup()
enclosure_group = enclosure_groups.create(eg_options)
print("Created enclosure group of name - '{}' with uri - '{}'".format(enclosure_group.data['name'], enclosure_group.data['uri']))
24 changes: 12 additions & 12 deletions examples/ethernet_networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,6 @@
ethernet_networks = oneview_client.ethernet_networks
scopes = oneview_client.scopes

# Get all, with defaults
print("\nGet all ethernet-networks")
ethernet_nets = ethernet_networks.get_all()
for net in ethernet_nets:
print(" '{name}' at uri: '{uri}'".format(**net))

# Get by Uri
print("\nGet an ethernet-network by uri")
ethernet_network_uri = ethernet_nets[0]['uri']
ethernet_nets_by_uri = ethernet_networks.get_by_uri(ethernet_network_uri)
pprint(ethernet_nets_by_uri.data)

# Filter by name
print("\nGet all ethernet-networks filtering by name")
ethernet_nets_filtered = ethernet_networks.get_all(
Expand Down Expand Up @@ -115,6 +103,18 @@
bulkNetworkUris.append(eth['uri'])
pprint(ethernet_nets_bulk)

# Get all, with defaults
print("\nGet all ethernet-networks")
ethernet_nets = ethernet_networks.get_all()
for net in ethernet_nets:
print(" '{name}' at uri: '{uri}'".format(**net))

# Get by Uri
print("\nGet an ethernet-network by uri")
ethernet_network_uri = ethernet_nets[0]['uri']
ethernet_nets_by_uri = ethernet_networks.get_by_uri(ethernet_network_uri)
pprint(ethernet_nets_by_uri.data)

# Update purpose recently created network
print("\nUpdate the purpose attribute from the recently created network")
ethernet_data_copy = deepcopy(ethernet_network.data)
Expand Down
3 changes: 2 additions & 1 deletion examples/logical_enclosures.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,15 @@
# Get enclosure group uri for creating logical enclosure
enclosure_group = enclosure_groups.get_by_name(options['enclosureGroupUri'])
options["enclosureGroupUri"] = enclosure_group.data["uri"]
enclosure_count = enclosure_group["enclosureCount"]
enclosure_count = enclosure_group.data["enclosureCount"]

# Get enclosures
enclosures_all = enclosures.get_all()
enclosure_uris = []
for i in range(0, enclosure_count):
enclosure_uris.append(enclosures_all[i]["uri"])
options["enclosureUris"] = sorted(enclosure_uris)
print(options)

# Create a logical enclosure
# This method is only available on HPE Synergy.
Expand Down
30 changes: 15 additions & 15 deletions examples/logical_interconnect_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
fc_fabric = "FC_fabric_nw" # Fabric attach FC network
scope_name = "test_scope"
interconnect_type_name1 = "Virtual Connect SE 40Gb F8 Module for Synergy"
interconnect_type_name2 = "Synergy 10Gb Interconnect Link Module"
interconnect_type_name2 = "Synergy 20Gb Interconnect Link Module"

# Get the interconnect type by name and using the uri in the values for the fields
# "permittedInterconnectTypeUri" and create a Logical Interconnect Group.
Expand Down Expand Up @@ -366,11 +366,19 @@
"redundancyType": "HighlyAvailable"
}

# Get logical interconnect group by name
lig = logical_interconnect_groups.get_by_name(options["name"])
if not lig:
# Create a logical interconnect group
print("Create a logical interconnect group")
lig = logical_interconnect_groups.create(options)
print("Created logical interconnect group with name - '{}' and uri - '{}'".format(lig.data['name'], lig.data['uri']))

# Get all, with defaults
print("Get all Logical Interconnect Groups")
ligs = logical_interconnect_groups.get_all()
for lig in ligs:
print(" - {}".format(lig['name']))
for lig_each in ligs:
print(" - {}".format(lig_each['name']))

# Get by uri
print("Get a Logical Interconnect Group by uri")
Expand All @@ -381,12 +389,12 @@
print("Get the first Logical Interconnect Groups, sorting by name descending, filtering by name")
ligs = logical_interconnect_groups.get_all(
0, 10, sort='name:descending', filter="\"'name'='OneView Test Logical Interconnect Group'\"")
for lig in ligs:
print(" - {}".format(lig['name']))
for lig_each in ligs:
print(" - {}".format(lig_each['name']))

# Get Logical Interconnect Group by property
lig = logical_interconnect_groups.get_by('name', 'LIG')[0]
print("Found lig by name: '%s'.\n uri = '%s'" % (lig['name'], lig['uri']))
lig_prop = logical_interconnect_groups.get_by('name', 'LIG')[0]
print("Found lig by name: '%s'.\n uri = '%s'" % (lig_prop['name'], lig_prop['uri']))

# Get Logical Interconnect Group by scope_uris
if oneview_client.api_version >= 600:
Expand All @@ -398,14 +406,6 @@
else:
print("No Logical Interconnect Group found.")

# Get logical interconnect group by name
lig = logical_interconnect_groups.get_by_name(options["name"])
if not lig:
# Create a logical interconnect group
print("Create a logical interconnect group")
lig = logical_interconnect_groups.create(options)
print("Created logical interconnect group with name - '{}' and uri - '{}'".format(lig.data['name'], lig.data['uri']))

# Update a logical interconnect group
print("Update a logical interconnect group")
lig_to_update = lig.data.copy()
Expand Down
2 changes: 1 addition & 1 deletion hpeOneView/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
standard_library.install_aliases()

__title__ = 'hpeOneView'
__version__ = '5.4.0'
__version__ = '5.5.0'
__copyright__ = '(C) Copyright (2012-2020) Hewlett Packard Enterprise Development LP'
__license__ = 'Apache'

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
from setuptools import setup

setup(name='hpeOneView',
version='5.4.0',
version='5.5.0',
description='HPE OneView Python Library',
url='https://github.com/HewlettPackard/oneview-python',
download_url="https://github.com/HewlettPackard/oneview-python/tarball/v5.4.0",
download_url="https://github.com/HewlettPackard/oneview-python/tarball/v5.5.0",
author='Hewlett Packard Enterprise Development LP',
author_email='[email protected]',
license='Apache',
Expand Down

0 comments on commit 386eff2

Please sign in to comment.