RemoteSshUtil

public class RemoteSshUtil
extends Object

java.lang.Object
   ↳ com.android.tradefed.device.cloud.RemoteSshUtil


Tiện ích để thực thi các lệnh ssh trên các phiên bản từ xa.

Tóm tắt

Hàm khởi tạo công khai

RemoteSshUtil()

Phương thức công khai

static CommandResult remoteSshCommandExec(GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeoutMs, OutputStream stdout, OutputStream stderr, String... command)

Thực thi một lệnh trên thực thể từ xa bằng ssh.

static CommandResult remoteSshCommandExec(GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeoutMs, String... command)

Thực thi một lệnh trên thực thể từ xa bằng ssh.

Hàm khởi tạo công khai

RemoteSshUtil

public RemoteSshUtil ()

Phương thức công khai

remoteSshCommandExec

public static CommandResult remoteSshCommandExec (GceAvdInfo remoteInstance, 
                TestDeviceOptions options, 
                IRunUtil runUtil, 
                long timeoutMs, 
                OutputStream stdout, 
                OutputStream stderr, 
                String... command)

Thực thi một lệnh trên thực thể từ xa bằng ssh.

Tham số
remoteInstance GceAvdInfo: GceAvdInfo mô tả thiết bị.

options TestDeviceOptions: TestDeviceOptions mô tả các tuỳ chọn thiết bị sẽ được sử dụng cho thiết bị GCE.

runUtil IRunUtil: IRunUtil để thực thi các lệnh.

timeoutMs long: tính bằng mili giây để quá trình tìm nạp hoàn tất

stdout OutputStream: ERROR(/OutputStream) nơi stdout sẽ được ghi lại.

stderr OutputStream: ERROR(/OutputStream) nơi stderr sẽ được ghi nhật ký.

command String: Lệnh cần thực thi.

Giá trị trả về
CommandResult CommandResult chứa trạng thái và nhật ký.

remoteSshCommandExec

public static CommandResult remoteSshCommandExec (GceAvdInfo remoteInstance, 
                TestDeviceOptions options, 
                IRunUtil runUtil, 
                long timeoutMs, 
                String... command)

Thực thi một lệnh trên thực thể từ xa bằng ssh.

Tham số
remoteInstance GceAvdInfo: GceAvdInfo mô tả thiết bị.

options TestDeviceOptions: TestDeviceOptions mô tả các tuỳ chọn thiết bị sẽ được sử dụng cho thiết bị GCE.

runUtil IRunUtil: IRunUtil để thực thi các lệnh.

timeoutMs long: tính bằng mili giây để quá trình tìm nạp hoàn tất

command String: Lệnh cần thực thi.

Giá trị trả về
CommandResult CommandResult chứa trạng thái và nhật ký.