'Parses the XML returned by the device to check the return code.
Raises a DotHillRequestError error if the return code is not 0
or if the return code is None.'

def _assert_response_ok(self, tree):

    return_code = tree.findtext(".//PROPERTY[@name='return-code']")
    if (not return_code):
        raise exception.DotHillRequestError(message='No    status    found')
    if (return_code == '0'):
        return
    msg = ('%s    (%s)' % (tree.findtext(".//PROPERTY[@name='response']"), return_code))
    raise exception.DotHillRequestError(message=msg)
