From: sridharkn <sridhar@linux.com>
Date: Mon, 11 Apr 2016 14:02:44 +0000 (+0530)
Subject: pkt_gen: Testcenter traffic generation using STC-REST API -Import Issue.
X-Git-Tag: colorado.1.0~93
X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=a8e1c6a42bd55a70268ecefc44f81870c539848b;p=vswitchperf.git

pkt_gen: Testcenter traffic generation using STC-REST API -Import Issue.

The import of stcrestclient in moved down to avoid execution errors.

Change-Id: Ib9b64f62400c20a031f0ffcd3410582741cf1644
JIRA: VSPERF-237
---

diff --git a/tools/pkt_gen/testcenter/testcenter-rfc2544-rest.py b/tools/pkt_gen/testcenter/testcenter-rfc2544-rest.py
index 13f68fb7..428240a1 100644
--- a/tools/pkt_gen/testcenter/testcenter-rfc2544-rest.py
+++ b/tools/pkt_gen/testcenter/testcenter-rfc2544-rest.py
@@ -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)