mirror of
https://opendev.org/x/pyghmi
synced 2026-04-02 00:03:30 +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:
@@ -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
|
||||
|
||||
1395
pyghmi/ipmi/private/simplesession.py
Normal file
1395
pyghmi/ipmi/private/simplesession.py
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user