| Total Complexity | 3 |
| Total Lines | 13 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more |
||
| 19 | class DeleteServer(ICSPBaseActions): |
||
| 20 | def run(self, mids, connection_details=None): |
||
| 21 | self.set_connection(connection_details) |
||
| 22 | self.get_sessionid() |
||
| 23 | for mid in mids: |
||
| 24 | try: |
||
| 25 | isinstance(mid, int) |
||
| 26 | except: |
||
| 27 | raise ValueError("MID values must be numbers") |
||
| 28 | |||
| 29 | endpoint = "/rest/os-deployment-servers/%s" % (mid) |
||
| 30 | self.icsp_delete(endpoint) |
||
| 31 | return |
||
| 32 |