'Executes given command with auth attributes appended.
:param cmd: command to be executed
:type cmd: string
:param action: command on cli to run
:type action: string
:param flags: optional cli flags to use
:type flags: string
:param params: optional positional args to use
:type params: string
:param fail_ok: if True an exception is not raised when the cli return
code is non-zero
:type fail_ok: boolean
:param merge_stderr:  if True the stderr buffer is merged into stdout
:type merge_stderr: boolean'

def cmd_with_auth(self, cmd, action, flags='', params='', fail_ok=False, merge_stderr=False):

    creds = ('--os-username    %s    --os-tenant-name    %s    --os-password    %s    --os-auth-url    %s' % (self.username, self.tenant_name, self.password, self.uri))
    if self.insecure:
        flags = ((creds + '    --insecure    ') + flags)
    else:
        flags = ((creds + '    ') + flags)
    return execute(cmd, action, flags, params, fail_ok, merge_stderr, self.cli_dir, prefix=self.prefix)
