Remove a crew deployment. Args: uuid (Optional[str]): The UUID of the crew to remove.
(self, uuid: str | None)
| 631 | self._display_logs(response.json()) |
| 632 | |
| 633 | def remove_crew(self, uuid: str | None) -> None: |
| 634 | """ |
| 635 | Remove a crew deployment. |
| 636 | |
| 637 | Args: |
| 638 | uuid (Optional[str]): The UUID of the crew to remove. |
| 639 | """ |
| 640 | self._telemetry.remove_crew_span(uuid) |
| 641 | console.print("Removing deployment...", style="bold blue") |
| 642 | |
| 643 | if uuid: |
| 644 | response = self.plus_api_client.delete_crew_by_uuid(uuid) |
| 645 | elif self.project_name: |
| 646 | response = self.plus_api_client.delete_crew_by_name(self.project_name) |
| 647 | else: |
| 648 | self._standard_no_param_error_message() |
| 649 | return |
| 650 | |
| 651 | if response.status_code == 204: |
| 652 | console.print( |
| 653 | f"Crew '{self.project_name}' removed successfully.", style="green" |
| 654 | ) |
| 655 | else: |
| 656 | console.print( |
| 657 | f"Failed to remove crew '{self.project_name}'", style="bold red" |
| 658 | ) |