(self, resource, *args, **kwargs)
| 1710 | |
| 1711 | class ActionExecutionReRunCommand(ActionRunCommandMixin, resource.ResourceCommand): |
| 1712 | def __init__(self, resource, *args, **kwargs): |
| 1713 | |
| 1714 | super(ActionExecutionReRunCommand, self).__init__( |
| 1715 | resource, |
| 1716 | kwargs.pop("name", "re-run"), |
| 1717 | "Re-run a particular action.", |
| 1718 | *args, |
| 1719 | **kwargs, |
| 1720 | ) |
| 1721 | |
| 1722 | self.parser.add_argument( |
| 1723 | "id", nargs="?", metavar="id", help="ID of action execution to re-run " |
| 1724 | ) |
| 1725 | self.parser.add_argument( |
| 1726 | "parameters", |
| 1727 | nargs="*", |
| 1728 | help="List of keyword args, positional args, " |
| 1729 | "and optional args for the action.", |
| 1730 | ) |
| 1731 | self.parser.add_argument( |
| 1732 | "--tasks", nargs="*", help="Name of the workflow tasks to re-run." |
| 1733 | ) |
| 1734 | self.parser.add_argument( |
| 1735 | "--no-reset", |
| 1736 | dest="no_reset", |
| 1737 | nargs="*", |
| 1738 | help="Name of the with-items tasks to not reset. This only " |
| 1739 | "applies to Orquesta workflows. By default, all iterations " |
| 1740 | "for with-items tasks is rerun. If no reset, only failed " |
| 1741 | " iterations are rerun.", |
| 1742 | ) |
| 1743 | self.parser.add_argument( |
| 1744 | "-a", |
| 1745 | "--async", |
| 1746 | action="store_true", |
| 1747 | dest="action_async", |
| 1748 | help="Do not wait for action to finish.", |
| 1749 | ) |
| 1750 | self.parser.add_argument( |
| 1751 | "-e", |
| 1752 | "--inherit-env", |
| 1753 | action="store_true", |
| 1754 | dest="inherit_env", |
| 1755 | help="Pass all the environment variables " |
| 1756 | 'which are accessible to the CLI as "env" ' |
| 1757 | "parameter to the action. Note: Only works " |
| 1758 | "with python, local and remote runners.", |
| 1759 | ) |
| 1760 | self.parser.add_argument( |
| 1761 | "-h", |
| 1762 | "--help", |
| 1763 | action="store_true", |
| 1764 | dest="help", |
| 1765 | help="Print usage for the given action.", |
| 1766 | ) |
| 1767 | self._add_common_options() |
| 1768 | |
| 1769 | @add_auth_token_to_kwargs_from_cli |
nothing calls this directly
no test coverage detected