summaryrefslogtreecommitdiffstats
path: root/testcases/Controllers/ONOS
diff options
context:
space:
mode:
authorwuwb1989 <wuwenbin2@huawei.com>2016-08-16 17:40:29 +0800
committerwuwb1989 <wuwenbin2@huawei.com>2016-08-16 17:42:14 +0800
commit7ea025169de260d6de95ec110673086a9202d3a3 (patch)
treef340a4a9a227dd72308c153c7ea246bee85e0aec /testcases/Controllers/ONOS
parentf33b1f1793bf7561c4fd555385f75acaccf86129 (diff)
Fix joid test bug that creation of vm fails
Change-Id: I54d56cb2266ae627e4518f06b14705b672e6f74e Signed-off-by: wuwb1989 <wuwenbin2@huawei.com>
Diffstat (limited to 'testcases/Controllers/ONOS')
-rw-r--r--testcases/Controllers/ONOS/Sfc/Sfc_fun.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/testcases/Controllers/ONOS/Sfc/Sfc_fun.py b/testcases/Controllers/ONOS/Sfc/Sfc_fun.py
index b94eedcaf..0d9eaf80d 100644
--- a/testcases/Controllers/ONOS/Sfc/Sfc_fun.py
+++ b/testcases/Controllers/ONOS/Sfc/Sfc_fun.py
@@ -227,6 +227,22 @@ class Sfc_fun:
else:
return(response.status_code)
+ url = 'http://' + self.nova_hostname + \
+ ':8774/v2.1/' + self.tenant_id + '/flavors?name=m1.tiny'
+ headers = {"Accept": "application/json", "Content-Type":
+ "application/json", "X-Auth-Token": self.token_id}
+ response = requests.get(url, headers=headers)
+
+ if (response.status_code == 200):
+ self.logger.debug(response.status_code)
+ self.logger.debug(response.content)
+ self.logger.info("\tFlavor is available")
+ json1_data = json.loads(response.content)
+ self.logger.debug(json1_data)
+ self.flavorRef = json1_data['flavors'][0]['id']
+ else:
+ return(response.status_code)
+
for y in range(0, 3):
Dicdata = {}
org_nw_port = []