Fix fetching existing AS (#58756)

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
This commit is contained in:
Nilashish Chakraborty 2019-07-05 18:03:08 +05:30 committed by GitHub
parent 83f92987b8
commit 709fbcf804
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,7 +23,8 @@ class Provider(CliProvider):
existing_as = None existing_as = None
if config: if config:
match = re.search(r'router bgp (\d+)', config, re.M) match = re.search(r'router bgp (\d+)', config, re.M)
existing_as = match.group(1) if match:
existing_as = match.group(1)
operation = self.params['operation'] operation = self.params['operation']