2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-01-12 02:52:30 +00:00

Fix unpatched imports of webclient

This commit is contained in:
Jarrod Johnson
2025-03-28 09:26:41 -04:00
parent 659f87877d
commit 7419dbcf71
6 changed files with 10 additions and 7 deletions

View File

@@ -1,8 +1,8 @@
import pyghmi.util.webclient as webclient
import confluent.util as util
import time
from pprint import pprint
import eventlet
webclient = eventlet.import_patched('pyghmi.util.webclient')
_healthmap = {
'normal': 'ok',
@@ -222,6 +222,7 @@ class NxApiClient:
if __name__ == '__main__':
import sys
import os
from pprint import pprint
myuser = os.environ['SWITCHUSER']
mypass = os.environ['SWITCHPASS']
na = NxApiClient(sys.argv[1], myuser, mypass, None)

View File

@@ -25,9 +25,9 @@ import confluent.log as log
import confluent.util as util
import pyghmi.exceptions as pygexc
import pyghmi.redfish.command as rcmd
import pyghmi.util.webclient as webclient
import eventlet
import eventlet.green.ssl as ssl
webclient = eventlet.import_patched('pyghmi.util.webclient')
try:
websocket = eventlet.import_patched('websocket')
wso = websocket.WebSocket

View File

@@ -13,7 +13,6 @@
# limitations under the License.
from xml.etree.ElementTree import fromstring as rfromstring
import pyghmi.util.webclient as wc
import confluent.util as util
import confluent.messages as msg
import confluent.exceptions as exc
@@ -21,6 +20,7 @@ import eventlet.green.time as time
import eventlet.green.socket as socket
import eventlet.greenpool as greenpool
import eventlet
wc = eventlet.import_patched('pyghmi.util.webclient')
try:
import Cookie
httplib = eventlet.import_patched('httplib')

View File

@@ -18,13 +18,14 @@ import confluent.messages as msg
import confluent.exceptions as exc
import eventlet
import eventlet.green.socket as socket
import pyghmi.util.webclient as wc
wc = eventlet.import_patched('pyghmi.util.webclient')
import confluent.util as util
import re
import hashlib
import json
import time
def simplify_name(name):
return name.lower().replace(' ', '_').replace('/', '-').replace(
'_-_', '-')

View File

@@ -12,13 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import pyghmi.util.webclient as wc
import confluent.util as util
import confluent.messages as msg
import confluent.exceptions as exc
import eventlet.green.time as time
import eventlet
import eventlet.greenpool as greenpool
wc = eventlet.import_patched('pyghmi.util.webclient')

View File

@@ -12,13 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import pyghmi.util.webclient as wc
import confluent.util as util
import confluent.messages as msg
import confluent.exceptions as exc
import eventlet.green.time as time
import eventlet
import eventlet.greenpool as greenpool
wc = eventlet.import_patched('pyghmi.util.webclient')