docs: def restart_tools(self,
                        repo=None,
                        name=None,
                        groups=None,
                        branch='master',
                        version='HEAD',
                        main_cfg=False,
                        old_val='',
                        new_val=''):
          """
          Restart necessary tools based on changes that have been made either to
          vent.cfg or to vent.template. This includes tools that need to be
          restarted because they depend on other tools that were changed.
          """
          status = (True, None)
          if not main_cfg:
              try:
                  t_identifier = {'name': name,
                                  'branch': branch,
                                  'version': version}
                  result = Template(System().manifest).constrain_opts(t_identifier,
                                                                      ['running',
                                                                       'link_name'])
                  tools = result[0]
                  tool = list(tools.keys())[0]
                  if ('running' in tools[tool] and
                          tools[tool]['running'] == 'yes'):
                      start_tools = [t_identifier]
                      dependent_tools = [tools[tool]['link_name']]
                      start_tools += Dependencies(dependent_tools)
                      # TODO
                      start_d = {}
                      for tool_identifier in start_tools:
                          self.clean(**tool_identifier)
                          start_d.update(self.prep_start(**tool_identifier)[1])
                      if start_d:
                          Tools().start(start_d, '', is_tool_d=True)
              except Exception as e:  # pragma: no cover
                  self.logger.error('Trouble restarting tool ' + name +
                                    ' because: ' + str(e))
                  status = (False, str(e))
          else:
              try:
                  # string manipulation to get tools into arrays
                  ext_start = old_val.find('[external-services]')
                  if ext_start >= 0:
                      ot_str = old_val[old_val.find('[external-services]') + 20:]
                  else:
                      ot_str = ''
                  old_tools = []
                  for old_tool in ot_str.split('\n'):
                      if old_tool != '':
                          old_tools.append(old_tool.split('=')[0].strip())
                  ext_start = new_val.find('[external-services]')
                  if ext_start >= 0:
                      nt_str = new_val[new_val.find('[external-services]') + 20:]
                  else:
                      nt_str = ''
                  new_tools = []
                  for new_tool in nt_str.split('\n'):
                      if new_tool != '':
                          new_tools.append(new_tool.split('=')[0].strip())
                  # find tools changed
                  tool_changes = []
                  for old_tool in old_tools:
                      if old_tool not in new_tools:
                          tool_changes.append(old_tool)
                  for new_tool in new_tools:
                      if new_tool not in old_tools:
                          tool_changes.append(new_tool)
                      else:
                          # tool name will be the same
                          oconf = old_val[old_val.find(new_tool):].split('\n')[0]
                          nconf = new_val[new_val.find(new_tool):].split('\n')[0]
                          if oconf != nconf:
                              tool_changes.append(new_tool)
                  # put link names in a dictionary for finding dependencies
                  dependent_tools = []
                  for i, entry in enumerate(tool_changes):
                      dependent_tools.append(entry)
                      # change names to lowercase for use in clean, prep_start
                      tool_changes[i] = {'name': entry.lower().replace('-', '_')}
                  dependencies = Dependencies(dependent_tools)
                  # restart tools
                  restart = tool_changes + dependencies
                  tool_d = {}
                  for tool in restart:
                      self.clean(**tool)
                      tool_d.update(self.prep_start(**tool)[1])
                  if tool_d:
                      # TODO fix the arguments
                      Tools().start(tool_d)
              except Exception as e:  # pragma: no cover
                  self.logger.error('Problem restarting tools: ' + str(e))
                  status = (False, str(e))
          return status