2
0
mirror of https://opendev.org/x/pyghmi synced 2025-02-06 22:13:09 +00:00

Add a simplesession option

simplesession represents a stripped down session.

For now it doesn't support many bells and whistles, but it
should suffice for one-off command usage.

Caller has to opt-in to the experimental simplesession by
calling select_simplesession() method in command:
import pyghmi.ipmi.command
pyghmi.ipmi.command.select_simplesession()

Change-Id: I3884762621306d4a895f4b56d173fc80526a095c
This commit is contained in:
Jarrod Johnson 2020-02-26 15:35:47 -05:00
parent 0f397ac0d9
commit 6bc53a1546
2 changed files with 1400 additions and 0 deletions

View File

@ -84,6 +84,11 @@ power_states = {
}
def select_simplesession():
global session
import pyghmi.ipmi.private.simplesession as session
def _mask_to_cidr(mask):
maskn = struct.unpack_from('>I', mask)[0]
cidr = 32

File diff suppressed because it is too large Load Diff