diff --git a/CHANGELOG.rst b/CHANGELOG.rst index bd17daa2cd..7ece29e1cd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -62,6 +62,9 @@ In development (improvement) * Change st2api so that a full execution object is returned instead of an error message, when an API client requests cancellation of an execution that is already canceled +* Remove ``packs.info`` action because ``.gitinfo`` file has been deprecated with the new pack + management approach. Now pack directories are actual checkouts of the corresponding pack git + repositories so this file is not needed anymore. 2.0.1 - September 30, 2016 -------------------------- diff --git a/contrib/packs/actions/info.yaml b/contrib/packs/actions/info.yaml deleted file mode 100644 index 82d25983d7..0000000000 --- a/contrib/packs/actions/info.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -name: "info" -runner_type: "python-script" -description: "Get currently deployed pack information" -enabled: true -entry_point: "pack_mgmt/info.py" -parameters: - pack: - type: "string" - description: "Name of pack to introspect" - required: true - diff --git a/contrib/packs/actions/pack_mgmt/info.py b/contrib/packs/actions/pack_mgmt/info.py deleted file mode 100644 index 0d09b07a25..0000000000 --- a/contrib/packs/actions/pack_mgmt/info.py +++ /dev/null @@ -1,54 +0,0 @@ -# Licensed to the StackStorm, Inc ('StackStorm') under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import os -import json - -from st2common.runners.base_action import Action -from st2common.content.utils import get_packs_base_paths - -GITINFO_FILE = '.gitinfo' - - -class PackInfo(Action): - def run(self, pack): - packs_base_paths = get_packs_base_paths() - - pack_git_info_path = None - for packs_base_path in packs_base_paths: - git_info_path = os.path.join(packs_base_path, pack, GITINFO_FILE) - - if os.path.isfile(git_info_path): - pack_git_info_path = git_info_path - break - - if not pack_git_info_path: - error = ('Pack "%s" doesn\'t exist or it doesn\'t contain a .gitinfo file' % (pack)) - raise Exception(error) - - try: - details = self._parse_git_info_file(git_info_path) - except Exception as e: - error = ('Pack "%s" doesn\'t contain a valid .gitinfo file: %s' % (pack, str(e))) - raise Exception(error) - - return details - - def _parse_git_info_file(self, file_path): - with open(file_path) as data_file: - details = json.load(data_file) - return details - - return details