pkt_gen: Testcenter traffic generation using STC-REST API -Import Issue. 51/12151/2
authorsridharkn <sridhar@linux.com>
Mon, 11 Apr 2016 14:02:44 +0000 (19:32 +0530)
committerMaryam Tahhan <maryam.tahhan@intel.com>
Tue, 12 Apr 2016 11:50:41 +0000 (11:50 +0000)
The import of stcrestclient in moved down to avoid execution errors.

Change-Id: Ib9b64f62400c20a031f0ffcd3410582741cf1644
JIRA: VSPERF-237

tools/pkt_gen/testcenter/testcenter-rfc2544-rest.py

index 13f68fb..428240a 100644 (file)
@@ -23,8 +23,6 @@ import argparse
 import logging
 import os
 
-# Load Spirent REST Library
-from stcrestclient import stchttp
 
 logger = logging.getLogger(__name__)
 
@@ -281,6 +279,9 @@ def main():
     user_name = args.test_user_name
 
     try:
+        # Load Spirent REST Library
+        from stcrestclient import stchttp
+
         stc = stchttp.StcHttp(args.lab_server_addr)
         session_id = stc.new_session(user_name, session_name)
         stc.join_session(session_id)