Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMockDUT

    GetMockDUT returns a mock lab config with ChromeOS DUT

    func GetMockLabstation

      GetMockLabstation returns a mock lab config with ChromeOS Labstation

      func GitData

      func GitData(path string) (string, error)

        GitData mocks a git file content based on a given filepath

        func SheetData

        func SheetData(path string) (*sheets.Spreadsheet, error)

          SheetData returns the fake sheet get API response for other testers

          Types

          type CrimsonClient

          type CrimsonClient struct {
          	Machines      []*crimson.Machine
          	Nics          []*crimson.NIC
          	PhysicalHosts []*crimson.PhysicalHost
          	Vms           []*crimson.VM
          	Dracs         []*crimson.DRAC
          }

            CrimsonClient mocks the crimsonClient

            func (*CrimsonClient) CreateDRAC

            func (c *CrimsonClient) CreateDRAC(ctx context.Context, in *crimson.CreateDRACRequest, opts ...grpc.CallOption) (*crimson.DRAC, error)

              CreateDRAC mocks the CreateDRAC of crimsonClient

              func (*CrimsonClient) CreateMachine

              func (c *CrimsonClient) CreateMachine(ctx context.Context, in *crimson.CreateMachineRequest, opts ...grpc.CallOption) (*crimson.Machine, error)

                CreateMachine mocks the CreateMachine of crimsonClient

                func (*CrimsonClient) CreateNIC

                func (c *CrimsonClient) CreateNIC(ctx context.Context, in *crimson.CreateNICRequest, opts ...grpc.CallOption) (*crimson.NIC, error)

                  CreateNIC mocks the CreateNIC of crimsonClient

                  func (*CrimsonClient) CreatePhysicalHost

                    CreatePhysicalHost mocks the CreatePhysicalHost of crimsonClient

                    func (*CrimsonClient) CreateVM

                    func (c *CrimsonClient) CreateVM(ctx context.Context, in *crimson.CreateVMRequest, opts ...grpc.CallOption) (*crimson.VM, error)

                      CreateVM mocks the CreateVM of crimsonClient

                      func (*CrimsonClient) DeleteHost

                      func (c *CrimsonClient) DeleteHost(ctx context.Context, in *crimson.DeleteHostRequest, opts ...grpc.CallOption) (*empty.Empty, error)

                        DeleteHost mocks the DeleteHost of crimsonClient

                        func (*CrimsonClient) DeleteMachine

                        func (c *CrimsonClient) DeleteMachine(ctx context.Context, in *crimson.DeleteMachineRequest, opts ...grpc.CallOption) (*empty.Empty, error)

                          DeleteMachine mocks the DeleteMachine of crimsonClient

                          func (*CrimsonClient) DeleteNIC

                          func (c *CrimsonClient) DeleteNIC(ctx context.Context, in *crimson.DeleteNICRequest, opts ...grpc.CallOption) (*empty.Empty, error)

                            DeleteNIC mocks the DeleteNIC of crimsonClient

                            func (*CrimsonClient) FindVMSlots

                              FindVMSlots mocks the FindVMSlots of crimsonClient

                              func (*CrimsonClient) ListDRACs

                                ListDRACs mocks the ListDRACs of crimsonClient

                                func (*CrimsonClient) ListDatacenters

                                  ListDatacenters mocks the ListDatacenters of crimsonClient

                                  func (*CrimsonClient) ListFreeIPs

                                    ListFreeIPs mocks the ListFreeIPs of crimsonClient

                                    func (*CrimsonClient) ListKVMs

                                      ListKVMs mocks the ListKVMs of crimsonClient

                                      func (*CrimsonClient) ListMachines

                                        ListMachines mocks the ListMachines of crimsonClient

                                        func (*CrimsonClient) ListNICs

                                          ListNICs mocks the ListNICs of crimsonClient

                                          func (*CrimsonClient) ListOSes

                                            ListOSes mocks the ListOSes of crimsonClient

                                            func (*CrimsonClient) ListPhysicalHosts

                                              ListPhysicalHosts mocks the ListPhysicalHosts of crimsonClient

                                              func (*CrimsonClient) ListPlatforms

                                                ListPlatforms mocks the ListPlatforms of crimsonClient

                                                func (*CrimsonClient) ListRacks

                                                  ListRacks mocks the ListRacks of crimsonClient

                                                  func (*CrimsonClient) ListSwitches

                                                    ListSwitches mocks the ListSwitches of crimsonClient

                                                    func (*CrimsonClient) ListVLANs

                                                      ListVLANs mocks the ListVLANs of crimsonClient

                                                      func (*CrimsonClient) ListVMs

                                                        ListVMs mocks the ListVMs of crimsonClient

                                                        func (*CrimsonClient) RenameMachine

                                                        func (c *CrimsonClient) RenameMachine(ctx context.Context, in *crimson.RenameMachineRequest, opts ...grpc.CallOption) (*crimson.Machine, error)

                                                          RenameMachine mocks the RenameMachine of crimsonClient

                                                          func (*CrimsonClient) UpdateDRAC

                                                          func (c *CrimsonClient) UpdateDRAC(ctx context.Context, in *crimson.UpdateDRACRequest, opts ...grpc.CallOption) (*crimson.DRAC, error)

                                                            UpdateDRAC mocks the UpdateDRAC of crimsonClient

                                                            func (*CrimsonClient) UpdateMachine

                                                            func (c *CrimsonClient) UpdateMachine(ctx context.Context, in *crimson.UpdateMachineRequest, opts ...grpc.CallOption) (*crimson.Machine, error)

                                                              UpdateMachine mocks the UpdateMachine of crimsonClient

                                                              func (*CrimsonClient) UpdateNIC

                                                              func (c *CrimsonClient) UpdateNIC(ctx context.Context, in *crimson.UpdateNICRequest, opts ...grpc.CallOption) (*crimson.NIC, error)

                                                                UpdateNIC mocks the UpdateNIC of crimsonClient

                                                                func (*CrimsonClient) UpdatePhysicalHost

                                                                  UpdatePhysicalHost mocks the UpdatePhysicalHost of crimsonClient

                                                                  func (*CrimsonClient) UpdateVM

                                                                  func (c *CrimsonClient) UpdateVM(ctx context.Context, in *crimson.UpdateVMRequest, opts ...grpc.CallOption) (*crimson.VM, error)

                                                                    UpdateVM mocks the UpdateVM of crimsonClient

                                                                    type GitClient

                                                                    type GitClient struct {
                                                                    }

                                                                      GitClient mocks the git.ClientInterface

                                                                      func (*GitClient) GetFile

                                                                      func (gc *GitClient) GetFile(ctx context.Context, path string) (string, error)

                                                                        GetFile mocks git.ClientInterface.GetFile()

                                                                        func (*GitClient) SwitchProject

                                                                        func (gc *GitClient) SwitchProject(ctx context.Context, project string) error

                                                                          SwitchProject mocks git.ClientInterface.SwitchProject()

                                                                          type InventoryClient

                                                                          type InventoryClient struct {
                                                                          }

                                                                            InventoryClient mocks the inventory v2 client

                                                                            func (*InventoryClient) DeviceConfigsExists

                                                                              DeviceConfigsExists mock the device config exists request.

                                                                              func (*InventoryClient) GetDeviceConfig

                                                                              func (ic *InventoryClient) GetDeviceConfig(ctx context.Context, in *invV2Api.GetDeviceConfigRequest, opts ...grpc.CallOption) (*device.Config, error)

                                                                                GetDeviceConfig mocks the GetDeviceConfig api from InvV2.

                                                                                func (*InventoryClient) GetHwidData

                                                                                  GetHwidData mocks the GetHwidData api from InvV2.

                                                                                  func (*InventoryClient) GetManufacturingConfig

                                                                                    GetManufacturingConfig mocks the GetManufaturingConfig api from InvV2.

                                                                                    func (*InventoryClient) ListCrosDevicesLabConfig

                                                                                      ListCrosDevicesLabConfig mock the invV2Api.InventoryClient's ListCrosDevicesLabConfig

                                                                                      type LuciConfigClient

                                                                                      type LuciConfigClient struct {
                                                                                      }

                                                                                        LuciConfigClient mocks the luciconfig.Interface

                                                                                        func (*LuciConfigClient) GetConfig

                                                                                        func (c *LuciConfigClient) GetConfig(ctx context.Context, configSet luciconfig.Set, path string, metaOnly bool) (*luciconfig.Config, error)

                                                                                          GetConfig returns a config at a path in a config set

                                                                                          func (*LuciConfigClient) GetConfigByHash

                                                                                          func (c *LuciConfigClient) GetConfigByHash(ctx context.Context, contentHash string) (string, error)

                                                                                            GetConfigByHash returns the contents of a config

                                                                                            func (*LuciConfigClient) GetConfigSetLocation

                                                                                            func (c *LuciConfigClient) GetConfigSetLocation(ctx context.Context, configSet luciconfig.Set) (*url.URL, error)

                                                                                              GetConfigSetLocation returns the URL location of a config set.

                                                                                              func (*LuciConfigClient) GetProjectConfigs

                                                                                              func (c *LuciConfigClient) GetProjectConfigs(ctx context.Context, path string, metaOnly bool) ([]luciconfig.Config, error)

                                                                                                GetProjectConfigs returns all the configs at the given path

                                                                                                func (*LuciConfigClient) GetProjects

                                                                                                func (c *LuciConfigClient) GetProjects(ctx context.Context) ([]luciconfig.Project, error)

                                                                                                  GetProjects returns all the registered projects in the configuration service.

                                                                                                  func (*LuciConfigClient) GetRefConfigs

                                                                                                  func (c *LuciConfigClient) GetRefConfigs(ctx context.Context, path string, metaOnly bool) ([]luciconfig.Config, error)

                                                                                                    GetRefConfigs returns the config at the given path

                                                                                                    func (*LuciConfigClient) GetRefs

                                                                                                    func (c *LuciConfigClient) GetRefs(ctx context.Context, projectID string) ([]string, error)

                                                                                                      GetRefs returns the list of refs for a project.

                                                                                                      func (*LuciConfigClient) ListFiles

                                                                                                      func (c *LuciConfigClient) ListFiles(ctx context.Context, configSet luciconfig.Set) ([]string, error)

                                                                                                        ListFiles returns the list of files for a config set.

                                                                                                        type SheetClient

                                                                                                        type SheetClient struct {
                                                                                                        }

                                                                                                          SheetClient mocks the sheet.ClientInterface

                                                                                                          func (*SheetClient) Get

                                                                                                          func (sc *SheetClient) Get(ctx context.Context, sheetID string, ranges []string) (*sheets.Spreadsheet, error)

                                                                                                            Get mocks the sheet.ClientInterface.Get()