# 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
# Copyright (C) 2013-2014 eNovance SAS <licensing@enovance.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# 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.





class TestParsing(unittest.TestCase):

    def test_parse_ctrl_all_show(self):
        # => ctrl 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

# Copyright (C) 2013-2014 eNovance SAS <licensing@enovance.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# 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.





class TestParsing(unittest.TestCase):

    def test_parse_ctrl_all_show(self):
        # => ctrl all show
        return self.assertEqual(

            hpacucli.parse_ctrl_all_show(CTRL_ALL_SHOW_OUTPUT),