'Execute an \'oc\' command in the remote host.
Returns: output of command and namespace,
or raises CouldNotUseOc on error'

def exec_oc(self, cmd_str='', extra_args=None):

    config_base = self.get_var('openshift', 'common', 'config_base')
    args = {'namespace': self.logging_namespace(), 'config_file': os.path.join(config_base, 'master', 'admin.kubeconfig'), 'cmd': cmd_str, 'extra_args': (list(extra_args) if extra_args else [])}
    result = self.execute_module('ocutil', args)
    if result.get('failed'):
        if (result['result'] == '[Errno    2]    No    such    file    or    directory'):
            raise CouldNotUseOc('This    host    is    supposed    to    be    a    master    but    does    not    have    the    `oc`    command    where    expected.\nHas    an    installation    been    run    on    this    host    yet?')
        raise CouldNotUseOc('Unexpected    error    using    `oc`    to    validate    the    logging    stack    components.\nError    executing    `oc    {cmd}`:\n{error}'.format(cmd=args['cmd'], error=result['result']))
    return result.get('result', '')
