Skip to content

Commit

Permalink
Update to 3.1
Browse files Browse the repository at this point in the history
Update to 3.1
  • Loading branch information
rajeevkallur committed Oct 7, 2020
1 parent d2e8665 commit 85be90f
Show file tree
Hide file tree
Showing 144 changed files with 7,473 additions and 1,829 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ script: nosetests
deploy:
# test pypi
- provider: pypi
user: "yergidy"
server: https://pypi.python.org/pypi
user: "rajeevkg"
password:
secure: "xJ7w4zeS2YMrirhTH8PzEc0vRfXHZV6sp26DUNTczJggX+cx79lfui1sG4kQaMJ4GEzhBigBwh8kEkPEcJbwl/1u/tpv1Uoyn1Gmn/rln/0sUm3wPhG4o0w2U6WQKBgs8zdfgNIpIxAjNRQ0Eag80wr1hgWL7cICA7n914oJG1272q6/W+4qiRMDqxskqLUqQaqEdUsfmrGZJeOVu7zd+RJjLdu2A/mVcLtMMGeSjvyJam8ftQGZTtthKeaSqGMWexhFxZiXAJu2NHmTgeoqouzyom5EDcisw/Mng2bHosUgH1zXLgWmP/lRylJNMX874K+H78tTrW28Z01rwGudPxjBKyBxlx2rVlTuxzG6irtdf4h8kZdpSOPpviSpPkNdcRV6EzLGKEoqsSFoZxN4vLjXFp+hq4IWevpRcYdVYMpbx8FZTpRMPQmtYYl69a1QIy+f7KV3OTfQ3ZY5XvtJFDYusyP4Qyd4X0tO2+tiq8a2ZzmQzG6OrJxvFZdX/tx18HnFW+dhCFgHleR2UyiOKM426Xhpzjh4q7Z76yBCElshuBcwLRLyqyY9qSt1sGhWMwhHbnlLUN83U+qzjCS6j6e03KWI0p+GkZ1NTWv7xh68uyoH0iR4Qf17A+pV8KWVlDdq7pBz22l2ec9yXsptst5vhyuekAo7dWda8sd03II="
secure: "o9WW8rsVhjhZNTTvb30ArwnGIbKd1ZQ0KkQkQUIF9cskJxlkVLFQkcE8fCVVMhZ+BTXakHsAQ0nuKq29YB87dk6qf0Gvd3m/AcSjFSSxrtz4BeqA1vy8MmiUIztoJAGfEXaBKp52JnnIUbXuu+xzzOdFxeRul2GfYRT+KDKW/pk="
on:
branch: master
tags: true
Expand Down
102 changes: 102 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
UNZIP=$(shell which unzip)
EXPORT=$(shell which export)
FIND=$(shell which find)
ECHO=$(shell which echo)
RM=$(shell which rm)
PYTHON=$(shell which python)
PYLINT=$(shell which pylint)
NOSE=$(shell which nosetests)
CREATE_CHROOT := /net/blofly.us.rdlabs.hpecorp.net/data/blofly/iss-linux-sdk/chrootbuilder/create_chroot.sh
CHROOT := /net/blofly.us.rdlabs.hpecorp.net/data/blofly/iss-linux-sdk/chrootbuilder/tools/muchroot
BUILD_DIR := $(shell pwd)/.blddir
SOURCEDIR := $(shell pwd)/
ZYPPER := zypper --non-interactive install


all: bdist-rpm bdist-rpm-python3

bdist-rpm:
zypper --non-interactive install rpm-build
$(eval DIR=$(shell pwd))
$(eval ILOREST=$(DIR)/ilorest/src)
$(eval PYTHONPATH=$(ILOREST):$(PYTHONPATH))
mkdir ${MTX_COLLECTION_PATH}/python2/
tar xfz ./packaging/ext/setuptools-2.2.tar.gz
cd ./setuptools-2.2 && \
$(PYTHON) setup.py install
tar xfz ./packaging/ext/PySocks-1.6.8.tar.gz
cd ./PySocks-1.6.8 && \
$(PYTHON) setup.py install
unzip ./packaging/ext/recordtype-1.1.zip
cd ./recordtype-1.1 && \
$(PYTHON) setup.py bdist_rpm --dist-dir ${MTX_COLLECTION_PATH}/python2/
tar xfz ./packaging/ext/pypandoc-1.4.tar.gz
cd ./pypandoc-1.4 $$ \
$(PYTHON) setup.py install
tar xfz ./packaging/ext/jsonpointer-1.10.tar.gz
cd ./jsonpointer-1.10 && \
iconv -f 'UTF-8' -t 'ASCII//TRANSLIT//IGNORE' jsonpointer.py > jp && \
cp -f jp jsonpointer.py
cd ./jsonpointer-1.10 && \
rm jp
cd ./jsonpointer-1.10 && \
$(PYTHON) setup.py bdist_rpm --dist-dir ${MTX_COLLECTION_PATH}/python2/
tar xfz ./packaging/ext/jsonpatch-1.16.tar.gz
cd ./jsonpatch-1.16 && \
iconv -f 'UTF-8' -t 'ASCII//TRANSLIT//IGNORE' jsonpatch.py > jp && \
cp -f jp jsonpatch.py
cd ./jsonpatch-1.16 && \
rm jp
cd ./jsonpatch-1.16 && \
$(PYTHON) setup.py bdist_rpm --dist-dir ${MTX_COLLECTION_PATH}/python2/
tar xfz ./packaging/ext/jsonpath-rw-1.4.0.tar.gz
cd ./jsonpath-rw-1.4.0 && \
$(PYTHON) setup.py bdist_rpm --dist-dir ${MTX_COLLECTION_PATH}/python2/
tar xfz ./packaging/ext/decorator-4.1.2.tar.gz
cd ./decorator-4.1.2 && \
$(PYTHON) setup.py bdist_rpm --dist-dir ${MTX_COLLECTION_PATH}/python2/
tar xfz ./packaging/ext/six-1.10.0.tar.gz
cd ./six-1.10.0 && \
$(PYTHON) setup.py bdist_rpm --dist-dir ${MTX_COLLECTION_PATH}/python2/
tar xfz ./packaging/ext/urllib3-1.23.tar.gz
cd ./urllib3-1.23 && \
$(PYTHON) setup.py bdist_rpm --dist-dir ${MTX_COLLECTION_PATH}/python2/
tar xfz ./packaging/ext/ply-3.10.tar.gz
cd ./ply-3.10 && \
$(PYTHON) setup.py bdist_rpm --dist-dir ${MTX_COLLECTION_PATH}/python2/
$(PYTHON) setup.py bdist_rpm --dist-dir ${MTX_COLLECTION_PATH}/python2/
rm -rf ${MTX_COLLECTION_PATH}/*.src.rpm
rm -rf ${MTX_COLLECTION_PATH}/python2/*.src.rpm


define build-pkg
tar xfz $(BUILD_DIR)/buildpwd/packaging/ext/$1* -C $(BUILD_DIR)/buildpwd/
$(CHROOT) $(BUILD_DIR) bash -c 'cd /buildpwd/$1 && python3 setup.py bdist_rpm --dist-dir /collection/'
rm -r $(BUILD_DIR)/buildpwd/$1
endef

export LC_ALL=en_US.UTF-8
export PYTHONIOENCODING=utf-8
bdist-rpm-python3:
$(CREATE_CHROOT) -d SLES15 -D $(BUILD_DIR)
$(CHROOT) $(BUILD_DIR) $(ZYPPER) python3 python3-setuptools
mkdir -p $(BUILD_DIR)/buildpwd $(BUILD_DIR)/collection/
cp -a $(SOURCEDIR)* $(BUILD_DIR)/buildpwd

$(call build-pkg,recordtype-1.3)
$(call build-pkg,pypandoc-1.4)
$(call build-pkg,jsonpointer-2.0)
$(call build-pkg,jsonpatch-1.23)
$(call build-pkg,jsonpath-rw-1.4.0)
$(call build-pkg,decorator-4.1.2)
$(call build-pkg,urllib3-1.23)
$(call build-pkg,ply-3.10)
$(call build-pkg,pypandoc-1.4)
$(call build-pkg,six-1.10.0)
#cd $(BUILD_DIR)/collection/ && rename "" python3- *.rpm
$(CHROOT) $(BUILD_DIR) bash -c 'cd /buildpwd/ && python3 setup.py bdist_rpm --dist-dir /collection/'
#cd $(BUILD_DIR)/collection/ && rename python- python3- *.rpm
mkdir ${MTX_COLLECTION_PATH}/python3/
mv $(BUILD_DIR)/collection/*.noarch.rpm ${MTX_COLLECTION_PATH}/python3/
rm -rf ${MTX_COLLECTION_PATH}/*.src.rpm
rm -rf ${MTX_COLLECTION_PATH}python3/*.src.rpm
46 changes: 46 additions & 0 deletions MakefileSDK.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
$START_DIR = "$(get-location)"
$product_version = $Env:MTX_PRODUCT_VERSION
if (!"$product_version") {
$product_version = "9.9.9.9"
}

$build_number = $Env:MTX_BUILD_NUMBER
if (!"$build_number") {
$build_number = "999"
}

if( Test-Path $START_DIR\lessmsi ) { Remove-Item $START_DIR\lessmsi -Recurse -Force }
New-Item -ItemType directory -Path .\lessmsi
& 7z x -y -olessmsi .\packaging\lessmsi\lessmsi-v1.3.zip
if ( $LastExitCode ) { exit 1 }

if( Test-Path $START_DIR\python-2.7.10.amd64 ) { Remove-Item $START_DIR\python-2.7.11.amd64 -Recurse -Force }
& $START_DIR\lessmsi\lessmsi x .\packaging\python\python-2.7.11.amd64.msi
if ( $LastExitCode ) { exit 1 }

$Env:PYTHONPATH="$START_DIR\src"
$PYTHON_AMD64 = "${START_DIR}\python-2.7.11.amd64\SourceDir\python.exe"

Set-Location -Path $START_DIR

Function InstallPythonModule($python, $name, $version) {
Set-Location -Path "${START_DIR}"
if( Test-Path .\${name} ) { Remove-Item .\${name} -Recurse -Force }
New-Item -ItemType directory -Path "${START_DIR}\${name}"
& 7z x -y "-o${name}" .\packaging\ext\${name}-${version}.tar.gz
& 7z x -y "-o${name}" "${START_DIR}\${name}\dist\${name}-${version}.tar"
Set-Location -Path "${START_DIR}\${name}\${name}-${version}"
& $python setup.py install
Set-Location -Path "${START_DIR}"
}

InstallPythonModule "$PYTHON_AMD64" "setuptools" "2.2"

Set-Location -Path ${START_DIR}
& $PYTHON_AMD64 setup.py "sdist" "--formats=zip"
Copy-Item ".\dist\*" "$Env:MTX_COLLECTION_PATH"





38 changes: 20 additions & 18 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
python-ilorest-library
======================
.. image:: https://travis-ci.org/HewlettPackard/python-ilorest-library.svg?branch=master
:target: https://travis-ci.org/HewlettPackard/python-ilorest-library
:target: https://travis-ci.org/HewlettPackard/python-ilorest-library
.. image:: https://img.shields.io/pypi/v/python-ilorest-library.svg?maxAge=2592000
:target: https://pypi.python.org/pypi/python-ilorest-library
:target: https://pypi.python.org/pypi/python-ilorest-library
.. image:: https://img.shields.io/github/release/HewlettPackard/python-ilorest-library.svg?maxAge=2592000
:target:
:target:
.. image:: https://img.shields.io/badge/license-Apache%202-blue.svg
:target: https://raw.githubusercontent.com/HewlettPackard/python-ilorest-library/master/LICENSE
:target: https://raw.githubusercontent.com/HewlettPackard/python-ilorest-library/master/LICENSE
.. image:: https://img.shields.io/pypi/pyversions/python-ilorest-library.svg?maxAge=2592000
:target: https://pypi.python.org/pypi/python-ilorest-library
:target: https://pypi.python.org/pypi/python-ilorest-library
.. image:: https://api.codacy.com/project/badge/Grade/1283adc3972d42b4a3ddb9b96660bc07
:target: https://www.codacy.com/app/rexysmydog/python-ilorest-library?utm_source=github.com&utm_medium=referral&utm_content=HewlettPackard/python-ilorest-library&utm_campaign=Badge_Grade
:target: https://www.codacy.com/app/rexysmydog/python-ilorest-library?utm_source=github.com&utm_medium=referral&utm_content=HewlettPackard/python-ilorest-library&utm_campaign=Badge_Grade


.. contents:: :depth: 1

Description
----------
The python-ilorest-library is a python library built for interacting with the Redfish API remotely to any BMC that
The python-ilorest-library is a python library built for interacting with the Redfish API remotely to any BMC that
implements a Redfish API or any HPE system locally. The library also supports HPE's legacy REST API. Go to the library
`documentation <https://hewlettpackard.github.io/python-ilorest-library/>`_ for more details.
`documentation <https://pages.github.hpe.com/intelligent-provisioning/python-redfish-library/>`_ for more details.

HPE RESTful API for iLO is a RESTful application programming interface for the
management of iLO and iLO Chassis Manager based HPE servers. REST
Expand All @@ -28,15 +29,16 @@ consisting of a set of constraints that focuses on a system's resources. iLO
REST library performs the basic HTTP operations GET, POST, PUT, PATCH and
DELETE on resources using the HATEOAS (Hypermedia as the Engine of Application
State) REST architecture. The API allows the clients to manage and interact
with iLO through a fixed URL and several URIs. Go to the API
with iLO through a fixed URL and several URIs. Go to the API
`documentation <https://hewlettpackard.github.io/ilo-rest-api-docs/>`_
for more details.

Installing
----------

.. code-block:: console
pip install python-ilorest-library
pip install python-ilorest-library
Building from zip file source
~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -46,7 +48,7 @@ Building from zip file source
python setup.py sdist --formats=zip (this will produce a .zip file)
cd dist
pip install python-ilorest-library-x.x.x.zip
Including socks support (Version 2.5 or greater)
~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: console
Expand All @@ -69,25 +71,25 @@ No special requirements.
Inband communication
~~~~~~~~~~~~~~~~~~~~~~~~~

To enable support for inband communications, you must download the DLL/SO for your system. By downloading, you agree to the terms and conditions of the `Hewlett Packard Enterprise Software License Agreement`_.
To enable support for inband communications, you must download the DLL/SO for your system. By downloading, you agree to the terms and conditions of the `Hewlett Packard Enterprise Software License Agreement`_.
It must be placed in your working environment path.

Windows Download: ilorest_chif.dll_

Linux Download: ilorest_chif.so_

.. _`Hewlett Packard Enterprise Software License Agreement` : https://www.hpe.com/us/en/software/licensing.html
.. _ilorest_chif.dll: https://downloads.hpe.com/pub/softlib2/software1/pubsw-windows/p1463761240/v167985/ilorest_chif.dll
.. _ilorest_chif.so: https://downloads.hpe.com/pub/softlib2/software1/pubsw-linux/p1093353304/v168967/ilorest_chif.so

Usage
----------
For 3.x and greater versions of the library see the documentation for usage: https://hewlettpackard.github.io/python-ilorest-library/
For 3.x and greater versions of the library see the documentation for usage: https://pages.github.hpe.com/intelligent-provisioning/python-redfish-library/

For 2.x versions of the library documentation is located at the `Wiki <https://github.com/HewlettPackard/python-ilorest-library/wiki>`_.
For 2.x versions of the library documentation is located at the `Wiki <https://github.hpe.com/intelligent-provisioning/python-redfish-library/wiki>`_.

Contributing
------------
----------

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
Expand Down
4 changes: 3 additions & 1 deletion docs/API-Overview.rest
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ today’s enterprise, hyperscale, and cloud infrastructures. Redfish defines the
and the effort to modernize heterogeneous data centers.

HPE ProLiant servers provide iLO RESTful API extensions to Redfish, allowing you to take advantage of the full range of value-added API
features. You can now benefit from adopting the Redfish standard into HPE ProLiant Gen8, Gen9, and Gen10 servers, as well as on other non-HPE server products that implement to the standard.
features. You can now benefit from adopting the Redfish standard into HPE ProLiant Gen8, Gen9, and Gen10 servers, as well as on other non-HPE server products that implement to the standard.

More information on Redfish can be found on the `DMTF Redfish Website <https://www.dmtf.org/standards/redfish>`_.

Expand Down Expand Up @@ -87,3 +87,5 @@ Return codes
+------------------------+---------------------------------+-----------------------------------------------------------+
| 5xx | iLO error with error message returned. |
+------------------------+---------------------------------+-----------------------------------------------------------+


Loading

0 comments on commit 85be90f

Please sign in to comment.