diff --git a/bmc/Redfishtool/centos/build_srpm.data b/bmc/Redfishtool/centos/build_srpm.data index 958ae3bb0..826da01e3 100644 --- a/bmc/Redfishtool/centos/build_srpm.data +++ b/bmc/Redfishtool/centos/build_srpm.data @@ -1,6 +1,6 @@ COPY_LIST=" \ - $STX_BASE/downloads/Redfishtool-1.0.8.tar.gz \ + $STX_BASE/downloads/Redfishtool-1.1.0.tar.gz \ $PKG_BASE/files/* \ " -TIS_PATCH_VER=0 +TIS_PATCH_VER=1 diff --git a/bmc/Redfishtool/centos/redfishtool.spec b/bmc/Redfishtool/centos/redfishtool.spec index e8210b420..baf27c59f 100644 --- a/bmc/Redfishtool/centos/redfishtool.spec +++ b/bmc/Redfishtool/centos/redfishtool.spec @@ -6,7 +6,7 @@ Summary: Redfish Tool Package Name: Redfishtool -Version: 1.0.8 +Version: 1.1.0 Release: %{?_tis_dist}.%{tis_patch_ver} #For full text see link: https://github.com/DMTF/Redfishtool/blob/master/LICENSE.md License: BSD-3-Clause. @@ -19,7 +19,6 @@ Source0: %{name}-%{version}.tar.gz BuildArch: noarch Patch01: 0001-Adapt-redfishtool-to-python2.patch -Patch02: 0002-Add-configfile-option-support.patch BuildRequires: python-setuptools @@ -34,7 +33,6 @@ Redfish Tool Package %prep %setup %patch01 -p1 -%patch02 -p1 # Remove bundled egg-info rm -rf *.egg-info diff --git a/bmc/Redfishtool/files/0002-Add-configfile-option-support.patch b/bmc/Redfishtool/files/0002-Add-configfile-option-support.patch deleted file mode 100644 index 03f7457b8..000000000 --- a/bmc/Redfishtool/files/0002-Add-configfile-option-support.patch +++ /dev/null @@ -1,35 +0,0 @@ -From d0c3cc759545a82138329e292e99f310ec74047f Mon Sep 17 00:00:00 2001 -From: zhipengl -Date: Sat, 22 Jun 2019 02:06:54 +0800 -Subject: [PATCH] Add configfile option support - -Signed-off-by: zhipengl ---- - redfishtool/redfishtoolMain.py | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/redfishtool/redfishtoolMain.py b/redfishtool/redfishtoolMain.py -index cd3dd6f..ea2e44f 100644 ---- a/redfishtool/redfishtoolMain.py -+++ b/redfishtool/redfishtoolMain.py -@@ -156,6 +156,17 @@ def main(argv): - rft.authToken=rft.token - elif opt in ("-c", "--config"): #read additional options from a file - rft.configFile=arg -+ try: -+ with open(arg, 'r') as f: -+ configdata = json.load(f) -+ if 'username' in configdata and 'password' in configdata: -+ rft.user = configdata['username'] -+ rft.password = configdata['password'] -+ rft.printVerbose(1,"Main: get pw from configfile, usr:{}, pw:{}".format(rft.user, rft.password)) -+ else: -+ rft.printErr("Invalid --config= filedata: {}".format(configdata)) -+ except IOError: -+ rft.printErr("Invalid: Could not open configfile") - elif opt in ("-T", "--Timeout"): #Specify http timeout in seconds - timePattern="^([1-9][0-9]*)$" - timeMatch=re.search(timePattern,arg) --- -2.7.4 -