Completed
Pull Request — master (#415)
by Anthony
02:10
created

DeleteVlanAction.run()   A

Complexity

Conditions 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 1
dl 0
loc 11
rs 9.4285
1
from lib import actions
2
3
__all__ = [
4
    'DeleteVlanAction',
5
]
6
7
8
class DeleteVlanAction(actions.BaseAction):
9
10
    def run(self, **kwargs):
11
        action = kwargs['action']
12
        del kwargs['action']
13
        region = kwargs['region']
14
        del kwargs['region']
15
        vlan_id = kwargs['vlan_id']
16
        del kwargs['vlan_id']
17
        driver = self._get_compute_driver(region)
18
        vlan = driver.ex_get_vlan(vlan_id)
19
        kwargs['vlan'] = vlan
20
        return self._do_function(driver, action, **kwargs)
21