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