# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import xml.etree.ElementTree as ET import libvirt import pyghmi.ipmi.bmc as bmc from virtualbmc import log from virtualbmc import utils LOG = log.get_logger() # Power states POWEROFF = 0 POWERON = 1 # Boot device maps GET_BOOT_DEVICES_MAP = { 'network': 4, 'hd': 8, 'cdrom': 0x14, } SET_BOOT_DEVICES_MAP = { 'network': 'network', 'hd': 'hd',
def setUp(self): super(TestCase, self).setUp() self._level = vbmc_log.get_logger().getEffectiveLevel() vbmc_log.get_logger().setLevel(logging.DEBUG) self.addCleanup(lambda level: vbmc_log.get_logger().setLevel(level), self._level)