'Invokes API and checks execution status as success.
Need to set enable_tunneling to True explicitly to achieve it.
This helps to use same connection instance to enable or disable
tunneling. The vserver or vfiler should be set before this call
otherwise tunneling remains disabled.'

def invoke_successfully(self, na_element, enable_tunneling=False):

    result = self.send_http_request(na_element, enable_tunneling)
    if (result.has_attr('status') and (result.get_attr('status') == 'passed')):
        return result
    code = (result.get_attr('errno') or result.get_child_content('errorno') or 'ESTATUSFAILED')
    if (code == ESIS_CLONE_NOT_LICENSED):
        msg = 'Clone    operation    failed:    FlexClone    not    licensed.'
    else:
        msg = (result.get_attr('reason') or result.get_child_content('reason') or 'Execution    status    is    failed    due    to    unknown    reason')
    raise NaApiError(code, msg)
