nsr_id = CharField()
vnf_member_index = CharField()
vdu_name = CharField()
- last_action = CharField(default='insufficient-data')
+ last_action = CharField(default="insufficient-data")
id_suffix = IntegerField()
ok_ack = BooleanField(default=False)
alarm_ack = BooleanField(default=False)
cooldown_time = IntegerField()
count_index = IntegerField()
last_heal = DateTimeField(default=datetime.datetime.now)
- last_status = CharField(default='insufficient-data')
+ last_status = CharField(default="insufficient-data")
day1 = BooleanField(default=False)
class ScalingAlarmRepository:
@staticmethod
def list(*expressions) -> Iterable[ScalingAlarm]:
- return ScalingAlarm.select().where(*expressions)
+ return ScalingAlarm.select().where(*expressions).__iter__()
@staticmethod
def get(*expressions, join_classes: List = None) -> ScalingAlarm:
class ScalingGroupRepository:
@staticmethod
def list(*expressions) -> Iterable[ScalingGroup]:
- return ScalingGroup.select().where(*expressions)
+ return ScalingGroup.select().where(*expressions).__iter__()
@staticmethod
def get(*expressions) -> ScalingGroup:
if join_classes:
for join_class in join_classes:
query = query.join(join_class)
- return query.where(*expressions)
+ return query.where(*expressions).__iter__()
@staticmethod
def get(*expressions, join_classes: List = None) -> ScalingPolicy:
if join_classes:
for join_class in join_classes:
query = query.join(join_class)
- return query.where(*expressions)
+ return query.where(*expressions).__iter__()
@staticmethod
def get(*expressions, join_classes: List = None) -> ScalingCriteria:
class VnfAlarmRepository:
@staticmethod
def list(*expressions) -> Iterable[VnfAlarm]:
- return VnfAlarm.select().where(*expressions)
+ return VnfAlarm.select().where(*expressions).__iter__()
@staticmethod
def get(*expressions) -> VnfAlarm:
class AlarmActionRepository:
@staticmethod
def list(*expressions) -> Iterable[AlarmAction]:
- return AlarmAction.select().where(*expressions)
+ return AlarmAction.select().where(*expressions).__iter__()
@staticmethod
def get(*expressions) -> AlarmAction:
class HealingActionRepository:
@staticmethod
def list(*expressions) -> Iterable[HealingAction]:
- log.info("### Printing healing action db alarm {}".format(HealingAction.select().where(*expressions)))
- return HealingAction.select().where(*expressions)
+ log.info(
+ "### Printing healing action db alarm {}".format(
+ HealingAction.select().where(*expressions)
+ )
+ )
+ return HealingAction.select().where(*expressions).__iter__()
@staticmethod
def get(*expressions) -> HealingAction: