# Path: hardware/hpacucli.py
# ALL_SHOW_REGEXP = re.compile(r'^(.*) in Slot ([0-9]+).*\(sn: (.*)\)', re.M)
# ERROR_REGEXP = re.compile('Error: (.*)', re.M)
# LOGICAL_REGEXP = re.compile(r'\s*logicaldrive (.*) \((.*), (.*), (.*)\)')
# PHYSICAL_REGEXP = re.compile(r'\s*physicaldrive (.*) \(.*, (.*), (.*), (.*)\)')
# PROMPT_REGEXP = re.compile('=> ')
# class Error(Exception):
# class Cli:
#     def __init__(self, value):
#     def __str__(self):
# def parse_ctrl_all_show(output):
# def _generic_parsing(line, status, ignore_list):
# def _parse_ctrl_d_disk_show(output):
# def _parse_ctrl_show(output):
# def _parse_ctrl_d_all_show(output, regexp):
# def parse_ctrl_ld_all_show(output):
# def parse_ctrl_pd_all_show(output):
# def parse_ctrl_show(output):
# def parse_ctrl_pd_disk_show(output):
# def parse_error(output):
# def parse_ctrl_ld_show(output):
#     def __init__(self, debug=False):
#     def launch(self):
#     def _sendline(self, line):
#     def ctrl_all_show(self):
#     def ctrl_show(self, ctrl):
#     def ctrl_pd_all_show(self, selector):
#     def ctrl_pd_disk_show(self, selector, disk):
#     def ctrl_ld_all_show(self, selector):
#     def ctrl_ld_show(self, selector, ldid):
#     def ctrl_delete(self, selector):
#     def ctrl_create_ld(self, selector, drives, raid):
# def detect():
# 
# Path: hardware/tests/utils.py
# def sample(name, mode='r'):
#     return open(os.path.join(_BASEDIR, 'samples', name), mode).read()


import unittest
import pexpect
from unittest import mock
from hardware import hpacucli
from hardware.tests.utils import sample
            hpacucli.parse_ctrl_all_show(CTRL_ALL_SHOW_OUTPUT),
            CTRL_ALL_SHOW_RESULT)

    def test_parse_ctrl_all_show_hpssacli(self):
        # => ctrl all show
        return self.assertEqual(
            hpacucli.parse_ctrl_all_show(CTRL_ALL_SHOW_OUTPUT_HPSSAPI),
            CTRL_ALL_SHOW_RESULT_HPSSAPI)

    def test_parse_ctrl_pd_all_show(self):
        # => ctrl slot=2 pd all show
        return self.assertEqual(
            hpacucli.parse_ctrl_pd_all_show(CTRL_PD_ALL_SHOW_OUTPUT),
            CTRL_PD_ALL_SHOW_RESULT)

    def test_parse_ctrl_pd_all_show_hpssacli(self):
        # => ctrl slot=0 pd all show
        return self.assertEqual(
            hpacucli.parse_ctrl_pd_all_show(CTRL_PD_ALL_SHOW_OUTPUT_HPSSACLI),
            CTRL_PD_ALL_SHOW_RESULT_HPSSACLI)

    def test_parse_ctrl_pd_show(self):
        # => ctrl slot=0 pd all show
        return self.assertEqual(
            hpacucli.parse_ctrl_pd_disk_show(CTRL_PD_SHOW_OUTPUT),
            CTRL_PD_SHOW_RESULT)

    def test_parse_ctrl_pd_show_hpssacli(self):
        # => ctrl slot=0 pd all show
        return self.assertEqual(

# Path: hardware/hpacucli.py
# ALL_SHOW_REGEXP = re.compile(r'^(.*) in Slot ([0-9]+).*\(sn: (.*)\)', re.M)
# ERROR_REGEXP = re.compile('Error: (.*)', re.M)
# LOGICAL_REGEXP = re.compile(r'\s*logicaldrive (.*) \((.*), (.*), (.*)\)')
# PHYSICAL_REGEXP = re.compile(r'\s*physicaldrive (.*) \(.*, (.*), (.*), (.*)\)')
# PROMPT_REGEXP = re.compile('=> ')
# class Error(Exception):
# class Cli:
#     def __init__(self, value):
#     def __str__(self):
# def parse_ctrl_all_show(output):
# def _generic_parsing(line, status, ignore_list):
# def _parse_ctrl_d_disk_show(output):
# def _parse_ctrl_show(output):
# def _parse_ctrl_d_all_show(output, regexp):
# def parse_ctrl_ld_all_show(output):
# def parse_ctrl_pd_all_show(output):
# def parse_ctrl_show(output):
# def parse_ctrl_pd_disk_show(output):
# def parse_error(output):
# def parse_ctrl_ld_show(output):
#     def __init__(self, debug=False):
#     def launch(self):
#     def _sendline(self, line):
#     def ctrl_all_show(self):
#     def ctrl_show(self, ctrl):
#     def ctrl_pd_all_show(self, selector):
#     def ctrl_pd_disk_show(self, selector, disk):
#     def ctrl_ld_all_show(self, selector):
#     def ctrl_ld_show(self, selector, ldid):
#     def ctrl_delete(self, selector):
#     def ctrl_create_ld(self, selector, drives, raid):
# def detect():
# 
# Path: hardware/tests/utils.py
# def sample(name, mode='r'):
#     return open(os.path.join(_BASEDIR, 'samples', name), mode).read()


# Path: hardware/tests/test_hpacucli.py
import unittest
import pexpect
from unittest import mock
from hardware import hpacucli
from hardware.tests.utils import sample

            hpacucli.parse_ctrl_all_show(CTRL_ALL_SHOW_OUTPUT),
            CTRL_ALL_SHOW_RESULT)

    def test_parse_ctrl_all_show_hpssacli(self):
        # => ctrl all show
        return self.assertEqual(
            hpacucli.parse_ctrl_all_show(CTRL_ALL_SHOW_OUTPUT_HPSSAPI),
            CTRL_ALL_SHOW_RESULT_HPSSAPI)

    def test_parse_ctrl_pd_all_show(self):
        # => ctrl slot=2 pd all show
        return self.assertEqual(
            hpacucli.parse_ctrl_pd_all_show(CTRL_PD_ALL_SHOW_OUTPUT),
            CTRL_PD_ALL_SHOW_RESULT)

    def test_parse_ctrl_pd_all_show_hpssacli(self):
        # => ctrl slot=0 pd all show
        return self.assertEqual(
            hpacucli.parse_ctrl_pd_all_show(CTRL_PD_ALL_SHOW_OUTPUT_HPSSACLI),
            CTRL_PD_ALL_SHOW_RESULT_HPSSACLI)

    def test_parse_ctrl_pd_show(self):
        # => ctrl slot=0 pd all show
        return self.assertEqual(
            hpacucli.parse_ctrl_pd_disk_show(CTRL_PD_SHOW_OUTPUT),
            CTRL_PD_SHOW_RESULT)

    def test_parse_ctrl_pd_show_hpssacli(self):
        # => ctrl slot=0 pd all show
        return self.assertEqual(

            hpacucli.parse_ctrl_pd_disk_show(CTRL_PD_SHOW_OUTPUT_HPSSACLI),