def parse (self, name, command):
		if command not in self.known:
			return self.error.set('unknown command %s options are %s' % (command,', '.join(self.known)))

		try:
			if command in self.default:
				insert = self.known[command](self.tokeniser.iterate,self.default[command])
			else:
				insert = self.known[command](self.tokeniser.iterate)

			action = self.action[command]

			if action == 'set-command':
				self.scope.set(command,insert)
			elif action == 'extend-name':
				self.scope.extend(name,insert)
			elif action == 'append-name':
				self.scope.append(name,insert)
			elif action == 'append-command':
				self.scope.append(command,insert)
			elif action == 'attribute-add':
				self.scope.attribute_add(name,insert)
			elif action == 'nlri-set':
				self.scope.nlri_assign(name,self.assign[command],insert)
			elif action == 'nlri-add':
				for adding in insert:
					self.scope.nlri_add(name,command,adding)
			elif action == 'nlri-nexthop':
				self.scope.nlri_nexthop(name,insert)
			elif action == 'nexthop-and-attribute':
				ip, attribute = insert
				if ip:
					self.scope.nlri_nexthop(name,ip)
				if attribute:
					self.scope.attribute_add(name,attribute)
			elif action == 'nop':
				pass
			else:
				raise RuntimeError('name %s command %s has no action set' % (name,command))
			return True
		except __HOLE__, exc:
			return self.error.set(str(exc))

		return True
dataset/ETHPy150Open Exa-Networks/exabgp/lib/exabgp/configuration/core/section.py/Section.parse