def do_connect(self, line):
"""
Command: connect
Description:
Connect to a sensor given the sensor ID or the sensor hostname.
Args:
connect SENSOR_ID | SENSOR_HOSTNAME
"""
if not line:
raise CliArgsException("Need argument: sensor ID or hostname")
sensor = self.connect_callback(self.cb, line)
self.lr_session = sensor.lr_session()
print("Session: {0}".format(self.lr_session.session_id))
print(" Available Drives: %s" % ' '.join(self.lr_session.session_data.get('drives', [])))
# look up supported commands
print(" Supported Commands: %s" % ', '.join(self.lr_session.session_data.get('supported_commands', [])))
print(" Working Directory: %s" % self.cwd)
log.info("Attached to sensor {0}".format(sensor._model_unique_id))
评论列表
文章目录