CORD-2590 update vnaas sync step to match modeling

Change-Id: I276083229695a9c8a59b67b7515256754e1c1522
diff --git a/xos/synchronizer/steps/sync_vnaaseline.py b/xos/synchronizer/steps/sync_vnaaseline.py
index e11d15d..aefc266 100644
--- a/xos/synchronizer/steps/sync_vnaaseline.py
+++ b/xos/synchronizer/steps/sync_vnaaseline.py
@@ -55,9 +55,6 @@
         logger.info("Syncing Edited EVC: %s" % evc.name)
         logger.info("POST %s " % (evc))
 
-        # Fetch the bwp from the DB
-        bwp = BandwidthProfile.objects.get(name=evc.bwp)
-
         # json to configure ONOS to start the EVC.
         # {
         #     "evcId": "evc1",
@@ -77,13 +74,13 @@
         data = {}
         data["evcId"] = evc.name
         data["evcCfgId"] = evc.name
-        data["uniList"] = [evc.connect_point_1_id, evc.connect_point_2_id]
+        data["uniList"] = [evc.connect_point_1.cpe_id, evc.connect_point_2.cpe_id]
         data["evcType"] = "POINT_TO_POINT"
         data["vlanId"] = int(evc.vlanids.split(",")[0]) # FIXME - should be list (CORD-2075)
-        data["cbs"] = bwp.cbs
-        data["ebs"] = bwp.ebs
-        data["cir"] = bwp.cir
-        data["eir"] = bwp.eir
+        data["cbs"] = evc.bwp.cbs
+        data["ebs"] = evc.bwp.ebs
+        data["cir"] = evc.bwp.cir
+        data["eir"] = evc.bwp.eir
         logger.info("data %s" % data)
         # assuming that the CPEs are controller by the fabric ONOS
         onos = OnosModel.objects.get(onos_type="global")
diff --git a/xos/synchronizer/steps/test_sync_vnaaseline.py b/xos/synchronizer/steps/test_sync_vnaaseline.py
index b02b94d..4aa34af 100644
--- a/xos/synchronizer/steps/test_sync_vnaaseline.py
+++ b/xos/synchronizer/steps/test_sync_vnaaseline.py
@@ -41,17 +41,19 @@
 BWP_GOLD_EIR = 5000
 BWP_GOLD_NAME = "gold"
 
+CONNECT_POINT_1_TENANT = "onf"
+CONNECT_POINT_1_NAME = "uni1"
+CONNECT_POINT_1_LATLNG = "[37.973535, -122.531087]"
+CONNECT_POINT_1_CPE_ID = "domain:10.90.1.30-cord-onos/1"
+
+CONNECT_POINT_2_TENANT = "onf"
+CONNECT_POINT_2_NAME = "uni2"
+CONNECT_POINT_2_LATLNG = "[37.773972, -122.431297]"
+CONNECT_POINT_2_CPE_ID = "domain:10.90.1.30-cord-onos/1"
+
 ELINE_VLANIDS = "100"
-ELINE_CONNECT_POINT_1_ID = "domain:10.90.1.30-cord-onos/1"
-ELINE_CONNECT_POINT_2_ID = "domain:10.90.1.50-cord-onos/1"
 ELINE_NAME = "testeline"
 
-UNI_TENANT = "onf"
-UNI_NAME = "onf"
-UNI_LATLNG = [37.773972, -122.431297]
-UNI_CPE_ID = "netconf:192.168.56.20:830/0"
-
-
 class TestSyncvNaaSEline(unittest.TestCase):
     def setUp(self):
         global SyncvNaaSEline, MockObjectList
@@ -96,17 +98,21 @@
                                                  cir=BWP_GOLD_CIR,
                                                  eir=BWP_GOLD_EIR,
                                                  name=BWP_GOLD_NAME)
-        self.userNetworkInterface = UserNetworkInterface(tenant=UNI_TENANT,
-                                                         name=UNI_NAME,
-                                                         latlng=UNI_LATLNG,
-                                                         cpe_id=UNI_CPE_ID)
+        self.connect_point_1 = UserNetworkInterface(tenant=CONNECT_POINT_1_TENANT,
+                                                         name=CONNECT_POINT_1_NAME,
+                                                         latlng=CONNECT_POINT_1_LATLNG,
+                                                         cpe_id=CONNECT_POINT_1_CPE_ID)
+        self.connect_point_2 = UserNetworkInterface(tenant=CONNECT_POINT_2_TENANT,
+                                                         name=CONNECT_POINT_2_NAME,
+                                                         latlng=CONNECT_POINT_2_LATLNG,
+                                                         cpe_id=CONNECT_POINT_2_CPE_ID)
 
         self.eline = ELine(name=ELINE_NAME,
-                           connect_point_1_id=ELINE_CONNECT_POINT_1_ID,
-                           connect_point_2_id=ELINE_CONNECT_POINT_2_ID,
+                           connect_point_1=self.connect_point_1,
+                           connect_point_2=self.connect_point_2,
                            vlanids=ELINE_VLANIDS,
                            cord_site_name=ONOS_NAME,
-                           bwp=BWP_GOLD_NAME)
+                           bwp=self.bandwidthProfile)
 
     def tearDown(self):
         sys.path = self.sys_path_save
@@ -131,7 +137,7 @@
             desired_attrs = {"evcCfgId": ELINE_NAME,
                              "eir": BWP_GOLD_EIR,
                              "cir": BWP_GOLD_CIR,
-                             "uniList": [ELINE_CONNECT_POINT_1_ID, ELINE_CONNECT_POINT_2_ID],
+                             "uniList": [CONNECT_POINT_1_CPE_ID, CONNECT_POINT_2_CPE_ID],
                              "ebs": BWP_GOLD_EBS,
                              "vlanId": int(ELINE_VLANIDS),
                              "cbs": BWP_GOLD_CBS,