Total Complexity | 4 |
Total Lines | 14 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 1 |
1 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more |
||
19 | class GetMid(ICSPBaseActions): |
||
20 | def run(self, identifiers, identifier_type, connection_details=None): |
||
21 | |||
22 | self.set_connection(connection_details) |
||
23 | self.get_sessionid() |
||
24 | mids = self.get_mids(identifiers, identifier_type) |
||
25 | |||
26 | if mids: |
||
27 | if len(mids) == 1: |
||
28 | return {'mid': int(mids[0])} |
||
29 | elif len(mids) > 1: |
||
30 | return mids |
||
31 | else: |
||
32 | raise ValueError("No Servers Found") |
||
33 |