Conditions | 7 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
1 | from lib.base import QualysBaseAction |
||
9 | def run(self, hosts, vulnerability_management, policy_compliance): |
||
10 | if policy_compliance and vulnerability_management: |
||
11 | host_type = 'both' |
||
12 | elif policy_compliance and not vulnerability_management: |
||
13 | host_type = 'pc' |
||
14 | elif not policy_compliance and vulnerability_management: |
||
15 | host_type = 'vm' |
||
16 | else: |
||
17 | host_type = '' |
||
18 | hosts = self.connection.addHost(str.join(',', hosts), host_type) |
||
19 | return self.resultsets.formatter(hosts) |
||
20 |