Fix for opnfv onos-sfc scripts
authorsathishkumarmurugesan <sathishkumar@huawei.com>
Thu, 19 Jan 2017 06:29:54 +0000 (11:59 +0530)
committersathishkumar murugesan <sathishkumar@huawei.com>
Mon, 23 Jan 2017 12:03:01 +0000 (12:03 +0000)
Change-Id: I676885b364e81e2266e72defd7fb21bbc96b093d
Signed-off-by: sathishkumarmurugesan <sathishkumar@huawei.com>
functest/opnfv_tests/sdn/onos/sfc/sfc_onos.py
functest/opnfv_tests/sdn/onos/teston/onos.py

index 349b42a..090502b 100644 (file)
@@ -232,10 +232,8 @@ class SfcOnos:
         else:
             return(response.status_code)
 
-        url = ("http://%s:8774//v2.1/%s/ports/"
-               "%s/flavors?name=m1.tiny" % (self.nova_hostname,
-                                            self.tenant_id))
-
+        url = ("http://%s:8774/v2.1/%s/flavors?"
+               "name=m1.tiny" % (self.nova_hostname, self.tenant_id))
         headers = {"Accept": "application/json", "Content-Type":
                    "application/json", "X-Auth-Token": self.token_id}
         response = requests.get(url, headers=headers)
@@ -344,7 +342,7 @@ class SfcOnos:
     def getPortPair(self):
         """Query the Portpair id value."""
         for p in range(0, 1):
-            url = ("http://%s:9696/%s/ports/"
+            url = ("http://%s:9696/%s/"
                    "sfc/port_pairs?name=PP1" % (self.neutron_hostname,
                                                 self.osver))
             headers = {"Accept": "application/json",
index 213bdb7..2537e18 100755 (executable)
@@ -175,7 +175,7 @@ def CreateImage():
 
 
 def SfcTest():
-    cmd = "python " + ONOS_SFC_PATH + "/Sfc.py"
+    cmd = "python " + ONOS_SFC_PATH + "/sfc.py"
     logger.debug("Run sfc tests")
     os.system(cmd)
 
@@ -187,7 +187,7 @@ def GetIp(type):
 
 
 def Replace(before, after):
-    file = "/Sfc_fun.py"
+    file = "/sfc_onos.py"
     cmd = "sed -i 's/" + before + "/" + after + "/g' " + ONOS_SFC_PATH + file
     os.system(cmd)
 
@@ -199,7 +199,7 @@ def SetSfcConf():
     Replace("glance_ip", GetIp("glance"))
     pwd = ft_constants.OS_PASSWORD
     Replace("console", pwd)
-    creds_neutron = openstack_utils.get_credentials("neutron")
+    creds_neutron = openstack_utils.get_credentials()
     neutron_client = neutronclient.Client(**creds_neutron)
     ext_net = openstack_utils.get_external_net(neutron_client)
     Replace("admin_floating_net", ext_net)