def enabled(self):
        """bool: ``True`` if BGP is enabled; ``False`` if BGP is disabled.
        """
        namespace = 'urn:ietf:params:xml:ns:netconf:base:1.0'
        bgp_filter = 'rbridge-id/router/bgp'
        bgp_config = ET.Element('get-config', xmlns="%s" % namespace)
        source = ET.SubElement(bgp_config, 'source')
        ET.SubElement(source, 'running')
        ET.SubElement(bgp_config, 'filter',
                      type="xpath", select="%s" % bgp_filter)
        bgp_config = self._callback(bgp_config, handler='get')
        namespace = 'urn:brocade.com:mgmt:brocade-bgp'
        enabled = bgp_config.find('.//*{%s}bgp' % namespace)
        if enabled is not None:
            return True
        return False
def enabled ( self ) : namespace = 'urn:ietf:params:xml:ns:netconf:base:1.0' bgp_filter = 'rbridge-id/router/bgp' bgp_config = ET . Element ( 'get-config' , xmlns = "%s" % namespace ) source = ET . SubElement ( bgp_config , 'source' ) ET . SubElement ( source , 'running' ) ET . SubElement ( bgp_config , 'filter' , type = "xpath" , select = "%s" % bgp_filter ) bgp_config = self . _callback ( bgp_config , handler = 'get' ) namespace = 'urn:brocade.com:mgmt:brocade-bgp' enabled = bgp_config . find ( './/*{%s}bgp' % namespace ) if enabled is not None : return True return False
bool: ``True`` if BGP is enabled; ``False`` if BGP is disabled.