Update the code so "st2 execution get" works correctly out of the box
with include_attributes filters in place.
@@ -242,15 +242,23 @@ class ResourceViewCommand(ResourceCommand):
"""
@classmethod
- def _get_include_attributes(cls, args):
+ def _get_include_attributes(cls, args, extra_attributes=None):
"""
Return a list of attributes to send to the API using ?include_attributes filter.
If None / empty list is returned it's assumed no filtering is to be performed and all
attributes are to be retrieved.
+
+ :param extra_attributes: Additional include attributes which should always be included.
+ :type extra_attributes: ``list`` of ``str``
"""
+ extra_attributes = extra_attributes or []
+
include_attributes = []
+ if extra_attributes:
+ include_attributes.extend(extra_attributes)
+
# If user specifies which attributes to retrieve via CLI --attr / -a argument, take that
# into account
