test suite reviews and discussions
 help / color / mirror / Atom feed
From: Marvin Liu <yong.liu@intel.com>
To: dts@dpdk.org
Cc: Marvin Liu <yong.liu@intel.com>
Subject: [dts] [PATCH v1] framework crb: login CRB by username and password
Date: Wed, 26 Jul 2017 01:53:49 -0400	[thread overview]
Message-ID: <1501048429-50899-1-git-send-email-yong.liu@intel.com> (raw)

There's no default username or password for CRB. These kind of
information should be configured.

Signed-off-by: Marvin Liu <yong.liu@intel.com>

diff --git a/framework/crb.py b/framework/crb.py
index bf07345..00f418d 100644
--- a/framework/crb.py
+++ b/framework/crb.py
@@ -61,11 +61,13 @@ class Crb(object):
 
         self.logger = getLogger(name)
         self.session = SSHConnection(self.get_ip_address(), name,
+                                     self.get_username(),
                                      self.get_password())
         self.session.init_log(self.logger)
         self.alt_session = SSHConnection(
             self.get_ip_address(),
             name + '_alt',
+            self.get_username(),
             self.get_password())
         self.alt_session.init_log(self.logger)
 
@@ -88,7 +90,9 @@ class Crb(object):
         Create new session for addtional useage. This session will not enable log.
         """
         logger = getLogger(name)
-        session = SSHConnection(self.get_ip_address(), name,
+        session = SSHConnection(self.get_ip_address(),
+                                name,
+                                self.get_username(),
                                 self.get_password())
         session.init_log(logger)
         self.sessions.append(session)
@@ -103,7 +107,8 @@ class Crb(object):
                 save_session.close()
                 logger = getLogger(save_session.name)
                 logger.logger_exit()
-            self.sessions.remove(save_session)
+                self.sessions.remove(save_session)
+                break
 
     def reconnect_session(self, alt_session=False):
         """
@@ -121,11 +126,12 @@ class Crb(object):
             session = SSHConnection(
                 self.get_ip_address(),
                 self.name + '_alt',
+                self.get_username(),
                 self.get_password())
             self.alt_session = session
         else:
             session = SSHConnection(self.get_ip_address(), self.name,
-                                    self.get_password())
+                                    self.get_username(), self.get_password())
             self.session = session
 
         session.init_log(self.logger)
-- 
1.9.3

                 reply	other threads:[~2017-07-26  5:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1501048429-50899-1-git-send-email-yong.liu@intel.com \
    --to=yong.liu@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).