-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Expand `ListResourceActions` to support the root App Prior to this change, `ListResourceActions` could only be performed on resources managed by the Application; this implicitly did not include the Application itself, unless it was a self-referential Application. This prevents the listing of actions on the Application itself. This change detects when the requested resource is an Application with the same name as the managing Application, thus bypassing the fetching of the requested resource listing and simply retrieving the Application. It then retrieves the resource details from the Application itself, instead of any sub-resource. Signed-off-by: David Monks <david.monks@octoenergy.com> * Expand `RunResourceAction` to support the root App Prior to this change, similar to the `ListResourceActions` function updated in the previous commit, the `RunResourceAction` function only supports running actions on resources managed by the Application, rather than the Application itself. This change re-uses in the `RunResourceAction` function the new behaviour introduced in the previous commit to make the Application a valid target for resource actions. Signed-off-by: David Monks <david.monks@octoenergy.com> * Extract App actions resource gathering to a private function This abstracts the fetching of resources that can provide custom resource actions for a given Application via the CLI to a new private function next to the two Commands that do it. This is a precursor to expanding this set of resources to include the Application itself. Signed-off-by: David Monks <david.monks@octoenergy.com> * Include the Application in the `actions list` CLI command Prior to this change, only resources managed by the Application (and not the Application itself) were able to have actions associated with them for running via the CLI. This change includes the Application itself in the list of resources to check for custom resource actions when listing or running them via the CLI. Signed-off-by: David Monks <david.monks@octoenergy.com> Signed-off-by: David Monks <david.monks@octoenergy.com>
- Loading branch information
Showing
2 changed files
with
76 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters