Skip to content

Commit fa60516

Browse files
authored
Merge branch 'master' into ci
2 parents 06c7352 + 07df9a8 commit fa60516

86 files changed

Lines changed: 146 additions & 256 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

confluent_client/confluent/asynclient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ async def updateattrib(session, updateargs, nodetype, noderange, options, dictas
762762
if "=" in updateargs[1]:
763763
update_ready = True
764764
for arg in updateargs[1:]:
765-
if not '=' in arg:
765+
if '=' not in arg:
766766
update_ready = False
767767
exitcode = 1
768768
if not update_ready:

confluent_client/confluent/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ def updateattrib(session, updateargs, nodetype, noderange, options, dictassign=N
712712
if "=" in updateargs[1]:
713713
update_ready = True
714714
for arg in updateargs[1:]:
715-
if not '=' in arg:
715+
if '=' not in arg:
716716
update_ready = False
717717
exitcode = 1
718718
if not update_ready:

confluent_client/confluent/textgroup.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ def get_group_text(self, nodes):
138138
def print_all(self, output=sys.stdout, skipmodal=False, reverse=False,
139139
count=False):
140140
self.generate_byoutput()
141-
modaloutput = None
142-
ismodal = True
143141

144142
if reverse:
145143
outdatalist = sorted(

confluent_client/confluent/vnc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ async def _handle_framebuffer_update(self):
215215
self._request_screen_update(incremental=True)
216216

217217
async def _handle_rectangle(self):
218-
if self.framebuffer == None:
218+
if self.framebuffer is None:
219219
self.framebuffer = Image.new('RGBA', (self.width, self.height))
220220
x = await self._read_number(2)
221221
y = await self._read_number(2)

confluent_osdeploy/common/profile/scripts/getinstalldisk

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ import os
55
class SilentException(Exception):
66
pass
77

8+
# List of models that are generally used for OS install disk (generally 2-disk mirroring)
9+
PRIORITY_MODELS = ('m.2 nvme 2-bay raid kit',
10+
'thinksystem_m.2_vd',
11+
'thinksystem m.2',
12+
'thinksystem_m.2',
13+
'b540p-2hs', # 7mm or M.2 in rear
14+
'b540d-2hs', # M.2 in E3.S or 2.5inch
15+
'b550d-2hs', # Front M.2
16+
'b550p-2hs', # Rear M.2
17+
'raid b540p-2hs',
18+
'raid b540d-2hs',
19+
'raid b550d-2hs',
20+
'raid b550p-2hs')
21+
822
class DiskInfo(object):
923
def __init__(self, devname):
1024
if devname.startswith('nvme') and 'c' in devname:
@@ -69,7 +83,7 @@ class DiskInfo(object):
6983

7084
@property
7185
def priority(self):
72-
if self.model.lower() in ('m.2 nvme 2-bay raid kit', 'thinksystem_m.2_vd', 'thinksystem m.2', 'thinksystem_m.2'):
86+
if self.model.lower() in PRIORITY_MODELS:
7387
return 0
7488
if 'imsm' in self.mdcontainer:
7589
return 1

confluent_osdeploy/ubuntu20.04-diskless/profiles/default/scripts/image2disk.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,4 +431,3 @@ def install_to_disk(imgpath):
431431
traceback.print_exc()
432432
time.sleep(86400)
433433
raise
434-

confluent_server/aiohmi/ipmi/command.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ async def set_power(self, powerstate, wait=False, bridge_request=None):
345345
return {'powerstate': oldpowerstate}
346346
if newpowerstate == 'boot':
347347
newpowerstate = 'on' if oldpowerstate == 'off' else 'reset'
348-
response = await self.raw_command(
348+
await self.raw_command(
349349
netfn=0, command=2, data=[power_states[newpowerstate]],
350350
bridge_request=bridge_request)
351351
lastresponse = {'pendingpowerstate': newpowerstate}
@@ -564,7 +564,7 @@ async def set_identify(self, on=True, duration=None, blink=False):
564564
duration = 255
565565
if duration < 0:
566566
duration = 0
567-
response = await self.raw_command(netfn=0, command=4, data=[duration])
567+
await self.raw_command(netfn=0, command=4, data=[duration])
568568
return
569569
forceon = 0
570570
if on:
@@ -575,7 +575,7 @@ async def set_identify(self, on=True, duration=None, blink=False):
575575
identifydata = [255 * forceon]
576576
else:
577577
identifydata = [0, forceon]
578-
response = await self.raw_command(netfn=0, command=4, data=identifydata)
578+
await self.raw_command(netfn=0, command=4, data=identifydata)
579579

580580
async def init_sdr(self):
581581
"""Initialize SDR
@@ -892,7 +892,6 @@ async def set_net6_configuration(self, static_addresses=None, static_gateway=Non
892892
if channel is None:
893893
channel = await self.get_network_channel()
894894
if static_addresses is not None:
895-
i = 0
896895
for va in static_addresses:
897896
if '/' in va:
898897
va, plen = va.split('/', 1)
@@ -2239,7 +2238,8 @@ async def update_firmware(self, filename, data=None, progress=None, bank=None):
22392238

22402239
await self.oem_init()
22412240
if progress is None:
2242-
progress = lambda x: True
2241+
def progress(x):
2242+
return True
22432243
return await self._oem.update_firmware(filename, data, progress, bank)
22442244

22452245
async def attach_remote_media(self, url, username=None, password=None):

confluent_server/aiohmi/ipmi/oem/generic.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ async def get_average_processor_temperature(self, ipmicmd):
6767
# in practice, some implementations use 0x27 ('External environment')
6868
if not hasattr(self, '_processor_names'):
6969
self._processor_names = []
70-
readings = []
7170
if not self._processor_names:
7271
sdr = await ipmicmd.init_sdr()
7372
for sensename in sdr.sensors:

confluent_server/aiohmi/ipmi/oem/lenovo/config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import random
2424
import struct
2525

26-
import time
2726

2827
import aiohmi.exceptions as pygexc
2928

confluent_server/aiohmi/ipmi/oem/lenovo/imm.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import base64
1818
import binascii
1919
from datetime import datetime
20-
import errno
2120
import fnmatch
2221
import json
2322
import math
@@ -28,7 +27,6 @@
2827
import struct
2928
import weakref
3029

31-
import six
3230
import zipfile
3331

3432
import aiohmi.constants as pygconst
@@ -848,7 +846,7 @@ async def get_firmware_inventory(self, bmcver, components, category):
848846
# https, using the caller TLS verification scheme
849847
components = set(components)
850848
if 'core' in components:
851-
category = 'core'
849+
category = 'core'
852850
if not components or set(('imm', 'xcc', 'bmc', 'core')) & components:
853851
rsp = await self.ipmicmd.raw_command(netfn=0x3a, command=0x50)
854852
immverdata = self.parse_imm_buildinfo(rsp['data'])

0 commit comments

Comments
 (0)