'Create a CCI configuration file.'

def _create_horcm_conf(self, horcmgr=_HORCMGR):

    inst = self.conf.vsp_horcm_numbers[horcmgr]
    serial = self.conf.vsp_storage_id
    filename = ('/etc/horcm%s.conf' % inst)
    port = (_DEFAULT_PORT_BASE + inst)
    found = False
    if (not os.path.exists(filename)):
        file_str = ('\nHORCM_MON\n#ip_address                                service                                    poll(10ms)                    timeout(10ms)\n127.0.0.1    %16d                                                            6000                                                        3000\nHORCM_CMD\n' % port)
    else:
        file_str = cinder_utils.read_file_as_root(filename)
        if re.search(('^\\\\\\\\.\\\\CMD-%s:/dev/sd$' % serial), file_str, re.M):
            found = True
    if (not found):
        repl_str = ('\\1\\\\\\\\.\\\\CMD-%s:/dev/sd\\n' % serial)
        file_str = CMD_PATTERN.sub(repl_str, file_str)
        result = utils.execute('tee', filename, process_input=file_str)
        if result[0]:
            msg = utils.output_log(MSG.CREATE_HORCM_CONF_FILE_FAILED, file=filename, ret=result[0], err=result[2])
            raise exception.VSPError(msg)
