# Copyright 2018: Mirantis Inc.
# All Rights Reserved.
#
#    Licensed 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.


RESOLVED_STATUSES = ('UP', 'OK', 'resolved')
SUBJECT_FMT = '[{}][{}] {}'


def alert_fields_and_action(alert):
    fields = []

    if alert['status'] in RESOLVED_STATUSES:
        action = 'close_case'
        fields.append(alert['labels'])
    else:
        action = 'create_case'
        # Order matters
        subject = SUBJECT_FMT.format(alert['labels']['environment'],
                                     alert['labels'].get('host', 'none'),
                                     alert['annotations']['summary'])
        fields.append(subject)
        fields.append(alert['annotations']['description'])
        fields.append(alert['status'])
        fields.append(alert['labels'])
    return fields, action
