projects
/
osm
/
POL.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Feature 10923: Autohealing
[osm/POL.git]
/
osm_policy_module
/
migrations
/
002_add_vnf_alarm.py
diff --git
a/osm_policy_module/migrations/002_add_vnf_alarm.py
b/osm_policy_module/migrations/002_add_vnf_alarm.py
index
70360e4
..
65bf26b
100644
(file)
--- a/
osm_policy_module/migrations/002_add_vnf_alarm.py
+++ b/
osm_policy_module/migrations/002_add_vnf_alarm.py
@@
-60,6
+60,10
@@
def migrate(migrator, database, fake=False, **kwargs):
nsr_id = pw.CharField(max_length=255)
vnf_member_index = pw.IntegerField()
vdu_name = pw.CharField(max_length=255)
nsr_id = pw.CharField(max_length=255)
vnf_member_index = pw.IntegerField()
vdu_name = pw.CharField(max_length=255)
+ last_action = pw.CharField(max_length=255, default='insufficient-data')
+ id_suffix = pw.IntegerField()
+ ok_ack = pw.BooleanField(default=False)
+ alarm_ack = pw.BooleanField(default=False)
class Meta:
table_name = "vnfalarm"
class Meta:
table_name = "vnfalarm"
@@
-69,8
+73,13
@@
def migrate(migrator, database, fake=False, **kwargs):
id = pw.AutoField()
type = pw.CharField(max_length=255)
url = pw.TextField()
id = pw.AutoField()
type = pw.CharField(max_length=255)
url = pw.TextField()
- alarm = pw.ForeignKeyField(backref='actions', column_name='alarm_id', field='id',
- model=migrator.orm['vnfalarm'], on_delete='CASCADE')
+ alarm = pw.ForeignKeyField(
+ backref="actions",
+ column_name="alarm_id",
+ field="id",
+ model=migrator.orm["vnfalarm"],
+ on_delete="CASCADE",
+ )
class Meta:
table_name = "alarmaction"
class Meta:
table_name = "alarmaction"
@@
-79,6
+88,6
@@
def migrate(migrator, database, fake=False, **kwargs):
def rollback(migrator, database, fake=False, **kwargs):
"""Write your rollback migrations here."""
def rollback(migrator, database, fake=False, **kwargs):
"""Write your rollback migrations here."""
- migrator.remove_model(
'vnfalarm'
)
+ migrator.remove_model(
"vnfalarm"
)
- migrator.remove_model(
'alarmaction'
)
+ migrator.remove_model(
"alarmaction"
)