Completed
Pull Request — master (#462)
by
unknown
02:34
created

GetVMUUID   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 9
Duplicated Lines 0 %
Metric Value
wmc 3
dl 0
loc 9
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 7 3
1
from vmwarelib import inventory
2
from vmwarelib.actions import BaseAction
3
4
5
class GetVMUUID(BaseAction):
6
7
    def run(self, vms):
8
        results = []
9
        for vm in vms:
10
            vm = inventory.get_virtualmachine(self.si_content, name=vm)
11
            if vm:
12
                results.append({vm.name: vm.summary.config.uuid})
13
        return results
14