bgp_max_paths   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 12 2
1
from pynos import device
2
from st2actions.runners.pythonrunner import Action
3
4
5
class bgp_max_paths(Action):
6
    def run(self, **kwargs):
7
        conn = (str(kwargs.pop('ip')), str(kwargs.pop('port')))
8
        auth = (str(kwargs.pop('username')), str(kwargs.pop('password')))
9
        test = kwargs.pop('test', False)
10
        callback = kwargs.pop('callback', None)
11
        with device.Device(
12
            conn=conn, auth=auth,
13
            test=test,
14
            callback=callback
15
        ) as dev:
16
            dev.bgp.max_paths(**kwargs)
17
        return 0
18