Completed
Pull Request — master (#348)
by Tomaz
02:21
created

CreateVMAction   A

Complexity

Total Complexity 20

Size/Duplication

Total Lines 39
Duplicated Lines 0 %
Metric Value
wmc 20
dl 0
loc 39
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
F run() 0 36 20
1
from lib.actions import BaseAction
2
3
__all__ = [
4
    'ImportPublicSSHKeyAction'
5
]
6
7
8
class ImportPublicSSHKeyAction(BaseAction):
9
    api_type = 'compute'
10
11
    def run(self, credentials, name, key_material):
12
        driver = self._get_driver_for_credentials(credentials=credentials)
13
        return driver.import_key_pair_from_string(name=name,
14
                                                  key_material=key_material)
15