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
This commit is contained in:
David Moreau Simard 2018-12-14 11:31:07 -05:00
parent 9e61bfbb51
commit 04936f2fe0
No known key found for this signature in database
GPG Key ID: CBEB466764A9E621
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,3 @@
import os
LOCATION = os.path.abspath(os.path.dirname(__file__))

21
ara/plugins/__main__.py Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
from ara.plugins import LOCATION
if __name__ == "__main__":
print(LOCATION)