Added efficacy specification to /goals
In this changeset, I added the new Efficacy, EfficacySpecification and IndicatorSpecification classes which are the main components for computing an efficacy. Partially Implements: blueprint efficacy-indicator Change-Id: I3a1d62569de2dd6bb6f9a52f6058313fa2b886ce
This commit is contained in:
27
watcher/decision_engine/solution/efficacy.py
Normal file
27
watcher/decision_engine/solution/efficacy.py
Normal file
@@ -0,0 +1,27 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
# Copyright (c) 2016 b<>com
|
||||
#
|
||||
# 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.
|
||||
|
||||
from watcher.common import utils
|
||||
|
||||
|
||||
class Indicator(utils.Struct):
|
||||
|
||||
def __init__(self, name, description, unit, value):
|
||||
super(Indicator, self).__init__()
|
||||
self.name = name
|
||||
self.description = description
|
||||
self.unit = unit
|
||||
self.value = value
|
||||
Reference in New Issue
Block a user