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

CreateNetworkDomainAction   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %
Metric Value
dl 0
loc 13
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 11 1
1
from lib import actions
2
3
__all__ = [
4
    'CreateNetworkDomainAction',
5
]
6
7
8
class CreateNetworkDomainAction(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
        location_id = kwargs['location']
16
        del kwargs['location']
17
        driver = self._get_compute_driver(region)
18
        location = driver.ex_get_location_by_id(str(location_id))
19
        kwargs['location'] = location
20
        return self._do_function(driver, action, **kwargs)
21