Add subscriptions API to GVNFM
[vfc/gvnfm/vnflcm.git] / lcm / lcm / pub / database / models.py
index e54fae2..4f4fc9f 100644 (file)
@@ -293,3 +293,20 @@ class CPInstModel(models.Model):
     relatedvl = models.CharField(db_column='RELATEDVL', max_length=255, blank=True, null=True)
     relatedcp = models.CharField(db_column='RELATEDCP', max_length=255, blank=True, null=True)
     relatedport = models.CharField(db_column='RELATEDPORT', max_length=255, blank=True, null=True)
+
+
+class SubscriptionModel(models.Model):
+    class Meta:
+        db_table = 'SUBSCRIPTION'
+    subscription_id = models.CharField(db_column='SUBSCRIPTIONID', max_length=255, primary_key=True)
+    callback_uri = models.CharField(db_column='CALLBACKURI', max_length=255)
+    auth_info = models.TextField(db_column='AUTHINFO', max_length=20000, blank=True, null=True)
+    notification_types = models.TextField(db_column='NOTIFICATIONTYPES',
+                                          null=True)
+    operation_types = models.TextField(db_column='OPERATIONTYPES',
+                                       null=True)
+    operation_states = models.TextField(db_column='OPERATIONSTATES',
+                                        null=True)
+    vnf_instance_filter = models.TextField(db_column='VNFINSTANCEFILTER',
+                                           null=True)
+    links = models.TextField(db_column='LINKS', max_length=20000)