Completed
Pull Request — master (#543)
by
unknown
03:06
created

interface_vrrp_vip   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 13
rs 10
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 interface_vrrp_vip(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.interface.vrrp_vip(**kwargs)
17
        return 0
18