Completed
Pull Request — master (#336)
by James
03:24
created

CreateVMAction   A

Complexity

Total Complexity 18

Size/Duplication

Total Lines 40
Duplicated Lines 0 %
Metric Value
wmc 18
dl 0
loc 40
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
F run() 0 37 18
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