Documentation
¶
Overview ¶
Copyright 2023 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Copyright 2023 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteDNSEntry ¶
DeleteDNSEntry removes the dns entry from /etc/dut_hosts/hosts.
Types ¶
type AddDUT ¶
type AddDUT struct { SatlabID string Namespace string NewSpecsFile string Hostname string Asset string Servo string ServoSerial string ServoSetupType string ServoDockerContainerName string SubrailConfig string LicenseTypes []string LicenseIds []string Pools []string Rpm string RpmOutlet string IgnoreUFS bool DeployTags []string DeploymentTicket string Tags []string State string Description string // Asset location fields Zone string Rack string Hive string // ACS DUT fields Chameleons []string Cameras []string AntennaConnection string Router string Cables []string Facing string Light string Carrier string AudioBoard bool AudioBox bool Atrus bool WifiCell bool TouchMimo bool CameraBox bool Chaos bool AudioCable bool SmartUSBHub bool // Machine specific fields Model string Board string // AssetType is the type of the asset, it always has a value of "dut" AssetType string // Address is the IP address of the DUT Address string // SkipDNS controls whether to modify the `/etc/dut_hosts/hosts` file on the dns container SkipDNS bool // contains filtered or unexported fields }
AddDUT contains all the commands for "satlab add dut" inherited from shivas.
Keep this up to date with infra/cmd/shivas/ufs/subcmds/dut/add_dut.go
func (*AddDUT) TriggerRun ¶
type AddDUTResponse ¶
type CCDOpenRun ¶
type CCDOpenRun struct { ServoSerial string UsbDevice string UseRmaAuth bool ResetFactory bool // contains filtered or unexported fields }
func (*CCDOpenRun) TriggerRun ¶
func (c *CCDOpenRun) TriggerRun( ctx context.Context, executor executor.IExecCommander, w io.Writer, r bufio.Reader, ) error
TriggerRun triggers the Run with the given information
type DeleteClient ¶
type DeleteClient interface { DeleteAsset(context.Context, *ufsApi.DeleteAssetRequest, ...grpc.CallOption) (*emptypb.Empty, error) DeleteMachineLSE(context.Context, *ufsApi.DeleteMachineLSERequest, ...grpc.CallOption) (*emptypb.Empty, error) DeleteRack(context.Context, *ufsApi.DeleteRackRequest, ...grpc.CallOption) (*emptypb.Empty, error) GetMachineLSE(ctx context.Context, in *ufsApi.GetMachineLSERequest, opts ...grpc.CallOption) (*ufsModels.MachineLSE, error) }
type DeleteDUT ¶
type DeleteDUT struct { // SatlabID the Satlab ID from the Command Line // if it is empty it will get the ID from the enviornment SatlabID string // full if true, it deletes `DUT`, `rack`, and `Asset`. Otherwise, // it only deletes `DUT` Full bool // Names contain the DUT name that we want to delete Names []string }
func (*DeleteDUT) TriggerRun ¶
func (d *DeleteDUT) TriggerRun(ctx context.Context, executor executor.IExecCommander, ufs DeleteClient) (*DeleteDUTResult, error)
TriggerRun deletes the DUTs by given names
If we want to pass the `Namespace`, we can set up it in the context e.g. ``` import "go.chromium.org/infra/cmd/shivas/utils"
ctx = utils.SetupContext(ctx, c.envFlags.GetNamespace()) ```
type DeleteDUTResult ¶
type DeleteDUTResult struct { // MachineLSEs show which machineLSE we want to delete MachineLSEs []*ufsModels.MachineLSE // DutResults contain the name which has passed or failed after // deleting DUT. DutResults *Result // AssetResults contain the name which has passed or failed after // deleting Asset AssetResults *Result // RackResults contain the name which has passed or failed after // deleting Rack RackResults *Result }
type GetDUT ¶
type GetDUT struct { // SatlabID will be prepended to DUT names if not already prefixing them. SatlabID string Namespace string HostInfoStore bool // Zone value Name(s) of a zone to filter by. Zones []string // Rack Name(s) of a rack to filter by. Racks []string // Machines Name(s) of a machine/asset to filter by. Machines []string // Prototypes Name(s) of a host prototype to filter by. Prototypes []string // Tags Name(s) of a tag to filter by. Tags []string // States Name(s) of a state to filter by. States []string // Servos Name(s) of a servo:port to filter by. Servos []string // Servotypes Name(s) of a servo type to filter by. Servotypes []string // Switches Name(s) of a switch to filter by. Switches []string // Rpms Name(s) of a rpm to filter by. Rpms []string // Pools Name(s) of a pool to filter by. Pools []string }
GetDUT contains fields used to control behavior when fetching DUTs
func (*GetDUT) TriggerRun ¶
func (g *GetDUT) TriggerRun( ctx context.Context, executor executor.IExecCommander, names []string, ) ([]*ufsModels.MachineLSE, error)
TriggerRun trigger `shivas get dut` CLI to get the machines information.
type InitiateSupportRun ¶
type InitiateSupportRun struct { ProjectID string Zone string Network string Timeout string Port int // contains filtered or unexported fields }
func (*InitiateSupportRun) TriggerRun ¶
func (c *InitiateSupportRun) TriggerRun( ctx context.Context, executor executor.IExecCommander, ) error
TriggerRun triggers the Run with the given information
type UpdateDUT ¶
type UpdateDUT struct { // DUT specification inputs. NewSpecsFile string Hostname string Machine string Servo string ServoSerial string ServoSetupType string ServoFwChannel string ServoDockerContainerName string Pools []string LicenseTypes []string LicenseIds []string Rpm string RpmOutlet string DeploymentTicket string Tags []string Description string // Deploy task inputs. ForceDeploy bool DeployTags []string // ACS DUT fields Chameleons []string Cameras []string AntennaConnection string Router string Cables []string Facing string Light string Carrier string AudioBoard bool AudioBox bool Atrus bool WifiCell bool TouchMimo bool CameraBox bool Chaos bool AudioCable bool SmartUSBHub bool // For use in determining if a flag is set FlagInputs map[string]bool // SatlabID the Satlab ID from the Command Line // if it is empty it will get the ID from the enviornment SatlabID string // Namespace for executing the `shivas` Namespace string }