| 601 | |
| 602 | |
| 603 | class InquiryResourceManager(ResourceManager): |
| 604 | @add_auth_token_to_kwargs_from_env |
| 605 | def respond(self, inquiry_id, inquiry_response, **kwargs): |
| 606 | """ |
| 607 | Update st2.inquiry.respond action |
| 608 | Update st2client respond command to use this? |
| 609 | """ |
| 610 | url = "/%s/%s" % (self.resource.get_url_path_name(), inquiry_id) |
| 611 | |
| 612 | payload = {"id": inquiry_id, "response": inquiry_response} |
| 613 | |
| 614 | response = self.client.put(url, payload, **kwargs) |
| 615 | |
| 616 | if response.status_code != http_client.OK: |
| 617 | self.handle_error(response) |
| 618 | |
| 619 | return self.resource.deserialize(parse_api_response(response)) |
| 620 | |
| 621 | |
| 622 | class TriggerInstanceResourceManager(ResourceManager): |