registration

package
v0.0.0-...-e560ebb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const AssetKind string = "Asset"

AssetKind is a datastore entity identifier for Asset

View Source
const DracKind string = "Drac"

DracKind is the datastore entity kind Drac.

View Source
const KVMKind string = "KVM"

KVMKind is the datastore entity kind KVM.

View Source
const MachineKind string = "Machine"

MachineKind is the datastore entity kind Machine.

View Source
const NicKind string = "Nic"

NicKind is the datastore entity kind Nic.

View Source
const RPMKind string = "RPM"

RPMKind is the datastore entity kind RPM.

View Source
const RackKind string = "Rack"

RackKind is the datastore entity kind Rack.

View Source
const SwitchKind string = "Switch"

SwitchKind is the datastore entity kind Switch.

Variables

This section is empty.

Functions

func BatchDeleteKVMs

func BatchDeleteKVMs(ctx context.Context, ids []string) error

BatchDeleteKVMs deletes kvms in datastore.

This is a non-atomic operation. Must be used within a transaction. Will lead to partial deletes if not used in a transaction.

func BatchDeleteNics

func BatchDeleteNics(ctx context.Context, ids []string) error

BatchDeleteNics deletes nics in datastore.

This is a non-atomic operation. Must be used within a transaction. Will lead to partial deletes if not used in a transaction.

func BatchDeleteRPMs

func BatchDeleteRPMs(ctx context.Context, ids []string) error

BatchDeleteRPMs deletes rpms in datastore.

This is a non-atomic operation. Must be used within a transaction. Will lead to partial deletes if not used in a transaction.

func BatchDeleteSwitches

func BatchDeleteSwitches(ctx context.Context, ids []string) error

BatchDeleteSwitches deletes switches in datastore.

This is a non-atomic operation. Must be used within a transaction. Will lead to partial deletes if not used in a transaction.

func BatchGetDracs

func BatchGetDracs(ctx context.Context, ids []string) ([]*ufspb.Drac, error)

BatchGetDracs returns a batch of dracs from datastore.

func BatchGetKVM

func BatchGetKVM(ctx context.Context, ids []string) ([]*ufspb.KVM, error)

BatchGetKVM returns a batch of KVMs from datastore.

func BatchGetMachines

func BatchGetMachines(ctx context.Context, ids []string) ([]*ufspb.Machine, error)

BatchGetMachines returns a batch of machines from datastore.

func BatchGetNics

func BatchGetNics(ctx context.Context, ids []string) ([]*ufspb.Nic, error)

BatchGetNics returns a batch of nics from datastore.

func BatchGetRPMs

func BatchGetRPMs(ctx context.Context, ids []string) ([]*ufspb.RPM, error)

BatchGetRPMs returns a batch of rpms from datastore.

func BatchGetRacks

func BatchGetRacks(ctx context.Context, ids []string) ([]*ufspb.Rack, error)

BatchGetRacks returns a batch of racks from datastore.

func BatchGetSwitches

func BatchGetSwitches(ctx context.Context, ids []string) ([]*ufspb.Switch, error)

BatchGetSwitches returns a batch of switches from datastore.

func BatchUpdateAssets

func BatchUpdateAssets(ctx context.Context, assets []*ufspb.Asset) ([]*ufspb.Asset, error)

BatchUpdateAssets updates the assets to the datastore

func BatchUpdateDracs

func BatchUpdateDracs(ctx context.Context, dracs []*ufspb.Drac) ([]*ufspb.Drac, error)

BatchUpdateDracs updates dracs in datastore.

This is a non-atomic operation and doesnt check if the object already exists before update. Must be used within a Transaction where objects are checked before update. Will lead to partial updates if not used in a transaction.

func BatchUpdateKVMs

func BatchUpdateKVMs(ctx context.Context, kvms []*ufspb.KVM) ([]*ufspb.KVM, error)

BatchUpdateKVMs updates kvms in datastore.

This is a non-atomic operation and doesnt check if the object already exists before update. Must be used within a Transaction where objects are checked before update. Will lead to partial updates if not used in a transaction.

func BatchUpdateMachines

func BatchUpdateMachines(ctx context.Context, machines []*ufspb.Machine) ([]*ufspb.Machine, error)

BatchUpdateMachines updates machines in datastore.

This is a non-atomic operation and doesnt check if the object already exists before update. Must be used within a Transaction where objects are checked before update. Will lead to partial updates if not used in a transaction.

func BatchUpdateNics

func BatchUpdateNics(ctx context.Context, nics []*ufspb.Nic) ([]*ufspb.Nic, error)

BatchUpdateNics updates nics in datastore.

This is a non-atomic operation and doesnt check if the object already exists before update. Must be used within a Transaction where objects are checked before update. Will lead to partial updates if not used in a transaction.

func BatchUpdateRPMs

func BatchUpdateRPMs(ctx context.Context, rpms []*ufspb.RPM) ([]*ufspb.RPM, error)

BatchUpdateRPMs updates rpms in datastore.

This is a non-atomic operation and doesnt check if the object already exists before update. Must be used within a Transaction where objects are checked before update. Will lead to partial updates if not used in a transaction.

func BatchUpdateRacks

func BatchUpdateRacks(ctx context.Context, racks []*ufspb.Rack) ([]*ufspb.Rack, error)

BatchUpdateRacks updates racks in datastore.

This is a non-atomic operation and doesnt check if the object already exists before update. Must be used within a Transaction where objects are checked before update. Will lead to partial updates if not used in a transaction.

func BatchUpdateSwitches

func BatchUpdateSwitches(ctx context.Context, switches []*ufspb.Switch) ([]*ufspb.Switch, error)

BatchUpdateSwitches updates switches in datastore.

This is a non-atomic operation and doesnt check if the object already exists before update. Must be used within a Transaction where objects are checked before update. Will lead to partial updates if not used in a transaction.

func CreateAsset

func CreateAsset(ctx context.Context, asset *ufspb.Asset) (*ufspb.Asset, error)

CreateAsset creates an asset record in the datastore using the given asset proto.

func CreateDrac

func CreateDrac(ctx context.Context, drac *ufspb.Drac) (*ufspb.Drac, error)

CreateDrac creates a new drac in datastore.

func CreateKVM

func CreateKVM(ctx context.Context, KVM *ufspb.KVM) (*ufspb.KVM, error)

CreateKVM creates a new KVM in datastore.

func CreateMachine

func CreateMachine(ctx context.Context, machine *ufspb.Machine) (*ufspb.Machine, error)

CreateMachine creates a new machine in datastore.

func CreateNic

func CreateNic(ctx context.Context, nic *ufspb.Nic) (*ufspb.Nic, error)

CreateNic creates a new nic in datastore.

func CreateRPM

func CreateRPM(ctx context.Context, RPM *ufspb.RPM) (*ufspb.RPM, error)

CreateRPM creates a new RPM in datastore.

func CreateRack

func CreateRack(ctx context.Context, rack *ufspb.Rack) (*ufspb.Rack, error)

CreateRack creates a new rack in datastore.

func CreateSwitch

func CreateSwitch(ctx context.Context, s *ufspb.Switch) (*ufspb.Switch, error)

CreateSwitch creates a new switch in datastore.

func DeleteAsset

func DeleteAsset(ctx context.Context, id string) error

DeleteAsset deletes the asset corresponding to id from datastore.

func DeleteDrac

func DeleteDrac(ctx context.Context, id string) error

DeleteDrac deletes the drac in datastore

func DeleteDracs

func DeleteDracs(ctx context.Context, resourceNames []string) *ufsds.OpResults

DeleteDracs deletes a batch of dracs

func DeleteKVM

func DeleteKVM(ctx context.Context, id string) error

DeleteKVM deletes the KVM in datastore

func DeleteKVMs

func DeleteKVMs(ctx context.Context, resourceNames []string) *ufsds.OpResults

DeleteKVMs deletes a batch of kvms

func DeleteMachine

func DeleteMachine(ctx context.Context, id string) error

DeleteMachine deletes the machine in datastore

func DeleteMachines

func DeleteMachines(ctx context.Context, resourceNames []string) *ufsds.OpResults

DeleteMachines deletes a batch of machines

func DeleteNic

func DeleteNic(ctx context.Context, id string) error

DeleteNic deletes the nic in datastore

func DeleteNics

func DeleteNics(ctx context.Context, resourceNames []string) *ufsds.OpResults

DeleteNics deletes a batch of nics

func DeleteRPM

func DeleteRPM(ctx context.Context, id string) error

DeleteRPM deletes the RPM in datastore

func DeleteRack

func DeleteRack(ctx context.Context, id string) error

DeleteRack deletes the rack in datastore

func DeleteRacks

func DeleteRacks(ctx context.Context, resourceNames []string) *ufsds.OpResults

DeleteRacks deletes a batch of racks

func DeleteSwitch

func DeleteSwitch(ctx context.Context, id string) error

DeleteSwitch deletes the switch in datastore

func DeleteSwitches

func DeleteSwitches(ctx context.Context, resourceNames []string) *ufsds.OpResults

DeleteSwitches deletes a batch of switches

func GetAllAssets

func GetAllAssets(ctx context.Context) ([]*ufspb.Asset, error)

GetAllAssets returns all assets currently in the datastore.

func GetAllDracs

func GetAllDracs(ctx context.Context) (*ufsds.OpResults, error)

GetAllDracs returns all dracs in datastore.

func GetAllKVMs

func GetAllKVMs(ctx context.Context) (*ufsds.OpResults, error)

GetAllKVMs returns all kvms in datastore.

func GetAllMachines

func GetAllMachines(ctx context.Context) (*ufsds.OpResults, error)

GetAllMachines returns all machines in datastore.

func GetAllNics

func GetAllNics(ctx context.Context) (*ufsds.OpResults, error)

GetAllNics returns all nics in datastore.

func GetAllRacks

func GetAllRacks(ctx context.Context) (*ufsds.OpResults, error)

GetAllRacks returns all racks in datastore.

func GetAllSwitches

func GetAllSwitches(ctx context.Context) (*ufsds.OpResults, error)

GetAllSwitches returns all switches in datastore.

func GetAsset

func GetAsset(ctx context.Context, name string) (*ufspb.Asset, error)

GetAsset returns asset corresponding to the name.

func GetAssetIndexedFieldName

func GetAssetIndexedFieldName(input string) (string, error)

GetAssetIndexedFieldName returns the index name

func GetDrac

func GetDrac(ctx context.Context, id string) (*ufspb.Drac, error)

GetDrac returns drac for the given id from datastore.

func GetDracIndexedFieldName

func GetDracIndexedFieldName(input string) (string, error)

GetDracIndexedFieldName returns the index name

func GetKVM

func GetKVM(ctx context.Context, id string) (*ufspb.KVM, error)

GetKVM returns KVM for the given id from datastore.

func GetKVMIndexedFieldName

func GetKVMIndexedFieldName(input string) (string, error)

GetKVMIndexedFieldName returns the index name

func GetMachine

func GetMachine(ctx context.Context, id string) (*ufspb.Machine, error)

GetMachine returns machine for the given id from datastore.

func GetMachineIndexedFieldName

func GetMachineIndexedFieldName(input string) (string, error)

GetMachineIndexedFieldName returns the index name

func GetNic

func GetNic(ctx context.Context, id string) (*ufspb.Nic, error)

GetNic returns nic for the given id from datastore.

func GetNicIndexedFieldName

func GetNicIndexedFieldName(input string) (string, error)

GetNicIndexedFieldName returns the index name

func GetRPM

func GetRPM(ctx context.Context, id string) (*ufspb.RPM, error)

GetRPM returns RPM for the given id from datastore.

func GetRPMIndexedFieldName

func GetRPMIndexedFieldName(input string) (string, error)

GetRPMIndexedFieldName returns the index name

func GetRack

func GetRack(ctx context.Context, id string) (*ufspb.Rack, error)

GetRack returns rack for the given id from datastore.

func GetRackIndexedFieldName

func GetRackIndexedFieldName(input string) (string, error)

GetRackIndexedFieldName returns the index name

func GetSwitch

func GetSwitch(ctx context.Context, id string) (*ufspb.Switch, error)

GetSwitch returns switch for the given id from datastore.

func GetSwitchIndexedFieldName

func GetSwitchIndexedFieldName(input string) (string, error)

GetSwitchIndexedFieldName returns the index name

func ImportDracs

func ImportDracs(ctx context.Context, dracs []*ufspb.Drac) (*ufsds.OpResults, error)

ImportDracs creates or updates a batch of dracs in datastore.

func ImportKVMs

func ImportKVMs(ctx context.Context, kvms []*ufspb.KVM) (*ufsds.OpResults, error)

ImportKVMs creates or updates a batch of kvms in datastore.

func ImportMachines

func ImportMachines(ctx context.Context, machines []*ufspb.Machine) (*ufsds.OpResults, error)

ImportMachines creates or updates a batch of machines in datastore

func ImportNics

func ImportNics(ctx context.Context, nics []*ufspb.Nic) (*ufsds.OpResults, error)

ImportNics creates or updates a batch of nics in datastore.

func ImportRacks

func ImportRacks(ctx context.Context, racks []*ufspb.Rack) (*ufsds.OpResults, error)

ImportRacks creates or updates a batch of racks in datastore.

func ImportSwitches

func ImportSwitches(ctx context.Context, switches []*ufspb.Switch) (*ufsds.OpResults, error)

ImportSwitches creates or updates a batch of switches in datastore

func ListAllMachines

func ListAllMachines(ctx context.Context, keysOnly bool) (res []*ufspb.Machine, err error)

ListAllMachines returns all machine in datastore.

func ListAssets

func ListAssets(ctx context.Context, pageSize int32, pageToken string, filterMap map[string][]interface{}, keysOnly bool) (res []*ufspb.Asset, nextPageToken string, err error)

ListAssets lists the assets Does a query over asset entities. Returns pageSize number of entities and a non-nil cursor if there are more results. pageSize must be positive

func ListDracs

func ListDracs(ctx context.Context, pageSize int32, pageToken string, filterMap map[string][]interface{}, keysOnly bool) (res []*ufspb.Drac, nextPageToken string, err error)

ListDracs lists the dracs

Does a query over Drac entities. Returns up to pageSize entities, plus non-nil cursor (if there are more results). pageSize must be positive.

func ListKVMs

func ListKVMs(ctx context.Context, pageSize int32, pageToken string, filterMap map[string][]interface{}, keysOnly bool) (res []*ufspb.KVM, nextPageToken string, err error)

ListKVMs lists the KVMs

Does a query over KVM entities. Returns up to pageSize entities, plus non-nil cursor (if there are more results). pageSize must be positive.

func ListMachines

func ListMachines(ctx context.Context, pageSize int32, pageToken string, filterMap map[string][]interface{}, keysOnly bool) (res []*ufspb.Machine, nextPageToken string, err error)

ListMachines lists the machines Does a query over Machine entities. Returns up to pageSize entities, plus non-nil cursor (if there are more results). pageSize must be positive.

func ListNics

func ListNics(ctx context.Context, pageSize int32, pageToken string, filterMap map[string][]interface{}, keysOnly bool) (res []*ufspb.Nic, nextPageToken string, err error)

ListNics lists the nics

Does a query over Nic entities. Returns up to pageSize entities, plus non-nil cursor (if there are more results). pageSize must be positive.

func ListRPMs

func ListRPMs(ctx context.Context, pageSize int32, pageToken string, filterMap map[string][]interface{}, keysOnly bool) (res []*ufspb.RPM, nextPageToken string, err error)

ListRPMs lists the RPMs

Does a query over RPM entities. Returns up to pageSize entities, plus non-nil cursor (if there are more results). pageSize must be positive.

func ListRacks

func ListRacks(ctx context.Context, pageSize int32, pageToken string, filterMap map[string][]interface{}, keysOnly bool) (res []*ufspb.Rack, nextPageToken string, err error)

ListRacks lists the racks Does a query over Rack entities. Returns up to pageSize entities, plus non-nil cursor (if there are more results). pageSize must be positive.

func ListSwitches

func ListSwitches(ctx context.Context, pageSize int32, pageToken string, filterMap map[string][]interface{}, keysOnly bool) (res []*ufspb.Switch, nextPageToken string, err error)

ListSwitches lists the switches

Does a query over switch entities. Returns up to pageSize entities, plus non-nil cursor (if there are more results). pageSize must be positive.

func QueryAssetByPropertyName

func QueryAssetByPropertyName(ctx context.Context, propertyName, id string, keysOnly bool) ([]*ufspb.Asset, error)

QueryAssetByPropertyName queries Asset Entity in the datastore If keysOnly is true, then only key field is populated in returned assets

func QueryDracByPropertyName

func QueryDracByPropertyName(ctx context.Context, propertyName, id string, keysOnly bool) ([]*ufspb.Drac, error)

QueryDracByPropertyName query's Drac Entity in the datastore

If keysOnly is true, then only key field is populated in returned dracs

func QueryKVMByPropertyName

func QueryKVMByPropertyName(ctx context.Context, propertyName, id string, keysOnly bool) ([]*ufspb.KVM, error)

QueryKVMByPropertyName query's KVM Entity in the datastore

If keysOnly is true, then only key field is populated in returned kvms

func QueryMachineByPropertyName

func QueryMachineByPropertyName(ctx context.Context, propertyName, id string, keysOnly bool) ([]*ufspb.Machine, error)

QueryMachineByPropertyName queries Machine Entity in the datastore If keysOnly is true, then only key field is populated in returned machines

func QueryNicByPropertyName

func QueryNicByPropertyName(ctx context.Context, propertyName, id string, keysOnly bool) ([]*ufspb.Nic, error)

QueryNicByPropertyName query's Nic Entity in the datastore

If keysOnly is true, then only key field is populated in returned nics

func QueryRPMByPropertyName

func QueryRPMByPropertyName(ctx context.Context, propertyName, id string, keysOnly bool) ([]*ufspb.RPM, error)

QueryRPMByPropertyName query's RPM Entity in the datastore

If keysOnly is true, then only key field is populated in returned rpms

func QueryRackByPropertyName

func QueryRackByPropertyName(ctx context.Context, propertyName, id string, keysOnly bool) ([]*ufspb.Rack, error)

QueryRackByPropertyName queries Rack Entity in the datastore

If keysOnly is true, then only key field is populated in returned racks

func QuerySwitchByPropertyName

func QuerySwitchByPropertyName(ctx context.Context, propertyName, id string, keysOnly bool) ([]*ufspb.Switch, error)

QuerySwitchByPropertyName query's Switch Entity in the datastore

If keysOnly is true, then only key field is populated in returned switches

func UpdateAsset

func UpdateAsset(ctx context.Context, asset *ufspb.Asset) (*ufspb.Asset, error)

UpdateAsset updates the asset to the given asset proto.

func UpdateDrac

func UpdateDrac(ctx context.Context, drac *ufspb.Drac) (*ufspb.Drac, error)

UpdateDrac updates drac in datastore.

func UpdateKVM

func UpdateKVM(ctx context.Context, KVM *ufspb.KVM) (*ufspb.KVM, error)

UpdateKVM updates KVM in datastore.

func UpdateMachine

func UpdateMachine(ctx context.Context, machine *ufspb.Machine) (*ufspb.Machine, error)

UpdateMachine updates machine in datastore.

func UpdateNic

func UpdateNic(ctx context.Context, nic *ufspb.Nic) (*ufspb.Nic, error)

UpdateNic updates nic in datastore.

func UpdateRPM

func UpdateRPM(ctx context.Context, RPM *ufspb.RPM) (*ufspb.RPM, error)

UpdateRPM updates RPM in datastore.

func UpdateRack

func UpdateRack(ctx context.Context, rack *ufspb.Rack) (*ufspb.Rack, error)

UpdateRack updates rack in datastore.

func UpdateSwitch

func UpdateSwitch(ctx context.Context, s *ufspb.Switch) (*ufspb.Switch, error)

UpdateSwitch updates switch in datastore.

Types

type AssetEntity

type AssetEntity struct {
	Name        string   `gae:"$id"`
	Zone        string   `gae:"zone"`
	Type        string   `gae:"type"`
	Model       string   `gae:"model"`
	Rack        string   `gae:"rack"`
	BuildTarget string   `gae:"build_target"`
	Phase       string   `gae:"phase"`
	Tags        []string `gae:"tags"`
	Asset       []byte   `gae:",noindex"` // Marshalled Asset proto
	// contains filtered or unexported fields
}

AssetEntity is a datastore entity that tracks Assets

func (*AssetEntity) GetProto

func (a *AssetEntity) GetProto() (proto.Message, error)

GetProto returns unmarshalled Asset.

type DracEntity

type DracEntity struct {
	ID         string   `gae:"$id"`
	SwitchID   string   `gae:"switch_id"`
	Lab        string   `gae:"lab"` // deprecated
	Zone       string   `gae:"zone"`
	Machine    string   `gae:"machine"`
	Rack       string   `gae:"rack"`
	Tags       []string `gae:"tags"`
	MacAddress string   `gae:"mac_address"`
	SwitchPort string   `gae:"switch_port"`
	// ufspb.Drac cannot be directly used as it contains pointer.
	Drac []byte `gae:",noindex"`
	// contains filtered or unexported fields
}

DracEntity is a datastore entity that tdracs Drac.

func (*DracEntity) GetProto

func (e *DracEntity) GetProto() (proto.Message, error)

GetProto returns the unmarshaled Drac.

type KVMEntity

type KVMEntity struct {
	ID               string   `gae:"$id"`
	ChromePlatformID string   `gae:"chrome_platform_id"`
	Lab              string   `gae:"lab"` // deprecated
	Zone             string   `gae:"zone"`
	Rack             string   `gae:"rack"`
	Tags             []string `gae:"tags"`
	MacAddress       string   `gae:"mac_address"`
	State            string   `gae:"state"`
	// ufspb.KVM cannot be directly used as it contains pointer.
	KVM []byte `gae:",noindex"`
	// contains filtered or unexported fields
}

KVMEntity is a datastore entity that tracks KVM.

func (*KVMEntity) GetProto

func (e *KVMEntity) GetProto() (proto.Message, error)

GetProto returns the unmarshaled KVM.

type MachineEntity

type MachineEntity struct {

	// ufspb.Machine.Name
	ID               string   `gae:"$id"`
	SerialNumber     string   `gae:"serial_number"`
	KVMID            string   `gae:"kvm_id"`
	KVMPort          string   `gae:"kvm_port"`
	RPMID            string   `gae:"rpm_id"`
	NicIDs           []string `gae:"nic_ids"` // deprecated. Do not use.
	DracID           string   `gae:"drac_id"` // deprecated. Do not use.
	ChromePlatformID string   `gae:"chrome_platform_id"`
	Rack             string   `gae:"rack"`
	Lab              string   `gae:"lab"` // deprecated
	Zone             string   `gae:"zone"`
	Tags             []string `gae:"tags"`
	State            string   `gae:"state"`
	Model            string   `gae:"model"`
	BuildTarget      string   `gae:"build_target"`
	DeviceType       string   `gae:"device_type"`
	Phase            string   `gae:"phase"`
	// ufspb.Machine cannot be directly used as it contains pointer.
	Machine []byte `gae:",noindex"`
	// contains filtered or unexported fields
}

MachineEntity is a datastore entity that tracks Machine.

func (*MachineEntity) GetProto

func (e *MachineEntity) GetProto() (proto.Message, error)

GetProto returns the unmarshaled Machine.

type NicEntity

type NicEntity struct {
	ID         string   `gae:"$id"`
	SwitchID   string   `gae:"switch_id"`
	Lab        string   `gae:"lab"` // deprecated
	Zone       string   `gae:"zone"`
	Machine    string   `gae:"machine"`
	Rack       string   `gae:"rack"`
	Tags       []string `gae:"tags"`
	MacAddress string   `gae:"mac_address"`
	SwitchPort string   `gae:"switch_port"`
	// ufspb.Nic cannot be directly used as it contains pointer.
	Nic []byte `gae:",noindex"`
	// contains filtered or unexported fields
}

NicEntity is a datastore entity that tnics Nic.

func (*NicEntity) GetProto

func (e *NicEntity) GetProto() (proto.Message, error)

GetProto returns the unmarshaled Nic.

type RPMEntity

type RPMEntity struct {
	ID         string   `gae:"$id"`
	Lab        string   `gae:"lab"` // deprecated
	Zone       string   `gae:"zone"`
	Rack       string   `gae:"rack"`
	Tags       []string `gae:"tags"`
	MacAddress string   `gae:"mac_address"`
	State      string   `gae:"state"`
	// ufspb.RPM cannot be directly used as it contains pointer.
	RPM []byte `gae:",noindex"`
	// contains filtered or unexported fields
}

RPMEntity is a datastore entity that tracks RPM.

func (*RPMEntity) GetProto

func (e *RPMEntity) GetProto() (proto.Message, error)

GetProto returns the unmarshaled RPM.

type RackEntity

type RackEntity struct {
	ID        string   `gae:"$id"`
	SwitchIDs []string `gae:"switch_ids"` // deprecated. Do not use.
	KVMIDs    []string `gae:"kvm_ids"`    // deprecated. Do not use.
	RPMIDs    []string `gae:"rpm_ids"`    // deprecated. Do not use.
	Lab       string   `gae:"lab"`        // deprecated
	Zone      string   `gae:"zone"`
	Tags      []string `gae:"tags"`
	State     string   `gae:"state"`
	// ufspb.Rack cannot be directly used as it contains pointer.
	Rack []byte `gae:",noindex"`
	// contains filtered or unexported fields
}

RackEntity is a datastore entity that tracks Rack.

func (*RackEntity) GetProto

func (e *RackEntity) GetProto() (proto.Message, error)

GetProto returns the unmarshaled Rack.

type SwitchEntity

type SwitchEntity struct {
	ID    string   `gae:"$id"`
	Lab   string   `gae:"lab"` // deprecated
	Zone  string   `gae:"zone"`
	Rack  string   `gae:"rack"`
	Tags  []string `gae:"tags"`
	State string   `gae:"state"`
	// ufspb.Switch cannot be directly used as it contains pointer (timestamp).
	Switch []byte `gae:",noindex"`
	// contains filtered or unexported fields
}

SwitchEntity is a datastore entity that tracks switch.

func (*SwitchEntity) GetProto

func (e *SwitchEntity) GetProto() (proto.Message, error)

GetProto returns the unmarshaled switch.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL