From 754583bc2cd9019318d781e98c980b913d925f73 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Tue, 12 Apr 2022 09:39:26 -0400 Subject: [PATCH] Python3 for openbmc-py RPM --- xCAT-openbmc-py/lib/python/agent/agent.py | 2 +- xCAT-openbmc-py/lib/python/agent/client.py | 2 +- xCAT-openbmc-py/lib/python/agent/common/exceptions.py | 2 +- xCAT-openbmc-py/lib/python/agent/common/rest.py | 2 +- xCAT-openbmc-py/lib/python/agent/common/task.py | 2 +- xCAT-openbmc-py/lib/python/agent/common/utils.py | 2 +- xCAT-openbmc-py/lib/python/agent/hwctl/beacon.py | 2 +- xCAT-openbmc-py/lib/python/agent/hwctl/bmcconfig.py | 2 +- xCAT-openbmc-py/lib/python/agent/hwctl/eventlog.py | 2 +- xCAT-openbmc-py/lib/python/agent/hwctl/flash.py | 2 +- xCAT-openbmc-py/lib/python/agent/hwctl/inventory.py | 2 +- .../lib/python/agent/hwctl/openbmc/openbmc_beacon.py | 2 +- .../lib/python/agent/hwctl/openbmc/openbmc_bmcconfig.py | 2 +- .../lib/python/agent/hwctl/openbmc/openbmc_eventlog.py | 2 +- .../lib/python/agent/hwctl/openbmc/openbmc_flash.py | 2 +- .../lib/python/agent/hwctl/openbmc/openbmc_inventory.py | 2 +- .../lib/python/agent/hwctl/openbmc/openbmc_power.py | 2 +- .../lib/python/agent/hwctl/openbmc/openbmc_sensor.py | 2 +- .../lib/python/agent/hwctl/openbmc/openbmc_setboot.py | 2 +- xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py | 2 +- xCAT-openbmc-py/lib/python/agent/hwctl/power.py | 2 +- .../lib/python/agent/hwctl/redfish/redfish_power.py | 2 +- .../lib/python/agent/hwctl/redfish/redfish_setboot.py | 2 +- xCAT-openbmc-py/lib/python/agent/hwctl/redfish_client.py | 2 +- xCAT-openbmc-py/lib/python/agent/hwctl/sensor.py | 2 +- xCAT-openbmc-py/lib/python/agent/hwctl/setboot.py | 2 +- .../agent/tests/unit/test_hwctl/test_redfish_client.py | 2 +- xCAT-openbmc-py/lib/python/agent/xcatagent/openbmc.py | 2 +- xCAT-openbmc-py/lib/python/agent/xcatagent/redfish.py | 2 +- xCAT-openbmc-py/xCAT-openbmc-py.spec | 8 ++++---- 30 files changed, 33 insertions(+), 33 deletions(-) diff --git a/xCAT-openbmc-py/lib/python/agent/agent.py b/xCAT-openbmc-py/lib/python/agent/agent.py index 6afdefea8..3b70d5811 100755 --- a/xCAT-openbmc-py/lib/python/agent/agent.py +++ b/xCAT-openbmc-py/lib/python/agent/agent.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- encoding: utf-8 -*- from __future__ import print_function import argparse diff --git a/xCAT-openbmc-py/lib/python/agent/client.py b/xCAT-openbmc-py/lib/python/agent/client.py index ff2188e9e..30322a4a6 100755 --- a/xCAT-openbmc-py/lib/python/agent/client.py +++ b/xCAT-openbmc-py/lib/python/agent/client.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- encoding: utf-8 -*- # just for test from __future__ import print_function diff --git a/xCAT-openbmc-py/lib/python/agent/common/exceptions.py b/xCAT-openbmc-py/lib/python/agent/common/exceptions.py index ba135d177..463775cd2 100644 --- a/xCAT-openbmc-py/lib/python/agent/common/exceptions.py +++ b/xCAT-openbmc-py/lib/python/agent/common/exceptions.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 class SelfServerException(Exception) : def __init__(self, message, detail_msg= "", host_and_port="") : diff --git a/xCAT-openbmc-py/lib/python/agent/common/rest.py b/xCAT-openbmc-py/lib/python/agent/common/rest.py index 54fb5b4eb..95b3b9589 100644 --- a/xCAT-openbmc-py/lib/python/agent/common/rest.py +++ b/xCAT-openbmc-py/lib/python/agent/common/rest.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/common/task.py b/xCAT-openbmc-py/lib/python/agent/common/task.py index 1f93cab0e..021ea95cd 100644 --- a/xCAT-openbmc-py/lib/python/agent/common/task.py +++ b/xCAT-openbmc-py/lib/python/agent/common/task.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/common/utils.py b/xCAT-openbmc-py/lib/python/agent/common/utils.py index bdbfba23e..3306649ad 100644 --- a/xCAT-openbmc-py/lib/python/agent/common/utils.py +++ b/xCAT-openbmc-py/lib/python/agent/common/utils.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/beacon.py b/xCAT-openbmc-py/lib/python/agent/hwctl/beacon.py index 0c4cb6672..ec24ee858 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/beacon.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/beacon.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/bmcconfig.py b/xCAT-openbmc-py/lib/python/agent/hwctl/bmcconfig.py index 76355be85..b29665638 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/bmcconfig.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/bmcconfig.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/eventlog.py b/xCAT-openbmc-py/lib/python/agent/hwctl/eventlog.py index 0c8f6378d..a17d1e94c 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/eventlog.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/eventlog.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/flash.py b/xCAT-openbmc-py/lib/python/agent/hwctl/flash.py index ab82062b4..353768ee6 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/flash.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/flash.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/inventory.py b/xCAT-openbmc-py/lib/python/agent/hwctl/inventory.py index 041c29b93..517235628 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/inventory.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/inventory.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_beacon.py b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_beacon.py index b22170fff..b8c9468af 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_beacon.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_beacon.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_bmcconfig.py b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_bmcconfig.py index 902858229..56da82f99 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_bmcconfig.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_bmcconfig.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_eventlog.py b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_eventlog.py index 65b29f230..eacb2728c 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_eventlog.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_eventlog.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_flash.py b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_flash.py index 59e0f4153..bd39d2ddf 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_flash.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_flash.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_inventory.py b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_inventory.py index fbf02c12f..0146c5e9b 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_inventory.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_inventory.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_power.py b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_power.py index b6bc0b4e4..0364b6ac3 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_power.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_power.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_sensor.py b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_sensor.py index 24d041912..ecdaa103e 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_sensor.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_sensor.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_setboot.py b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_setboot.py index 3a6b5ba1b..b7674061a 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_setboot.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_setboot.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py index fe9640919..e8994e513 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/power.py b/xCAT-openbmc-py/lib/python/agent/hwctl/power.py index 84b59ab99..839f42d84 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/power.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/power.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/redfish/redfish_power.py b/xCAT-openbmc-py/lib/python/agent/hwctl/redfish/redfish_power.py index 00325b994..7d74401cb 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/redfish/redfish_power.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/redfish/redfish_power.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/redfish/redfish_setboot.py b/xCAT-openbmc-py/lib/python/agent/hwctl/redfish/redfish_setboot.py index d80f9515a..8a3282b16 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/redfish/redfish_setboot.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/redfish/redfish_setboot.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/redfish_client.py b/xCAT-openbmc-py/lib/python/agent/hwctl/redfish_client.py index 0900f63bf..ae0871914 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/redfish_client.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/redfish_client.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/sensor.py b/xCAT-openbmc-py/lib/python/agent/hwctl/sensor.py index e70e45c4e..09f9c2de9 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/sensor.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/sensor.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/setboot.py b/xCAT-openbmc-py/lib/python/agent/hwctl/setboot.py index d45ae34e7..3a0a49a11 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/setboot.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/setboot.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/tests/unit/test_hwctl/test_redfish_client.py b/xCAT-openbmc-py/lib/python/agent/tests/unit/test_hwctl/test_redfish_client.py index 0318531c8..1d4958d8d 100644 --- a/xCAT-openbmc-py/lib/python/agent/tests/unit/test_hwctl/test_redfish_client.py +++ b/xCAT-openbmc-py/lib/python/agent/tests/unit/test_hwctl/test_redfish_client.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/xcatagent/openbmc.py b/xCAT-openbmc-py/lib/python/agent/xcatagent/openbmc.py index c01884876..15b8631b0 100644 --- a/xCAT-openbmc-py/lib/python/agent/xcatagent/openbmc.py +++ b/xCAT-openbmc-py/lib/python/agent/xcatagent/openbmc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/lib/python/agent/xcatagent/redfish.py b/xCAT-openbmc-py/lib/python/agent/xcatagent/redfish.py index 1d66178ab..6a2c48db6 100644 --- a/xCAT-openbmc-py/lib/python/agent/xcatagent/redfish.py +++ b/xCAT-openbmc-py/lib/python/agent/xcatagent/redfish.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ############################################################################### # IBM(c) 2018 EPL license http://www.eclipse.org/legal/epl-v10.html ############################################################################### diff --git a/xCAT-openbmc-py/xCAT-openbmc-py.spec b/xCAT-openbmc-py/xCAT-openbmc-py.spec index 36f9342e9..563b34a2a 100644 --- a/xCAT-openbmc-py/xCAT-openbmc-py.spec +++ b/xCAT-openbmc-py/xCAT-openbmc-py.spec @@ -18,10 +18,10 @@ AutoReqProv: no BuildArch: noarch Requires: xCAT-server -Requires: python-gevent >= 1.2.2-2 -Requires: python-greenlet >= 0.4.13-2 -Requires: python-paramiko >= 2.0.0 -Requires: python2-docopt python-requests python-scp +Requires: python3-gevent +Requires: python3-greenlet +Requires: python3-paramiko +Requires: python3-docopt python3-requests python3-scp %description xCAT-openbmc-py provides openbmc related functions.