Esempio n. 1
0
import sys
from docopt import docopt,DocoptExit

from common import utils
from common import exceptions as xcat_exception
from hwctl.redfish.redfish_power import RedfishPowerTask
from hwctl.redfish.redfish_setboot import RedfishBootTask
from hwctl.power import DefaultPowerManager
from hwctl.setboot import DefaultBootManager

from xcatagent import base
import logging
logger = logging.getLogger('xcatagent')
try:
    if not logger.handlers:
        utils.enableSyslog('xcat.agent')
except:
    pass

DEBUGMODE = False
VERBOSE = False

# global variables of rpower
POWER_REBOOT_OPTIONS = ('boot', 'reset')
POWER_SET_OPTIONS = ('on', 'off', 'bmcreboot')
POWER_GET_OPTIONS = ('bmcstate', 'state', 'stat', 'status')

# global variables of rsetboot
SETBOOT_GET_OPTIONS = ('stat', '')
SETBOOT_SET_OPTIONS = ('cd', 'def', 'default', 'floppy', 'hd', 'net', 'setup')
Esempio n. 2
0
from hwctl.openbmc.openbmc_eventlog import OpenBMCEventlogTask
from hwctl.beacon import DefaultBeaconManager
from hwctl.setboot import DefaultBootManager
from hwctl.flash import DefaultFlashManager
from hwctl.inventory import DefaultInventoryManager
from hwctl.power import DefaultPowerManager
from hwctl.sensor import DefaultSensorManager
from hwctl.bmcconfig import DefaultBmcConfigManager
from hwctl.eventlog import DefaultEventlogManager

from xcatagent import base
import logging
logger = logging.getLogger('xcatagent')
try:
    if not logger.handlers:
        utils.enableSyslog('xcat.agent')
except:
    pass

HTTP_PROTOCOL = "https://"
PROJECT_URL = "/xyz/openbmc_project"

RESULT_OK = 'ok'
RESULT_FAIL = 'fail'

DEBUGMODE = False
VERBOSE = False

all_nodes_result = {}

# global variables of rbeacon