'get_config'

def get_config(self, xml_str):

    con_obj = None
    try:
        con_obj = self.mc.get(filter=xml_str)
    except RPCError:
        err = get_exception()
        self._module.fail_json(msg=('Error:    %s' % str(err).replace('\r\n', '')))
    set_id = get_nc_set_id(con_obj.xml)
    if (not set_id):
        return con_obj.xml
    xml_str = con_obj.xml
    while set_id:
        set_attr = dict()
        set_attr['set-id'] = str(set_id)
        xsd_fetch = xml_.new_ele_ns('get-next', 'http://www.huawei.com/netconf/capability/base/1.0', set_attr)
        try:
            con_obj_next = self.mc.dispatch(xsd_fetch)
        except RPCError:
            err = get_exception()
            self._module.fail_json(msg=('Error:    %s' % str(err).replace('\r\n', '')))
        if ('<data/>' in con_obj_next.xml):
            break
        xml_str = merge_nc_xml(xml_str, con_obj_next.xml)
        set_id = get_nc_set_id(con_obj_next.xml)
    return xml_str
