From 2127f3c96dda39fa591d09231c9f067df080f5f6 Mon Sep 17 00:00:00 2001 From: Jeff Bradberry Date: Wed, 29 Jan 2020 14:41:39 -0500 Subject: [PATCH] Add organizations as a resource type to export --- awxkit/awxkit/cli/resource.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awxkit/awxkit/cli/resource.py b/awxkit/awxkit/cli/resource.py index 47b8c83a39..107dccf86c 100644 --- a/awxkit/awxkit/cli/resource.py +++ b/awxkit/awxkit/cli/resource.py @@ -157,6 +157,7 @@ class Export(CustomCommand): def extend_parser(self, parser): resources = parser.add_argument_group('resources') resources.add_argument('--users', nargs='?', const='') + resources.add_argument('--organizations', nargs='?', const='') def get_resources(self, client, resource, value): api_resource = getattr(client.v2, resource) @@ -182,7 +183,7 @@ class Export(CustomCommand): parsed = parser.parse_known_args()[0] data = {} - for resource in ('users',): + for resource in ('users', 'organizations'): value = getattr(parsed, resource, None) if value is None: continue