[CORD-2550] adding fields

Change-Id: I54fadc7bcb795fd05257b1142638e930ecbae16f
diff --git a/samples/cem-profile.json b/samples/cem-profile.json
new file mode 100644
index 0000000..2a76901
--- /dev/null
+++ b/samples/cem-profile.json
@@ -0,0 +1,19 @@
+
+{
+  "name":"testcem",
+  "DlSchedType":"RR",
+  "UlSchedType":"RR",
+  "DlAllocRBRate":16,
+  "UlAllocRBRate":15,
+  "start":0,
+  "end":0,
+  "AdmControl":1,
+  "CellIndividualOffset":1,
+  "mmeip":"192.168.28.35",
+  "mmeport":"123",
+  "SubsProfile":"",
+  "DlWifiRate":13,
+  "DlUeAllocRbRate":12,
+  "enodeb_id": 1,
+  "handover_id": 1
+}
\ No newline at end of file
diff --git a/samples/handover.json b/samples/handover.json
index 798137b..0fad7f0 100644
--- a/samples/handover.json
+++ b/samples/handover.json
@@ -6,5 +6,7 @@
   "A5Thresh2Rsrq":-8,
   "A5TriggerType":0,
   "HysteresisA3":1,
-  "HysteresisA5":1
+  "HysteresisA5":1,
+  "A3TriggerQuantity": 10,
+  "A5TriggerQuantity": 20
 }
\ No newline at end of file
diff --git a/samples/profile.json b/samples/profile.json
index fe026c1..0d97598 100644
--- a/samples/profile.json
+++ b/samples/profile.json
@@ -1,14 +1,17 @@
 {
-  "id": 1,
   "AdmControl":"0",
   "DlSchedType":"RR",
-  "start":1516780800,
+  "start": 1516780800,
   "UlSchedType":"RR",
-  "end":1517385600,
+  "end": 1517385600,
   "CellIndividualOffset":1,
   "DlAllocRBRate":1,
   "name":"test-profile",
   "UlAllocRBRate":12,
-  "enodeb_id":1,
+  "mmeip": "10.20.30.40",
+  "mmeport": "8080",
+  "DlWifiRate": "80",
+  "DlUeAllocRbRate": "70",
+  "enodeb_id":5,
   "handover_id":1
 }
\ No newline at end of file
diff --git a/xos/models/models.py b/xos/models/models.py
index 594255a..4493452 100644
--- a/xos/models/models.py
+++ b/xos/models/models.py
@@ -29,6 +29,8 @@
     class Meta:
         proxy = True
 
+    ## TODO do not allow enbId duplicates
+
 
 class Handover(Handover_decl):
     class Meta:
diff --git a/xos/models/progran.xproto b/xos/models/progran.xproto
index 909f6e1..8591291 100644
--- a/xos/models/progran.xproto
+++ b/xos/models/progran.xproto
@@ -39,12 +39,17 @@
     required int32 DlAllocRBRate = 2 [db_index = False, null = False, blank = False];
     required string UlSchedType = 3 [default = "vm", choices = "(('RR', 'Round Robin'),)", max_length = 30, blank = False, null = False, db_index = False];
     required int32 UlAllocRBRate = 4 [db_index = False, null = False, blank = False];
-    required string start = 5 [content_type = "date", null = False, blank = True];
-    required string end = 6 [content_type = "date", null = False, blank = True];
-    required string AdmControl = 7 [default = "0", choices = "(('0', 'ALL'), ('1', 'Voice Only'), ('2', 'Data Only'))", max_length = 1, blank = False, null = False, db_index = False];
+    required string start = 5 [content_type = "date", null = True, blank = True];
+    required string end = 6 [content_type = "date", null = True, blank = True];
+    required int32 AdmControl = 7 [default = "0", choices = "(('0', 'ALL'), ('1', 'Voice Only'), ('2', 'Data Only'))", max_length = 1, blank = False, null = False, db_index = False];
     required int32 CellIndividualOffset = 8 [db_index = False, null = False, blank = False];
-    required manytoone enodeb->ENodeB:profiles = 9 [null = True, blank = True];
-    required manytoone handover->Handover:profiles = 10 [null = False, blank = False];
+    required string mmeip = 9 [db_index = False, max_length = 256, null = False, blank = False];
+    required string mmeport = 10 [db_index = False, max_length = 256, null = False, blank = False];
+    required int32 DlWifiRate = 11 [default = 100, db_index = False, null = False, blank = False];
+    required int32 DlUeAllocRbRate = 12 [default = 100, db_index = False, null = False, blank = False];
+    required string SubsProfile = 13 [ db_index = False, null = True, blank = True];
+    required manytoone enodeb->ENodeB:profiles = 14 [null = True, blank = True];
+    required manytoone handover->Handover:profiles = 15 [null = False, blank = False];
 }
 
 
diff --git a/xos/synchronizer/steps/helpers.py b/xos/synchronizer/steps/helpers.py
index 6795068..d52422b 100644
--- a/xos/synchronizer/steps/helpers.py
+++ b/xos/synchronizer/steps/helpers.py
@@ -27,7 +27,10 @@
 
     @staticmethod
     def get_progran_onos_info():
-        progran_service = ProgranService.objects.all()[0]
+        try:
+            progran_service = ProgranService.objects.all()[0]
+        except IndexError:
+            log.error("Cannot find Progran Service, does it exists?")
         return ProgranHelpers.get_onos_info_from_service(progran_service)
 
     @staticmethod
diff --git a/xos/synchronizer/steps/sync_progranserviceinstance.py b/xos/synchronizer/steps/sync_progranserviceinstance.py
index b8cbd3b..3b8e0d3 100644
--- a/xos/synchronizer/steps/sync_progranserviceinstance.py
+++ b/xos/synchronizer/steps/sync_progranserviceinstance.py
@@ -60,14 +60,18 @@
         profile = {
             'AdmControl': o.AdmControl,
             "DlSchedType": o.DlSchedType,
-            "Start": o.start,
+            "Start": o.start, # TODO date has to be in the format dd.MM.yyyy HH:mm
             "UlSchedType": o.UlSchedType,
-            "End": o.end,
+            "End": o.end, # TODO date has to be in the format dd.MM.yyyy HH:mm
             "CellIndividualOffset": o.CellIndividualOffset,
             "DlAllocRBRate": o.DlAllocRBRate,
             "Name": o.name,
             "UlAllocRBRate": o.UlAllocRBRate,
             "Handover": self.get_handover_for_profile(o),
+            'mmeip': o.mmeip,
+            'mmeport': o.mmeport,
+            'DlWifiRate': o.DlWifiRate,
+            'DlUeAllocRbRate': o.DlUeAllocRbRate,
         }
         profile = json.dumps(profile)
         return profile