Yufei 98ec299fa6 Avoid TypeError after _replace when user post a str url
function geturl will rasie a TypeError if we specify a str url and
replace the scheme value with a unicode value. In order to work with
both string redfish url and unicode redfish url, we need to convert
the "https" to the scheme's type.

This bug canbe reproduced with:

from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from builtins import object

import json
from urllib.parse import urlparse, urljoin, urlunparse

url=urlparse(unicode("http://127.0.0.1"))
url._replace(scheme="https").geturl()
url=urlparse(str("http://127.0.0.1"))
url._replace(scheme="https").geturl()

Change-Id: I1aa0f173a7b843c2bdf3eba8425ff794778b74da
2017-01-16 10:05:23 +08:00
2016-04-30 01:02:52 +02:00
2016-04-06 18:32:22 +02:00
2016-04-30 02:11:22 +02:00
2016-04-06 18:32:22 +02:00
2016-04-05 17:51:23 +02:00
2015-03-23 12:05:45 -05:00
2016-04-30 01:02:52 +02:00
2016-04-07 15:26:35 +02:00
2016-04-30 01:02:52 +02:00
2015-12-02 20:54:51 +01:00
2016-04-07 15:26:35 +02:00
2016-04-04 19:35:03 +02:00
2016-03-04 12:02:13 +01:00
2016-03-07 21:25:40 +01:00
2016-04-05 17:51:23 +02:00

The python-redfish project

This repository will be used to house the python-redfish library, a reference implementation to enable Python developers to communicate with the Redfish API (http://www.dmtf.org/standards/redfish).

NOTE:

STATUS: Work in progress, ready for proof of concept.

The current Redfish specification revision is 1.0.0 - Note that the mockup
is still at version 0.99.0a and may not reflect what the standard provides
fully

Documentation

The full documentation is available at http://pythonhosted.org/python-redfish/installation.html

Project Structure

This project follows the same convention as OpenStack projects, eg. using pbr for build and test automation:

doc/            # Documentation
doc/source      # The doc source files live here
doc/build/html  # Output of building any docs will go here
dmtf            # Reference documents and mockup provided by the DMTF
examples/       # Any sample code using this library, eg. for education
                # should be put here
pbconf          # Project builder file to build rpm/deb packages for
                # distributions
redfish/        # The redfish library itself
redfish/tests/  # python-redfish unit test suite
redfish-client  # Client tool to manage redfish devices

Requirements

To use the enclosed examples, you will need Python 2.7 or Python 3.4 (https://www.python.org/downloads/). Note that Python 2.7.9 enforces greater SSL verification requiring server certificates be installed. Parameters to relax the requirements are available in the library, but these configurations are discouraged due to security.

Python requirements are listed in requirements.txt; additional requirements for running the unit test suite are listed in test-requirements.txt.

Note: Running tests requires Docker engine.

Note: The program was tested with Python 2.7.10 and 3.4.2 however it might work as well with all Python 3 releases.

Get the source code

The source code is available on github and can be retrieved using:

git clone https://github.com/bcornec/python-redfish

As python-redfish is currently in heavy development we recommend to checkout the devel branch using:

cd python-redfish
git checkout devel

Installation

Please refer to the following link.

http://pythonhosted.org/python-redfish/installation.html

Contacts

Distribution list: python-redfish@mondorescue.org

Further References

Please look at dmtf/README.rst file.

Description
Python library and client for Redfish support
Readme 18 MiB
Languages
HTML 88.1%
Python 9%
ApacheConf 1.8%
Shell 0.6%
RPM Spec 0.3%