From 04936f2fe09924f36c4a385cd09cb8529c18fda2 Mon Sep 17 00:00:00 2001 From: David Moreau Simard Date: Fri, 14 Dec 2018 11:31:07 -0500 Subject: [PATCH] Add helper command to determine plugins location This is the equivalent of the 0.x "python -m ara.setup.callback_plugins" and "python -m ara.setup.action_plugins". This allows users to run "python -m ara.plugins" in order to determine the location of the plugins. Change-Id: I8fddf3507916ae58c83af5e8400e7f7af83ba98c --- ara/plugins/__init__.py | 3 +++ ara/plugins/__main__.py | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 ara/plugins/__main__.py diff --git a/ara/plugins/__init__.py b/ara/plugins/__init__.py index e69de29..d6fa966 100644 --- a/ara/plugins/__init__.py +++ b/ara/plugins/__init__.py @@ -0,0 +1,3 @@ +import os + +LOCATION = os.path.abspath(os.path.dirname(__file__)) diff --git a/ara/plugins/__main__.py b/ara/plugins/__main__.py new file mode 100644 index 0000000..77cd7c2 --- /dev/null +++ b/ara/plugins/__main__.py @@ -0,0 +1,21 @@ +# Copyright (c) 2018 Red Hat, Inc. +# +# This file is part of ARA: Ansible Run Analysis. +# +# ARA is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# ARA is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with ARA. If not, see . + +from ara.plugins import LOCATION + +if __name__ == "__main__": + print(LOCATION)