Exemple #1
0
		def parse (fname):
			conf = Configuration()
			conf.register(SectionBGP,        ['bgp'])
			conf.register(SectionFamily,     ['bgp','family'])
			conf.register(SectionCapability, ['bgp','capability'])
			conf.register(SectionSession,    ['bgp','session'])
			conf.register(SectionProcess,    ['bgp','process'])
			conf.register(SectionNeighbor,   ['bgp','neighbor'])
			conf.register(SectionBMP,        ['bmp'])

			return conf.parse_file(fname)
        def parse(fname):
            conf = Configuration()
            conf.register(SectionBGP, ['bgp'])
            conf.register(SectionFamily, ['bgp', 'family'])
            conf.register(SectionCapability, ['bgp', 'capability'])
            conf.register(SectionSession, ['bgp', 'session'])
            conf.register(SectionProcess, ['bgp', 'process'])
            conf.register(SectionNeighbor, ['bgp', 'neighbor'])
            conf.register(SectionBMP, ['bmp'])

            return conf.parse_file(fname)
Exemple #3
0
def parse (command):
	conf = Configuration()
	conf.register(SectionShow,['show'])
	return conf.parse_string(command)