272 Commits

Author SHA1 Message Date
Uggla
48703963c9 Cleanup setup.cfg
Change-Id: I93390373eeb1c6c26341254eecb368b5d6099445
2017-04-20 21:47:53 +02:00
Uggla
089af268a7 Add draft completion script
- This is a sample file for completion

Change-Id: I3a61f4987107c6138767339aefef60ef30e0fd72
2017-03-22 22:10:35 +01:00
Jenkins
3f55e6a430 Merge "Fix a link in doc and update develsetup" 2017-03-17 10:30:02 +00:00
Madhuri Kumari
ed4e544e6d Fix a link in doc and update develsetup
This patch updates the `develsetup.rst` link in testing.rst which
is throwing 404 with the current link. And also updated the
develsetup document to link to the dmtf/README.rst for detailed
setup steps.

Change-Id: I3d27b0e06d7a236c9491333b580fcad665d56728
2017-03-17 09:08:43 +00:00
Jenkins
e75247c38a Merge "Fix pep8 issues" 2017-03-11 15:44:53 +00:00
Bruno Cornec
cebacc30ac Announce of 0.4.1 on ML
Change-Id: Iec7f412daaa1327e6af12199c7aea5f24de89551
2017-03-09 00:47:00 +00:00
Uggla
6840cc878f Add a new mechanism to create a container running simulator 1.1.0
- Move previous simulator files into mockup_0.99.0a directory.
- Cleanup, adapt mockup_0.99.0a files.
- Add mockup_1.1.0 directory to host the new simulator files.

Note :
- First redfish-client tests against this new mockup work well.
- Of course, this is a first commit so it could be refined.

Change-Id: I88ac480e5b303922be5ec37e1a14a91f68d0bd92
2017-03-08 01:50:50 +00:00
Bruno Cornec
7b9851df6a Delivery of python-redfish 0.4.1
Change-Id: I35bab7735096aa3726b52060a835a39932ef50c6
0.4.1
2017-03-08 02:31:05 +01:00
Bruno Cornec
c824220d3d version 0.4 announce
- Announce of python-redfish 0.4 on MLs
- Update pbcl log file for version 0.4

Change-Id: Ife96225415e73666831ef562d58396a659f6c655
2017-03-08 01:42:47 +01:00
Bruno Cornec
7305242d99 Fix pep8 issues
Change-Id: I59905717b7892b7718b4d7bcb0985a1ac82b087f
2017-03-07 20:04:13 +01:00
Bruno Cornec
ea995f722a Closes-Bug: #1670722
Do not assume that only one script is delivered.
Replace by a loop

Change-Id: I389d202e61f47761dff88f12e6a63ef4687b513f
2017-03-07 19:22:06 +01:00
Madhuri Kumari
7331f6e267 Trivial: Fix a spelling mistake in exception.py
Change-Id: If901add01f156923b1a27eb24267b63700d81b39
2017-03-07 07:45:24 +00:00
yufei
dc9e0b74ee Recover the lost fix
The change on commit I319376f818b532a1511248a9f17ecd0a41540e88 is
reverse by Id13e94d75f85fec7d98f1fa005c37836c244e08a recently

Change-Id: Ibf8cd587bbbc2d01614e677721f5d80fce06e1fa
2017-03-03 08:46:42 +00:00
Jenkins
0361a69cb7 Merge "Fix for Oem data" 0.4 2017-02-24 16:14:55 +00:00
Uggla
a77d9ba0e4 Fix for Oem data
- Set Oem data to none to avoid client exceptions.

Change-Id: I24274e86bfe7f49e41ff57e17deabb526d5106a0
2017-02-24 11:13:38 +01:00
Jenkins
e50d29c334 Merge "Fix wrong path for templates" 2017-02-24 00:08:15 +00:00
Uggla
470d8036b5 Fix wrong path for templates
Change-Id: Ic08d36ae1a5138ecca46e1beb42a1fcb6a5571a8
2017-02-23 13:29:54 +01:00
Uggla
edf25cb299 Re enable redfish-client tests
- Check if local docker is available, if not skip the tests.
  So this should allow gerrit tests to pass.
- Stick to docker-py 1.x, because 2.0 has lot of naming changes.
- Use Fedora 25 instead of 23.
- Use Ubuntu 16.04 instead of 14.04.
- Use pip --pre parameter. Allowing to test dev release (pre).
- Rename Dockerfiles to get more consistency using a new naming
  convention.
- Naming convention that I hope will make Bruno happy ! ;)

Change-Id: I3cbd51f201c4805ba58ebcabb023237624d4dfc8
2017-02-23 10:25:13 +01:00
Bruno Cornec
9d6ec64daf Improve package build
- Packages can now be built with Docker containers and project-builder.org for
  Mageia 5, Fedora 25, OpenSUSE 42.2 & CentOS 7
- Fix a bug in conf file path management in setup.py
- A script pbconf/mkctn is also availble to ease package building
- Status is documented in pbconf/README.rst
- Update install script to have a variable for doc installation path which is
  different between Mageia/Fedora and OpenSUSE

Change-Id: Id34e885c5cba7b650adf1638147ffb089ad3c7c3
2017-02-21 00:53:08 +01:00
Bruno Cornec
b40437d19c Fix wrong delivery for usage files
- usage files are now placed under /usr/share (PBSHAREPATH variable) and not
  /usr/bin with the binary.
- PBTEMPLATEPATH replaced by PBSHAREPATH/templates

Change-Id: I757c679bf03e4e93028e019086ad665e2d43b35b
2017-02-15 18:52:07 +01:00
Jenkins
b242bb8294 Merge "Fix RPM build" 2017-02-14 08:47:21 +00:00
Jenkins
20b0e98716 Merge "Adapt contributions descritptions" 2017-02-13 13:34:07 +00:00
Bruno Cornec
b0196258ff Fix RPM build
- Create a new python-redfish-data package in order to share common content
  between python2 and python3 packages
- Fix python3 package by renaming binaries to allow joint installation of
  python2 and python3 packages
- Adds encapsulation of tests
- Fix doc package build

Change-Id: I3579663e77dd55b7162a3d1346bf6cd00f73c0a5
2017-02-13 03:03:07 +01:00
Uggla
9bd6f30e4e Fix setup.py #1662225
- Remove future module dependencies.
- Do not use pip in setup.py which is a bad idea.

Change-Id: I9a5994eace1d3af764f4052e23ba4fe0e9e1fee8
2017-02-11 14:28:48 +01:00
Bruno Cornec
62acfa7932 Adapt contributions descritptions
Now that python-redfish is an OpenStack project, adapt references to
point to their git repository instead of project member.
Also precise instructions for contributions

Change-Id: I9367ac8664ffa075b74fed6b09f57b94e74d3539
2017-02-07 01:40:37 +01:00
Uggla
2167911d02 Fix import of configparser to allow pip installation
Change-Id: I40a0f40adff422dc6227c15106e10b1589c2bf99
2017-02-06 17:39:29 +01:00
Jenkins
df87d4c836 Merge "Update changelog for 0.3 version" 2017-02-06 14:25:48 +00:00
Bruno Cornec
1120545ef0 Update changelog for 0.3 version
Change-Id: I3994d9300cf148aaf6692f0704c6238aa16be246
2017-02-05 23:33:32 +01:00
Bruno Cornec
12a44a9115 Improve build process
- Fix bug in install on directory.
- Improve dependencies on RPMs.
- Adds support for redfish-check-cartridge in RPMs.
- Update pbconf content for new pb 0.14.x naming.

Change-Id: Ifd16e06660fe5945d88ca8f8ee6999e7c8a0d3b8
2017-02-05 19:01:14 +01:00
Uggla
d4b3f046e9 Fix urllib import that prevent clients to run with python2
Change-Id: I62992b38b294d8a643f96e14677d1f998a8128d3
2017-02-04 20:11:11 +01:00
Uggla
abd3012ec0 Moonshot add on
- Add redfish-check-cartridge to check cartridge changes into a HPE Moonshot
  chassis.
- Fix for m510 cartridges with first revision of firmware that do not
  have Manager and Chassis data.
- Various updates to be pep8 compliant.

Change-Id: Ie38cc5539e71aaf1041394fbbc6596c313f9bb47
2017-02-04 19:56:19 +01:00
Bruno Cornec
f567a175c7 Adds oem support for RPMs
Change-Id: I20fc973172ffe8825d785ddd9228af24b7c5ceed
2017-02-02 10:19:32 +01:00
Jenkins
4b902f2233 Merge "Add oem data" 2017-02-01 10:24:47 +00:00
Jenkins
0c33489070 Merge "Updates to DMTF docs" 2017-01-31 14:03:32 +00:00
Uggla
905a36d660 Add oem data
- Add oem structure
    - Add oem as a redfish submodule.
    - Modify code and files to avoid circular imports :
        - types.py contains the Base, BaseCollection and Device class on
          which all standard and oem classes are inherited.
       	- standard.py will contain the redfish standard classes.
        - oem/<oem_name> will contains specific classes for <oem_name>.
          so oem/hpe will contains hpe specific classes.
  Note: the goal of python-redfish is not to deal with oem part.
  So oem will be kept as minimal as possible, however currently
  some critical hardware characteristics are only available into the oem
  part that's the reason why we are implementing it.

- Add oem class NetworkAdapter
    - This is mainly to extract mac@ with function get_mac().
- Add classes SmartStorage, ArrayControllersCollection,
  ArrayControllers, LogicalDrivesCollection, LogicalDrives.
    - Add Logical drives methods get_capacity(), get_raid.

- Improve system template and add a couple of function.
    - Add get_structured_name().
    - Add get_uefi_path().
    - However this 2 functions provide invalid content due to the firmware.

- Review and inherit from device instead of base for some components.

Change-Id: Id13e94d75f85fec7d98f1fa005c37836c244e08a
2017-01-28 12:54:57 +01:00
Bruno Cornec
f83a2400b6 Updates to DMTF docs
- Adds the new documents published in January 2017 by the DMTF
  API spec 1.0.5 and 1.1.0
- Adds new schema 2016.3
- Adds new mockup 1.1.0

Change-Id: I19db748aaf0279fa74c49d2ceade605f2177184b
2017-01-27 10:42:18 +01:00
Bruno Cornec
77580a87d2 Fix rpm build with pb for CentOS7
- Adds a macro to build for python3 (not activated for CentOS 7)
- Fix dependency list for CentoS7
- Limit VM list to reasonable distros
- This is again a test version.
- Build Test remains to be done for Fedora and Mageia
- Fix #45 with operational CentOS 7 build

Change-Id: I90fc6030a11932b7ef259100eb72aa629a19d1a6
2017-01-26 13:54:05 +01:00
Uggla
68f70626ad Fix mockup invalid json into http://localhost:8000/redfish/v1/Managers/1/EthernetInterfaces/1
- Update container creation process to patch the mockup.
- Also remove apache pid file if present. Happens if container is
  brutally killed.
- This is a fix for the old mockup 0.99a waiting to create a new
  process and container to use the 1.0.

Change-Id: I1be50a77b514d01e119be128b63a55180d2fa3fd
2017-01-26 13:33:34 +01:00
Jenkins
13f0974cae Merge "Update docs for Redfish" 2017-01-26 00:05:20 +00:00
Jenkins
c020f909de Merge "Fix wrong payload in set boot source" 2017-01-25 23:54:16 +00:00
Jenkins
5773dfb974 Merge "Avoid TypeError after _replace when user post a str url" 2017-01-25 15:17:01 +00:00
Bruno Cornec
9a7c65d942 Update docs for Redfish
- Added 1.0.2
- Added 1.0.3 (2016-07-14)
- Added 1.0.4 (2016-08-30)
- Add the new mockup v1.0.0
- Add the new API schema 2016.2
- Add Moonshot Data Model ref in dmtf directory

Change-Id: I0a7cb127d5fb9324e50164eff786e54411c0e7aa
2017-01-25 13:36:20 +01:00
Uggla
139044083a Fix jenkins tests to allow commits
- Do not pass tests on redfish-client
  Currently tests are using a local docker container. We remove them to
  allow jenkins tests to pass.

- Move programme usage in a separate file to get rid of pep8 issue.

- Fix tox venv usage

- Add flake8 test dependency

Change-Id: I12f3a567f3ff83c34c3832a544ef547372857161
2017-01-23 17:37:22 +01:00
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
Yufei
3915eaad8e Fix wrong payload in set boot source
The vaild boot source parameter is:
'{"Boot": {"BootSourceOverrideTarget": "Pxe",
"BootSourceOverrideEnabled" : "Once"}}'

not:
'{"Boot": {"BootSourceOverrideTarget": "Pxe"},
{"BootSourceOverrideEnabled" : "Once"}}'

Change-Id: I319376f818b532a1511248a9f17ecd0a41540e88
2017-01-16 10:03:57 +08:00
Bruno Cornec
5dd6b91f12 Adds the announces DB for pb 2016-04-30 02:11:22 +02:00
Bruno Cornec
650431a2c0 Merge branch 'devel' 2016-04-30 02:08:52 +02:00
Bruno Cornec
564a48235d Setup smtp relay for announces 2016-04-30 02:07:50 +02:00
Bruno Cornec
fe694983f2 Merge branch 'devel'
This is version 0.3
0.3
2016-04-30 01:51:13 +02:00
Bruno Cornec
78c830ef5b Last remaining rpm fix ! 2016-04-30 01:37:54 +02:00