Documentation ¶
Index ¶
- Constants
- Variables
- func CompletedBinaryBlobIdxByName(blobs []BinaryBlobCompleted, name string) int
- func ConfigureGOGC(limit int64, percent int) (int64, int, error)
- func CountDNSServers(dns DeviceNetworkStatus, ifname string) int
- func CountLocalAddrAnyNoLinkLocal(dns DeviceNetworkStatus) int
- func CountLocalAddrAnyNoLinkLocalIf(dns DeviceNetworkStatus, ifname string) (int, error)
- func CountLocalAddrNoLinkLocalWithCost(dns DeviceNetworkStatus, maxCost uint8) int
- func CountLocalIPv4AddrAnyNoLinkLocal(dns DeviceNetworkStatus) int
- func CountLocalIPv4AddrAnyNoLinkLocalIf(dns DeviceNetworkStatus, ifname string) (int, error)
- func DomainnameToUUID(name string) (uuid.UUID, string, int, error)
- func ExtractUSBBusnumPort(path string) (uint16, string, error)
- func FormatTriState(state TriState) string
- func GetAllPortsSortedCost(dns DeviceNetworkStatus, l3Only bool, rotation int) []string
- func GetDNSServers(dns DeviceNetworkStatus, ifname string) []net.IP
- func GetDefaultRouteTable() int
- func GetEveKmemUsageInBytes() (uint64, error)
- func GetEveMemoryLimitInBytes() (uint64, error)
- func GetEveMemoryUsageInBytes() (uint64, error)
- func GetLocalAddrAnyNoLinkLocal(dns DeviceNetworkStatus, pickNum int, ifname string) (net.IP, error)
- func GetLocalAddrList(dns DeviceNetworkStatus, ifname string) ([]net.IP, error)
- func GetLocalAddrNoLinkLocalWithCost(dns DeviceNetworkStatus, pickNum int, ifname string, maxCost uint8) (net.IP, error)
- func GetMgmtPortFromAddr(dns DeviceNetworkStatus, addr net.IP) string
- func GetMgmtPortsAny(dns DeviceNetworkStatus, rotation int) []string
- func GetMgmtPortsByCost(dns DeviceNetworkStatus, cost uint8) []string
- func GetMgmtPortsSortedCost(dns DeviceNetworkStatus, rotation int) []string
- func GetMgmtPortsSortedCostWithoutFailed(dns DeviceNetworkStatus, rotation int) []string
- func GetNTPServers(dns DeviceNetworkStatus, ifname string) []net.IP
- func GetPillarHardMemoryLimitInBytes() (uint64, error)
- func GetPortCost(dns DeviceNetworkStatus, ifname string) uint8
- func GetPortCostList(dns DeviceNetworkStatus) []uint8
- func GetSnapshotAppInstanceConfigFile(snapshotID string) string
- func GetSnapshotDir(snapshotID string) string
- func GetSnapshotInstanceStatusFile(snapshotID string) string
- func GetVolumesSnapshotStatusFile(snapshotID string) string
- func GetZFSArcMaxSizeInBytes() (uint64, error)
- func IfRename(log *base.LogObject, ifname string, newIfname string) error
- func IoBundleToPci(log *base.LogObject, ib *IoBundle) (string, error)
- func IsEveDefinedPortLabel(label string) bool
- func IsL3Port(dns DeviceNetworkStatus, ifname string) bool
- func IsMgmtPort(dns DeviceNetworkStatus, ifname string) bool
- func IsPort(dns DeviceNetworkStatus, ifname string) bool
- func PCIGetIOMMUGroup(long string) (string, error)
- func PCIIsBootVga(log *base.LogObject, long string) (bool, error)
- func PCILongToShort(long string) string
- func PCISameController(long1 string, long2 string) bool
- func PathToKey(path string) string
- func PciLongToIfname(log *base.LogObject, long string) (bool, string)
- func PciLongToUnique(log *base.LogObject, long string) (bool, string)
- func RoundupToKB(b uint64) uint64
- func UuidsToStrings(uuids []uuid.UUID) []string
- type ACE
- type ACEAction
- type ACEDirection
- type ACEMatch
- type ACLActionType
- type AddrInfo
- type AddressSource
- type AddressType
- type AgentRunner
- type AgentSettingKey
- type AppAndImageToHash
- type AppBlobsAvailable
- type AppCommand
- type AppContainerMetrics
- func (acMetric AppContainerMetrics) Key() string
- func (acMetric AppContainerMetrics) LogCreate(logBase *base.LogObject)
- func (acMetric AppContainerMetrics) LogDelete(logBase *base.LogObject)
- func (acMetric AppContainerMetrics) LogKey() string
- func (acMetric AppContainerMetrics) LogModify(logBase *base.LogObject, old interface{})
- type AppContainerStats
- type AppCount
- type AppDiskMetric
- type AppInfo
- type AppInstMetaData
- type AppInstMetaDataType
- type AppInstanceConfig
- func (config AppInstanceConfig) Key() string
- func (config AppInstanceConfig) LogCreate(logBase *base.LogObject)
- func (config AppInstanceConfig) LogDelete(logBase *base.LogObject)
- func (config AppInstanceConfig) LogKey() string
- func (config AppInstanceConfig) LogModify(logBase *base.LogObject, old interface{})
- type AppInstanceOpsCmd
- type AppInstanceStatus
- func (status AppInstanceStatus) GetAppInterfaceList() []string
- func (status AppInstanceStatus) Key() string
- func (status AppInstanceStatus) LogCreate(logBase *base.LogObject)
- func (status AppInstanceStatus) LogDelete(logBase *base.LogObject)
- func (status AppInstanceStatus) LogKey() string
- func (status AppInstanceStatus) LogModify(logBase *base.LogObject, old interface{})
- type AppInstanceSummary
- type AppInterfaceKey
- type AppInterfaceToNum
- func (info *AppInterfaceToNum) GetKey() objtonum.ObjKey
- func (info *AppInterfaceToNum) GetNumber() (number int, numberType string)
- func (info *AppInterfaceToNum) GetTimestamps() (createdAt time.Time, lastUpdatedAt time.Time)
- func (info *AppInterfaceToNum) IsReservedOnly() bool
- func (info AppInterfaceToNum) LogCreate(logBase *base.LogObject)
- func (info AppInterfaceToNum) LogDelete(logBase *base.LogObject)
- func (info AppInterfaceToNum) LogKey() string
- func (info AppInterfaceToNum) LogModify(logBase *base.LogObject, old interface{})
- func (info *AppInterfaceToNum) New(objKey objtonum.ObjKey) objtonum.ObjNumContainer
- func (info *AppInterfaceToNum) SetNumber(number int, numberType string)
- func (info *AppInterfaceToNum) SetReservedOnly(reservedOnly bool)
- type AppMACGenerator
- func (g AppMACGenerator) LogCreate(logBase *base.LogObject)
- func (g AppMACGenerator) LogDelete(logBase *base.LogObject)
- func (g AppMACGenerator) LogKey() string
- func (g AppMACGenerator) LogModify(logBase *base.LogObject, old interface{})
- func (g *AppMACGenerator) New(objKey objtonum.ObjKey) objtonum.ObjNumContainer
- type AppNetAdapterConfig
- type AppNetAdapterStatus
- type AppNetworkConfig
- func (config *AppNetworkConfig) IsNetworkUsed(network uuid.UUID) bool
- func (config AppNetworkConfig) Key() string
- func (config AppNetworkConfig) LogCreate(logBase *base.LogObject)
- func (config AppNetworkConfig) LogDelete(logBase *base.LogObject)
- func (config AppNetworkConfig) LogKey() string
- func (config AppNetworkConfig) LogModify(logBase *base.LogObject, old interface{})
- type AppNetworkStatus
- func (status AppNetworkStatus) AwaitingNetwork() bool
- func (status AppNetworkStatus) GetAdaptersStatusForNI(netUUID uuid.UUID) []*AppNetAdapterStatus
- func (status AppNetworkStatus) Key() string
- func (status AppNetworkStatus) LogCreate(logBase *base.LogObject)
- func (status AppNetworkStatus) LogDelete(logBase *base.LogObject)
- func (status AppNetworkStatus) LogKey() string
- func (status AppNetworkStatus) LogModify(logBase *base.LogObject, old interface{})
- func (status AppNetworkStatus) Pending() bool
- type AssignableAdapters
- func (aa *AssignableAdapters) AddOrUpdateIoBundle(log *base.LogObject, ib IoBundle)
- func (aa *AssignableAdapters) CheckBadAssignmentGroups(log *base.LogObject, PCISameController func(string, string) bool) bool
- func (aa *AssignableAdapters) CheckBadUSBBundles()
- func (aa *AssignableAdapters) CheckParentAssigngrp() bool
- func (aa *AssignableAdapters) ExpandControllers(log *base.LogObject, list []*IoBundle, ...) []*IoBundle
- func (aa AssignableAdapters) Key() string
- func (aa AssignableAdapters) LogCreate(logBase *base.LogObject)
- func (aa AssignableAdapters) LogDelete(logBase *base.LogObject)
- func (aa AssignableAdapters) LogKey() string
- func (aa AssignableAdapters) LogModify(logBase *base.LogObject, old interface{})
- func (aa *AssignableAdapters) LookupIoBundleAny(name string) []*IoBundle
- func (aa *AssignableAdapters) LookupIoBundleGroup(group string) []*IoBundle
- func (aa *AssignableAdapters) LookupIoBundleIfName(ifname string) *IoBundle
- func (aa *AssignableAdapters) LookupIoBundleLogicallabel(label string) *IoBundle
- func (aa *AssignableAdapters) LookupIoBundlePhylabel(phylabel string) *IoBundle
- type AssignedAddr
- type AssignedAddrs
- type AttestNonce
- type AttestQuote
- type AttestState
- type BaseOSMgrStatus
- type BaseOsConfig
- type BaseOsStatus
- type BinaryBlobCompleted
- type BinaryBlobVolumeRef
- type BlobStatus
- func (status BlobStatus) GetDownloadedPercentage() uint32
- func (status BlobStatus) IsIndex() bool
- func (status BlobStatus) IsManifest() bool
- func (status BlobStatus) Key() string
- func (status BlobStatus) LogCreate(logBase *base.LogObject)
- func (status BlobStatus) LogDelete(logBase *base.LogObject)
- func (status BlobStatus) LogKey() string
- func (status BlobStatus) LogModify(logBase *base.LogObject, old interface{})
- type BondArpMonitor
- type BondConfig
- type BondMIIMonitor
- type BondMode
- type BootReason
- type CachedIP
- type CachedResolvedIPs
- func (c CachedResolvedIPs) Key() string
- func (c CachedResolvedIPs) LogCreate(logBase *base.LogObject)
- func (c CachedResolvedIPs) LogDelete(logBase *base.LogObject)
- func (c CachedResolvedIPs) LogKey() string
- func (c CachedResolvedIPs) LogModify(logBase *base.LogObject, old interface{})
- func (c CachedResolvedIPs) String() string
- type Capabilities
- type CellNetPortConfig
- type CellularAccessPoint
- type CertHashType
- type CertMetaData
- type CertMetaDataType
- type CertType
- type ChangeInProgressType
- type CipherBlockStatus
- func (status *CipherBlockStatus) Key() string
- func (status CipherBlockStatus) LogCreate(logBase *base.LogObject)
- func (status CipherBlockStatus) LogDelete(logBase *base.LogObject)
- func (status CipherBlockStatus) LogKey() string
- func (status CipherBlockStatus) LogModify(logBase *base.LogObject, old interface{})
- type CipherContext
- func (status *CipherContext) ControllerCertKey() string
- func (status *CipherContext) EdgeNodeCertKey() string
- func (status *CipherContext) Key() string
- func (status CipherContext) LogCreate(logBase *base.LogObject)
- func (status CipherContext) LogDelete(logBase *base.LogObject)
- func (status CipherContext) LogKey() string
- func (status CipherContext) LogModify(logBase *base.LogObject, old interface{})
- type CipherError
- type CipherMetrics
- func (cipherMetric CipherMetrics) Key() string
- func (cipherMetric CipherMetrics) LogCreate(logBase *base.LogObject)
- func (cipherMetric CipherMetrics) LogDelete(logBase *base.LogObject)
- func (cipherMetric CipherMetrics) LogKey() string
- func (cipherMetric CipherMetrics) LogModify(logBase *base.LogObject, old interface{})
- type CollectingStatus
- type ConfigGetStatus
- type ConfigItem
- type ConfigItemSpec
- type ConfigItemSpecMap
- func (specMap *ConfigItemSpecMap) AddAgentSettingStringItem(key AgentSettingKey, defaultString string, validator Validator)
- func (specMap *ConfigItemSpecMap) AddBoolItem(key GlobalSettingKey, defaultBool bool)
- func (specMap *ConfigItemSpecMap) AddIntItem(key GlobalSettingKey, defaultInt uint32, min uint32, max uint32)
- func (specMap *ConfigItemSpecMap) AddStringItem(key GlobalSettingKey, defaultString string, validator Validator)
- func (specMap *ConfigItemSpecMap) AddTriStateItem(key GlobalSettingKey, defaultTriState TriState)
- func (specMap *ConfigItemSpecMap) ParseItem(newConfigMap *ConfigItemValueMap, oldConfigMap *ConfigItemValueMap, key string, ...) (ConfigItemValue, error)
- type ConfigItemStatus
- type ConfigItemType
- type ConfigItemValue
- type ConfigItemValueMap
- func (configPtr *ConfigItemValueMap) AgentSettingStringValue(agentName string, agentSettingKey AgentSettingKey) string
- func (configPtr *ConfigItemValueMap) DelAgentValue(key AgentSettingKey, agentName string)
- func (configPtr *ConfigItemValueMap) GlobalValueBool(key GlobalSettingKey) bool
- func (configPtr *ConfigItemValueMap) GlobalValueInt(key GlobalSettingKey) uint32
- func (configPtr *ConfigItemValueMap) GlobalValueString(key GlobalSettingKey) string
- func (configPtr *ConfigItemValueMap) GlobalValueTriState(key GlobalSettingKey) TriState
- func (configPtr *ConfigItemValueMap) ResetGlobalValue(key GlobalSettingKey)
- func (configPtr *ConfigItemValueMap) SetAgentSettingStringValue(agentName string, key AgentSettingKey, newValue string)
- func (configPtr *ConfigItemValueMap) SetGlobalValueBool(key GlobalSettingKey, value bool)
- func (configPtr *ConfigItemValueMap) SetGlobalValueInt(key GlobalSettingKey, value uint32)
- func (configPtr *ConfigItemValueMap) SetGlobalValueString(key GlobalSettingKey, value string)
- func (configPtr *ConfigItemValueMap) SetGlobalValueTriState(key GlobalSettingKey, value TriState)
- func (configPtr *ConfigItemValueMap) UpdateItemValues(source *ConfigItemValueMap)
- type ConnectivityProbe
- type ConnectivityProbeMethod
- type ContentTreeConfig
- func (config ContentTreeConfig) Key() string
- func (config ContentTreeConfig) LogCreate(logBase *base.LogObject)
- func (config ContentTreeConfig) LogDelete(logBase *base.LogObject)
- func (config ContentTreeConfig) LogKey() string
- func (config ContentTreeConfig) LogModify(logBase *base.LogObject, old interface{})
- type ContentTreeStatus
- func (status ContentTreeStatus) IsContainer() bool
- func (status ContentTreeStatus) Key() string
- func (status ContentTreeStatus) LogCreate(logBase *base.LogObject)
- func (status ContentTreeStatus) LogDelete(logBase *base.LogObject)
- func (status ContentTreeStatus) LogKey() string
- func (status ContentTreeStatus) LogModify(logBase *base.LogObject, old interface{})
- func (status ContentTreeStatus) ReferenceID() string
- func (status ContentTreeStatus) ResolveKey() string
- func (status *ContentTreeStatus) UpdateFromContentTreeConfig(config ContentTreeConfig)
- type ControllerCert
- type DAttrTable
- type DNSNameToIP
- type DNSNotAvailError
- type DNSReq
- type DPCSanitizeArgs
- type DPCState
- type DatastoreConfig
- func (config DatastoreConfig) Key() string
- func (config DatastoreConfig) LogCreate(logBase *base.LogObject)
- func (config DatastoreConfig) LogDelete(logBase *base.LogObject)
- func (config DatastoreConfig) LogKey() string
- func (config DatastoreConfig) LogModify(logBase *base.LogObject, old interface{})
- type DatastoreContext
- type DeprecatedCellConfig
- type DevCommand
- type DeviceNetworkStatus
- func (status DeviceNetworkStatus) GetPortAddrInfo(ifname string, addr net.IP) *AddrInfo
- func (status DeviceNetworkStatus) HasErrors() bool
- func (status DeviceNetworkStatus) Key() string
- func (status DeviceNetworkStatus) LogCreate(logBase *base.LogObject)
- func (status DeviceNetworkStatus) LogDelete(logBase *base.LogObject)
- func (status DeviceNetworkStatus) LogKey() string
- func (status DeviceNetworkStatus) LogModify(logBase *base.LogObject, old interface{})
- func (status *DeviceNetworkStatus) LookupPortByIfName(ifname string) *NetworkPortStatus
- func (status *DeviceNetworkStatus) LookupPortByLogicallabel(label string) *NetworkPortStatus
- func (status *DeviceNetworkStatus) LookupPortsByLabel(label string) (ports []*NetworkPortStatus)
- func (status DeviceNetworkStatus) MostlyEqual(status2 DeviceNetworkStatus) bool
- func (status *DeviceNetworkStatus) MostlyEqualStatus(status2 DeviceNetworkStatus) bool
- func (status *DeviceNetworkStatus) UpdatePortStatusFromIntfStatusMap(intfStatusMap IntfStatusMap)
- type DeviceOperation
- type DeviceOpsCmd
- type DevicePortConfig
- func (config *DevicePortConfig) CountMgmtPorts(onlyValidConfig bool) int
- func (config *DevicePortConfig) DoSanitize(log *base.LogObject, args DPCSanitizeArgs)
- func (config *DevicePortConfig) IsAnyPortInPciBack(log *base.LogObject, aa *AssignableAdapters, filterUnassigned bool) (bool, string, uuid.UUID)
- func (config DevicePortConfig) IsDPCTestable(minTimeSinceFailure time.Duration) bool
- func (config DevicePortConfig) IsDPCUntested() bool
- func (config DevicePortConfig) IsDPCUsable() bool
- func (config DevicePortConfig) LogCreate(logBase *base.LogObject)
- func (config DevicePortConfig) LogDelete(logBase *base.LogObject)
- func (config DevicePortConfig) LogKey() string
- func (config DevicePortConfig) LogModify(logBase *base.LogObject, old interface{})
- func (config *DevicePortConfig) LookupPortByIfName(ifName string) *NetworkPortConfig
- func (config *DevicePortConfig) LookupPortByLogicallabel(label string) *NetworkPortConfig
- func (config *DevicePortConfig) LookupPortsByLabel(label string) (ports []*NetworkPortConfig)
- func (config *DevicePortConfig) MostlyEqual(config2 *DevicePortConfig) bool
- func (config DevicePortConfig) PubKey() string
- func (config *DevicePortConfig) RecordPortFailure(ifname string, errStr string)
- func (config *DevicePortConfig) RecordPortSuccess(ifname string)
- func (config *DevicePortConfig) UpdatePortStatusFromIntfStatusMap(intfStatusMap IntfStatusMap)
- func (config DevicePortConfig) WasDPCWorking() bool
- type DevicePortConfigList
- func (config DevicePortConfigList) LogCreate(logBase *base.LogObject)
- func (config DevicePortConfigList) LogDelete(logBase *base.LogObject)
- func (config DevicePortConfigList) LogKey() string
- func (config DevicePortConfigList) LogModify(logBase *base.LogObject, old interface{})
- func (config DevicePortConfigList) MostlyEqual(config2 DevicePortConfigList) bool
- func (config DevicePortConfigList) PubKey() string
- type DevicePortConfigVersion
- type DeviceSmartInfo
- type DeviceState
- type DhcpConfig
- type DhcpType
- type DiskConfig
- type DiskDescription
- type DiskMetric
- type DiskNotification
- type DiskSmartInfo
- type DiskStatus
- type DiskType
- type DisksInformation
- type DomainConfig
- func (config DomainConfig) GetTaskName() string
- func (config DomainConfig) IsOCIContainer() bool
- func (config DomainConfig) Key() string
- func (config DomainConfig) LogCreate(logBase *base.LogObject)
- func (config DomainConfig) LogDelete(logBase *base.LogObject)
- func (config DomainConfig) LogKey() string
- func (config DomainConfig) LogModify(logBase *base.LogObject, old interface{})
- func (config DomainConfig) VirtualizationModeOrDefault() VmMode
- type DomainMetric
- type DomainStatus
- func (status DomainStatus) Key() string
- func (status DomainStatus) LogCreate(logBase *base.LogObject)
- func (status DomainStatus) LogDelete(logBase *base.LogObject)
- func (status DomainStatus) LogKey() string
- func (status DomainStatus) LogModify(logBase *base.LogObject, old interface{})
- func (status DomainStatus) Pending() bool
- func (status DomainStatus) VifInfoByVif(vif string) *VifInfo
- type DownloaderConfig
- func (config DownloaderConfig) Key() string
- func (config DownloaderConfig) LogCreate(logBase *base.LogObject)
- func (config DownloaderConfig) LogDelete(logBase *base.LogObject)
- func (config DownloaderConfig) LogKey() string
- func (config DownloaderConfig) LogModify(logBase *base.LogObject, old interface{})
- type DownloaderStatus
- func (status *DownloaderStatus) HandleDownloadFail(errStr string, retryTime time.Duration, cancelled bool)
- func (status DownloaderStatus) Key() string
- func (status DownloaderStatus) LogCreate(logBase *base.LogObject)
- func (status DownloaderStatus) LogDelete(logBase *base.LogObject)
- func (status DownloaderStatus) LogKey() string
- func (status DownloaderStatus) LogModify(logBase *base.LogObject, old interface{})
- type ENClusterAppStatus
- type EdgeNodeCert
- type EdgeNodeClusterConfig
- type EdgeNodeClusterStatus
- type EdgeNodeDiskArrayType
- type EdgeNodeDiskConfig
- type EdgeNodeDiskConfigType
- type EdgeNodeDiskDescription
- type EdgeNodeDisks
- type EdgeNodeInfo
- type EdgeviewConfig
- type EdgeviewStatus
- type EncryptedVaultKeyFromController
- func (key EncryptedVaultKeyFromController) Key() string
- func (key EncryptedVaultKeyFromController) LogCreate(logBase *base.LogObject)
- func (key EncryptedVaultKeyFromController) LogDelete(logBase *base.LogObject)
- func (key EncryptedVaultKeyFromController) LogKey() string
- func (key EncryptedVaultKeyFromController) LogModify(logBase *base.LogObject, old interface{})
- type EncryptedVaultKeyFromDevice
- func (key EncryptedVaultKeyFromDevice) Key() string
- func (key EncryptedVaultKeyFromDevice) LogCreate(logBase *base.LogObject)
- func (key EncryptedVaultKeyFromDevice) LogDelete(logBase *base.LogObject)
- func (key EncryptedVaultKeyFromDevice) LogKey() string
- func (key EncryptedVaultKeyFromDevice) LogModify(logBase *base.LogObject, old interface{})
- type EncryptionBlock
- type ErrCycleDetected
- type ErrEmptyAssigngrpWithParent
- type ErrIOBundleCollision
- type ErrOwnParent
- type ErrParentAssigngrpMismatch
- type ErrorAndTime
- type ErrorAndTimeWithSource
- func (etsPtr *ErrorAndTimeWithSource) ClearErrorWithSource()
- func (etsPtr *ErrorAndTimeWithSource) HasError() bool
- func (etsPtr *ErrorAndTimeWithSource) IsErrorSource(source interface{}) bool
- func (etsPtr *ErrorAndTimeWithSource) SetError(errStr string, errTime time.Time)
- func (etsPtr *ErrorAndTimeWithSource) SetErrorWithSource(errStr string, source interface{}, errTime time.Time)
- func (etsPtr *ErrorAndTimeWithSource) SetErrorWithSourceAndDescription(errDescription ErrorDescription, source interface{})
- type ErrorDescription
- type ErrorEntity
- type ErrorEntityType
- type ErrorSeverity
- type EvAppPolicy
- type EvDevPolicy
- type EvExtPolicy
- type EvKubPolicy
- type EvjwtAlgo
- type EvjwtInfo
- type ExecConfig
- type ExecStatus
- type FlowRec
- type FlowScope
- type FlowlogCounters
- type FlowlogMetrics
- type GlobalSettingKey
- type GlobalStatus
- type HostMemory
- type IOBundleCollision
- type IOBundleError
- type IPAddrNotAvailError
- type IPFlow
- type IPRange
- type IPRouteConfig
- type IPRouteInfo
- type IPRouteStatus
- type IPTuple
- type ImgInfo
- type Inprogress
- type IntfStatusMap
- type IoAdapter
- type IoBundle
- type IoType
- type KubeClusterInfo
- type KubeNodeInfo
- type KubeNodeStatus
- type KubePodInfo
- type KubePodStatus
- type KubeVMIInfo
- type KubeVMIStatus
- type L2LinkConfig
- type L2LinkType
- type LOCConfig
- type LacpRate
- type LedBlinkCount
- type LedBlinkCounter
- type LocReliability
- type LocalAppCommand
- type LocalAppCounters
- type LocalCommands
- type MaintenanceModeReason
- type MemoryNotification
- type MetaDataType
- type MetricItem
- type MetricItemType
- type MetricsMap
- type NIPortProbe
- type NetworkInstanceConfig
- func (config *NetworkInstanceConfig) IsIPv6() bool
- func (config *NetworkInstanceConfig) Key() string
- func (config NetworkInstanceConfig) LogCreate(logBase *base.LogObject)
- func (config NetworkInstanceConfig) LogDelete(logBase *base.LogObject)
- func (config NetworkInstanceConfig) LogKey() string
- func (config NetworkInstanceConfig) LogModify(logBase *base.LogObject, old interface{})
- type NetworkInstanceInfo
- type NetworkInstanceMetrics
- func (metrics NetworkInstanceMetrics) Key() string
- func (metrics NetworkInstanceMetrics) LogCreate(logBase *base.LogObject)
- func (metrics NetworkInstanceMetrics) LogDelete(logBase *base.LogObject)
- func (metrics NetworkInstanceMetrics) LogKey() string
- func (metrics NetworkInstanceMetrics) LogModify(logBase *base.LogObject, old interface{})
- type NetworkInstanceStatus
- func (status *NetworkInstanceStatus) CombineErrors() (combinedErr ErrorAndTime)
- func (status NetworkInstanceStatus) EligibleForActivate() bool
- func (status *NetworkInstanceStatus) IsIpAssigned(ip net.IP) bool
- func (status NetworkInstanceStatus) LogCreate(logBase *base.LogObject)
- func (status NetworkInstanceStatus) LogDelete(logBase *base.LogObject)
- func (status NetworkInstanceStatus) LogKey() string
- func (status NetworkInstanceStatus) LogModify(logBase *base.LogObject, old interface{})
- type NetworkInstanceType
- type NetworkMetric
- type NetworkMetrics
- func (nms NetworkMetrics) Key() string
- func (nms NetworkMetrics) LogCreate(logBase *base.LogObject)
- func (nms NetworkMetrics) LogDelete(logBase *base.LogObject)
- func (nms NetworkMetrics) LogKey() string
- func (nms NetworkMetrics) LogModify(logBase *base.LogObject, old interface{})
- func (nms *NetworkMetrics) LookupNetworkMetrics(ifName string) (NetworkMetric, bool)
- type NetworkPortConfig
- type NetworkPortStatus
- type NetworkProxyType
- type NetworkType
- type NetworkXObjectConfig
- func (config NetworkXObjectConfig) Key() string
- func (config NetworkXObjectConfig) LogCreate(logBase *base.LogObject)
- func (config NetworkXObjectConfig) LogDelete(logBase *base.LogObject)
- func (config NetworkXObjectConfig) LogKey() string
- func (config NetworkXObjectConfig) LogModify(logBase *base.LogObject, old interface{})
- type NewlogMetrics
- type NodeAgentStatus
- func (status NodeAgentStatus) Key() string
- func (status NodeAgentStatus) LogCreate(logBase *base.LogObject)
- func (status NodeAgentStatus) LogDelete(logBase *base.LogObject)
- func (status NodeAgentStatus) LogKey() string
- func (status NodeAgentStatus) LogModify(logBase *base.LogObject, old interface{})
- type OldGlobalConfig
- type OnboardingStatus
- func (status OnboardingStatus) Key() string
- func (status OnboardingStatus) LogCreate(logBase *base.LogObject)
- func (status OnboardingStatus) LogDelete(logBase *base.LogObject)
- func (status OnboardingStatus) LogKey() string
- func (status OnboardingStatus) LogModify(logBase *base.LogObject, old interface{})
- type PCRExtendHashType
- type PCRValue
- type PatchEnvelopeInfo
- type PatchEnvelopeInfoList
- type PatchEnvelopeState
- type PatchEnvelopeUsage
- type PerAgentSettings
- type PersistType
- type PhyIOUsagePolicy
- type PhysicalAddress
- type PhysicalIOAdapter
- type PhysicalIOAdapterList
- func (ioAdapterList PhysicalIOAdapterList) Key() string
- func (ioAdapterList PhysicalIOAdapterList) LogCreate(logBase *base.LogObject)
- func (ioAdapterList PhysicalIOAdapterList) LogDelete(logBase *base.LogObject)
- func (ioAdapterList PhysicalIOAdapterList) LogKey() string
- func (ioAdapterList PhysicalIOAdapterList) LogModify(logBase *base.LogObject, old interface{})
- func (ioAdapterList *PhysicalIOAdapterList) LookupAdapter(phylabel string) *PhysicalIOAdapter
- type PodVIF
- type PoolStatus
- type PowerOnTime
- type ProbeIntfMetrics
- type ProbeMetrics
- type ProcessMetric
- type ProxyConfig
- type ProxyEntry
- type RadioSilence
- type ResolveConfig
- type ResolveStatus
- type RetStatus
- type STPConfig
- type SenderStatus
- type ServiceInitStatus
- type SigAlg
- type SimType
- type SnapshotConfig
- type SnapshotDesc
- type SnapshotInstanceStatus
- type SnapshotType
- type SnapshottingStatus
- type StorageChildren
- type StorageChildrenMetrics
- type StorageDiskMetrics
- type StorageDiskState
- type StorageRaidType
- type StorageStatus
- type StorageZVolMetrics
- type SwState
- type Task
- type TestResults
- func (trPtr *TestResults) Clear()
- func (trPtr *TestResults) HasError() bool
- func (trPtr *TestResults) HasWarning() bool
- func (trPtr *TestResults) RecordFailure(errStr string)
- func (trPtr *TestResults) RecordSuccess()
- func (trPtr *TestResults) RecordSuccessWithWarning(warnStr string)
- func (trPtr *TestResults) Update(src TestResults)
- type TriState
- type UEvent
- type UUIDPairAndIfIdxToNum
- type UUIDandVersion
- type UrlcloudMetrics
- type UsageStat
- type UsageZone
- type UuidToNum
- func (info *UuidToNum) GetKey() objtonum.ObjKey
- func (info *UuidToNum) GetNumber() (number int, numberType string)
- func (info *UuidToNum) GetTimestamps() (createdAt time.Time, lastUpdatedAt time.Time)
- func (info *UuidToNum) IsReservedOnly() bool
- func (info UuidToNum) LogCreate(logBase *base.LogObject)
- func (info UuidToNum) LogDelete(logBase *base.LogObject)
- func (info UuidToNum) LogKey() string
- func (info UuidToNum) LogModify(logBase *base.LogObject, old interface{})
- func (info *UuidToNum) New(objKey objtonum.ObjKey) objtonum.ObjNumContainer
- func (info *UuidToNum) SetNumber(number int, numberType string)
- func (info *UuidToNum) SetReservedOnly(reservedOnly bool)
- type UuidToNumKey
- type VDevAux
- type VLANConfig
- type Validator
- type VaultConfig
- type VaultStatus
- type VerifyImageConfig
- func (config VerifyImageConfig) Key() string
- func (config VerifyImageConfig) LogCreate(logBase *base.LogObject)
- func (config VerifyImageConfig) LogDelete(logBase *base.LogObject)
- func (config VerifyImageConfig) LogKey() string
- func (config VerifyImageConfig) LogModify(logBase *base.LogObject, old interface{})
- type VerifyImageStatus
- func (status VerifyImageStatus) Key() string
- func (status VerifyImageStatus) LogCreate(logBase *base.LogObject)
- func (status VerifyImageStatus) LogDelete(logBase *base.LogObject)
- func (status VerifyImageStatus) LogKey() string
- func (status VerifyImageStatus) LogModify(logBase *base.LogObject, old interface{})
- func (status VerifyImageStatus) Pending() bool
- type VfInfo
- type VifConfig
- type VifInfo
- type VifNameMac
- type VlanAccessPort
- type VlanInfo
- type VlanMetrics
- type VmConfig
- type VmMode
- type VolumeConfig
- type VolumeCreatePending
- func (status VolumeCreatePending) IsContainer() bool
- func (status VolumeCreatePending) Key() string
- func (status VolumeCreatePending) LogCreate(logBase *base.LogObject)
- func (status VolumeCreatePending) LogDelete(logBase *base.LogObject)
- func (status VolumeCreatePending) LogKey() string
- func (status VolumeCreatePending) LogModify(logBase *base.LogObject, old interface{})
- func (status VolumeCreatePending) PathName() string
- func (status VolumeCreatePending) ZVolName() string
- type VolumeMgrStatus
- func (status VolumeMgrStatus) Key() string
- func (status VolumeMgrStatus) LogCreate(logBase *base.LogObject)
- func (status VolumeMgrStatus) LogDelete(logBase *base.LogObject)
- func (status VolumeMgrStatus) LogKey() string
- func (status VolumeMgrStatus) LogModify(logBase *base.LogObject, old interface{})
- type VolumeRefConfig
- func (config VolumeRefConfig) Key() string
- func (config VolumeRefConfig) LogCreate(logBase *base.LogObject)
- func (config VolumeRefConfig) LogDelete(logBase *base.LogObject)
- func (config VolumeRefConfig) LogKey() string
- func (config VolumeRefConfig) LogModify(logBase *base.LogObject, old interface{})
- func (config VolumeRefConfig) VolumeKey() string
- type VolumeRefStatus
- func (status VolumeRefStatus) IsContainer() bool
- func (status VolumeRefStatus) Key() string
- func (status VolumeRefStatus) LogCreate(logBase *base.LogObject)
- func (status VolumeRefStatus) LogDelete(logBase *base.LogObject)
- func (status VolumeRefStatus) LogKey() string
- func (status VolumeRefStatus) LogModify(logBase *base.LogObject, old interface{})
- func (status VolumeRefStatus) VolumeKey() string
- type VolumeStatus
- func (status VolumeStatus) GetPVCName() string
- func (status VolumeStatus) IsContainer() bool
- func (status VolumeStatus) Key() string
- func (status VolumeStatus) LogCreate(logBase *base.LogObject)
- func (status VolumeStatus) LogDelete(logBase *base.LogObject)
- func (status VolumeStatus) LogKey() string
- func (status VolumeStatus) LogModify(logBase *base.LogObject, old interface{})
- func (status VolumeStatus) PathName() string
- func (status VolumeStatus) UseZVolDisk(persistType PersistType) bool
- func (status VolumeStatus) ZVolName() string
- type VolumesSnapshotAction
- type VolumesSnapshotConfig
- type VolumesSnapshotStatus
- type WatchdogParam
- type WifiConfig
- type WifiKeySchemeType
- type WirelessConfig
- type WirelessStatus
- type WirelessType
- type WwanAuthProtocol
- type WwanCellModule
- type WwanConfig
- func (wc WwanConfig) Equal(wc2 WwanConfig) bool
- func (wc WwanConfig) GetNetworkConfig(logicalLabel string) *WwanNetworkConfig
- func (wc WwanConfig) Key() string
- func (wc WwanConfig) LogCreate(logBase *base.LogObject)
- func (wc WwanConfig) LogDelete(logBase *base.LogObject)
- func (wc WwanConfig) LogKey() string
- func (wc WwanConfig) LogModify(logBase *base.LogObject, old interface{})
- type WwanCtrlProt
- type WwanIPSettings
- type WwanLocationInfo
- type WwanMetrics
- func (wm WwanMetrics) Equal(wm2 WwanMetrics) bool
- func (wm WwanMetrics) GetNetworkMetrics(logicalLabel string) *WwanNetworkMetrics
- func (wm WwanMetrics) Key() string
- func (wm WwanMetrics) LogCreate(logBase *base.LogObject)
- func (wm WwanMetrics) LogDelete(logBase *base.LogObject)
- func (wm WwanMetrics) LogKey() string
- func (wm WwanMetrics) LogModify(logBase *base.LogObject, old interface{})
- func (wm WwanMetrics) LookupNetworkMetrics(logicalLabel string) (WwanNetworkMetrics, bool)
- type WwanNetworkConfig
- type WwanNetworkMetrics
- type WwanNetworkStatus
- type WwanOpMode
- type WwanPacketStats
- type WwanPhysAddrs
- type WwanProbe
- type WwanProvider
- type WwanRAT
- type WwanSignalInfo
- type WwanSimCard
- type WwanStatus
- func (ws WwanStatus) DoSanitize()
- func (ws WwanStatus) Equal(ws2 WwanStatus) bool
- func (ws WwanStatus) GetNetworkStatus(logicalLabel string) *WwanNetworkStatus
- func (ws WwanStatus) Key() string
- func (ws WwanStatus) LogCreate(logBase *base.LogObject)
- func (ws WwanStatus) LogDelete(logBase *base.LogObject)
- func (ws WwanStatus) LogKey() string
- func (ws WwanStatus) LogModify(logBase *base.LogObject, old interface{})
- type ZFSPoolMetrics
- type ZFSPoolStatus
- type ZFSVDevMetrics
- type ZVolStatus
- type ZbootConfig
- type ZbootStatus
- type ZedAgentStatus
- type ZedcloudMetric
Constants ¶
const ( CertHashTypeNone = iota + 0 CertHashTypeSha256First16 = 1 // hash with sha256, the 1st 16 bytes of result in 'certHash' )
Needs to match api/proto/attest/attest.proto:ZEveCertHashType Various CertHashType fields
const ( // EVEDownloadedLabel : Label to set on all eve downloaded images/blobs EVEDownloadedLabel = "eve-downloaded" // EVEDownloadedValue : Value to set on the label EVEDownloadedValue = "true" )
const ( // PortCostMin is the lowest cost PortCostMin = uint8(0) // PortCostMax is the highest cost PortCostMax = uint8(255) )
const ( // DefaultMTU : the default Ethernet MTU of 1500 bytes. DefaultMTU = 1500 // MinMTU : minimum accepted MTU value. // As per RFC 8200, the MTU must not be less than 1280 bytes to accommodate IPv6 packets. MinMTU = 1280 // MaxMTU : maximum accepted MTU value. // The Total Length field of IPv4 and the Payload Length field of IPv6 each have a size // of 16 bits, thus allowing data of up to 65535 octets. // For now, we will not support IPv6 jumbograms. MaxMTU = 65535 )
const ( // AllPortsLabel references all device ports. AllPortsLabel = "all" // UplinkLabel references all management ports. UplinkLabel = "uplink" // FreeUplinkLabel references all management ports with 0 cost. FreeUplinkLabel = "freeuplink" )
EVE-defined port labels.
const ( // EdgeviewPath - path to edgeview files EdgeviewPath = "/run/edgeview/" // EdgeviewCfgFile - for configuration of edgeview EdgeviewCfgFile = EdgeviewPath + "edge-view-config" // EdgeViewJwtPrefix - jwt token prefix string EdgeViewJwtPrefix = "EvJWToken:" // EdgeViewExpPrefix - jwt expire prefix string EdgeViewExpPrefix = "EvJWTExp:" // EdgeViewMultiInstPrefix - multi-instance prefix string EdgeViewMultiInstPrefix = "EdgeViewMultiInst:" // EdgeViewCertPrefix - Edgeview Dispatcher Certs prefix string EdgeViewCertPrefix = "EvDepCerts:" // EdgeViewDevPolicyPrefix - Edgeview device policy prefix string EdgeViewDevPolicyPrefix = "EvDevPolicy:" // EdgeViewAppPolicyPrefix - Edgeview application policy prefix string EdgeViewAppPolicyPrefix = "EvAppPolicy:" // EdgeViewExtPolicyPrefix - Edgeview external policy prefix string EdgeViewExtPolicyPrefix = "EvExtPolicy:" // EdgeViewKubPolicyPrefix - Edgeview kubernetes policy prefix string EdgeViewKubPolicyPrefix = "EvKubPolicy:" // EdgeViewGenIDPrefix - Edgeview generation-ID prefix string EdgeViewGenIDPrefix = "EvGenID:" // EdgeviewJWTAlgo - JWT algorithm string EdgeviewJWTAlgo = "ES256" // EdgeviewJWTType - JWT type string EdgeviewJWTType = "JWT" // EdgeviewMaxInstNum - maximum instancess allowed EdgeviewMaxInstNum = 5 )
const ( //RetryCountWarning indicates to move severity to Warning in case of more retries RetryCountWarning = 10 //RetryTimeWarning indicates to move severity to Warning in case of more time spent for retry RetryTimeWarning = time.Hour //RetryCountError indicates to move severity to Error in case of more retries RetryCountError = 20 //RetryTimeError indicates to move severity to Error in case of more time spent for retry RetryTimeError = 10 * time.Hour )
const ( // MinuteInSec is number of seconds in a minute MinuteInSec = 60 // HourInSec is number of seconds in a minute HourInSec = 60 * MinuteInSec )
const ( // TmpDirname - used for files fed into pubsub as global subscriptions TmpDirname = "/run/global" // PersistDir - Location to store persistent files. PersistDir = "/persist" // PersistConfigDir is where we used to keep some configuration across reboots. Remove once upgradeconverter code is removed. PersistConfigDir = PersistDir + "/config" // PersistStatusDir is where we keep some configuration across reboots PersistStatusDir = PersistDir + "/status" // CertificateDirname - Location of certificates CertificateDirname = PersistDir + "/certs" // SealedDirName - directory sealed under TPM PCRs SealedDirName = PersistDir + "/vault" // VolumeEncryptedDirName - sealed directory used to store volumes VolumeEncryptedDirName = SealedDirName + "/volumes" // ClearDirName - directory which is not encrypted ClearDirName = PersistDir + "/clear" // VolumeClearDirName - Not encrypted directory used to store volumes VolumeClearDirName = ClearDirName + "/volumes" // PersistDebugDir - Location for service specific debug/traces PersistDebugDir = PersistDir + "/agentdebug" // PersistInstallerDir - location for installer output PersistInstallerDir = PersistDir + "/installer" // IngestedDirname - location for shas of files we pulled from /config IngestedDirname = PersistDir + "/ingested" // SnapshotsDirname - location for snapshots SnapshotsDirname = PersistDir + "/snapshots" // SnapshotAppInstanceConfigFilename - file to store snapshot-related app instance config SnapshotAppInstanceConfigFilename = "appInstanceConfig.json" // SnapshotVolumesSnapshotStatusFilename - file to store volume snapshot status SnapshotVolumesSnapshotStatusFilename = "volumesSnapshotStatus.json" // SnapshotInstanceStatusFilename - file to store SnapshotInstanceStatus SnapshotInstanceStatusFilename = "snapshotInstanceStatus.json" // PersistCachePatchEnvelopes - folder to store inline patch envelopes PersistCachePatchEnvelopes = PersistDir + "/patchEnvelopesCache" // PersistCachePatchEnvelopesUsage - folder to store patch envelopes usage stat per app PersistCachePatchEnvelopesUsage = PersistDir + "/patchEnvelopesUsageCache" // IdentityDirname - Config dir IdentityDirname = "/config" // ServerFileName - server file ServerFileName = IdentityDirname + "/server" // DeviceCertName - device certificate DeviceCertName = IdentityDirname + "/device.cert.pem" // DeviceKeyName - device private key (if not in TPM) DeviceKeyName = IdentityDirname + "/device.key.pem" // OnboardCertName - Onboard certificate OnboardCertName = IdentityDirname + "/onboard.cert.pem" // OnboardKeyName - onboard key OnboardKeyName = IdentityDirname + "/onboard.key.pem" // RootCertFileName - what we trust for signatures and object encryption RootCertFileName = IdentityDirname + "/root-certificate.pem" // V2TLSCertShaFilename - find TLS root cert for API V2 based on this sha V2TLSCertShaFilename = CertificateDirname + "/v2tlsbaseroot-certificates.sha256" // V2TLSBaseFile is where the initial file V2TLSBaseFile = IdentityDirname + "/v2tlsbaseroot-certificates.pem" // APIV1FileName - user can statically allow for API v1 APIV1FileName = IdentityDirname + "/Force-API-V1" // BootstrapConfFileName - file to store initial device configuration for bootstrapping BootstrapConfFileName = IdentityDirname + "/bootstrap-config.pb" // RemoteAccessFlagFileName -- file to check for remote access configuration RemoteAccessFlagFileName = IdentityDirname + "/remote_access_disabled" // BootstrapShaFileName - file to store SHA hash of an already ingested bootstrap config BootstrapShaFileName = IngestedDirname + "/bootstrap-config.sha" // ServerSigningCertFileName - filename for server signing leaf certificate ServerSigningCertFileName = CertificateDirname + "/server-signing-cert.pem" ShareCertDirname = "/usr/local/share/ca-certificates" // AppImgObj - name of app image type AppImgObj = "appImg.obj" // BaseOsObj - name of base image type BaseOsObj = "baseOs.obj" //ITokenFile contains the integrity token sent in attestation response ITokenFile = "/run/eve.integrity_token" //EveVersionFile contains the running version of EVE EveVersionFile = "/run/eve-release" //DefaultVaultName is the name of the default vault DefaultVaultName = "Application Data Store" // NewlogDir - newlog directories NewlogDir = "/persist/newlog" // NewlogCollectDir - newlog collect directory for temp log files NewlogCollectDir = NewlogDir + "/collect" // NewlogUploadDevDir - newlog device gzip file directory ready for upload NewlogUploadDevDir = NewlogDir + "/devUpload" // NewlogUploadAppDir - newlog app gzip file directory ready for upload NewlogUploadAppDir = NewlogDir + "/appUpload" // NewlogKeepSentQueueDir - a circular queue of gzip files already been sent NewlogKeepSentQueueDir = NewlogDir + "/keepSentQueue" // PillarHardMemoryLimitFile - hard memory reserved for pillar PillarHardMemoryLimitFile = "/hostfs/sys/fs/cgroup/memory/eve/services/pillar/memory.limit_in_bytes" // EveMemoryLimitFile - stores memory reserved for eve EveMemoryLimitFile = "/hostfs/sys/fs/cgroup/memory/eve/memory.limit_in_bytes" // EveMemoryUsageFile - current usage EveMemoryUsageFile = "/hostfs/sys/fs/cgroup/memory/eve/memory.usage_in_bytes" // EveKmemUsageFile - current kernel usage EveKmemUsageFile = "/hostfs/sys/fs/cgroup/memory/eve/memory.kmem.usage_in_bytes" // ZFSArcMaxSizeFile - file with zfs_arc_max size in bytes ZFSArcMaxSizeFile = "/hostfs/sys/module/zfs/parameters/zfs_arc_max" // DownloaderDir - storage for downloader DownloaderDir = SealedDirName + "/downloader" // VerifierDir - storage for verifier VerifierDir = SealedDirName + "/verifier" // ContainerdDir - path to user containerd storage ContainerdDir = SealedDirName + "/containerd" // ContainerdContentDir - path to containerd`s content store ContainerdContentDir = ContainerdDir + "/io.containerd.content.v1.content" // VtpmdCtrlSocket is UDS to ask vtpmd to launch SWTP instances for VMs VtpmdCtrlSocket = "/run/swtpm/vtpmd.ctrl.sock" // SwtpmCtrlSocketPath SWTPM per-vm socket path, the format string is filled with the App UUID SwtpmCtrlSocketPath = "/run/swtpm/%s.ctrl.sock" // SwtpmPidPath is SWTPM per-vm pid file path, the format string is filled with the App UUID SwtpmPidPath = "/run/swtpm/%s.pid" // MemoryMonitorDir - directory for memory monitor MemoryMonitorDir = PersistDir + "/memory-monitor" // MemoryMonitorOutputDir - directory for memory monitor output MemoryMonitorOutputDir = MemoryMonitorDir + "/output" // MemoryMonitorPSIStatsFile - file to store memory PSI (Pressure Stall Information) statistics MemoryMonitorPSIStatsFile = MemoryMonitorOutputDir + "/psi.txt" // OVMFSettingsDir - directory for OVMF settings, they are stored in per-domain files OVMFSettingsDir = SealedDirName + "/ovmf" // OVMFSettingsTemplate - template file for OVMF settings OVMFSettingsTemplate = "/usr/lib/xen/boot/OVMF_VARS.fd" // CustomOVMFSettingsDir - directory for custom OVMF settings (for different resolutions) CustomOVMFSettingsDir = "/hostfs/etc/ovmf" )
const ( // DevPrefix - device log file prefix string DevPrefix = "dev.log." // AppPrefix - app log file prefix string AppPrefix = "app." // AppSuffix - app log file suffix string, the appuuid is between the AppPrefix and AppSuffix AppSuffix = ".log." )
const ( // SmartAttrIDPowerCycleCount - this attribute indicates the count of full hard disk power on/off cycles SmartAttrIDPowerCycleCount int = 12 // SmartAttrIDPowerOnHours - count of hours in power-on state. SmartAttrIDPowerOnHours int = 9 // SmartAttrIDRealLocatedSectorCt - count of reallocated sectors. The higher the attribute value, the more sectors were reallocated SmartAttrIDRealLocatedSectorCt int = 5 // SmartAttrIDCurrentPendingSectorCt - count of "unstable" sectors (waiting to be remapped, because of unrecoverable read errors) SmartAttrIDCurrentPendingSectorCt int = 197 // SmartAttrIDTemperatureCelsius - indicates the device temperature, if the appropriate sensor is fitted. SmartAttrIDTemperatureCelsius int = 194 // SmartAttrIDRealLocatedEventCount - count of remap operations. Shows the total count of attempts. SmartAttrIDRealLocatedEventCount int = 196 )
The attributes we want to collect. Description: https://en.wikipedia.org/wiki/S.M.A.R.T.
const ( VolumeSubStateInitial volumeSubState = iota VolumeSubStatePreparing VolumeSubStatePrepareDone VolumeSubStateCreated VolumeSubStateDeleting )
Enum of volumeSubState variants
const ( DEVICE_STATE_UNSPECIFIED DeviceState = iota DEVICE_STATE_ONLINE = 1 DEVICE_STATE_REBOOTING = 2 DEVICE_STATE_MAINTENANCE_MODE = 3 DEVICE_STATE_BASEOS_UPDATING = 4 DEVICE_STATE_BOOTING = 5 DEVICE_STATE_PREPARING_POWEROFF = 6 DEVICE_STATE_POWERING_OFF = 7 DEVICE_STATE_PREPARED_POWEROFF = 8 )
Integer values must match those in ZDeviceState in lf-edge/eve-api/proto/info/info.proto
const ( MinSubnetSize = 4 // minimum Subnet Size LargeSubnetSize = 16 // for determining default Dhcp Range )
At the MinSubnetSize there is room for one app instance (.0 being reserved, .3 broadcast, .1 is the bridgeIPAddr, and .2 is usable).
const ( // MACGeneratorUnspecified : MAC generator is not specified. MACGeneratorUnspecified = 0 // MACGeneratorNodeScoped generates MAC addresses which are guaranteed to be unique // only within the scope of the given single device. // The exception are MAC addresses generated for switch network instances, // which are always generated with global scope. MACGeneratorNodeScoped = 1 // MACGeneratorGloballyScoped generates MAC addresses which are with high probability // unique globally, i.e. across entire fleet of devices. MACGeneratorGloballyScoped = 2 // MACGeneratorClusterDeterministic generates the same MAC address for a given // app interface on every node in the cluster. // Additionally, the probability of MAC address conflict with other devices outside // the cluster is very low (same property that MACGeneratorGloballyScoped // provides). MACGeneratorClusterDeterministic = 3 )
IDs assigned to different variants of MAC generators.
const ( // ZVolDevicePrefix controlled by mdev ZVolDevicePrefix = "/dev/zvol" // ZFSSnapshotter is containerd snapshotter for zfs ZFSSnapshotter = "zfs" // ZFSBinary is the zfs binary ZFSBinary = "zfs" // ZPoolBinary is the zpool binary ZPoolBinary = "zpool" )
const ( ZIOTypeNull = iota ZIOTypeRead ZIOTypeWrite ZIOTypeFree ZIOTypeClaim ZIOTypeIoctl ZIOTypeMax // ZIOTypeMax value determines the number of ZIOType in this enum. (Should always be the last in this enum) )
ZIOType - IO types in ZFS. These values are used to access the data in the arrays (Ops/Bytes) with statistics coming from libzfs. ZIOTypeMax value determines the number of ZIOType in this enum. (Should always be the last in this enum)
const ( // ClusterStatusPort - Port for k3s server for cluster status advertise // See more detail description in pkg/pillar/docs/zedkube.md ClusterStatusPort = "12346" )
const KubeContainerImagePrefix = "docker.io/"
KubeContainerImagePrefix : Container Image prefix adding to kubevirt container image name
Variables ¶
var ( // SyslogKernelLogLevelStr is a string representation of syslog/kernel // loglevels. SyslogKernelLogLevelStr = [8]string{ "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug", } // SyslogKernelLogLevelNum is a number representation of syslog/kernel // loglevels. SyslogKernelLogLevelNum = map[string]uint32{ "emerg": 0, "alert": 1, "crit": 2, "critical": 2, "err": 3, "error": 3, "warning": 4, "warn": 4, "notice": 5, "info": 6, "debug": 7, } // SyslogKernelDefaultLogLevel is a default loglevel for syslog and kernel. SyslogKernelDefaultLogLevel = "info" )
var ( // FmlResolutionUnset is a string to indicate that custom resolution is not set FmlResolutionUnset = "" // FmlResolution800x600 is a string to indicate 800x600 resolution FmlResolution800x600 = "800x600" // FmlResolution1024x768 is a string to indicate 1024x768 resolution FmlResolution1024x768 = "1024x768" // FmlResolution1280x800 is a string to indicate 1280x720 resolution FmlResolution1280x800 = "1280x800" // FmlResolution1920x1080 is a string to indicate 1280x720 resolution FmlResolution1920x1080 = "1920x1080" )
var ( // PersistDataset - parent dataset PersistDataset = strings.TrimLeft(PersistDir, "/") // PersistPool - parent pool PersistPool = PersistDataset // ClearDataset - dataset which is not encrypted ClearDataset = strings.TrimLeft(ClearDirName, "/") // SealedDataset - dataset sealed under TPM PCRs SealedDataset = strings.TrimLeft(SealedDirName, "/") // PersistReservedDataset - reserved dataset PersistReservedDataset = PersistDataset + "/reserved" //VolumeClearZFSDataset - dataset to create volumes without encryption VolumeClearZFSDataset = ClearDataset + "/volumes" //VolumeEncryptedZFSDataset - dataset to create volumes with encryption VolumeEncryptedZFSDataset = SealedDataset + "/volumes" // EtcdZvol - zvol encrypted for etcd storage EtcdZvol = PersistDataset + "/etcd-storage" )
var AppPersistPaths = []string{ VolumeEncryptedDirName, VolumeClearDirName, DownloaderDir, VerifierDir, ContainerdDir, SnapshotsDirname, PersistCachePatchEnvelopes, PersistCachePatchEnvelopesUsage, }
AppPersistPaths Application-related files live here XXX do we need to exclude the ContentTrees used for eve image update? If so how do we tell them apart?
var GlobalConfigMinimums = OldGlobalConfig{
ConfigInterval: 5,
MetricInterval: 5,
ResetIfCloudGoneTime: 120,
FallbackIfCloudGoneTime: 60,
MintimeUpdateSuccess: 30,
NetworkGeoRedoTime: 60,
NetworkGeoRetryTime: 5,
NetworkTestDuration: 10,
NetworkTestInterval: 300,
NetworkTestBetterInterval: 0,
DownloadGCTime: 60,
VdiskGCTime: 60,
DownloadRetryTime: 60,
DomainBootRetryTime: 10,
Dom0MinDiskUsagePercent: 20,
}
We enforce that timers are not below these values
var ReportDirPaths = []string{ PersistConfigDir, PersistStatusDir, CertificateDirname, SealedDirName, ClearDirName, PersistDebugDir, PersistInstallerDir, IngestedDirname, NewlogDir, MemoryMonitorOutputDir, PersistDir + "/containerd", PersistDir + "/tmp", PersistDir + "/log", PersistDir + "/checkpoint", PersistDir + "/containerd-system-root", PersistDir + "/netdump", PersistDir + "/pubsub-large", PersistDir + "/reserved", PersistDir + "/etcd-storage", PersistDir + "/kcrashes", PersistDir + "/eve-info", PersistDir + "/kubelog", }
ReportDirPaths Report directory usage for these paths
var ReportDiskPaths = []string{ "/", "/hostfs", IdentityDirname, PersistDir, }
ReportDiskPaths Report disk usage for these paths
Functions ¶
func CompletedBinaryBlobIdxByName ¶
func CompletedBinaryBlobIdxByName(blobs []BinaryBlobCompleted, name string) int
CompletedBinaryBlobIdxByName returns index of element in blobs list which FileName matches name
func ConfigureGOGC ¶
ConfigureGOGC sets two main configuration parameters for the garbage collector (GOGC): memory limit and percentage (see explanation here: https://tip.golang.org/doc/gc-guide). If limit is 0, create GOGC limit from the pillar cgroups hard memory limit.
func CountDNSServers ¶
func CountDNSServers(dns DeviceNetworkStatus, ifname string) int
CountDNSServers returns the number of DNS servers; for ifname if set
func CountLocalAddrAnyNoLinkLocal ¶
func CountLocalAddrAnyNoLinkLocal(dns DeviceNetworkStatus) int
CountLocalAddrAnyNoLinkLocal returns the number of local IP addresses for all the management ports (for all port costs) excluding link-local addresses
func CountLocalAddrAnyNoLinkLocalIf ¶
func CountLocalAddrAnyNoLinkLocalIf(dns DeviceNetworkStatus, ifname string) (int, error)
CountLocalAddrAnyNoLinkLocalIf return number of local IP addresses for the interface excluding link-local addresses
func CountLocalAddrNoLinkLocalWithCost ¶
func CountLocalAddrNoLinkLocalWithCost(dns DeviceNetworkStatus, maxCost uint8) int
CountLocalAddrNoLinkLocalWithCost is like CountLocalAddrAnyNoLinkLocal but in addition allows the caller to specify the cost between PortCostMin (0) and PortCostMax(255). If 0 is specified it only considers cost 0 ports. if 255 is specified it considers all the ports.
func CountLocalIPv4AddrAnyNoLinkLocal ¶
func CountLocalIPv4AddrAnyNoLinkLocal(dns DeviceNetworkStatus) int
CountLocalIPv4AddrAnyNoLinkLocal is like CountLocalAddrAnyNoLinkLocal but only IPv4 addresses are counted
func CountLocalIPv4AddrAnyNoLinkLocalIf ¶
func CountLocalIPv4AddrAnyNoLinkLocalIf(dns DeviceNetworkStatus, ifname string) (int, error)
CountLocalIPv4AddrAnyNoLinkLocalIf is like CountLocalAddrAnyNoLinkLocalIf but only IPv4 addresses are counted
func DomainnameToUUID ¶
DomainnameToUUID does the reverse of GetTaskName
func ExtractUSBBusnumPort ¶
ExtractUSBBusnumPort extracts busnum and port number out of a sysfs device path
func FormatTriState ¶
FormatTriState - return string format of TriState
func GetAllPortsSortedCost ¶
func GetAllPortsSortedCost(dns DeviceNetworkStatus, l3Only bool, rotation int) []string
GetAllPortsSortedCost returns all ports (management and app shared) sorted by port cost. Rotation causes rotation/round-robin within each cost.
func GetDNSServers ¶
func GetDNSServers(dns DeviceNetworkStatus, ifname string) []net.IP
GetDNSServers returns all, or the ones on one interface if ifname is set
func GetDefaultRouteTable ¶
func GetDefaultRouteTable() int
func GetEveKmemUsageInBytes ¶
GetEveKmemUsageInBytes returns memory limit reserved for eve in bytes
func GetEveMemoryLimitInBytes ¶
GetEveMemoryLimitInBytes returns memory limit reserved for eve in bytes
func GetEveMemoryUsageInBytes ¶
GetEveMemoryUsageInBytes returns memory limit reserved for eve in bytes
func GetLocalAddrAnyNoLinkLocal ¶
func GetLocalAddrAnyNoLinkLocal(dns DeviceNetworkStatus, pickNum int, ifname string) (net.IP, error)
GetLocalAddrAnyNoLinkLocal is used to pick one address from: - ifname if set. - otherwise from all of the management ports Excludes link-local addresses. The addresses are sorted in cost order thus as the caller starts with pickNum zero and increases it will use the ports in cost order.
func GetLocalAddrList ¶
func GetLocalAddrList(dns DeviceNetworkStatus, ifname string) ([]net.IP, error)
GetLocalAddrList returns all IP addresses on the ifName except the link local addresses.
func GetLocalAddrNoLinkLocalWithCost ¶
func GetLocalAddrNoLinkLocalWithCost(dns DeviceNetworkStatus, pickNum int, ifname string, maxCost uint8) (net.IP, error)
GetLocalAddrNoLinkLocalWithCost is like GetLocalAddrNoLinkLocal but in addition allows the caller to specify the cost between PortCostMin (0) and PortCostMax(255). If 0 is specified it only considers local addresses on cost zero ports; if 255 is specified it considers all the local addresses.
func GetMgmtPortFromAddr ¶
func GetMgmtPortFromAddr(dns DeviceNetworkStatus, addr net.IP) string
Given an address tell me its IfName
func GetMgmtPortsAny ¶
func GetMgmtPortsAny(dns DeviceNetworkStatus, rotation int) []string
GetMgmtPortsAny returns all management ports
func GetMgmtPortsByCost ¶
func GetMgmtPortsByCost(dns DeviceNetworkStatus, cost uint8) []string
GetMgmtPortsByCost returns all management ports with a given port cost
func GetMgmtPortsSortedCost ¶
func GetMgmtPortsSortedCost(dns DeviceNetworkStatus, rotation int) []string
GetMgmtPortsSortedCost returns all management ports sorted by port cost rotation causes rotation/round-robin within each cost
func GetMgmtPortsSortedCostWithoutFailed ¶
func GetMgmtPortsSortedCostWithoutFailed(dns DeviceNetworkStatus, rotation int) []string
GetMgmtPortsSortedCostWithoutFailed returns all management ports sorted by port cost ignoring ports with failures. rotation causes rotation/round-robin within each cost
func GetNTPServers ¶
func GetNTPServers(dns DeviceNetworkStatus, ifname string) []net.IP
GetNTPServers returns all, or the ones on one interface if ifname is set
func GetPillarHardMemoryLimitInBytes ¶
GetPillarHardMemoryLimitInBytes returns hard memory limit reserved for pillar in bytes
func GetPortCost ¶
func GetPortCost(dns DeviceNetworkStatus, ifname string) uint8
GetPortCost returns the port cost Returns 0 if the ifname does not exist.
func GetPortCostList ¶
func GetPortCostList(dns DeviceNetworkStatus) []uint8
GetPortCostList returns the sorted list of port costs with cost zero entries first.
func GetSnapshotAppInstanceConfigFile ¶
GetSnapshotAppInstanceConfigFile returns the app instance config file for the given snapshot ID
func GetSnapshotDir ¶
GetSnapshotDir returns the snapshot directory for the given snapshot ID
func GetSnapshotInstanceStatusFile ¶
GetSnapshotInstanceStatusFile returns the instance status file for the given snapshot ID
func GetVolumesSnapshotStatusFile ¶
GetVolumesSnapshotStatusFile returns the volumes snapshot status file for the given snapshot ID and volume ID
func GetZFSArcMaxSizeInBytes ¶
GetZFSArcMaxSizeInBytes returns memory limit reserved for zfs arc
func IoBundleToPci ¶
IoBundleToPci returns the long PCI ID if the bundle refers to a PCI controller. Checks if PCI ID exists on system. Returns null strings for non-PCI devices since we can't check if they exist. This can handle aliases like Ifname.
func IsEveDefinedPortLabel ¶
IsEveDefinedPortLabel returns true if the given port label is defined by EVE and not by the user.
func IsL3Port ¶
func IsL3Port(dns DeviceNetworkStatus, ifname string) bool
IsL3Port checks if an interface name belongs to a port with SystemAdapter attached.
func IsMgmtPort ¶
func IsMgmtPort(dns DeviceNetworkStatus, ifname string) bool
Check if a physical label or ifname is a management port
func IsPort ¶
func IsPort(dns DeviceNetworkStatus, ifname string) bool
Check if an interface name is a port owned by nim
func PCIGetIOMMUGroup ¶
PCIGetIOMMUGroup returns IOMMU group tag as seen by the control domain
func PCIIsBootVga ¶
PCIIsBootVga return 'true' if VGA device is a console device
func PCILongToShort ¶
PCILongToShort returns the PCI ID without the domain id
func PCISameController ¶
PCISameController compares the PCI-ID without comparing the controller
func PciLongToIfname ¶
PciLongToIfname return the interface name for a network PCI device. This is used to make sure devices don't move around Returns exist bool, string
func PciLongToUnique ¶
Return a string likely to be unique for the device. Used to make sure devices don't move around Returns exist bool, string
func RoundupToKB ¶
func UuidsToStrings ¶
UuidsToStrings converts list of uuids to a list of strings
Types ¶
type ACE ¶
type ACE struct { Matches []ACEMatch Actions []ACEAction Name string RuleID int32 Dir ACEDirection }
ACE definition is very similar to draft-ietf-netmod-acl-model
type ACEAction ¶
type ACEAction struct { Drop bool // Otherwise accept Limit bool // Is limiter enabled? LimitRate int // Packets per unit LimitUnit string // "s", "m", "h", for second, minute, hour LimitBurst int // Packets PortMap bool // Is port mapping part of action? TargetPort int // Internal port }
ACEAction decides what to do with traffic matched by a given ACE.
type ACEDirection ¶
type ACEDirection uint8
ACEDirection determines rule direction.
const ( // AceDirBoth : Rule applies in both directions AceDirBoth ACEDirection = iota // AceDirIngress : Rules applies in Ingress direction (from internet to app) AceDirIngress ACEDirection = 1 // AceDirEgress : Rules applies in Egress direction (from app to internet) AceDirEgress ACEDirection = 2 )
type ACEMatch ¶
ACEMatch determines which traffic is matched by a given ACE. The Type can be "ip" or "host" (aka domain name), "eidset", "protocol", "fport", "lport" or "adapter" for now. The "ip" and "host" matches the remote IP/hostname. The host matching is suffix-matching thus zededa.net matches *.zededa.net. "adapter" matches devices ports by user-configured or EVE-assigned shared port labels and applies the ACE only to flows transmitted through them. For now the matches are bidirectional. XXX Add directionality? Different rate limits in different directions? Value is always a string. There is an implicit reject rule at the end. The "eidset" type is special for the overlay. Matches all the IPs which are part of the DNSNameToIPList.
type ACLActionType ¶
type ACLActionType uint8
ACLActionType - action
const ( ACLActionNone ACLActionType = iota ACLActionAccept ACLActionDrop )
ACLAction Enum
type AddressSource ¶
type AddressSource uint8
AddressSource determines the source of an IP address assigned to an app VIF. Values are power of two and therefore can be used with a bit mask.
const ( // AddressSourceUndefined : IP address source is not defined AddressSourceUndefined AddressSource = 0 // AddressSourceEVEInternal : IP address is used only internally by EVE // (i.e. inside dom0). AddressSourceEVEInternal AddressSource = 1 << iota // AddressSourceInternalDHCP : IP address is leased to an app by an internal DHCP server // run by EVE. AddressSourceInternalDHCP // AddressSourceExternalDHCP : IP address is leased to an app by an external DHCP server. AddressSourceExternalDHCP // AddressSourceSLAAC : Stateless Address Autoconfiguration (SLAAC) was used by the client // to generate a unique IPv6 address. AddressSourceSLAAC // AddressSourceStatic : IP address is assigned to an app statically // (using e.g. cloud-init). AddressSourceStatic )
type AddressType ¶
type AddressType int32
AddressType : type of network address.
const ( AddressTypeNone AddressType = 0 // For switch networks AddressTypeIPV4 AddressType = 1 AddressTypeIPV6 AddressType = 2 AddressTypeCryptoIPV4 AddressType = 3 AddressTypeCryptoIPV6 AddressType = 4 AddressTypeLast AddressType = 255 )
The values here should be same as the ones defined in zconfig.AddressType
type AgentRunner ¶
type AgentRunner func(pubsubImpl *pubsub.PubSub, logger *logrus.Logger, baseLog *base.LogObject, arguments []string, baseDir string) int
AgentRunner is a function type that any agent that can be run by a caller process should export
type AgentSettingKey ¶
type AgentSettingKey string
AgentSettingKey - keys for per-agent settings
const ( // LogLevel agent setting key LogLevel AgentSettingKey = "debug.loglevel" // RemoteLogLevel agent setting key RemoteLogLevel AgentSettingKey = "debug.remote.loglevel" )
type AppAndImageToHash ¶
type AppAndImageToHash struct { AppUUID uuid.UUID ImageID uuid.UUID Hash string PurgeCounter uint32 }
AppAndImageToHash is used to retain <app,image> to sha maps across reboots. Key for OCI images which can be specified with a tag and we need to be able to latch the sha and choose when to update/refresh from the tag.
func (AppAndImageToHash) LogCreate ¶
func (aih AppAndImageToHash) LogCreate(logBase *base.LogObject)
LogCreate :
func (AppAndImageToHash) LogDelete ¶
func (aih AppAndImageToHash) LogDelete(logBase *base.LogObject)
LogDelete :
func (AppAndImageToHash) LogModify ¶
func (aih AppAndImageToHash) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type AppBlobsAvailable ¶
AppBlobsAvailable provides a list of AppCustom blobs which has been provided from the cloud
type AppCommand ¶
type AppCommand uint8
AppCommand : application command requested to run by a local server.
const ( // AppCommandUnspecified : command was not specified (invalid input). AppCommandUnspecified AppCommand = iota // AppCommandRestart : restart application without re-creating volumes. AppCommandRestart // AppCommandPurge : purge application with ALL of its volumes. AppCommandPurge )
Integer values are in-sync with proto enum AppCommand_Command.
type AppContainerMetrics ¶
type AppContainerMetrics struct { UUIDandVersion UUIDandVersion // App UUID // Stats Collection time for uploading stats to cloud CollectTime time.Time StatsList []AppContainerStats }
AppContainerMetrics - App Container Metrics
func (AppContainerMetrics) Key ¶
func (acMetric AppContainerMetrics) Key() string
Key - key for AppContainerMetrics
func (AppContainerMetrics) LogCreate ¶
func (acMetric AppContainerMetrics) LogCreate(logBase *base.LogObject)
LogCreate :
func (AppContainerMetrics) LogDelete ¶
func (acMetric AppContainerMetrics) LogDelete(logBase *base.LogObject)
LogDelete :
func (AppContainerMetrics) LogModify ¶
func (acMetric AppContainerMetrics) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type AppContainerStats ¶
type AppContainerStats struct { ContainerName string // unique under an App Status string // uptime, pause, stop status Pids uint32 // number of PIDs within the container // CPU stats Uptime int64 // unix.nano, time since container starts CPUTotal uint64 // container CPU since starts in nanosec SystemCPUTotal uint64 // total system, user, idle in nanosec // Memory stats UsedMem uint32 // in MBytes AllocatedMem uint32 // in MBytes // Network stats TxBytes uint64 // in Bytes RxBytes uint64 // in Bytes // Disk stats ReadBytes uint64 // in MBytes WriteBytes uint64 // in MBytes }
AppContainerStats - for App Container Stats
type AppCount ¶
type AppCount uint8
AppCount is uint8 and it should be sufficient for the number of apps we can support
type AppDiskMetric ¶
type AppDiskMetric struct { DiskPath string ProvisionedBytes uint64 // Value in Bytes. Total number of allotted Bytes for the disk. UsedBytes uint64 // Value in Bytes. Total number of used Bytes by the disk. DiskType string Dirty bool }
AppDiskMetric hold metrics data per appInstance volume
func (AppDiskMetric) LogCreate ¶
func (status AppDiskMetric) LogCreate(logBase *base.LogObject)
LogCreate :
func (AppDiskMetric) LogDelete ¶
func (status AppDiskMetric) LogDelete(logBase *base.LogObject)
LogDelete :
func (AppDiskMetric) LogModify ¶
func (status AppDiskMetric) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type AppInfo ¶
type AppInfo struct {
AppBlobs []AppBlobsAvailable
}
AppInfo provides various information to the application
type AppInstMetaData ¶
type AppInstMetaData struct { AppInstUUID uuid.UUID Data []byte Type AppInstMetaDataType }
AppInstMetaData : App Instance Metadata
func (AppInstMetaData) Key ¶
func (data AppInstMetaData) Key() string
Key : App Instance Metadata unique key
type AppInstMetaDataType ¶
type AppInstMetaDataType uint8
AppInstMetaDataType - types of app meta data
const ( AppInstMetaDataTypeNone AppInstMetaDataType = iota // enum for app inst metadata type AppInstMetaDataTypeKubeConfig AppInstMetaDataCustomStatus )
enum app metadata type
type AppInstanceConfig ¶
type AppInstanceConfig struct { UUIDandVersion UUIDandVersion DisplayName string // Error // If this is set, do not process further.. Just set the status to error // so the cloud gets it. Errors []string FixedResources VmConfig // CPU etc DisableLogs bool VolumeRefConfigList []VolumeRefConfig Activate bool //EffectiveActivate in AppInstanceStatus must be used for the actual activation AppNetAdapterList []AppNetAdapterConfig IoAdapterList []IoAdapter RestartCmd AppInstanceOpsCmd PurgeCmd AppInstanceOpsCmd LocalRestartCmd AppInstanceOpsCmd LocalPurgeCmd AppInstanceOpsCmd HasLocalServer bool // Set if localServerAddr matches // XXX: to be deprecated, use CipherBlockStatus instead CloudInitUserData *string `json:"pubsub-large-CloudInitUserData"` RemoteConsole bool // Collect Stats IP Address, assume port is the default docker API for http: 2375 CollectStatsIPAddr net.IP // CipherBlockStatus, for encrypted cloud-init data CipherBlockStatus MetaDataType MetaDataType ProfileList []string Delay time.Duration // Service flag indicates that we want to start app instance // with options defined in org.mobyproject.config label of image provided by linuxkit Service bool // All changes to the cloud-init config are tracked using this version field - // once the version is changed cloud-init tool restarts in a guest. CloudInitVersion uint32 // Contains the configuration of the snapshot handling for the app instance. // Meanwhile, the list of actual snapshots is stored in the AppInstanceStatus. Snapshot SnapshotConfig // allow AppInstance to discover other AppInstances attached to its network instances AllowToDiscover bool }
This is what we assume will come from the ZedControl for each application instance. Note that we can have different versions configured for the same UUID, hence the key is the UUIDandVersion We assume the elements in StorageConfig should be installed, but activation (advertise the EID in lisp and boot the guest) is driven by the Activate attribute.
func (AppInstanceConfig) Key ¶
func (config AppInstanceConfig) Key() string
func (AppInstanceConfig) LogCreate ¶
func (config AppInstanceConfig) LogCreate(logBase *base.LogObject)
LogCreate :
func (AppInstanceConfig) LogDelete ¶
func (config AppInstanceConfig) LogDelete(logBase *base.LogObject)
LogDelete :
func (AppInstanceConfig) LogModify ¶
func (config AppInstanceConfig) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type AppInstanceOpsCmd ¶
type AppInstanceStatus ¶
type AppInstanceStatus struct { UUIDandVersion UUIDandVersion DisplayName string DomainName string // Once booted Activated bool ActivateInprogress bool // Needed for cleanup after failure FixedResources VmConfig // CPU etc VolumeRefStatusList []VolumeRefStatus AppNetAdapters []AppNetAdapterStatus BootTime time.Time IoAdapterList []IoAdapter // Report what was actually used RestartInprogress Inprogress RestartStartedAt time.Time PurgeInprogress Inprogress PurgeStartedAt time.Time // Minimum state across all steps and all StorageStatus. // Error* set implies error. State SwState MissingNetwork bool // If some Network UUID not found MissingMemory bool // Waiting for memory // All error strings across all steps and all StorageStatus // ErrorAndTimeWithSource provides SetError, SetErrrorWithSource, etc ErrorAndTimeWithSource // Effective time, when the application should start StartTime time.Time // Snapshot related information SnapStatus SnapshottingStatus // Estimated memory overhead for VM, counted in MB MemOverhead uint64 }
Indexed by UUIDandVersion as above
func (AppInstanceStatus) GetAppInterfaceList ¶
func (status AppInstanceStatus) GetAppInterfaceList() []string
GetAppInterfaceList is a helper function to get all the vifnames
func (AppInstanceStatus) Key ¶
func (status AppInstanceStatus) Key() string
func (AppInstanceStatus) LogCreate ¶
func (status AppInstanceStatus) LogCreate(logBase *base.LogObject)
LogCreate :
func (AppInstanceStatus) LogDelete ¶
func (status AppInstanceStatus) LogDelete(logBase *base.LogObject)
LogDelete :
func (AppInstanceStatus) LogModify ¶
func (status AppInstanceStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type AppInstanceSummary ¶
type AppInstanceSummary struct { UUIDandVersion UUIDandVersion TotalStarting AppCount // Total number of apps starting/booting TotalRunning AppCount // Total number of apps in running state TotalStopping AppCount // Total number of apps in halting state TotalError AppCount // Total number of apps in error state }
AppInstanceSummary captures the running state of all apps
func (AppInstanceSummary) Key ¶
func (status AppInstanceSummary) Key() string
Key provides a unique key
type AppInterfaceKey ¶
type AppInterfaceKey struct { // NetInstID : UUID of the network instance to which the interface is connected. // Previously it was called BaseID, which was rather unspecific and a bit confusing. // In order to not break EVE upgrades, the json tag is set to use this old field name. NetInstID uuid.UUID `json:"BaseID"` // AppID : UUID of the application AppID uuid.UUID // IfIdx : interface index among interfaces of this app on this network instance. // First has index 0, next 1, etc. IfIdx uint32 }
AppInterfaceKey uniquely references application interface.
func (AppInterfaceKey) Key ¶
func (info AppInterfaceKey) Key() string
Key returns string representation of the key.
type AppInterfaceToNum ¶
type AppInterfaceToNum = UUIDPairAndIfIdxToNum
AppInterfaceToNum is used to store number assigned to an application interface. The number is unique only within the network instance where the interface is connected to. It is used to generate an IP address for the interface.
func (*AppInterfaceToNum) GetKey ¶
func (info *AppInterfaceToNum) GetKey() objtonum.ObjKey
GetKey is used by objtonum.ObjNumPublisher.
func (*AppInterfaceToNum) GetNumber ¶
func (info *AppInterfaceToNum) GetNumber() (number int, numberType string)
GetNumber is used by objtonum.ObjNumPublisher.
func (*AppInterfaceToNum) GetTimestamps ¶
func (info *AppInterfaceToNum) GetTimestamps() (createdAt time.Time, lastUpdatedAt time.Time)
GetTimestamps is used by objtonum.ObjNumPublisher.
func (*AppInterfaceToNum) IsReservedOnly ¶
func (info *AppInterfaceToNum) IsReservedOnly() bool
IsReservedOnly is used by objtonum.ObjNumPublisher.
func (AppInterfaceToNum) LogCreate ¶
func (info AppInterfaceToNum) LogCreate(logBase *base.LogObject)
LogCreate :
func (AppInterfaceToNum) LogDelete ¶
func (info AppInterfaceToNum) LogDelete(logBase *base.LogObject)
LogDelete :
func (AppInterfaceToNum) LogModify ¶
func (info AppInterfaceToNum) LogModify(logBase *base.LogObject, old interface{})
LogModify :
func (*AppInterfaceToNum) New ¶
func (info *AppInterfaceToNum) New(objKey objtonum.ObjKey) objtonum.ObjNumContainer
New is used by objtonum.ObjNumPublisher.
func (*AppInterfaceToNum) SetNumber ¶
func (info *AppInterfaceToNum) SetNumber(number int, numberType string)
SetNumber is used by objtonum.ObjNumPublisher.
func (*AppInterfaceToNum) SetReservedOnly ¶
func (info *AppInterfaceToNum) SetReservedOnly(reservedOnly bool)
SetReservedOnly is used by objtonum.ObjNumPublisher.
type AppMACGenerator ¶
type AppMACGenerator struct {
*UuidToNum
}
AppMACGenerator persistently stores ID of the MAC generator that was used to generate MAC addresses for interfaces of a given app.
func (AppMACGenerator) LogCreate ¶
func (g AppMACGenerator) LogCreate(logBase *base.LogObject)
LogCreate logs newly added AppMACGenerator entry.
func (AppMACGenerator) LogDelete ¶
func (g AppMACGenerator) LogDelete(logBase *base.LogObject)
LogDelete logs deleted AppMACGenerator entry.
func (AppMACGenerator) LogKey ¶
func (g AppMACGenerator) LogKey() string
LogKey identifies AppMACGenerator entry for logging purposes.
func (AppMACGenerator) LogModify ¶
func (g AppMACGenerator) LogModify(logBase *base.LogObject, old interface{})
LogModify logs modified AppMACGenerator entry.
func (*AppMACGenerator) New ¶
func (g *AppMACGenerator) New(objKey objtonum.ObjKey) objtonum.ObjNumContainer
New is used by objtonum.ObjNumPublisher.
type AppNetAdapterConfig ¶
type AppNetAdapterConfig struct { Name string // From proto message AppMacAddr net.HardwareAddr // If set use it for vif AppIPAddr net.IP // If set use DHCP to assign to app IntfOrder int32 // XXX need to get from API // XXX Shouldn't we use ErrorAndTime here // Error // If there is a parsing error and this AppNetAdapterNetwork config cannot be // processed, set the error here. This allows the error to be propagated // back to zedcloud Error string Network uuid.UUID // Points to a NetworkInstance. ACLs []ACE AccessVlanID uint32 IfIdx uint32 // If we have multiple interfaces on that network, we will increase the index AllowToDiscover bool }
AppNetAdapterConfig : configuration for one application network adapter.
type AppNetAdapterStatus ¶
type AppNetAdapterStatus struct { AppNetAdapterConfig VifInfo BridgeMac net.HardwareAddr BridgeIPAddr net.IP // The address for DNS/DHCP service in zedrouter AssignedAddresses AssignedAddrs // IPv4 and IPv6 addresses assigned to domU IPv4Assigned bool // Set to true once DHCP has assigned it to domU IPAddrMisMatch bool HostName string }
AppNetAdapterStatus : status of application network adapter.
type AppNetworkConfig ¶
type AppNetworkConfig struct { UUIDandVersion UUIDandVersion DisplayName string Activate bool GetStatsIPAddr net.IP AppNetAdapterList []AppNetAdapterConfig CloudInitUserData *string `json:"pubsub-large-CloudInitUserData"` CipherBlockStatus CipherBlockStatus MetaDataType MetaDataType }
AppNetworkConfig : network configuration for a given application.
func (*AppNetworkConfig) IsNetworkUsed ¶
func (config *AppNetworkConfig) IsNetworkUsed(network uuid.UUID) bool
IsNetworkUsed returns true if the given network instance is used by this app.
func (AppNetworkConfig) LogCreate ¶
func (config AppNetworkConfig) LogCreate(logBase *base.LogObject)
LogCreate :
func (AppNetworkConfig) LogDelete ¶
func (config AppNetworkConfig) LogDelete(logBase *base.LogObject)
LogDelete :
func (AppNetworkConfig) LogModify ¶
func (config AppNetworkConfig) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type AppNetworkStatus ¶
type AppNetworkStatus struct { UUIDandVersion UUIDandVersion AppNum int Activated bool PendingAdd bool PendingModify bool PendingDelete bool ConfigInSync bool DisplayName string // AppPod is only valid in Kubernetes mode. AppPod cnirpc.AppPod // Copy from the AppNetworkConfig; used to delete when config is gone. GetStatsIPAddr net.IP AppNetAdapterList []AppNetAdapterStatus AwaitNetworkInstance bool // If any Missing flag is set in the networks // ID of the MAC generator variant that was used to generate MAC addresses for this app. MACGenerator int // Any errors from provisioning the network // ErrorAndTime provides SetErrorNow() and ClearError() ErrorAndTime }
AppNetworkStatus : status of app connectivity.
func (AppNetworkStatus) AwaitingNetwork ¶
func (status AppNetworkStatus) AwaitingNetwork() bool
AwaitingNetwork - Is the app waiting for network?
func (AppNetworkStatus) GetAdaptersStatusForNI ¶
func (status AppNetworkStatus) GetAdaptersStatusForNI(netUUID uuid.UUID) []*AppNetAdapterStatus
GetAdaptersStatusForNI returns AppNetAdapterStatus for every application VIF connected to the given network instance (there can be multiple interfaces connected to the same network instance).
func (AppNetworkStatus) LogCreate ¶
func (status AppNetworkStatus) LogCreate(logBase *base.LogObject)
LogCreate :
func (AppNetworkStatus) LogDelete ¶
func (status AppNetworkStatus) LogDelete(logBase *base.LogObject)
LogDelete :
func (AppNetworkStatus) LogModify ¶
func (status AppNetworkStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
func (AppNetworkStatus) Pending ¶
func (status AppNetworkStatus) Pending() bool
Pending returns true if the last configuration operation is still pending and not processed yet.
type AssignableAdapters ¶
func (*AssignableAdapters) AddOrUpdateIoBundle ¶
func (aa *AssignableAdapters) AddOrUpdateIoBundle(log *base.LogObject, ib IoBundle)
AddOrUpdateIoBundle - Add an Io bundle to AA. If the bundle already exists, the function updates it, while preserving the most specific information. The information we preserve are of two kinds: - IsPort/IsPCIBack/UsedByUUID/KeepInHost which come from interaction with nim - PciLong, UsbAddr, etc which come from controller but might be filled in by domainmgr - Unique/MacAddr which come from the PhysicalIoAdapter
func (*AssignableAdapters) CheckBadAssignmentGroups ¶
func (aa *AssignableAdapters) CheckBadAssignmentGroups(log *base.LogObject, PCISameController func(string, string) bool) bool
CheckBadAssignmentGroups sets ib.Error/ErrorTime if two IoBundles in different assignment groups have the same PCI ID (ignoring the PCI function number) Returns true if there was a modification so caller can publish.
func (*AssignableAdapters) CheckBadUSBBundles ¶
func (aa *AssignableAdapters) CheckBadUSBBundles()
CheckBadUSBBundles sets and clears ib.Error/ErrorTime if bundle collides in regards of USB
func (*AssignableAdapters) CheckParentAssigngrp ¶
func (aa *AssignableAdapters) CheckParentAssigngrp() bool
CheckParentAssigngrp finds dependency loops between ioBundles and sets/clears the error
func (*AssignableAdapters) ExpandControllers ¶
func (aa *AssignableAdapters) ExpandControllers(log *base.LogObject, list []*IoBundle, PCISameController func(string, string) bool) []*IoBundle
ExpandControllers expands the list to include other PCI functions on the same PCI controller (while ignoring the function number). The output might have duplicate entries.
func (AssignableAdapters) LogCreate ¶
func (aa AssignableAdapters) LogCreate(logBase *base.LogObject)
LogCreate :
func (AssignableAdapters) LogDelete ¶
func (aa AssignableAdapters) LogDelete(logBase *base.LogObject)
LogDelete :
func (AssignableAdapters) LogModify ¶
func (aa AssignableAdapters) LogModify(logBase *base.LogObject, old interface{})
LogModify :
func (*AssignableAdapters) LookupIoBundleAny ¶
func (aa *AssignableAdapters) LookupIoBundleAny(name string) []*IoBundle
LookupIoBundleAny returns an empty slice if not found; name can be a member phylabel, logicallabel, or a group Returns pointers into aa
func (*AssignableAdapters) LookupIoBundleGroup ¶
func (aa *AssignableAdapters) LookupIoBundleGroup(group string) []*IoBundle
LookupIoBundleGroup returns an empty slice if not found Returns pointers into aa
func (*AssignableAdapters) LookupIoBundleIfName ¶
func (aa *AssignableAdapters) LookupIoBundleIfName(ifname string) *IoBundle
LookupIoBundleIfName checks for IoNet* types and a ifname match
func (*AssignableAdapters) LookupIoBundleLogicallabel ¶
func (aa *AssignableAdapters) LookupIoBundleLogicallabel(label string) *IoBundle
LookupIoBundleLogicallabel returns nil if not found
func (*AssignableAdapters) LookupIoBundlePhylabel ¶
func (aa *AssignableAdapters) LookupIoBundlePhylabel(phylabel string) *IoBundle
LookupIoBundlePhylabel returns nil if not found
type AssignedAddr ¶
type AssignedAddr struct { Address net.IP AssignedBy AddressSource }
AssignedAddr : IP address assigned to an application interface (on the guest side).
type AssignedAddrs ¶
type AssignedAddrs struct { IPv4Addrs []AssignedAddr IPv6Addrs []AssignedAddr }
AssignedAddrs : IP addresses assigned to application network adapter.
func (AssignedAddrs) GetInternallyLeasedIPv4Addr ¶
func (aa AssignedAddrs) GetInternallyLeasedIPv4Addr() net.IP
GetInternallyLeasedIPv4Addr returns IPv4 address leased by EVE using an internally run DHCP server.
type AttestNonce ¶
AttestNonce carries nonce published by requester
func (AttestNonce) Key ¶
func (nonce AttestNonce) Key() string
Key returns nonce content, which is the key as well
func (AttestNonce) LogCreate ¶
func (nonce AttestNonce) LogCreate(logBase *base.LogObject)
LogCreate :
func (AttestNonce) LogDelete ¶
func (nonce AttestNonce) LogDelete(logBase *base.LogObject)
LogDelete :
func (AttestNonce) LogModify ¶
func (nonce AttestNonce) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type AttestQuote ¶
type AttestQuote struct { Nonce []byte //Nonce provided by the requester SigType SigAlg //The signature algorithm used Signature []byte //ASN1 encoded signature Quote []byte //the quote structure PCRs []PCRValue //pcr values }
AttestQuote contains attestation quote
func (AttestQuote) Key ¶
func (quote AttestQuote) Key() string
Key uniquely identifies an AttestQuote object
func (AttestQuote) LogCreate ¶
func (quote AttestQuote) LogCreate(logBase *base.LogObject)
LogCreate :
func (AttestQuote) LogDelete ¶
func (quote AttestQuote) LogDelete(logBase *base.LogObject)
LogDelete :
func (AttestQuote) LogModify ¶
func (quote AttestQuote) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type AttestState ¶
type AttestState int32
AttestState represents a state in the attest state machine
const ( StateNone AttestState = iota + 0 // State when (Re)Starting attestation StateNonceWait // Waiting for response from Controller for Nonce request StateInternalQuoteWait // Waiting for internal PCR quote to be published StateInternalEscrowWait // Waiting for internal Escrow data to be published StateAttestWait // Waiting for response from Controller for PCR quote StateAttestEscrowWait // Waiting for response from Controller for Escrow data StateRestartWait // Waiting for restart timer to expire, to start all over again StateComplete // Everything w.r.t attestation is complete StateAny // Not a real state per se. helps defining wildcard transitions(below) )
States
func (AttestState) String ¶
func (state AttestState) String() string
String returns human readable string of an AttestState
type BaseOSMgrStatus ¶
type BaseOSMgrStatus struct {
CurrentRetryUpdateCounter uint32 // CurrentRetryUpdateCounter from baseosmgr
}
BaseOSMgrStatus : for sending from baseosmgr
type BaseOsConfig ¶
type BaseOsConfig struct { BaseOsVersion string ContentTreeUUID string RetryUpdateCounter uint32 Activate bool }
BaseOsConfig is what we assume will come from the ZedControl for base OS. We assume ContentTreeUUID should be installed, but activation is driven by the Activate attribute.
func (BaseOsConfig) Key ¶
func (config BaseOsConfig) Key() string
func (BaseOsConfig) LogCreate ¶
func (config BaseOsConfig) LogCreate(logBase *base.LogObject)
LogCreate :
func (BaseOsConfig) LogDelete ¶
func (config BaseOsConfig) LogDelete(logBase *base.LogObject)
LogDelete :
func (BaseOsConfig) LogModify ¶
func (config BaseOsConfig) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type BaseOsStatus ¶
type BaseOsStatus struct { BaseOsVersion string Activated bool TooEarly bool // Failed since previous was inprogress/test ContentTreeUUID string PartitionLabel string PartitionDevice string // From zboot PartitionState string // From zboot // Minimum state across all steps/StorageStatus. // Error* set implies error. State SwState // error strings across all steps/StorageStatus // ErrorAndTime provides SetErrorNow() and ClearError() ErrorAndTime }
BaseOsStatus indexed by ContentTreeUUID as above
func (BaseOsStatus) Key ¶
func (status BaseOsStatus) Key() string
func (BaseOsStatus) LogCreate ¶
func (status BaseOsStatus) LogCreate(logBase *base.LogObject)
LogCreate :
func (BaseOsStatus) LogDelete ¶
func (status BaseOsStatus) LogDelete(logBase *base.LogObject)
LogDelete :
func (BaseOsStatus) LogModify ¶
func (status BaseOsStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type BinaryBlobCompleted ¶
type BinaryBlobCompleted struct { FileName string `json:"fileName"` FileSha string `json:"fileSha"` // FileMetadata is related to file, i.e. env variables, cli arguments FileMetadata string `json:"fileMetaData"` // ArtifactMetadata is generic info i.e. user info, desc etc. ArtifactMetadata string `json:"artifactMetaData"` URL string `json:"url"` //nolint:var-naming Size int64 `json:"size"` }
BinaryBlobCompleted is representation of binary blob ready to be downloaded by app instance
type BinaryBlobVolumeRef ¶
type BinaryBlobVolumeRef struct { FileName string `json:"fileName"` ImageName string `json:"imageName"` // FileMetadata is related to file, i.e. env variables, cli arguments FileMetadata string `json:"fileMetaData"` // ArtifactMetadata is generic info i.e. user info, desc etc. ArtifactMetadata string `json:"artifactMetaData"` ImageID string `json:"imageId"` }
BinaryBlobVolumeRef is representation of external binary blobs, which has not yet been downloaded
type BlobStatus ¶
type BlobStatus struct { // DatastoreIDList list of datastores where the blob can be retrieved DatastoreIDList []uuid.UUID // RelativeURL URL relative to the root of the datastore RelativeURL string // Sha256 the sha of the blob Sha256 string // Size size of the expected download Size uint64 // Path where this blob can be retrieved. This changes based on the state, e.g. after download // in one place, after verify might be another Path string // Content for short blobs, the content itself may be in memory and not in a Path. // Used *only* when this has data and Path is "" Content []byte // State of download of this blob; only supports: INITIAL, DOWNLOADING, DOWNLOADED, VERIFYING, VERIFIED State SwState CreateTime time.Time // MediaType the actual media type string for this blob MediaType string // HasDownloaderRef whether or not we have started a downloader for this blob HasDownloaderRef bool // HasVerifierRef whether or not we have started a verifier for this blob HasVerifierRef bool // RefCount number of consumers referring this object RefCount uint LastRefCountChangeTime time.Time TotalSize int64 // expected size as reported by the downloader, if any CurrentSize int64 // current total downloaded size as reported by the downloader // Progress percentage downloaded 0-100, defined by CurrentSize/TotalSize Progress uint // ErrorAndTimeWithSource provide common error handling capabilities ErrorAndTimeWithSource }
BlobStatus status of a downloaded blob
func (BlobStatus) GetDownloadedPercentage ¶
func (status BlobStatus) GetDownloadedPercentage() uint32
GetDownloadedPercentage returns blob's downloaded %
func (BlobStatus) IsManifest ¶
func (status BlobStatus) IsManifest() bool
IsManifest is this a manifest.
func (BlobStatus) LogCreate ¶
func (status BlobStatus) LogCreate(logBase *base.LogObject)
LogCreate :
func (BlobStatus) LogDelete ¶
func (status BlobStatus) LogDelete(logBase *base.LogObject)
LogDelete :
func (BlobStatus) LogModify ¶
func (status BlobStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type BondArpMonitor ¶
BondArpMonitor : ARP-based link monitoring parameters (see devmodel.proto for description).
type BondConfig ¶
type BondConfig struct { // Logical names of PhysicalIO network adapters aggregated by this bond. AggregatedPorts []string // Bonding policy. Mode BondMode // LACPDU packets transmission rate. // Applicable for BondMode802Dot3AD only. LacpRate LacpRate // Link monitoring is either disabled or one of the monitors // is enabled, never both at the same time. MIIMonitor BondMIIMonitor ARPMonitor BondArpMonitor }
BondConfig - Bond (LAG) interface configuration.
type BondMIIMonitor ¶
BondMIIMonitor : MII link monitoring parameters (see devmodel.proto for description).
type BondMode ¶
type BondMode uint8
BondMode specifies the policy indicating how bonding slaves are used during network transmissions.
const ( // BondModeUnspecified : default is Round-Robin BondModeUnspecified BondMode = iota // BondModeBalanceRR : Round-Robin BondModeBalanceRR // BondModeActiveBackup : Active/Backup BondModeActiveBackup // BondModeBalanceXOR : select slave for a packet using a hash function BondModeBalanceXOR // BondModeBroadcast : send every packet on all slaves BondModeBroadcast // BondMode802Dot3AD : IEEE 802.3ad Dynamic link aggregation BondMode802Dot3AD // BondModeBalanceTLB : Adaptive transmit load balancing BondModeBalanceTLB // BondModeBalanceALB : Adaptive load balancing BondModeBalanceALB )
type BootReason ¶
type BootReason uint8
BootReason captures our best guess of why the device (re)booted
const ( BootReasonNone BootReason = iota BootReasonFirst // Normal - was not yet onboarded BootReasonRebootCmd // Normal - result of a reboot command in the API BootReasonUpdate // Normal - from an EVE image update in the API BootReasonFallback // Fallback from a failed EVE image update BootReasonDisconnect // Disconnected from controller for too long BootReasonFatal // Fatal error causing log.Fatal BootReasonOOM // OOM causing process to be killed BootReasonWatchdogHung // Software watchdog due stuck agent BootReasonWatchdogPid // Software watchdog due to e.g., golang panic BootReasonKernel // Set by dump-capture kernel, see docs/KERNEL-DUMPS.md and pkg/kdump/kdump.sh for details BootReasonPowerFail // Known power failure e.g., from disk controller S.M.A.R.T counter increase BootReasonUnknown // Could be power failure, kernel panic, or hardware watchdog BootReasonVaultFailure // Vault was not ready within the expected time BootReasonPoweroffCmd // Start after Local Profile Server poweroff BootReasonParseFail = 255 // BootReasonFromString didn't find match )
BootReasonNone is the initial value, followed by three normal reasons to boot/reboot, and then different error reasons Must match the values in api/proto/info/info.proto.BootReason
func BootReasonFromString ¶
func BootReasonFromString(str string) BootReason
BootReasonFromString parses what above String produced Empty string is returned as None
func (BootReason) StartWithSavedConfig ¶
func (br BootReason) StartWithSavedConfig() bool
StartWithSavedConfig indicates a normal reboot where we should immediately start the applications. Note that on most platforms we get Unknown for a power cycle
type CachedResolvedIPs ¶
CachedResolvedIPs serves as a cache for storing the IP addresses obtained through DNS resolution for a given hostname.
func (CachedResolvedIPs) LogCreate ¶
func (c CachedResolvedIPs) LogCreate(logBase *base.LogObject)
LogCreate :
func (CachedResolvedIPs) LogDelete ¶
func (c CachedResolvedIPs) LogDelete(logBase *base.LogObject)
LogDelete :
func (CachedResolvedIPs) LogModify ¶
func (c CachedResolvedIPs) LogModify(logBase *base.LogObject, old interface{})
LogModify :
func (CachedResolvedIPs) String ¶
func (c CachedResolvedIPs) String() string
String representation of CachedResolvedIPs.
type Capabilities ¶
type Capabilities struct { HWAssistedVirtualization bool // VMX/SVM for amd64 or Arm virtualization extensions for arm64 IOVirtualization bool // I/O Virtualization support CPUPinning bool // CPU Pinning support UseVHost bool // vHost support }
Capabilities represents device information
type CellNetPortConfig ¶
type CellNetPortConfig struct { // Parameters to apply for connecting to cellular networks. // Configured separately for every SIM card inserted into the modem. AccessPoints []CellularAccessPoint // Probe used to detect broken connection. Probe WwanProbe // Enable to get location info from the GNSS receiver of the cellular modem. LocationTracking bool }
CellNetPortConfig - configuration for cellular network port (part of DPC).
type CellularAccessPoint ¶
type CellularAccessPoint struct { // SIM card slot to which this configuration applies. // 0 - unspecified (apply to currently activated or the only available) // 1 - config for SIM card in the first slot // 2 - config for SIM card in the second slot // etc. SIMSlot uint8 // If true, then this configuration is currently activated. Activated bool // Access Point Network APN string // Authentication protocol used by the network. AuthProtocol WwanAuthProtocol // EncryptedCredentials : encrypted username and password. EncryptedCredentials CipherBlockStatus // The set of cellular network operators that modem should preferably try to register // and connect into. // Network operator should be referenced by PLMN (Public Land Mobile Network) code. PreferredPLMNs []string // The list of preferred Radio Access Technologies (RATs) to use for connecting // to the network. PreferredRATs []WwanRAT // If true, then modem will avoid connecting to networks with roaming. ForbidRoaming bool }
CellularAccessPoint contains config parameters for connecting to a cellular network.
func (CellularAccessPoint) Equal ¶
func (ap CellularAccessPoint) Equal(ap2 CellularAccessPoint) bool
Equal compares two instances of CellularAccessPoint for equality.
type CertHashType ¶
type CertHashType uint8
CertHashType carries the hash algo used for compute the short hash
type CertMetaData ¶
type CertMetaData struct { Type CertMetaDataType Data []byte }
CertMetaData stores a pair of type and value for a MetaData
type CertMetaDataType ¶
type CertMetaDataType uint8
CertMetaDataType is used for telling which type of MetaData is populated
const ( CertMetaDataTypeNone CertMetaDataType = iota + 0 CertMetaDataTypeTpm2Public )
Different values for CertMetaDataType
type CertType ¶
type CertType uint8
CertType carries the certificate use case e.g. ek, ecdh_exchange etc
type ChangeInProgressType ¶
type ChangeInProgressType int32
const ( ChangeInProgressTypeNone ChangeInProgressType = 0 ChangeInProgressTypeCreate ChangeInProgressType = 1 ChangeInProgressTypeModify ChangeInProgressType = 2 ChangeInProgressTypeDelete ChangeInProgressType = 3 ChangeInProgressTypeLast ChangeInProgressType = 255 )
type CipherBlockStatus ¶
type CipherBlockStatus struct { CipherBlockID string // constructed using individual reference CipherContextID string // cipher context id InitialValue []byte CipherData []byte `json:"pubsub-large-CipherData"` ClearTextHash []byte IsCipher bool CipherContext *CipherContext // ErrorAndTime provides SetErrorNow() and ClearError() ErrorAndTime }
CipherBlockStatus : Object specific encryption information
func (CipherBlockStatus) LogCreate ¶
func (status CipherBlockStatus) LogCreate(logBase *base.LogObject)
LogCreate :
func (CipherBlockStatus) LogDelete ¶
func (status CipherBlockStatus) LogDelete(logBase *base.LogObject)
LogDelete :
func (CipherBlockStatus) LogModify ¶
func (status CipherBlockStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type CipherContext ¶
type CipherContext struct { ContextID string HashScheme zcommon.HashAlgorithm KeyExchangeScheme zcommon.KeyExchangeScheme EncryptionScheme zcommon.EncryptionScheme ControllerCertHash []byte DeviceCertHash []byte // ErrorAndTime provides SetErrorNow() and ClearError() ErrorAndTime }
CipherContext : a pair of device and controller certificate published by controller along with some attributes part of EdgeDevConfig block, received from controller
func (*CipherContext) ControllerCertKey ¶
func (status *CipherContext) ControllerCertKey() string
ControllerCertKey :
func (*CipherContext) EdgeNodeCertKey ¶
func (status *CipherContext) EdgeNodeCertKey() string
EdgeNodeCertKey :
func (CipherContext) LogCreate ¶
func (status CipherContext) LogCreate(logBase *base.LogObject)
LogCreate :
func (CipherContext) LogDelete ¶
func (status CipherContext) LogDelete(logBase *base.LogObject)
LogDelete :
func (CipherContext) LogModify ¶
func (status CipherContext) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type CipherError ¶
type CipherError uint8
CipherError is a specific error for object encryption Must match CipherError in the api/proto/metrics.proto Note that NoData isn't an error; it means there was nothing to decrypt
const ( Invalid CipherError = iota NotReady // Not yet received ECDH controller cert DecryptFailed // ECDH decrypt failed UnmarshalFailed // Failed protobuf decode post decryption CleartextFallback // Failure then using cleartext MissingFallback // Failed and no cleartext to fall back to NoCipher // Only cleartext received NoData // No data to encrypt/decrypt MaxCipherError // Must be last )
Invalid should not be used
type CipherMetrics ¶
type CipherMetrics struct { AgentName string FailureCount uint64 SuccessCount uint64 LastFailure time.Time LastSuccess time.Time // One for each value of CipherError TypeCounters []uint64 }
CipherMetrics are metrics from one agent
func (CipherMetrics) LogCreate ¶
func (cipherMetric CipherMetrics) LogCreate(logBase *base.LogObject)
LogCreate :
func (CipherMetrics) LogDelete ¶
func (cipherMetric CipherMetrics) LogDelete(logBase *base.LogObject)
LogDelete :
func (CipherMetrics) LogModify ¶
func (cipherMetric CipherMetrics) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type CollectingStatus ¶
type CollectingStatus int
CollectingStatus specifies the state of the error collector
const ( // SmartCollectingStatusSuccess - status of successful data collection SmartCollectingStatusSuccess CollectingStatus = iota // SmartCollectingStatusError - error status SmartCollectingStatusError )
type ConfigGetStatus ¶
type ConfigGetStatus uint8
ConfigGetStatus : Config Get Status from Controller
const ( ConfigGetSuccess ConfigGetStatus = iota + 1 ConfigGetFail ConfigGetTemporaryFail ConfigGetReadSaved )
ConfigGetSuccess : Config get is successful
type ConfigItem ¶
type ConfigItem struct { Key string Value interface{} }
Mirrors proto definition for ConfigItem The value can be bool, float, uint, or string
type ConfigItemSpec ¶
type ConfigItemSpec struct { Key string ItemType ConfigItemType IntMin uint32 IntMax uint32 IntDefault uint32 StringValidator Validator StringDefault string BoolDefault bool TriStateDefault TriState }
ConfigItemSpec - Defines what a specification for a configuration should be
func (ConfigItemSpec) DefaultValue ¶
func (configSpec ConfigItemSpec) DefaultValue() ConfigItemValue
DefaultValue - Creates default value from a spec
type ConfigItemSpecMap ¶
type ConfigItemSpecMap struct { // GlobalSettings - Map Key: GlobalSettingKey, ConfigItemValue.Key: GlobalSettingKey GlobalSettings map[GlobalSettingKey]ConfigItemSpec // AgentSettingKey - Map Key: AgentSettingKey, ConfigItemValue.Key: AgentSettingKey AgentSettings map[AgentSettingKey]ConfigItemSpec }
ConfigItemSpecMap - Map of all specifications
func NewConfigItemSpecMap ¶
func NewConfigItemSpecMap() ConfigItemSpecMap
NewConfigItemSpecMap - Creates a specmap based on default values
func (*ConfigItemSpecMap) AddAgentSettingStringItem ¶
func (specMap *ConfigItemSpecMap) AddAgentSettingStringItem(key AgentSettingKey, defaultString string, validator Validator)
AddAgentSettingStringItem - Adds string item for a per-agent setting
func (*ConfigItemSpecMap) AddBoolItem ¶
func (specMap *ConfigItemSpecMap) AddBoolItem(key GlobalSettingKey, defaultBool bool)
AddBoolItem - Adds boolean item to specMap
func (*ConfigItemSpecMap) AddIntItem ¶
func (specMap *ConfigItemSpecMap) AddIntItem(key GlobalSettingKey, defaultInt uint32, min uint32, max uint32)
AddIntItem - Adds integer item to specMap
func (*ConfigItemSpecMap) AddStringItem ¶
func (specMap *ConfigItemSpecMap) AddStringItem(key GlobalSettingKey, defaultString string, validator Validator)
AddStringItem - Adds string item to specMap
func (*ConfigItemSpecMap) AddTriStateItem ¶
func (specMap *ConfigItemSpecMap) AddTriStateItem(key GlobalSettingKey, defaultTriState TriState)
AddTriStateItem - Adds tristate item to specMap
func (*ConfigItemSpecMap) ParseItem ¶
func (specMap *ConfigItemSpecMap) ParseItem(newConfigMap *ConfigItemValueMap, oldConfigMap *ConfigItemValueMap, key string, value string) (ConfigItemValue, error)
ParseItem - Parses the Key/Value pair into a ConfigItem and updates
newConfigMap. If there is a Parse error, it copies the corresponding value from oldConfigMap
type ConfigItemStatus ¶
type ConfigItemStatus struct { // Value - Current value of the item Value string // Err - Error from last config. nil if no error. Err error }
ConfigItemStatus - Status of Config Items
type ConfigItemType ¶
type ConfigItemType uint8
ConfigItemType - Defines what type of item we are storing
const ( // ConfigItemTypeInvalid - Invalid type. Never use it for a valid entry ConfigItemTypeInvalid ConfigItemType = iota // ConfigItemTypeInt - for config item's who's value is an integer ConfigItemTypeInt // ConfigItemTypeBool - for config item's who's value is a boolean ConfigItemTypeBool // ConfigItemTypeString - for config item's who's value is a string ConfigItemTypeString // ConfigItemTypeTriState - for config item's who's value is a tristate ConfigItemTypeTriState )
type ConfigItemValue ¶
type ConfigItemValue struct { Key string ItemType ConfigItemType IntValue uint32 StrValue string BoolValue bool TriStateValue TriState }
ConfigItemValue - Stores the value of a setting
func (ConfigItemValue) StringValue ¶
func (val ConfigItemValue) StringValue() string
StringValue - Returns the value in String Format
type ConfigItemValueMap ¶
type ConfigItemValueMap struct { // GlobalSettings - Map Key: GlobalSettingKey, ConfigItemValue.Key: GlobalSettingKey GlobalSettings map[GlobalSettingKey]ConfigItemValue // AgentSettings - Map Outer Key: agentName, Map Inner Key: AgentSettingKey ConfigItemValue.Key: AgentSettingKey AgentSettings map[string]map[AgentSettingKey]ConfigItemValue }
ConfigItemValueMap - Maps both agent and global settings
func DefaultConfigItemValueMap ¶
func DefaultConfigItemValueMap() *ConfigItemValueMap
DefaultConfigItemValueMap - converts default specmap into value map
func NewConfigItemValueMap ¶
func NewConfigItemValueMap() *ConfigItemValueMap
NewConfigItemValueMap - Create new instance of ConfigItemValueMap
func (*ConfigItemValueMap) AgentSettingStringValue ¶
func (configPtr *ConfigItemValueMap) AgentSettingStringValue(agentName string, agentSettingKey AgentSettingKey) string
AgentSettingStringValue - Gets the value of a per-agent setting for a certain agentname and per-agent key
func (*ConfigItemValueMap) DelAgentValue ¶
func (configPtr *ConfigItemValueMap) DelAgentValue(key AgentSettingKey, agentName string)
DelAgentValue - Deletes agent settings for an agent name and agent setting key
func (*ConfigItemValueMap) GlobalValueBool ¶
func (configPtr *ConfigItemValueMap) GlobalValueBool(key GlobalSettingKey) bool
GlobalValueBool - Gets a boolean global setting value
func (*ConfigItemValueMap) GlobalValueInt ¶
func (configPtr *ConfigItemValueMap) GlobalValueInt(key GlobalSettingKey) uint32
GlobalValueInt - Gets a int global setting value
func (*ConfigItemValueMap) GlobalValueString ¶
func (configPtr *ConfigItemValueMap) GlobalValueString(key GlobalSettingKey) string
GlobalValueString - Gets a string global setting value
func (*ConfigItemValueMap) GlobalValueTriState ¶
func (configPtr *ConfigItemValueMap) GlobalValueTriState(key GlobalSettingKey) TriState
GlobalValueTriState - Gets a tristate global setting value
func (*ConfigItemValueMap) ResetGlobalValue ¶
func (configPtr *ConfigItemValueMap) ResetGlobalValue(key GlobalSettingKey)
ResetGlobalValue - resets global value to default
func (*ConfigItemValueMap) SetAgentSettingStringValue ¶
func (configPtr *ConfigItemValueMap) SetAgentSettingStringValue( agentName string, key AgentSettingKey, newValue string)
SetAgentSettingStringValue - Sets an agent value for a certain key and agent name
func (*ConfigItemValueMap) SetGlobalValueBool ¶
func (configPtr *ConfigItemValueMap) SetGlobalValueBool(key GlobalSettingKey, value bool)
SetGlobalValueBool - sets a bool value for a key
func (*ConfigItemValueMap) SetGlobalValueInt ¶
func (configPtr *ConfigItemValueMap) SetGlobalValueInt(key GlobalSettingKey, value uint32)
SetGlobalValueInt - sets a int value for a key
func (*ConfigItemValueMap) SetGlobalValueString ¶
func (configPtr *ConfigItemValueMap) SetGlobalValueString(key GlobalSettingKey, value string)
SetGlobalValueString - sets a string value for a key
func (*ConfigItemValueMap) SetGlobalValueTriState ¶
func (configPtr *ConfigItemValueMap) SetGlobalValueTriState(key GlobalSettingKey, value TriState)
SetGlobalValueTriState - sets a tristate value for a key
func (*ConfigItemValueMap) UpdateItemValues ¶
func (configPtr *ConfigItemValueMap) UpdateItemValues(source *ConfigItemValueMap)
UpdateItemValues brings in any of the source items into the ConfigItemValueMap
type ConnectivityProbe ¶
type ConnectivityProbe struct { // Method to use to determine the connectivity status. Method ConnectivityProbeMethod // ProbeHost is either IP or hostname. ProbeHost string // ProbePort is required for L4 probing methods (e.g. ConnectivityProbeMethodTCP). ProbePort uint16 }
ConnectivityProbe : configuration for user-defined connectivity-testing probe.
func (ConnectivityProbe) String ¶
func (r ConnectivityProbe) String() string
String returns human-readable description of the probe.
type ConnectivityProbeMethod ¶
type ConnectivityProbeMethod uint8
ConnectivityProbeMethod - method to use to determine the connectivity status of a port.
const ( // ConnectivityProbeMethodNone : connectivity probing is disabled. ConnectivityProbeMethodNone ConnectivityProbeMethod = iota // ConnectivityProbeMethodICMP : use ICMP ping against the probed endpoint to determine // the connectivity status. ConnectivityProbeMethodICMP // ConnectivityProbeMethodTCP : try to establish TCP connection with the probed endpoint // to determine the connectivity status. ConnectivityProbeMethodTCP )
type ContentTreeConfig ¶
type ContentTreeConfig struct { ContentID uuid.UUID DatastoreIDList []uuid.UUID RelativeURL string Format zconfig.Format // this is the format of the content tree itself, not necessarily of the datastore ContentSha256 string MaxDownloadSize uint64 GenerationCounter int64 DisplayName string CustomMeta string }
ContentTreeConfig specifies the needed information for content tree which might need to be downloaded and verified
func (ContentTreeConfig) Key ¶
func (config ContentTreeConfig) Key() string
Key is content info UUID which will be unique
func (ContentTreeConfig) LogCreate ¶
func (config ContentTreeConfig) LogCreate(logBase *base.LogObject)
LogCreate :
func (ContentTreeConfig) LogDelete ¶
func (config ContentTreeConfig) LogDelete(logBase *base.LogObject)
LogDelete :
func (ContentTreeConfig) LogModify ¶
func (config ContentTreeConfig) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type ContentTreeStatus ¶
type ContentTreeStatus struct { ContentID uuid.UUID DatastoreIDList []uuid.UUID DatastoreTypesList []string AllDatastoresResolved bool IsOCIRegistry bool RelativeURL string Format zconfig.Format ContentSha256 string MaxDownloadSize uint64 GenerationCounter int64 DisplayName string HasResolverRef bool State SwState // XXX RefCount not needed? // RefCount uint // LastRefCountChangeTime time.Time CreateTime time.Time // When LOADED TotalSize int64 // expected size as reported by the downloader, if any CurrentSize int64 // current total downloaded size as reported by the downloader Progress uint // In percent i.e., 0-100 FileLocation string // Location of filestystem NameIsURL bool // Blobs the sha256 hashes of the blobs that are in this tree, the first of which always is the root Blobs []string HVTypeKube bool ErrorAndTimeWithSource }
ContentTreeStatus is response from volumemgr about status of content tree
func (ContentTreeStatus) IsContainer ¶
func (status ContentTreeStatus) IsContainer() bool
IsContainer will return true if content tree is of container type
func (ContentTreeStatus) Key ¶
func (status ContentTreeStatus) Key() string
Key is content info UUID which will be unique
func (ContentTreeStatus) LogCreate ¶
func (status ContentTreeStatus) LogCreate(logBase *base.LogObject)
LogCreate :
func (ContentTreeStatus) LogDelete ¶
func (status ContentTreeStatus) LogDelete(logBase *base.LogObject)
LogDelete :
func (ContentTreeStatus) LogModify ¶
func (status ContentTreeStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
func (ContentTreeStatus) ReferenceID ¶
func (status ContentTreeStatus) ReferenceID() string
ReferenceID get the image reference ID
func (ContentTreeStatus) ResolveKey ¶
func (status ContentTreeStatus) ResolveKey() string
ResolveKey will return the key of resolver config/status
func (*ContentTreeStatus) UpdateFromContentTreeConfig ¶
func (status *ContentTreeStatus) UpdateFromContentTreeConfig(config ContentTreeConfig)
UpdateFromContentTreeConfig sets up ContentTreeStatus based on ContentTreeConfig struct Be aware: don't expect all fields are updated from the config
type ControllerCert ¶
type ControllerCert struct { HashAlgo zcommon.HashAlgorithm Type zcert.ZCertType Cert []byte CertHash []byte }
ControllerCert : controller certificate config received from controller
func (ControllerCert) LogCreate ¶
func (cert ControllerCert) LogCreate(logBase *base.LogObject)
LogCreate :
func (ControllerCert) LogDelete ¶
func (cert ControllerCert) LogDelete(logBase *base.LogObject)
LogDelete :
func (ControllerCert) LogModify ¶
func (cert ControllerCert) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type DAttrTable ¶
DAttrTable have smart attr received via API
type DNSNameToIP ¶
DNSNameToIP : static mapping between hostname and IP addresses.
type DNSNotAvailError ¶
type DNSNotAvailError struct {
IfName string
}
DNSNotAvailError is returned when there is no DNS server configured for a given interface.
type DNSReq ¶
type DNSReq struct { HostName string Addrs []net.IP RequestTime int64 // in nanoseconds ACLNum int32 }
DNSReq :
type DPCSanitizeArgs ¶
type DPCSanitizeArgs struct { SanitizeTimePriority bool SanitizeKey bool KeyToUseIfEmpty string SanitizeName bool SanitizeL3Port bool }
DPCSanitizeArgs : arguments for DevicePortConfig.DoSanitize().
type DPCState ¶
type DPCState uint8
DPCState tracks the progression a DPC verification.
const ( // DPCStateNone : undefined state. DPCStateNone DPCState = iota // DPCStateFail : DPC verification failed. DPCStateFail // DPCStateFailWithIPAndDNS : failed to reach controller but has IP/DNS. DPCStateFailWithIPAndDNS // DPCStateSuccess : DPC verification succeeded. DPCStateSuccess // DPCStateIPDNSWait : waiting for interface IP address(es) and/or DNS server(s). DPCStateIPDNSWait // DPCStatePCIWait : waiting for some interface to come from pciback. DPCStatePCIWait // DPCStateIntfWait : waiting for some interface to appear in the network stack. DPCStateIntfWait // DPCStateRemoteWait : DPC verification failed because controller is down // or has old certificate. DPCStateRemoteWait // DPCStateAsyncWait : waiting for some config operations to finalize which are // running asynchronously in the background. DPCStateAsyncWait // DPCStateWwanWait : waiting for the wwan microservice to apply the latest // cellular configuration. DPCStateWwanWait )
type DatastoreConfig ¶
type DatastoreConfig struct { UUID uuid.UUID DsType string Fqdn string ApiKey string // XXX: to be deprecated, use CipherBlockStatus instead Password string // XXX: to be deprecated, use CipherBlockStatus instead Dpath string // depending on DsType, it could be bucket or path Region string DsCertPEM [][]byte // cert chain used for the datastore // CipherBlockStatus, for encrypted credentials CipherBlockStatus }
func (DatastoreConfig) LogCreate ¶
func (config DatastoreConfig) LogCreate(logBase *base.LogObject)
LogCreate :
func (DatastoreConfig) LogDelete ¶
func (config DatastoreConfig) LogDelete(logBase *base.LogObject)
LogDelete :
func (DatastoreConfig) LogModify ¶
func (config DatastoreConfig) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type DatastoreContext ¶
type DatastoreContext struct { DownloadURL string TransportMethod string // Download Method S3/HTTP/SFTP etc. Dpath string APIKey string Password string Region string }
DatastoreContext : datastore detail
type DeprecatedCellConfig ¶
type DeprecatedCellConfig struct { APN string ProbeAddr string DisableProbe bool LocationTracking bool }
DeprecatedCellConfig : old and now deprecated structure for storing cellular network port config. It is preserved only to support upgrades from older EVE versions where this is still being used (under the original struct name "CellConfig")
type DevCommand ¶
type DevCommand uint8
DevCommand : application command requested to run by a local server.
const ( // DevCommandUnspecified : command was not specified (invalid input). DevCommandUnspecified DevCommand = iota // DevCommandShutdown : shut down all app instances DevCommandShutdown // DevCommandShutdownPoweroff : shut down all app instances + poweroff DevCommandShutdownPoweroff )
Integer values are in-sync with proto enum LocalDevCmd_Command.
type DeviceNetworkStatus ¶
type DeviceNetworkStatus struct { DPCKey string // For logs/testing Version DevicePortConfigVersion // From DevicePortConfig Testing bool // Ignore since it is not yet verified State DPCState // Details about testing state CurrentIndex int // For logs RadioSilence RadioSilence // The actual state of the radio-silence mode Ports []NetworkPortStatus }
DeviceNetworkStatus is published to microservices which needs to know about ports and IP addresses It is published under the key "global" only
func (DeviceNetworkStatus) GetPortAddrInfo ¶
func (status DeviceNetworkStatus) GetPortAddrInfo(ifname string, addr net.IP) *AddrInfo
GetPortAddrInfo returns address info for a given interface and its IP address.
func (DeviceNetworkStatus) HasErrors ¶
func (status DeviceNetworkStatus) HasErrors() bool
HasErrors - DeviceNetworkStatus has errors on any of it's ports?
func (DeviceNetworkStatus) Key ¶
func (status DeviceNetworkStatus) Key() string
Key is used for pubsub
func (DeviceNetworkStatus) LogCreate ¶
func (status DeviceNetworkStatus) LogCreate(logBase *base.LogObject)
LogCreate :
func (DeviceNetworkStatus) LogDelete ¶
func (status DeviceNetworkStatus) LogDelete(logBase *base.LogObject)
LogDelete :
func (DeviceNetworkStatus) LogModify ¶
func (status DeviceNetworkStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
func (*DeviceNetworkStatus) LookupPortByIfName ¶
func (status *DeviceNetworkStatus) LookupPortByIfName( ifname string) *NetworkPortStatus
LookupPortByIfName returns status for port with the given interface name.
func (*DeviceNetworkStatus) LookupPortByLogicallabel ¶
func (status *DeviceNetworkStatus) LookupPortByLogicallabel( label string) *NetworkPortStatus
LookupPortByLogicallabel returns port configuration referenced by the logical label.
func (*DeviceNetworkStatus) LookupPortsByLabel ¶
func (status *DeviceNetworkStatus) LookupPortsByLabel( label string) (ports []*NetworkPortStatus)
LookupPortsByLabel returns status for every port which has the given label assigned (can be logical label or shared label).
func (DeviceNetworkStatus) MostlyEqual ¶
func (status DeviceNetworkStatus) MostlyEqual(status2 DeviceNetworkStatus) bool
MostlyEqual compares two DeviceNetworkStatus but skips things the test status/results aspects, including State and Testing. We compare the Ports in array order.
func (*DeviceNetworkStatus) MostlyEqualStatus ¶
func (status *DeviceNetworkStatus) MostlyEqualStatus(status2 DeviceNetworkStatus) bool
MostlyEqualStatus compares two DeviceNetworkStatus but skips things that are unimportant like just an increase in the success timestamp, but detects when a port changes to/from a failure.
func (*DeviceNetworkStatus) UpdatePortStatusFromIntfStatusMap ¶
func (status *DeviceNetworkStatus) UpdatePortStatusFromIntfStatusMap( intfStatusMap IntfStatusMap)
UpdatePortStatusFromIntfStatusMap - Set TestResults for ports in DeviceNetworkStatus to those from intfStatusMap. If a port is not found in intfStatusMap, it means the port was not tested, so we retain the original TestResults for the port.
type DeviceOperation ¶
type DeviceOperation uint8
DeviceOperation is an operation on device
const ( //DeviceOperationReboot reboot the device DeviceOperationReboot DeviceOperation = iota //DeviceOperationShutdown shutdown all app instances on device DeviceOperationShutdown //DeviceOperationPoweroff is shutdown plus poweroff. Not setable from controller DeviceOperationPoweroff )
func (DeviceOperation) String ¶
func (do DeviceOperation) String() string
String returns the verbose equivalent of DeviceOperation code
type DeviceOpsCmd ¶
DeviceOpsCmd - copy of zconfig.DeviceOpsCmd
type DevicePortConfig ¶
type DevicePortConfig struct { Version DevicePortConfigVersion Key string TimePriority time.Time // All zero's is fallback lowest priority State DPCState ShaFile string // File in which to write ShaValue once DevicePortConfigList published ShaValue []byte TestResults LastIPAndDNS time.Time // Time when we got some IP addresses and DNS Ports []NetworkPortConfig }
DevicePortConfig is a misnomer in that it includes the total test results plus the test results for a given port. The complete status with IP addresses lives in DeviceNetworkStatus
func (*DevicePortConfig) CountMgmtPorts ¶
func (config *DevicePortConfig) CountMgmtPorts(onlyValidConfig bool) int
CountMgmtPorts returns the number of management ports Exclude any broken ones with Dhcp = DhcpTypeNone Optionally exclude mgmt ports with invalid config
func (*DevicePortConfig) DoSanitize ¶
func (config *DevicePortConfig) DoSanitize(log *base.LogObject, args DPCSanitizeArgs)
DoSanitize ensures that some of the DPC attributes that could be missing in a user-injected override.json or after an EVE upgrade are filled in.
func (*DevicePortConfig) IsAnyPortInPciBack ¶
func (config *DevicePortConfig) IsAnyPortInPciBack( log *base.LogObject, aa *AssignableAdapters, filterUnassigned bool) (bool, string, uuid.UUID)
IsAnyPortInPciBack
Checks if any of the Ports are part of IO bundles which are in PCIback. If true, it also returns the ifName ( NOT bundle name ) Also returns whether it is currently used by an application by returning a UUID. If the UUID is zero it is in PCIback but available. Use filterUnassigned to filter out unassigned ports.
func (DevicePortConfig) IsDPCTestable ¶
func (config DevicePortConfig) IsDPCTestable(minTimeSinceFailure time.Duration) bool
IsDPCTestable - Return false if recent failure (less than "minTimeSinceFailure") Also returns false if it isn't usable
func (DevicePortConfig) IsDPCUntested ¶
func (config DevicePortConfig) IsDPCUntested() bool
IsDPCUntested - returns true if this is something we might want to test now. Checks if it is Usable since there is no point in testing unusable things.
func (DevicePortConfig) IsDPCUsable ¶
func (config DevicePortConfig) IsDPCUsable() bool
IsDPCUsable - checks whether something is invalid; no management IP addresses means it isn't usable hence we return false if none.
func (DevicePortConfig) LogCreate ¶
func (config DevicePortConfig) LogCreate(logBase *base.LogObject)
LogCreate :
func (DevicePortConfig) LogDelete ¶
func (config DevicePortConfig) LogDelete(logBase *base.LogObject)
LogDelete :
func (DevicePortConfig) LogModify ¶
func (config DevicePortConfig) LogModify(logBase *base.LogObject, old interface{})
LogModify :
func (*DevicePortConfig) LookupPortByIfName ¶
func (config *DevicePortConfig) LookupPortByIfName(ifName string) *NetworkPortConfig
LookupPortByIfName returns port configuration for the given interface.
func (*DevicePortConfig) LookupPortByLogicallabel ¶
func (config *DevicePortConfig) LookupPortByLogicallabel( label string) *NetworkPortConfig
LookupPortByLogicallabel returns port configuration referenced by the logical label.
func (*DevicePortConfig) LookupPortsByLabel ¶
func (config *DevicePortConfig) LookupPortsByLabel( label string) (ports []*NetworkPortConfig)
LookupPortsByLabel returns all port configurations with the given label assigned (can be logical label or shared label).
func (*DevicePortConfig) MostlyEqual ¶
func (config *DevicePortConfig) MostlyEqual(config2 *DevicePortConfig) bool
MostlyEqual compares two DevicePortConfig but skips things that are more of status such as the timestamps and the TestResults XXX Compare Version or not? We compare the Ports in array order.
func (DevicePortConfig) PubKey ¶
func (config DevicePortConfig) PubKey() string
PubKey is used for pubsub. Key string plus TimePriority
func (*DevicePortConfig) RecordPortFailure ¶
func (config *DevicePortConfig) RecordPortFailure(ifname string, errStr string)
RecordPortFailure - Record for given ifname in PortConfig
func (*DevicePortConfig) RecordPortSuccess ¶
func (config *DevicePortConfig) RecordPortSuccess(ifname string)
RecordPortSuccess - Record for given ifname in PortConfig
func (*DevicePortConfig) UpdatePortStatusFromIntfStatusMap ¶
func (config *DevicePortConfig) UpdatePortStatusFromIntfStatusMap( intfStatusMap IntfStatusMap)
UpdatePortStatusFromIntfStatusMap - Set TestResults for ports in DevicePortConfig to those from intfStatusMap. If a port is not found in intfStatusMap, it means the port was not tested, so we retain the original TestResults for the port.
func (DevicePortConfig) WasDPCWorking ¶
func (config DevicePortConfig) WasDPCWorking() bool
WasDPCWorking - Check if the last results for the DPC was Success
type DevicePortConfigList ¶
type DevicePortConfigList struct { CurrentIndex int PortConfigList []DevicePortConfig }
DevicePortConfigList is an array in timestamp aka priority order; first one is the most desired config to use It includes test results hence is misnamed - should have a separate status This is only published under the key "global"
func (DevicePortConfigList) LogCreate ¶
func (config DevicePortConfigList) LogCreate(logBase *base.LogObject)
LogCreate :
func (DevicePortConfigList) LogDelete ¶
func (config DevicePortConfigList) LogDelete(logBase *base.LogObject)
LogDelete :
func (DevicePortConfigList) LogModify ¶
func (config DevicePortConfigList) LogModify(logBase *base.LogObject, old interface{})
LogModify :
func (DevicePortConfigList) MostlyEqual ¶
func (config DevicePortConfigList) MostlyEqual(config2 DevicePortConfigList) bool
MostlyEqual - Equal if everything else other than timestamps is equal.
func (DevicePortConfigList) PubKey ¶
func (config DevicePortConfigList) PubKey() string
PubKey is used for pubsub
type DevicePortConfigVersion ¶
type DevicePortConfigVersion uint32
DevicePortConfigVersion is used to track major changes in DPC semantics.
const ( DPCInitial DevicePortConfigVersion = iota DPCIsMgmt // Require IsMgmt to be set for management ports )
When new fields and/or new semantics are added to DevicePortConfig a new version value is added here.
type DeviceSmartInfo ¶
type DeviceSmartInfo struct { PowerOnTime PowerOnTime `json:"power_on_time"` PowerCycleCount int64 `json:"power_cycle_count"` }
DeviceSmartInfo holds SMART details of the device
func NewSmartDataWithDefaults ¶
func NewSmartDataWithDefaults() *DeviceSmartInfo
NewSmartDataWithDefaults returns 'SmartData' with default values
type DeviceState ¶
type DeviceState uint8
DeviceState represents overall state
func (DeviceState) String ¶
func (ds DeviceState) String() string
type DhcpConfig ¶
type DhcpConfig struct { Dhcp DhcpType // If DhcpTypeStatic use below; if DhcpTypeNone do nothing AddrSubnet string // In CIDR e.g., 192.168.1.44/24 Gateway net.IP DomainName string NTPServer net.IP DNSServers []net.IP // If not set we use Gateway as DNS server Type NetworkType // IPv4 or IPv6 or Dual stack }
DhcpConfig : DHCP configuration for network port.
type DhcpType ¶
type DhcpType uint8
DhcpType decides how EVE should obtain IP address for a given network port.
const ( // DhcpTypeNOOP : DHCP type is undefined. DhcpTypeNOOP DhcpType = iota // DhcpTypeStatic : static IP config. DhcpTypeStatic // DhcpTypeNone : DHCP passthrough for switch NI // (between app VIF and external DHCP server). DhcpTypeNone // DhcpTypeDeprecated : defined here just to match deprecated value in EVE API. DhcpTypeDeprecated // DhcpTypeClient : run DHCP client to obtain IP address. DhcpTypeClient )
type DiskConfig ¶
type DiskConfig struct { VolumeKey string FileLocation string // Location of the volume ReadOnly bool Format zconfig.Format MountDir string DisplayName string WWN string Target zconfig.Target CustomMeta string }
DomainManager will pass these to the xen xl config file The vdev is automatically assigned as xvd[x], where X is a, b, c etc, based on the order in the DiskList Note that vdev in general can be hd[x], xvd[x], sd[x] but here we only use xvd
type DiskDescription ¶
type DiskDescription struct { Name string // bus-related name, for example: /dev/sdc LogicalName string // logical name, for example: disk3 Serial string // serial number of disk }
DiskDescription stores disk information
type DiskMetric ¶
type DiskMetric struct { DiskPath string ReadBytes uint64 // Value in Bytes. Number read Bytes. WriteBytes uint64 // Value in Bytes. Number written Bytes. ReadCount uint64 // Number of read operations. WriteCount uint64 // Number of write operations. TotalBytes uint64 // Value in Bytes. Total number of allotted Bytes for the disk. UsedBytes uint64 // Value in Bytes. Total number of used Bytes by the disk. FreeBytes uint64 // Value in Bytes. Total number of free Bytes for the disk. IsDir bool // Will be true if DiskPath is a mountPath, will false if it's a disk. }
DiskMetric holds metrics data per disk
func (DiskMetric) LogCreate ¶
func (status DiskMetric) LogCreate(logBase *base.LogObject)
LogCreate :
func (DiskMetric) LogDelete ¶
func (status DiskMetric) LogDelete(logBase *base.LogObject)
LogDelete :
func (DiskMetric) LogModify ¶
func (status DiskMetric) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type DiskNotification ¶
type DiskNotification struct { Total uint64 // Total Disk space in Bytes Used uint64 // Used Disk space in Bytes Zone UsageZone PrevUsage uint64 // Previous (last) disk usage in Bytes // Last 5 Usage percentage values // Most recent usage is at index 0, the next at index 1 and so on. LastFive []uint64 UsageSlab uint64 PrevSlab uint64 }
DiskNotification :
func (DiskNotification) LogCreate ¶
func (disk DiskNotification) LogCreate(logBase *base.LogObject)
LogCreate :
func (DiskNotification) LogDelete ¶
func (disk DiskNotification) LogDelete(logBase *base.LogObject)
LogDelete :
func (DiskNotification) LogModify ¶
func (disk DiskNotification) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type DiskSmartInfo ¶
type DiskSmartInfo struct { DiskName string // /dev/sda DiskType DiskType //SATA, SCSI, NVME enum ModelNumber string // Intel ... SerialNumber string Wwn uint64 SmartAttrs []*DAttrTable // Temperature, PowerOnTime, PowerCycleCount ... TimeUpdate uint64 // Date last collect info in seconds Errors error // errors in data collection CollectingStatus CollectingStatus }
DiskSmartInfo have smart data received via API
func (DiskSmartInfo) GetPowerCycleCount ¶
func (dsi DiskSmartInfo) GetPowerCycleCount() uint32
GetPowerCycleCount returns count of full hard disk power on/off cycles.
func (DiskSmartInfo) GetPowerOnTime ¶
func (dsi DiskSmartInfo) GetPowerOnTime() uint32
GetPowerOnTime returns count of hours in power-on state
func (DiskSmartInfo) GetSmartAttrViaID ¶
func (dsi DiskSmartInfo) GetSmartAttrViaID(id int) *DAttrTable
GetSmartAttrViaID takes an attribute ID (SmartAttrID...) as input, returns the properties of this attribute (struct DAttrTable).
func (DiskSmartInfo) GetTemperature ¶
func (dsi DiskSmartInfo) GetTemperature() uint32
GetTemperature returns the disk temperature in degrees Celsius
type DiskStatus ¶
type DiskStatus struct { VolumeKey string ReadOnly bool FileLocation string // From DiskConfig Format zconfig.Format MountDir string DisplayName string Devtype string // XXX used internally by hypervisor; deprecate? Vdev string // Allocated WWN string CustomMeta string }
func (DiskStatus) GetPVCNameFromVolumeKey ¶
func (status DiskStatus) GetPVCNameFromVolumeKey() (string, error)
GetPVCNameFromVolumeKey gets the pvcName from volume key
type DisksInformation ¶
type DisksInformation struct {
Disks []*DiskSmartInfo
}
DisksInformation main struct for SMART
type DomainConfig ¶
type DomainConfig struct { UUIDandVersion UUIDandVersion DisplayName string // Use as name for domU? DisplayName+version? Activate bool // Actually start the domU as opposed to prepare AppNum int // From networking; makes the name unique VmConfig DisableLogs bool GPUConfig string DiskConfigList []DiskConfig VifList []VifConfig IoAdapterList []IoAdapter // KubeImageName: is the container image reference we pass to domainmgr to launch a native container // in kubevirt eve KubeImageName string // if this node is the DNiD of the App IsDNidNode bool // XXX: to be deprecated, use CipherBlockStatus instead CloudInitUserData *string `json:"pubsub-large-CloudInitUserData"` // base64-encoded // CipherBlockStatus, for encrypted cloud-init data CipherBlockStatus // MetaDataType for select type of metadata service for app MetaDataType MetaDataType // Service flag indicates that we want to start app instance // with options defined in org.mobyproject.config label of image provided by linuxkit Service bool // All changes to the cloud-init config are tracked using this version field - // once the version is changed cloud-init tool restarts in a guest. // See getCloudInitVersion() and createCloudInitISO() for details. CloudInitVersion uint32 }
DomainConfig contains information DomainManager needs to boot and halt domains If the the version (in UUIDandVersion) changes then the domain needs to halted and booted?? NO, because an ACL change from ZedControl would bump the version. Who determines which changes require halt+reboot? Do we need an explicit interlock with ZedManager when a reboot is needed? For instance, ZedManager could remove the DomainConfig, what for DomainStatus to be deleted, then re-create the DomainConfig.
func (DomainConfig) GetTaskName ¶
func (config DomainConfig) GetTaskName() string
GetTaskName assigns a unique name to the task representing this domain FIXME: given config.UUIDandVersion.Version part not sure config.AppNum is needed for uniqueness
func (DomainConfig) IsOCIContainer ¶
func (config DomainConfig) IsOCIContainer() bool
The whole domain is considered as a container-based if the first disk has the 'CONTAINER' format.
func (DomainConfig) LogCreate ¶
func (config DomainConfig) LogCreate(logBase *base.LogObject)
LogCreate :
func (DomainConfig) LogDelete ¶
func (config DomainConfig) LogDelete(logBase *base.LogObject)
LogDelete :
func (DomainConfig) LogModify ¶
func (config DomainConfig) LogModify(logBase *base.LogObject, old interface{})
LogModify :
func (DomainConfig) VirtualizationModeOrDefault ¶
func (config DomainConfig) VirtualizationModeOrDefault() VmMode
VirtualizationModeOrDefault sets the default to PV
type DomainMetric ¶
type DomainMetric struct { UUIDandVersion UUIDandVersion CPUTotalNs uint64 // Nanoseconds since Domain boot scaled by #CPUs CPUScaled uint32 // The scale factor which was applied AllocatedMB uint32 UsedMemory uint32 // in MB MaxUsedMemory uint32 // in MB AvailableMemory uint32 // in MB UsedMemoryPercent float64 LastHeard time.Time Activated bool NodeName string // the name of the kubernetes node on which the app is currently running }
DomainMetric carries CPU and memory usage. UUID=devUUID for the dom0/host metrics overhead
func (DomainMetric) LogCreate ¶
func (metric DomainMetric) LogCreate(logBase *base.LogObject)
LogCreate :
func (DomainMetric) LogDelete ¶
func (metric DomainMetric) LogDelete(logBase *base.LogObject)
LogDelete :
func (DomainMetric) LogModify ¶
func (metric DomainMetric) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type DomainStatus ¶
type DomainStatus struct { UUIDandVersion UUIDandVersion DisplayName string State SwState // BOOTING and above? Activated bool // XXX remove?? AppNum int // From networking; makes the name unique PendingAdd bool PendingModify bool PendingDelete bool DomainName string // Name of Xen domain DomainId int BootTime time.Time DiskStatusList []DiskStatus VifList []VifInfo IoAdapterList []IoAdapter DisableLogs bool TriedCount int // ErrorAndTime provides SetErrorNow() and ClearError() ErrorAndTime ConfigFailed bool BootFailed bool AdaptersFailed bool OCIConfigDir string // folder holding an OCI Image config for this domain (empty string means no config) EnvVariables map[string]string // List of environment variables to be set in container WritableFiles []cloudconfig.WritableFile // List of files from CloudInit scripts to be created in container VmConfig // From DomainConfig Service bool // VirtualTPM is a flag to signal the hypervisor implementation // that vTPM is available for the domain. VirtualTPM bool // FmlCustomResolution is the custom resolution for FML mode, // xxx: this should be moved to VmConfig FmlCustomResolution string // if this node is the DNiD of the App IsDNidNode bool // the device name is used for kube node name // Need to pass in from domainmgr to hypervisor context commands NodeName string }
func (DomainStatus) Key ¶
func (status DomainStatus) Key() string
func (DomainStatus) LogCreate ¶
func (status DomainStatus) LogCreate(logBase *base.LogObject)
LogCreate :
func (DomainStatus) LogDelete ¶
func (status DomainStatus) LogDelete(logBase *base.LogObject)
LogDelete :
func (DomainStatus) LogModify ¶
func (status DomainStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
func (DomainStatus) Pending ¶
func (status DomainStatus) Pending() bool
func (DomainStatus) VifInfoByVif ¶
func (status DomainStatus) VifInfoByVif(vif string) *VifInfo
VifInfoByVif looks up based on the name aka Vif
type DownloaderConfig ¶
type DownloaderConfig struct { ImageSha256 string DatastoreIDList []uuid.UUID Name string Target string // file path where to download the file NameIsURL bool // If not we form URL based on datastore info Size uint64 // In bytes FinalObjDir string // final Object Store RefCount uint }
The key/index to this is the ImageSha256 which is allocated by the controller or resolver.
func (DownloaderConfig) Key ¶
func (config DownloaderConfig) Key() string
func (DownloaderConfig) LogCreate ¶
func (config DownloaderConfig) LogCreate(logBase *base.LogObject)
LogCreate :
func (DownloaderConfig) LogDelete ¶
func (config DownloaderConfig) LogDelete(logBase *base.LogObject)
LogDelete :
func (DownloaderConfig) LogModify ¶
func (config DownloaderConfig) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type DownloaderStatus ¶
type DownloaderStatus struct { ImageSha256 string DatastoreIDList []uuid.UUID Target string // file path where we download the file Name string RefCount uint // Zero means not downloaded LastUse time.Time // When RefCount dropped to zero Expired bool // Handshake to client NameIsURL bool // If not we form URL based on datastore info State SwState // DOWNLOADED etc ReservedSpace uint64 // Contribution to global ReservedSpace Size uint64 // Once DOWNLOADED; in bytes TotalSize int64 // expected size as reported by the downloader, if any CurrentSize int64 // current total downloaded size as reported by the downloader Progress uint // In percent i.e., 0-100, given by CurrentSize/ExpectedSize ModTime time.Time ContentType string // content-type header, if provided // ErrorAndTime provides SetErrorNow() and ClearError() ErrorAndTime RetryCount int // We save the original error when we do a retry OrigError string }
The key/index to this is the ImageSha256 which comes from DownloaderConfig.
func (*DownloaderStatus) HandleDownloadFail ¶
func (status *DownloaderStatus) HandleDownloadFail(errStr string, retryTime time.Duration, cancelled bool)
HandleDownloadFail : Do Failure specific tasks
func (DownloaderStatus) Key ¶
func (status DownloaderStatus) Key() string
func (DownloaderStatus) LogCreate ¶
func (status DownloaderStatus) LogCreate(logBase *base.LogObject)
LogCreate :
func (DownloaderStatus) LogDelete ¶
func (status DownloaderStatus) LogDelete(logBase *base.LogObject)
LogDelete :
func (DownloaderStatus) LogModify ¶
func (status DownloaderStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type ENClusterAppStatus ¶
type ENClusterAppStatus struct { AppUUID uuid.UUID // UUID of the appinstance IsDNidNode bool // DesignatedNodeID is set on the App for this node ScheduledOnThisNode bool // App is running on this device StatusRunning bool // Status of the app in "Running" state IsVolumeDetached bool // Are volumes detached after failover ? }
ENClusterAppStatus - Status of an App Instance in the multi-node cluster
type EdgeNodeCert ¶
type EdgeNodeCert struct { HashAlgo CertHashType //hash method used to arrive at certHash CertID []byte //Hash of the cert, computed using hashAlgo CertType CertType //type of the certificate Cert []byte //PEM encoded IsTpm bool //TPM generated or, not MetaDataItems []CertMetaData //Meta data items associated with this cert(can be empty) }
EdgeNodeCert : contains additional device certificates such as - attest signing certificate published by tpmmgr - ECDH certificate published by tpmmgr
func (EdgeNodeCert) Key ¶
func (cert EdgeNodeCert) Key() string
Key uniquely identifies the certificate
func (EdgeNodeCert) LogCreate ¶
func (cert EdgeNodeCert) LogCreate(logBase *base.LogObject)
LogCreate :
func (EdgeNodeCert) LogDelete ¶
func (cert EdgeNodeCert) LogDelete(logBase *base.LogObject)
LogDelete :
func (EdgeNodeCert) LogModify ¶
func (cert EdgeNodeCert) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type EdgeNodeClusterConfig ¶
type EdgeNodeClusterConfig struct { ClusterName string ClusterID UUIDandVersion // ClusterInterface - Interface to be used for kubernetes cluster for the node. // This can be a Management interface or an App-Shared interface. This is a logical // label of the port. ClusterInterface string // ClusterIPPrefix - IP Prefix for the kubernetes cluster Node IP. This IP prefix is // applied to the ClusterInterface. It can be the only IP prefix on the interface, or // it can be the 2nd IP prefix on the interface. ClusterIPPrefix *net.IPNet // IsWorkerNode - Is this node a worker node in the cluster, vs a kubernetes server node IsWorkerNode bool // JoinServerIP - The kubernetes server IP address to join for this node as part of the // multi-node cluster JoinServerIP net.IP // BootstrapNode - Is this node the bootstrap node for the cluster. In bringing up the // kubernetes cluster, one node is designated as the bootstrap node in HA server mode. // This node needs to be up first before other nodes can join the cluster. This BootstrapNode // will own the 'JoinServerIP' on it's cluster interface. BootstrapNode bool // CipherBlockStatus, for encrypted cluster token data CipherToken CipherBlockStatus }
EdgeNodeClusterConfig - Configuration for cluster multi-node from controller
func (EdgeNodeClusterConfig) Key ¶
func (config EdgeNodeClusterConfig) Key() string
Key - returns the key for the config of EdgeNodeClusterConfig
type EdgeNodeClusterStatus ¶
type EdgeNodeClusterStatus struct { ClusterName string ClusterID UUIDandVersion // ClusterInterface - Interface to be used for kubernetes cluster for the node. // This can be a Management interface or an App-Shared interface. This is a logical // label of the port. ClusterInterface string // ClusterIPPrefix - IP Prefix for the kubernetes cluster Node IP. This IP prefix is // applied to the ClusterInterface. It can be the only IP prefix on the interface, or // it can be the 2nd IP prefix on the interface. ClusterIPPrefix *net.IPNet // ClusterIPIsReady - Is the cluster IP address ready on the cluster interface ClusterIPIsReady bool // IsWorkerNode - Is this node a worker node in the cluster, vs a kubernetes server node IsWorkerNode bool // JoinServerIP - The kubernetes server IP address to join for this node as part of the // multi-node cluster JoinServerIP net.IP // BootstrapNode - Is this node the bootstrap node for the cluster. In bringing up the // kubernetes cluster, one node is designated as the bootstrap node in HA server mode. // This node needs to be up first before other nodes can join the cluster. This BootstrapNode // will own the 'JoinServerIP' on it's cluster interface. BootstrapNode bool Error ErrorDescription }
EdgeNodeClusterStatus - Status of the multi-node cluster published by zedkube
type EdgeNodeDiskArrayType ¶
type EdgeNodeDiskArrayType int32
EdgeNodeDiskArrayType should be in sync with api
const ( EdgeNodeDiskArrayTypeUnspecified EdgeNodeDiskArrayType = 0 // no configured EdgeNodeDiskArrayTypeRAID0 EdgeNodeDiskArrayType = 1 // stripe EdgeNodeDiskArrayTypeRAID1 EdgeNodeDiskArrayType = 2 // mirror EdgeNodeDiskArrayTypeRAID5 EdgeNodeDiskArrayType = 3 // raidz1 EdgeNodeDiskArrayTypeRAID6 EdgeNodeDiskArrayType = 4 // raidz2 )
enum should be in sync with api
type EdgeNodeDiskConfig ¶
type EdgeNodeDiskConfig struct { Disk EdgeNodeDiskDescription OldDisk *EdgeNodeDiskDescription Config EdgeNodeDiskConfigType }
EdgeNodeDiskConfig disk configuration
type EdgeNodeDiskConfigType ¶
type EdgeNodeDiskConfigType int32
EdgeNodeDiskConfigType should be in sync with api
const ( EdgeNodeDiskConfigTypeUnspecified EdgeNodeDiskConfigType = iota // no configured, do nothing EdgeNodeDiskConfigTypeEveOs // the disk EVE is installed on EdgeNodeDiskConfigTypePersist // the disk is separate persist partition or disk, not zfs EdgeNodeDiskConfigTypeZfsOnline // included in zfs and online EdgeNodeDiskConfigTypeZfsOffline // included in zfs and offline EdgeNodeDiskConfigTypeAppDirect // for direct assignment EdgeNodeDiskConfigTypeUnused // removed from zfs/app-direct )
enum should be in sync with api
type EdgeNodeDiskDescription ¶
EdgeNodeDiskDescription stores information to identify disk
type EdgeNodeDisks ¶
type EdgeNodeDisks struct { Disks []EdgeNodeDiskConfig ArrayType EdgeNodeDiskArrayType Children []EdgeNodeDisks }
EdgeNodeDisks stores expected layout of disks
type EdgeNodeInfo ¶
type EdgeNodeInfo struct { DeviceName string DeviceID uuid.UUID ProjectName string ProjectID uuid.UUID EnterpriseName string EnterpriseID string }
EdgeNodeInfo - edge node info from controller
type EdgeviewConfig ¶
type EdgeviewConfig struct { JWToken string // JWT token for edge-view DispCertPEM [][]byte // dispatcher certificates DevPolicy EvDevPolicy // device policy AppPolicy EvAppPolicy // app policy ExtPolicy EvExtPolicy // external policy KubPolicy EvKubPolicy // kubernetes policy GenID uint32 // number of time started }
EdgeviewConfig - edge-view config from controller
type EdgeviewStatus ¶
type EdgeviewStatus struct { ExpireOn uint64 // unix time expiration in seconds StartedOn time.Time // edge-view process started on timestamp CmdCountDev uint32 // total edge-view dev related commands performed CmdCountApp uint32 // total edge-view app related commands performed CmdCountExt uint32 // total edge-view ext related commands performed }
EdgeviewStatus - status advertised by edge-view Not sending 'CmdOption' for now since it is logged for each command we can add it when figure out repliablly uploading
func (EdgeviewStatus) Key ¶
func (status EdgeviewStatus) Key() string
Key is global for edgeview for now
type EncryptedVaultKeyFromController ¶
EncryptedVaultKeyFromController is published from Controller to vaultmgr (through zedagent)
func (EncryptedVaultKeyFromController) Key ¶
func (key EncryptedVaultKeyFromController) Key() string
Key returns name of the vault corresponding to this object for now it is only the default vault i.e. "Application Volume Store"
func (EncryptedVaultKeyFromController) LogCreate ¶
func (key EncryptedVaultKeyFromController) LogCreate(logBase *base.LogObject)
LogCreate :
func (EncryptedVaultKeyFromController) LogDelete ¶
func (key EncryptedVaultKeyFromController) LogDelete(logBase *base.LogObject)
LogDelete :
func (EncryptedVaultKeyFromController) LogKey ¶
func (key EncryptedVaultKeyFromController) LogKey() string
LogKey :
func (EncryptedVaultKeyFromController) LogModify ¶
func (key EncryptedVaultKeyFromController) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type EncryptedVaultKeyFromDevice ¶
type EncryptedVaultKeyFromDevice struct { Name string EncryptedVaultKey []byte // empty if no TPM enabled IsTpmEnabled bool }
EncryptedVaultKeyFromDevice is published by vaultmgr towards Controller (through zedagent)
func (EncryptedVaultKeyFromDevice) Key ¶
func (key EncryptedVaultKeyFromDevice) Key() string
Key returns name of the vault corresponding to this object for now it is only the default vault i.e. "Application Volume Store"
func (EncryptedVaultKeyFromDevice) LogCreate ¶
func (key EncryptedVaultKeyFromDevice) LogCreate(logBase *base.LogObject)
LogCreate :
func (EncryptedVaultKeyFromDevice) LogDelete ¶
func (key EncryptedVaultKeyFromDevice) LogDelete(logBase *base.LogObject)
LogDelete :
func (EncryptedVaultKeyFromDevice) LogKey ¶
func (key EncryptedVaultKeyFromDevice) LogKey() string
LogKey :
func (EncryptedVaultKeyFromDevice) LogModify ¶
func (key EncryptedVaultKeyFromDevice) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type EncryptionBlock ¶
type EncryptionBlock struct { DsAPIKey string DsPassword string WifiUserName string // If the authentication type is EAP WifiPassword string CellularNetUsername string CellularNetPassword string ProtectedUserData string ClusterToken string }
EncryptionBlock - This is a Mirror of api/proto/config/acipherinfo.proto - EncryptionBlock Always need to keep these two consistent.
type ErrCycleDetected ¶
type ErrCycleDetected struct{}
ErrCycleDetected describes an error where an IoBundle has cycles with parentassigngrp
func (ErrCycleDetected) Error ¶
func (ErrCycleDetected) Error() string
type ErrEmptyAssigngrpWithParent ¶
type ErrEmptyAssigngrpWithParent struct{}
ErrEmptyAssigngrpWithParent describes an error where an IoBundle without assigngrp has a parentassingrp
func (ErrEmptyAssigngrpWithParent) Error ¶
func (ErrEmptyAssigngrpWithParent) Error() string
type ErrIOBundleCollision ¶
type ErrIOBundleCollision struct {
Collisions []IOBundleCollision
}
ErrIOBundleCollision describes an error where an IoBundle collides with another IoBundle
func (ErrIOBundleCollision) Error ¶
func (i ErrIOBundleCollision) Error() string
type ErrOwnParent ¶
type ErrOwnParent struct{}
ErrOwnParent describes an error where an IoBundle is parent of itself
func (ErrOwnParent) Error ¶
func (ErrOwnParent) Error() string
type ErrParentAssigngrpMismatch ¶
type ErrParentAssigngrpMismatch struct{}
ErrParentAssigngrpMismatch describes an error where an IoBundle has a mismatch with the parentassigngrp
func (ErrParentAssigngrpMismatch) Error ¶
func (ErrParentAssigngrpMismatch) Error() string
type ErrorAndTime ¶
type ErrorAndTime struct {
ErrorDescription
}
ErrorAndTime is used by many EVE agents
func (*ErrorAndTime) HasError ¶
func (etPtr *ErrorAndTime) HasError() bool
HasError returns true if there is an error
func (*ErrorAndTime) SetError ¶
func (etPtr *ErrorAndTime) SetError(errStr string, errorTime time.Time)
SetError is when time is specified Deprecated: use SetErrorDescription instead with ErrorDescription
func (*ErrorAndTime) SetErrorNow ¶
func (etPtr *ErrorAndTime) SetErrorNow(errStr string)
SetErrorNow uses the current time Deprecated: use SetErrorDescription instead with ErrorDescription without ErrorTime inside (or with zero time)
type ErrorAndTimeWithSource ¶
type ErrorAndTimeWithSource struct { ErrorSourceType string ErrorDescription }
ErrorAndTimeWithSource has an additional field "ErrorSourceType" which is used to selectively clear errors by calling IsErrorSource before calling ClearErrorWithSource. See zedmanager and volumemgr for example use.
func (*ErrorAndTimeWithSource) ClearErrorWithSource ¶
func (etsPtr *ErrorAndTimeWithSource) ClearErrorWithSource()
ClearErrorWithSource - Clears error state
func (*ErrorAndTimeWithSource) HasError ¶
func (etsPtr *ErrorAndTimeWithSource) HasError() bool
HasError returns true if there is an error
func (*ErrorAndTimeWithSource) IsErrorSource ¶
func (etsPtr *ErrorAndTimeWithSource) IsErrorSource(source interface{}) bool
IsErrorSource returns true if the source type matches
func (*ErrorAndTimeWithSource) SetError ¶
func (etsPtr *ErrorAndTimeWithSource) SetError(errStr string, errTime time.Time)
SetError - Sets error state with no source type Deprecated: use SetErrorDescription instead with ErrorDescription
func (*ErrorAndTimeWithSource) SetErrorWithSource ¶
func (etsPtr *ErrorAndTimeWithSource) SetErrorWithSource(errStr string, source interface{}, errTime time.Time)
SetErrorWithSource - Sets error state. Source needs to be a type but source might be a string passed from ErrorSourceType in another object. Deprecated: use SetErrorWithSourceAndDescription instead with ErrorDescription
func (*ErrorAndTimeWithSource) SetErrorWithSourceAndDescription ¶
func (etsPtr *ErrorAndTimeWithSource) SetErrorWithSourceAndDescription(errDescription ErrorDescription, source interface{})
SetErrorWithSourceAndDescription - Sets error state with ErrorDescription. Source needs to be a type but source might be a string passed from ErrorSourceType in another object.
type ErrorDescription ¶
type ErrorDescription struct { Error string ErrorTime time.Time ErrorSeverity ErrorSeverity ErrorRetryCondition string ErrorEntities []*ErrorEntity }
ErrorDescription contains error details
func (*ErrorDescription) SetErrorDescription ¶
func (edPtr *ErrorDescription) SetErrorDescription(errDescription ErrorDescription)
SetErrorDescription sync ErrorDescription with provided one it sets ErrorSeverityError in case of unspecified ErrorSeverity it sets ErrorTime to time.Now() in case of no time provided
type ErrorEntity ¶
type ErrorEntity struct { EntityType ErrorEntityType // entity type EntityID string // entity uuid, sha, or other unique id based on the type }
ErrorEntity contains the device entity details
type ErrorEntityType ¶
type ErrorEntityType int32
ErrorEntityType contains the entity type, must be in sync with info.Entity enum of api
const ( // ErrorEntityUnspecified Entity ErrorEntityUnspecified ErrorEntityType = 0 // ErrorEntityBaseOs entity ErrorEntityBaseOs ErrorEntityType = 1 // ErrorEntitySystemAdapter Entity ErrorEntitySystemAdapter ErrorEntityType = 2 // ErrorEntityVault Entity ErrorEntityVault ErrorEntityType = 3 // ErrorEntityAttestation Entity ErrorEntityAttestation ErrorEntityType = 4 // ErrorEntityAppInstance Entity ErrorEntityAppInstance ErrorEntityType = 5 // ErrorEntityPort Entity ErrorEntityPort ErrorEntityType = 6 // ErrorEntityNetwork Entity ErrorEntityNetwork ErrorEntityType = 7 // ErrorEntityNetworkInstance Entity ErrorEntityNetworkInstance ErrorEntityType = 8 // ErrorEntityContentTree Entity ErrorEntityContentTree ErrorEntityType = 9 // ErrorEntityContentBlob Entity ErrorEntityContentBlob ErrorEntityType = 10 // ErrorEntityVolume Entity ErrorEntityVolume ErrorEntityType = 11 )
type ErrorSeverity ¶
type ErrorSeverity int32
ErrorSeverity tells the severity type, must be in sync with info.Severity enum of api
const ( // ErrorSeverityUnspecified severity unspecified ErrorSeverityUnspecified ErrorSeverity = 0 // ErrorSeverityNotice severity notice ErrorSeverityNotice ErrorSeverity = 1 // ErrorSeverityWarning severity warning ErrorSeverityWarning ErrorSeverity = 2 // ErrorSeverityError severity error ErrorSeverityError ErrorSeverity = 3 )
func GetErrorSeverity ¶
func GetErrorSeverity(retryCount int, timeSpend time.Duration) ErrorSeverity
GetErrorSeverity returns ErrorSeverity based on retry count and time spend
type EvAppPolicy ¶
type EvAppPolicy struct {
Enabled bool `json:"enabled"` // allow access to apps
}
EvAppPolicy - edge-view policy for application access the 'Enabled' controls all app access is allowed or not With Enable App, can expend later for other policies
type EvDevPolicy ¶
type EvDevPolicy struct {
Enabled bool `json:"enabled"` // allow access to device
}
EvDevPolicy - edge-view policy for device access the 'Enabled' controls device side is allowed or not including debug commands With Enable Dev, can expend later for other policies
type EvExtPolicy ¶
type EvExtPolicy struct {
Enabled bool `json:"enabled"` // allow access to external end-points
}
EvExtPolicy - edge-view policy for external access the 'Enabled' controls all external access is allowed or not With Enable Ext, can expend later for other policies
type EvKubPolicy ¶
type EvKubPolicy struct {
Enabled bool `json:"enabled"` // allow access to kubernetes api
}
EvKubPolicy - edge-view policy for kubernetes/kubectl access the 'Enabled' controls all the tcp/kube operations are allowed or not
type EvjwtAlgo ¶
type EvjwtAlgo struct { Alg string `json:"alg"` // algorithm, use 'ES256' or SHA256withECDSA Typ string `json:"typ"` // type, is 'JWT' string }
EvjwtAlgo - jwt algorithm JWT token for edgeview JWT has 3 portion of items separated by '.' using base64url without padding, the 1st part is the algorithm, the 2nd is the info, the third is signing data the 1st and 2nd parts are from json format
type EvjwtInfo ¶
type EvjwtInfo struct { Dep string `json:"dep"` // dispatcher end-point string e.g. ip:port Sub string `json:"sub"` // jwt subject, the device UUID string Exp uint64 `json:"exp"` // expiration time for the token Key string `json:"key"` // key or nonce for payload hmac authentication Num uint8 `json:"num"` // number of instances, default is 1 Enc bool `json:"enc"` // payload with encryption, default is authentication }
EvjwtInfo - token embedded info the info specifies where is the dispatcher endpoint, the intended EVE device with UUID string, the token expiration time and authentication nonce
type ExecConfig ¶
type ExecConfig struct { Caller string // Typically agentName Sequence int // To be able to repeat same command Command string Args []string Environ []string TimeLimit uint // In seconds; zero means server default Combined bool // Combined Output - stdout and stderr DontWait bool // Caller doesn't want result }
ExecConfig contains a command to be executed The Caller+Sequence is assumed to be unique. When an item is added or modified in Caller or Sequence, the command is executed.
type ExecStatus ¶
type ExecStatus struct { Caller string // Typically agentName Sequence int // To be able to repeat same command ExitValue int Output string TimedOut bool // Exceeded timeout }
ExecStatus contains the results of executing a command The Caller+Sequence is the unique Key
type FlowRec ¶
type FlowRec struct { Flow IPTuple Inbound bool ACLID int32 Action ACLActionType StartTime int64 StopTime int64 TxBytes int64 TxPkts int64 RxBytes int64 RxPkts int64 }
FlowRec :
type FlowScope ¶
type FlowScope struct { AppUUID uuid.UUID NetAdapterName string // logical name for VIF (set by controller in NetworkAdapter.Name) BrIfName string NetUUID uuid.UUID Sequence string // used internally for limit and pkt size per app/bn }
FlowScope :
type FlowlogCounters ¶
FlowlogCounters encapsulates counters for published/dropped flowlog messages/flows or DNS requests.
type FlowlogMetrics ¶
type FlowlogMetrics struct { sync.Mutex Messages FlowlogCounters Flows FlowlogCounters DNSReqs FlowlogCounters }
FlowlogMetrics contains flowlog metrics as collected by flowlogTask of zedagent.
type GlobalSettingKey ¶
type GlobalSettingKey string
GlobalSettingKey - Constants of all global setting keys
const ( // Int Items // ConfigInterval global setting key ConfigInterval GlobalSettingKey = "timer.config.interval" // CertInterval global setting key; check for controller cert update CertInterval GlobalSettingKey = "timer.cert.interval" // MetricInterval global setting key MetricInterval GlobalSettingKey = "timer.metric.interval" // DiskScanMetricInterval global setting key DiskScanMetricInterval GlobalSettingKey = "timer.metric.diskscan.interval" // ResetIfCloudGoneTime global setting key ResetIfCloudGoneTime GlobalSettingKey = "timer.reboot.no.network" // FallbackIfCloudGoneTime global setting key FallbackIfCloudGoneTime GlobalSettingKey = "timer.update.fallback.no.network" // MintimeUpdateSuccess global setting key MintimeUpdateSuccess GlobalSettingKey = "timer.test.baseimage.update" // VdiskGCTime global setting key VdiskGCTime GlobalSettingKey = "timer.gc.vdisk" // DeferContentDelete global setting key DeferContentDelete GlobalSettingKey = "timer.defer.content.delete" // DownloadRetryTime global setting key DownloadRetryTime GlobalSettingKey = "timer.download.retry" // DownloadStalledTime global setting key DownloadStalledTime GlobalSettingKey = "timer.download.stalled" // DomainBootRetryTime global setting key DomainBootRetryTime GlobalSettingKey = "timer.boot.retry" // NetworkGeoRedoTime global setting key NetworkGeoRedoTime GlobalSettingKey = "timer.port.georedo" // NetworkGeoRetryTime global setting key NetworkGeoRetryTime GlobalSettingKey = "timer.port.georetry" // NetworkTestDuration global setting key NetworkTestDuration GlobalSettingKey = "timer.port.testduration" // NetworkTestInterval global setting key NetworkTestInterval GlobalSettingKey = "timer.port.testinterval" // NetworkTestBetterInterval global setting key NetworkTestBetterInterval GlobalSettingKey = "timer.port.testbetterinterval" // NetworkTestTimeout global setting key NetworkTestTimeout GlobalSettingKey = "timer.port.timeout" // NetworkSendTimeout global setting key NetworkSendTimeout GlobalSettingKey = "timer.send.timeout" // NetworkDialTimeout global setting key NetworkDialTimeout GlobalSettingKey = "timer.dial.timeout" // LocationCloudInterval global setting key LocationCloudInterval GlobalSettingKey = "timer.location.cloud.interval" // LocationAppInterval global setting key LocationAppInterval GlobalSettingKey = "timer.location.app.interval" // NTPSourcesInterval global setting key NTPSourcesInterval GlobalSettingKey = "timer.ntpsources.interval" // Dom0MinDiskUsagePercent global setting key Dom0MinDiskUsagePercent GlobalSettingKey = "storage.dom0.disk.minusage.percent" // Dom0DiskUsageMaxBytes - Max disk usage for Dom0. Dom0 can use // Dom0MinDiskUsagePercent up to a max of Dom0DiskUsageMaxBytes Dom0DiskUsageMaxBytes GlobalSettingKey = "storage.dom0.disk.maxusagebytes" // StorageZfsReserved is the percentage reserved in a ZFS pool StorageZfsReserved GlobalSettingKey = "storage.zfs.reserved.percent" // AppContainerStatsInterval - App Container Stats Collection AppContainerStatsInterval GlobalSettingKey = "timer.appcontainer.stats.interval" // VaultReadyCutOffTime global setting key VaultReadyCutOffTime GlobalSettingKey = "timer.vault.ready.cutoff" // LogRemainToSendMBytes Max gzip log files remain on device to be sent in Mbytes LogRemainToSendMBytes GlobalSettingKey = "newlog.gzipfiles.ondisk.maxmegabytes" // ForceFallbackCounter global setting key ForceFallbackCounter = "force.fallback.counter" // DownloadMaxPortCost global setting key controls // how the EVE microservices will use free and non-free (e.g., WWAN) // ports for image downloads. DownloadMaxPortCost GlobalSettingKey = "network.download.max.cost" // Bool Items // UsbAccess global setting key UsbAccess GlobalSettingKey = "debug.enable.usb" // VgaAccess global setting to enable host VGA console if it is not assigned to an application VgaAccess GlobalSettingKey = "debug.enable.vga" // AllowAppVnc global setting key AllowAppVnc GlobalSettingKey = "app.allow.vnc" // EveMemoryLimitInMiB global setting key, memory limit for EVE in MiB EveMemoryLimitInMiB GlobalSettingKey = "memory.eve.limit.MiB" // EveMemoryLimitInBytes global setting key, memory limit for EVE in bytes // Deprecated: Use EveMemoryLimitInMiB. This config is limited to 4GB // as it is stored as uint32. Nevertheles, for backward compatibility, // this config is still supported and has higher priority than EveMemoryLimitInMiB. EveMemoryLimitInBytes GlobalSettingKey = "memory.eve.limit.bytes" // How much memory overhead is allowed for VMM needs VmmMemoryLimitInMiB GlobalSettingKey = "memory.vmm.limit.MiB" // GOGCMemoryLimitInBytes global setting key GOGCMemoryLimitInBytes GlobalSettingKey = "gogc.memory.limit.bytes" // GOGCPercent global setting key GOGCPercent GlobalSettingKey = "gogc.percent" // GOGCForcedIntervalInSec global setting key GOGCForcedIntervalInSec GlobalSettingKey = "gogc.forced.interval.seconds" // GOGCForcedGrowthMemInMiB global setting key GOGCForcedGrowthMemInMiB GlobalSettingKey = "gogc.forced.growth.memory.MiB" // GOGCForcedGrowthMemPerc global setting key GOGCForcedGrowthMemPerc GlobalSettingKey = "gogc.forced.growth.memory.percent" // IgnoreMemoryCheckForApps global setting key IgnoreMemoryCheckForApps GlobalSettingKey = "memory.apps.ignore.check" // IgnoreDiskCheckForApps global setting key IgnoreDiskCheckForApps GlobalSettingKey = "storage.apps.ignore.disk.check" // AllowLogFastupload global setting key AllowLogFastupload GlobalSettingKey = "newlog.allow.fastupload" // EnableARPSnoopOnNI global setting key EnableARPSnoop GlobalSettingKey = "network.switch.enable.arpsnoop" // WwanQueryVisibleProviders : periodically query visible cellular service providers WwanQueryVisibleProviders GlobalSettingKey = "wwan.query.visible.providers" // GoroutineLeakDetectionThreshold amount of goroutines, reaching which will trigger leak detection // regardless of growth rate. GoroutineLeakDetectionThreshold GlobalSettingKey = "goroutine.leak.detection.threshold" // GoroutineLeakDetectionCheckIntervalMinutes interval in minutes between the measurements of the // goroutine count. GoroutineLeakDetectionCheckIntervalMinutes GlobalSettingKey = "goroutine.leak.detection.check.interval.minutes" // GoroutineLeakDetectionCheckWindowMinutes interval in minutes for which the leak analysis is performed. // It should contain at least 10 measurements, so no less than 10 * GoroutineLeakDetectionCheckIntervalMinutes. GoroutineLeakDetectionCheckWindowMinutes GlobalSettingKey = "goroutine.leak.detection.check.window.minutes" // GoroutineLeakDetectionKeepStatsHours amount of hours to keep the stats for the leak detection. We keep more // stats than the check window to be able to react to settings a bigger check window via configuration. GoroutineLeakDetectionKeepStatsHours GlobalSettingKey = "goroutine.leak.detection.keep.stats.hours" // GoroutineLeakDetectionCooldownMinutes cooldown period in minutes after the leak detection is triggered. During // this period no stack traces are collected, only warning messages are logged. GoroutineLeakDetectionCooldownMinutes GlobalSettingKey = "goroutine.leak.detection.cooldown.minutes" // TriState Items // NetworkFallbackAnyEth global setting key NetworkFallbackAnyEth GlobalSettingKey = "network.fallback.any.eth" // MaintenanceMode global setting key MaintenanceMode GlobalSettingKey = "maintenance.mode" // String Items // SSHAuthorizedKeys global setting key SSHAuthorizedKeys GlobalSettingKey = "debug.enable.ssh" // ConsoleAccess global setting key ConsoleAccess GlobalSettingKey = "debug.enable.console" // Shim VM VNC access global setting key VncShimVMAccess GlobalSettingKey = "debug.enable.vnc.shim.vm" // DefaultLogLevel global setting key DefaultLogLevel GlobalSettingKey = "debug.default.loglevel" // DefaultRemoteLogLevel global setting key DefaultRemoteLogLevel GlobalSettingKey = "debug.default.remote.loglevel" // SyslogLogLevel global setting key SyslogLogLevel GlobalSettingKey = "debug.syslog.loglevel" // KernelLogLevel global setting key KernelLogLevel GlobalSettingKey = "debug.kernel.loglevel" // FmlCustomResolution global setting key FmlCustomResolution GlobalSettingKey = "app.fml.resolution" // DisableDHCPAllOnesNetMask option is deprecated and has no effect. // Zedrouter no longer uses the all-ones netmask as it adds unnecessary complexity, // causes confusion for some applications, and is no longer required for any EVE // functionality (previously it was supposedly needed for ACLs and flow logging). // We keep the option defined to avoid reporting errors in ZInfoDevice.ConfigItemStatus // for older deployments where this option is still configured. DisableDHCPAllOnesNetMask GlobalSettingKey = "debug.disable.dhcp.all-ones.netmask" // ProcessCloudInitMultiPart to help VMs which do not handle mime multi-part themselves ProcessCloudInitMultiPart GlobalSettingKey = "process.cloud-init.multipart" // NetDumpEnable : enable publishing of network diagnostics (as tgz archives to /persist/netdump). NetDumpEnable GlobalSettingKey = "netdump.enable" // NetDumpTopicPreOnboardInterval : how frequently (in seconds) can be netdumps // of the same topic published. // This interval applies *only until* device is onboarded. NetDumpTopicPreOnboardInterval GlobalSettingKey = "netdump.topic.preonboard.interval" // NetDumpTopicPostOnboardInterval : how frequently (in seconds) can be netdumps // of the same topic published. // This interval applies *after* device is onboarded. NetDumpTopicPostOnboardInterval GlobalSettingKey = "netdump.topic.postonboard.interval" // NetDumpTopicMaxCount : maximum number of netdumps that can be published (persisted) // for each topic. The oldest netdump is unpublished should a new netdump exceed the limit. NetDumpTopicMaxCount GlobalSettingKey = "netdump.topic.maxcount" // NetDumpDownloaderPCAP : Enable to include packet captures inside netdumps for // download requests. However, even if enabled, TCP segments carrying non-empty payload // (i.e. content which is being downloaded) are excluded. NetDumpDownloaderPCAP GlobalSettingKey = "netdump.downloader.with.pcap" // NetDumpDownloaderHTTPWithFieldValue : Enable to include HTTP header field values in captured // network traces for download requests. // Beware: may contain secrets, such as datastore credentials. NetDumpDownloaderHTTPWithFieldValue GlobalSettingKey = "netdump.downloader.http.with.fieldvalue" // NetworkLocalLegacyMACAddress : Enables legacy MAC address generation for // local network instances. The legacy generation is not "that" random and // probability of repeating MAC addresses across nodes is high. Later the // algorithm was changed and more randomness was introduced, but some // applications may be already configured with already allocated MAC // address, and MAC address change on EVE node upgrade (switch from old // generation logic to new one) can cause problems with the guest network. NetworkLocalLegacyMACAddress GlobalSettingKey = "network.local.legacy.mac.address" )
Try to keep the GlobalSettingKey consts in the same order as in NewConfigItemSpecMap
type GlobalStatus ¶
type GlobalStatus struct { ConfigItems map[string]ConfigItemStatus UnknownConfigItems map[string]ConfigItemStatus }
GlobalStatus - Status of Global Config Items.
func NewGlobalStatus ¶
func NewGlobalStatus() *GlobalStatus
NewGlobalStatus - Creates a new global status
func (*GlobalStatus) UpdateItemValuesFromGlobalConfig ¶
func (gs *GlobalStatus) UpdateItemValuesFromGlobalConfig(gc ConfigItemValueMap)
UpdateItemValuesFromGlobalConfig - Update values of ConfigItems from globalConfig
type HostMemory ¶
type HostMemory struct { TotalMemoryMB uint64 FreeMemoryMB uint64 UsedEveMB uint64 KmemUsedEveMB uint64 Ncpus uint32 }
HostMemory reports global stats. Published under "global" key Note that Ncpus is the set of physical CPUs which is different than the set of CPUs assigned to dom0
func (HostMemory) LogModify ¶
func (hm HostMemory) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type IOBundleCollision ¶
type IOBundleCollision struct { Phylabel string USBAddr string USBProduct string PCILong string Assigngrp string }
IOBundleCollision has the members IoBundles can collide on
func (IOBundleCollision) String ¶
func (i IOBundleCollision) String() string
type IOBundleError ¶
IOBundleError is an error stored in IoBundles that can be marshalled
func (*IOBundleError) Append ¶
func (iobe *IOBundleError) Append(err error)
Append converts an error to ioBundleErrorBase and adds it
func (*IOBundleError) Empty ¶
func (iobe *IOBundleError) Empty() bool
Empty returns true if no error has been added
func (*IOBundleError) ErrorTime ¶
func (iobe *IOBundleError) ErrorTime() time.Time
ErrorTime returns the time of the last error added
func (*IOBundleError) HasErrorByType ¶
func (iobe *IOBundleError) HasErrorByType(e error) bool
HasErrorByType returns true if error of the same type is found
func (*IOBundleError) String ¶
func (iobe *IOBundleError) String() string
type IPAddrNotAvailError ¶
type IPAddrNotAvailError struct {
IfName string
}
IPAddrNotAvailError is returned when there is no (suitable) IP address assigned to a given interface.
type IPRange ¶
IPRange : range of consecutive IP addresses.
type IPRouteConfig ¶
type IPRouteConfig struct { // Destination network. // Guaranteed by zedagent not to be nil. DstNetwork *net.IPNet // Gateway IP address. // Can be nil. Gateway net.IP // Output device port for the routed traffic. // Either a single NI port referenced by its name (SystemAdapter.Name, aka logical label) // or an adapter shared-label matching zero or more NI ports (multipath routing). // Not used when gateway references one of the applications connected to the NI. OutputPortLabel string // Probe remote endpoint to determine connectivity status of each port and pick one // with a working connectivity (and known gateway IP) for the route (preferring // the currently used one if any). // Provides automatic fail-over between ports. // If OutputPortLabel is not defined or references only a single port (e.g. directly // by the logical label), probing is skipped (nothing to fail-over to anyway). PortProbe NIPortProbe // When EVE is deciding which port to use for multipath route and multiple ports have // working connectivity (or probing is disabled), port can be selected based on the cost // If this option is enabled, EVE will prefer ports with lower costs. PreferLowerCost bool // When EVE is deciding which port to use for multipath route and there are multiple // candidates among cellular modems, it might make sense to consider the current // cellular network signal strength. If this option is enabled, EVE will prefer // cellular ports with better signal (only among cellular ports). PreferStrongerWwanSignal bool }
IPRouteConfig : single IP route config entry.
func (IPRouteConfig) Equal ¶
func (r IPRouteConfig) Equal(r2 IPRouteConfig) bool
Equal compares two IP routes for equality.
func (IPRouteConfig) IsDefaultRoute ¶
func (r IPRouteConfig) IsDefaultRoute() bool
IsDefaultRoute returns true if this is a default route, i.e. matches all destinations.
func (IPRouteConfig) String ¶
func (r IPRouteConfig) String() string
String returns human-readable description of the route. Format does not matter, we use curly brackets just for the readability sake.
type IPRouteInfo ¶
type IPRouteInfo struct { IPVersion AddressType DstNetwork *net.IPNet // Nil for connected route. Gateway net.IP // Logical label of the output device port for the routed traffic. // Empty if the gateway is IP address of one of the applications. // In that case, GatewayApp is defined instead. OutputPort string // UUID of the application used as the gateway for the route. // Empty if the gateway is external (not one of the apps but outside the device). // In that case, OutputPort is defined instead. GatewayApp uuid.UUID }
IPRouteInfo contains info about a single IP route from the NI routing table. It is published to the controller as part of ZInfoNetworkInstance.
func (IPRouteInfo) Equal ¶
func (r IPRouteInfo) Equal(r2 IPRouteInfo) bool
Equal compares two IP routes for equality.
func (IPRouteInfo) IsDefaultRoute ¶
func (r IPRouteInfo) IsDefaultRoute() bool
IsDefaultRoute returns true if this is a default route, i.e. matches all destinations.
type IPRouteStatus ¶
type IPRouteStatus struct { IPRouteConfig // Logical label of the output device port for the routed traffic. // Empty if no port has been selected yet. SelectedPort string // True if port probing is running. RunningPortProbing bool // Error set when zedrouter fails to apply this route. ErrorAndTime }
IPRouteStatus contains state data for a user-configured static route.
type IPTuple ¶
type IPTuple struct { Src net.IP // local App IP address Dst net.IP // remote IP address SrcPort int32 // local App IP Port DstPort int32 // remote IP Port Proto int32 }
IPTuple :
type ImgInfo ¶
type ImgInfo struct { VirtualSize uint64 `json:"virtual-size"` Filename string `json:"filename"` ClusterSize uint64 `json:"cluster-size"` Format string `json:"format"` ActualSize uint64 `json:"actual-size"` DirtyFlag bool `json:"dirty-flag"` }
ImgInfo matches the json output of qemu-img info
type Inprogress ¶
type Inprogress uint8
Track more complicated workflows
const ( NotInprogress Inprogress = iota DownloadAndVerify // Download and verify new images if need be BringDown RecreateVolumes BringUp )
NotInprogress and other values for Inprogress
type IntfStatusMap ¶
type IntfStatusMap struct { // StatusMap -> Key: ifname, Value: TestResults StatusMap map[string]TestResults }
IntfStatusMap - Used to return per-interface test results (success and failures)
ifName is used as the key
func NewIntfStatusMap ¶
func NewIntfStatusMap() *IntfStatusMap
NewIntfStatusMap - Create a new instance of IntfStatusMap
func (*IntfStatusMap) RecordFailure ¶
func (intfMap *IntfStatusMap) RecordFailure(ifName string, errStr string)
RecordFailure records a failure for the ifName
func (*IntfStatusMap) RecordSuccess ¶
func (intfMap *IntfStatusMap) RecordSuccess(ifName string)
RecordSuccess records a success for the ifName
func (*IntfStatusMap) RecordSuccessWithWarning ¶
func (intfMap *IntfStatusMap) RecordSuccessWithWarning(ifName, warnStr string)
RecordSuccessWithWarning records a verification success but warns user about a potential issue.
func (*IntfStatusMap) SetOrUpdateFromMap ¶
func (intfMap *IntfStatusMap) SetOrUpdateFromMap( source IntfStatusMap)
SetOrUpdateFromMap - Set all the entries from the given per-interface map Entries which are not in the source are not modified
type IoAdapter ¶
type IoAdapter struct { Type IoType Name string // Short hand name such as "COM1" or "eth1-2" EthVf sriov.EthVF // Applies only to the VF IoType }
IoAdapter specifies that a group of ports should be assigned
type IoBundle ¶
type IoBundle struct { // Type // Type of the IoBundle Type IoType // Phylabel // Label on the outside of the enclosure Phylabel string // Logical Label assigned to the Adapter. Could match Phylabel // or could be a user-chosen string like "shopfloor" Logicallabel string // Assignment Group, is unique label that is applied across PhysicalIOs // Entire group can be assigned to application or nothing at all // If this is an empty string it means the IoBundle can not be assigned. AssignmentGroup string // Parent Assignment Group is there to reference the parent assignment group in order to make the device // dependent on a different device. // Currently the concrete reason to do this is to make a usb device dependent on the PCI address the USB // controller is using to prevent passthrough of the USB controller in one application while trying to passthrough // a USB device on this controller to another application. ParentAssignmentGroup string Usage zcommon.PhyIoMemberUsage // Cost is zero for the free ports; less desirable ports have higher numbers Cost uint8 // The following set of I/O addresses and info/aliases are used to find // a device, and also to configure it. // XXX TBD: Add PciClass, PciVendor and PciDevice strings as well // for matching Ifname string // Matching for network PCI devices e.g., "eth1" // Attributes from controller but can also be set locally. PciLong string // Specific PCI bus address in Domain:Bus:Device.Function syntax // For non-PCI devices such as the ISA serial ports we have: // XXX: Why is IRQ a string?? Should convert it into Int. Irq string // E.g., "5" Ioports string // E.g., "2f8-2ff" Serial string // E.g., "/dev/ttyS1" UsbAddr string // E.g., "1:2.3" UsbProduct string // E.g., "0951:1666" Unique string // From firmware_node symlink; used for debug checks MacAddr string // Set for networking adapters. XXX Note used for match. // UsedByUUID // Application UUID ( Can be Dom0 too ) that owns the Bundle. // For unassigned adapters, this is not set. UsedByUUID uuid.UUID // IsPciBack // Is the IoBundle assigned to pciBack; means other bundles in the same group are also assigned // If the device is managed by dom0, this is False. // If the device is ( or to be ) managed by DomU, this is True IsPCIBack bool // Assigned to pciback IsPort bool // Whole or part of the bundle is a zedrouter port // Do not put device under pciBack, instead keep it in dom0 as long as it is not assigned to any application. // In other words, this does not prevent assignments but keeps unassigned devices visible to EVE. KeepInHost bool Error IOBundleError // Only used in PhyIoNetEthPF Vfs sriov.VFList // Only used in PhyIoNetEthVF VfParams VfInfo // Used for additional attributes Cbattr map[string]string }
IoBundle has one entry per individual receptacle with a reference to a group name. Those sharing a group name needs to be assigned together.
func IoBundleFromPhyAdapter ¶
func IoBundleFromPhyAdapter(log *base.LogObject, phyAdapter PhysicalIOAdapter) *IoBundle
IoBundleFromPhyAdapter - Creates an IoBundle from the given PhyAdapter
func (IoBundle) HasAdapterChanged ¶
func (ib IoBundle) HasAdapterChanged(log *base.LogObject, phyAdapter PhysicalIOAdapter) bool
HasAdapterChanged - We store each Physical Adapter using the IoBundle object. Compares IoBundle with Physical adapter and returns if they are the Same or the Physical Adapter has changed.
type IoType ¶
type IoType uint8
Must match definition of PhyIoType in devmodel.proto which is an strict subset of the values in ZCioType in devmodel.proto
const ( IoNop IoType = 0 IoNetEth IoType = 1 IoUSB IoType = 2 IoCom IoType = 3 IoAudio IoType = 4 IoNetWLAN IoType = 5 IoNetWWAN IoType = 6 IoHDMI IoType = 7 // enum 8 is reserved for backward compatibility with controller API IoNVMEStorage IoType = 9 IoSATAStorage IoType = 10 IoNetEthPF IoType = 11 IoNetEthVF IoType = 12 IoUSBController IoType = 13 IoUSBDevice IoType = 14 IoCAN IoType = 15 IoVCAN IoType = 16 IoLCAN IoType = 17 IoNVME IoType = 255 IoOther IoType = 255 )
type KubeClusterInfo ¶
type KubeClusterInfo struct { Nodes []KubeNodeInfo // List of nodes in the cluster AppPods []KubePodInfo // List of EVE application pods AppVMIs []KubeVMIInfo // List of VirtualMachineInstance }
KubeClusterInfo - Information about a Kubernetes cluster
type KubeNodeInfo ¶
type KubeNodeInfo struct { Name string Status KubeNodeStatus IsMaster bool UsesEtcd bool CreationTime time.Time LastTransitionTime time.Time KubeletVersion string InternalIP string ExternalIP string Schedulable bool }
KubeNodeInfo - Information about a Kubernetes node
type KubeNodeStatus ¶
type KubeNodeStatus int8
KubeNodeStatus - Enum for the status of a Kubernetes node
const ( KubeNodeStatusUnknown KubeNodeStatus = iota // KubeNodeStatusUnknown - Node status is unknown KubeNodeStatusReady // KubeNodeStatusReady - Node is in ready status KubeNodeStatusNotReady // KubeNodeStatusNotReady - Node is in not ready status KubeNodeStatusNotReachable // KubeNodeStatusNotReachable - Node is not reachable )
type KubePodInfo ¶
type KubePodInfo struct { Name string Status KubePodStatus RestartCount int32 RestartTimestamp time.Time CreationTimestamp time.Time PodIP string NodeName string }
KubePodInfo - Information about a Kubernetes pod
type KubePodStatus ¶
type KubePodStatus int8
KubePodStatus - Enum for the status of a Kubernetes pod
const ( KubePodStatusUnknown KubePodStatus = iota // KubePodStatusUnknown - Pod status is unknown KubePodStatusPending // KubePodStatusPending - Pod is in pending status KubePodStatusRunning // KubePodStatusRunning - Pod is in running status KubePodStatusSucceeded // KubePodStatusSucceeded - Pod is in succeeded status KubePodStatusFailed // KubePodStatusFailed - Pod is in failed status )
type KubeVMIInfo ¶
type KubeVMIInfo struct { Name string Status KubeVMIStatus CreationTime time.Time LastTransitionTime time.Time IsReady bool NodeName string }
KubeVMIInfo - Information about a VirtualMachineInstance
type KubeVMIStatus ¶
type KubeVMIStatus int8
KubeVMIStatus - Enum for the status of a VirtualMachineInstance
const ( KubeVMIStatusUnset KubeVMIStatus = iota // KubeVMIStatusUnset - UnSet VMI status KubeVMIStatusPending // KubeVMIStatusPending - VMI in pending status KubeVMIStatusScheduling // KubeVMIStatusScheduling - VMI in Scheduling status KubeVMIStatusScheduled // KubeVMIStatusScheduled - VMI in Scheduled status KubeVMIStatusRunning // KubeVMIStatusRunning - VMI in Running status KubeVMIStatusSucceeded // KubeVMIStatusSucceeded - VMI in Succeeded status KubeVMIStatusFailed // KubeVMIStatusFailed - VMI in Failed status KubeVMIStatusUnknown // KubeVMIStatusUnknown - VMI in Unknown status )
type L2LinkConfig ¶
type L2LinkConfig struct { L2Type L2LinkType VLAN VLANConfig Bond BondConfig }
L2LinkConfig - contains either VLAN or Bond interface configuration, depending on the L2Type.
type L2LinkType ¶
type L2LinkType uint8
L2LinkType - supported types of an L2 link
const ( // L2LinkTypeNone : not an L2 link (used for physical network adapters). L2LinkTypeNone L2LinkType = iota // L2LinkTypeVLAN : VLAN sub-interface L2LinkTypeVLAN // L2LinkTypeBond : Bond interface L2LinkTypeBond )
type LOCConfig ¶
type LOCConfig struct { // LOC URL LocURL string }
LOCConfig : configuration of the Local Operator Console
type LacpRate ¶
type LacpRate uint8
LacpRate specifies the rate in which EVE will ask LACP link partners to transmit LACPDU packets in 802.3ad mode.
type LedBlinkCount ¶
type LedBlinkCount uint8
LedBlinkCount is enum type summarizing all LED blinking patterns.
const ( // LedBlinkUndefined - undefined/unknown LED blinking pattern. LedBlinkUndefined LedBlinkCount = iota // LedBlinkWaitingForIP - LED indication of device waiting to obtain management IP address. LedBlinkWaitingForIP // LedBlinkConnectingToController - LED indication of device trying to connect to the controller. LedBlinkConnectingToController // LedBlinkConnectedToController - LED indication of device being connected to the controller but not yet onboarded. LedBlinkConnectedToController // LedBlinkOnboarded - LED indication of device being connected to the controller and onboarded. LedBlinkOnboarded // LedBlinkRadioSilence - LED indication of radio-silence being enabled LedBlinkRadioSilence )
const ( // LedBlinkOnboardingFailure - LED indication of device failing to onboard. LedBlinkOnboardingFailure LedBlinkCount = iota + 10 // LedBlinkRespWithoutTLS - LED indication or device receiving response from controller without TLS connection state. LedBlinkRespWithoutTLS // LedBlinkRespWithoutOSCP - LED indication or device receiving response from controller without OSCP. LedBlinkRespWithoutOSCP // LedBlinkInvalidControllerCert - LED indication or device failing to validate or fetch the controller certificate. LedBlinkInvalidControllerCert // LedBlinkInvalidAuthContainer - LED indication of message not being signed by controller. LedBlinkInvalidAuthContainer // LedBlinkInvalidBootstrapConfig - LED indication of bootstrap configuration (bootstrap-config.pb) not being valid. LedBlinkInvalidBootstrapConfig )
func DeriveLedCounter ¶
func DeriveLedCounter(ledCounter LedBlinkCount, usableAddressCount int, radioSilence bool) LedBlinkCount
Merge the 1/2 values based on having usable addresses or not, with the value we get based on access to zedcloud or errors.
func (LedBlinkCount) String ¶
func (c LedBlinkCount) String() string
String returns human-readable description of the state indicated by the particular LED blinking count.
type LedBlinkCounter ¶
type LedBlinkCounter struct {
BlinkCounter LedBlinkCount
}
type LocReliability ¶
type LocReliability string
LocReliability : reliability of location information.
const ( // LocReliabilityUnspecified : reliability is not specified LocReliabilityUnspecified LocReliability = "not-set" // LocReliabilityVeryLow : very low reliability LocReliabilityVeryLow LocReliability = "very-low" // LocReliabilityLow : low reliability LocReliabilityLow LocReliability = "low" // LocReliabilityMedium : medium reliability LocReliabilityMedium LocReliability = "medium" // LocReliabilityHigh : high reliability LocReliabilityHigh LocReliability = "high" )
type LocalAppCommand ¶
type LocalAppCommand struct { // Command to execute. Command AppCommand // LocalServerTimestamp : timestamp made by the local server when the request was created. LocalServerTimestamp uint64 // DeviceTimestamp : timestamp made by EVE when the request was received. DeviceTimestamp time.Time // Completed is set to true by zedagent once the command completes. Completed bool // LastCompletedTimestamp : (server) timestamp of the last command completed for this app. // If Completed is true, then this happens to be the same as LocalServerTimestamp. LastCompletedTimestamp uint64 }
LocalAppCommand : An application command requested from a local server.
type LocalAppCounters ¶
type LocalAppCounters struct { // RestartCmd : contains counter counting how many restart requests have been submitted // via local server for this application in total (including uncompleted requests). RestartCmd AppInstanceOpsCmd // PurgeCounter : contains counter counting how many purge requests have been submitted // via local server for this application in total (including uncompleted requests). PurgeCmd AppInstanceOpsCmd }
LocalAppCounters : counters for locally issued application commands.
type LocalCommands ¶
type LocalCommands struct { // Locally issued app commands. // For every app there is entry only for the last command (completed // or still in progress). Previous commands are not remembered. AppCommands map[string]*LocalAppCommand // key: app UUID // Counters for locally issued app commands. AppCounters map[string]*LocalAppCounters // key: app UUID // Local volume generation counters. VolumeGenCounters map[string]int64 // key: volume UUID }
LocalCommands : commands triggered locally via Local profile server.
func (*LocalCommands) Empty ¶
func (lc *LocalCommands) Empty() bool
Empty : returns true if there were no commands triggered locally (for currently deployed apps and volumes).
type MaintenanceModeReason ¶
type MaintenanceModeReason uint8
MaintenanceModeReason captures reason for entering into maintenance mode
const ( MaintenanceModeReasonNone MaintenanceModeReason = iota MaintenanceModeReasonUserRequested MaintenanceModeReasonVaultLockedUp MaintenanceModeReasonNoDiskSpace )
MaintenanceModeReason codes for storing reason for getting into maintenance mode
func (MaintenanceModeReason) String ¶
func (mmr MaintenanceModeReason) String() string
String returns the verbose equivalent of MaintenanceModeReason code
type MemoryNotification ¶
type MemoryNotification struct { Total uint64 // Total memory in Bytes Used uint64 // Used memory in Bytes Zone UsageZone PrevUsage uint64 // Previous (last) memory usage in Bytes // Last 5 Usage percentage values // Most recent usage is at index 0, the next at index 1 and so on. LastFive []uint64 UsageSlab uint64 PrevSlab uint64 }
MemoryNotification :
func (MemoryNotification) LogCreate ¶
func (mem MemoryNotification) LogCreate(logBase *base.LogObject)
LogCreate :
func (MemoryNotification) LogDelete ¶
func (mem MemoryNotification) LogDelete(logBase *base.LogObject)
LogDelete :
func (MemoryNotification) LogModify ¶
func (mem MemoryNotification) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type MetaDataType ¶
type MetaDataType uint8
MetaDataType of metadata service for app must match the values in the proto definition
const ( MetaDataDrive MetaDataType = iota + 0 // Default MetaDataNone MetaDataOpenStack MetaDataDriveMultipart // Process multipart MIME for application )
types of metadata service for app if CloudInitUserData provided
func (MetaDataType) String ¶
func (metaDataType MetaDataType) String() string
String returns the string name
type MetricItem ¶
type MetricItem struct { Key string Type MetricItemType Value interface{} }
Mirrors proto definition for MetricItem The value can be bool, float, uint, or string
type MetricItemType ¶
type MetricItemType uint8
const ( MetricItemOther MetricItemType = iota // E.g., a string like an ESSID MetricItemGauge // Goes up and down over time MetricItemCounter // Monotonically increasing (until reboot) MetricItemState // Toggles on and off; count transitions )
type MetricsMap ¶
type MetricsMap map[string]ZedcloudMetric
MetricsMap maps from an ifname string to some metrics Note that there are no LogCreate etc functions for this type since it is published by logmanager and we don't want to cause logs when logging
func (MetricsMap) AddInto ¶
func (m MetricsMap) AddInto(toMap MetricsMap)
AddInto adds metrics from this instance of MetricsMap into the metrics map referenced by toMap.
type NIPortProbe ¶
type NIPortProbe struct { // EVE uses ICMP ping against the port's gateway IP to determine connectivity status. // User can disable this probe method. This is typically needed when the gateway router // is configured to drop/ignore ICMP pings and therefore this probe would return false // negatives. EnabledGwPing bool // Ports exceeding this cost will have the gateway probing disabled to reduce // traffic generated by probing (only less-frequent user-defined probe will be performed). GwPingMaxCost uint8 // User-defined method to use to determine the port connectivity status. // Zedrouter runs this additionally to gateway pings (unless EnabledGwPing is false). UserDefinedProbe ConnectivityProbe }
NIPortProbe is used to determine connectivity status of a port to decide if it is suitable for the default route of a network instance.
type NetworkInstanceConfig ¶
type NetworkInstanceConfig struct { UUIDandVersion DisplayName string Type NetworkInstanceType // Activate - Activate the config. Activate bool // PortLabel references port(s) from DevicePortConfig to use for external // connectivity. // Can be a specific logicallabel matching a single port, or a shared label, // such as "uplink", potentially matching multiple device ports. PortLabel string // IP configuration for the Application IpType AddressType Subnet net.IPNet Gateway net.IP DomainName string NtpServer net.IP DnsServers []net.IP // If not set we use Gateway as DNS server DhcpRange IPRange DnsNameToIPList []DNSNameToIP // Used for DNS and ACL ipset MTU uint16 // IP MTU // Route configuration PropagateConnRoutes bool StaticRoutes []IPRouteConfig // Enable flow logging for this network instance. // If enabled, EVE periodically captures metadata about all application TCP and UDP // flows, as well DNS queries. // It is recommended to disable flow logging by default. This is because it may // potentially produce a large amount of data, which is then uploaded to // the controller. Another drawback of flow-logging is that the iptables rules // that EVE installs for network instances are considerably more complicated // because of this feature and thus introduce additional packet processing overhead. EnableFlowlog bool // Spanning Tree Protocol configuration. // Only applied for Switch NI with multiple ports. STPConfig STPConfig // VLAN access ports configured for a switch network instance. // For other types of network instances, this option is ignored. // This setting applies to physical network ports attached to the network instance. // VLAN configuration for application interfaces is applied separately via AppNetAdapterConfig // (see AppNetAdapterConfig.AccessVlanID). VlanAccessPorts []VlanAccessPort // Any errors from the parser // ErrorAndTime provides SetErrorNow() and ClearError() ErrorAndTime }
NetworkInstanceConfig
Config Object for NetworkInstance Extracted from the protobuf NetworkInstanceConfig
func (*NetworkInstanceConfig) IsIPv6 ¶
func (config *NetworkInstanceConfig) IsIPv6() bool
IsIPv6 returns true if the address is IP version 6.
func (NetworkInstanceConfig) LogCreate ¶
func (config NetworkInstanceConfig) LogCreate(logBase *base.LogObject)
LogCreate :
func (NetworkInstanceConfig) LogDelete ¶
func (config NetworkInstanceConfig) LogDelete(logBase *base.LogObject)
LogDelete :
func (NetworkInstanceConfig) LogModify ¶
func (config NetworkInstanceConfig) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type NetworkInstanceInfo ¶
type NetworkInstanceInfo struct { BridgeNum int BridgeName string BridgeIPAddr net.IP BridgeMac net.HardwareAddr BridgeIfindex int // Collection of address assignments; from MAC address to IP address IPAssignments map[string]AssignedAddrs // Set of vifs on this bridge Vifs []VifNameMac // Maintain a map of all access vlan ids to their counts, used by apps // connected to this network instance. VlanMap map[uint32]uint32 // Counts the number of trunk ports attached to this network instance NumTrunkPorts uint32 }
NetworkInstanceInfo : info about created Network instance.
func (*NetworkInstanceInfo) AddVif ¶
func (instanceInfo *NetworkInstanceInfo) AddVif(log *base.LogObject, vifName string, appMac net.HardwareAddr, appID uuid.UUID)
AddVif : add VIF record into network instance info.
func (*NetworkInstanceInfo) IsVifInBridge ¶
func (instanceInfo *NetworkInstanceInfo) IsVifInBridge( vifName string) bool
IsVifInBridge checks if network instance already contains VIF with the given name.
type NetworkInstanceMetrics ¶
type NetworkInstanceMetrics struct { UUIDandVersion UUIDandVersion DisplayName string Type NetworkInstanceType BridgeName string NetworkMetrics NetworkMetrics ProbeMetrics []ProbeMetrics VlanMetrics VlanMetrics }
NetworkInstanceMetrics : metrics for a given network instance.
func (NetworkInstanceMetrics) LogCreate ¶
func (metrics NetworkInstanceMetrics) LogCreate(logBase *base.LogObject)
LogCreate :
func (NetworkInstanceMetrics) LogDelete ¶
func (metrics NetworkInstanceMetrics) LogDelete(logBase *base.LogObject)
LogDelete :
func (NetworkInstanceMetrics) LogKey ¶
func (metrics NetworkInstanceMetrics) LogKey() string
LogKey :
func (NetworkInstanceMetrics) LogModify ¶
func (metrics NetworkInstanceMetrics) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type NetworkInstanceStatus ¶
type NetworkInstanceStatus struct { NetworkInstanceConfig NetworkInstanceInfo // Error set when NI has invalid config. ValidationErr ErrorAndTime // Errors set when there are not enough resources to create the NI. AllocationErr ErrorAndTime // Make sure the Activate from the config isn't exposed as a boolean Activate uint64 // Activated is true if the network instance has been created in the network stack. Activated bool // ChangeInProgress is used to make sure that other microservices do not read // NI status until the latest Create/Modify/Delete operation completes. ChangeInProgress ChangeInProgressType // Error set when NI IP subnet overlaps with the subnet of one the device ports // or another NI. IPConflictErr ErrorAndTime // MTU configured for the network instance and app interfaces connected to it. // This can differ from the user-requested MTU in case it is invalid or conflicts // with the device port MTU. MTU uint16 // Error set when the MTU configured for NI is in conflict with the MTU configured // for the associated port (e.g. NI MTU is higher than MTU of an associated device // port). MTUConflictErr ErrorAndTime // Labels of device ports used for external connectivity. // The list is empty for air-gapped network instances. Ports []string // List of NTP servers published to applications connected to this network instance. // This includes the NTP server from the NI config (if any) and all NTP servers // associated with ports used by the network instance for external connectivity. NTPServers []net.IP // The intended state of the routing table. // Includes user-configured static routes and potentially also automatically // generated default route. IntendedRoutes []IPRouteStatus // The actual state of the routing table. // This includes connected routes (for ports, not bridge), DHCP-received routes, // user-defined static routes (NetworkInstanceConfig.static_routes) and the default // route (if any). Note that some user-defined static routes might not be applied // (and thus not reported here) if they do not match IP config of currently used // device ports. // Additionally, static routes with shared port labels (matching multiple ports) // are reported here each with the logical label of the (single) port, currently // selected for the route (selected based on connectivity status, port costs, wwan // signal strength, etc.). CurrentRoutes []IPRouteInfo // Error set when NI fails to use the configured device port(s) for whatever reason. PortErr ErrorAndTime // Error set when the network instance config reconciliation fails. ReconcileErr ErrorAndTime // Final error reported for the NetworkInstance to the controller. // It is a combination of all possible errors stored across *Err attributes. ErrorAndTime }
NetworkInstanceStatus
Config Object for NetworkInstance Extracted from the protobuf NetworkInstanceConfig
func (*NetworkInstanceStatus) CombineErrors ¶
func (status *NetworkInstanceStatus) CombineErrors() (combinedErr ErrorAndTime)
CombineErrors combines all errors raised for the network instance into one error.
func (NetworkInstanceStatus) EligibleForActivate ¶
func (status NetworkInstanceStatus) EligibleForActivate() bool
EligibleForActivate checks if there are no errors that prevent NI from being activated. Note that MTUConflictErr does not block NI activation. When the port and NI MTU are different, we flag the NI with an error but fall back to the port MTU and activate the NI with that MTU value. Also, route errors (IPRouteStatus.Error) are typically not very serious and do not block NI from being activated.
func (*NetworkInstanceStatus) IsIpAssigned ¶
func (status *NetworkInstanceStatus) IsIpAssigned(ip net.IP) bool
IsIpAssigned returns true if the given IP address is assigned to any app VIF.
func (NetworkInstanceStatus) LogCreate ¶
func (status NetworkInstanceStatus) LogCreate(logBase *base.LogObject)
LogCreate :
func (NetworkInstanceStatus) LogDelete ¶
func (status NetworkInstanceStatus) LogDelete(logBase *base.LogObject)
LogDelete :
func (NetworkInstanceStatus) LogModify ¶
func (status NetworkInstanceStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type NetworkInstanceType ¶
type NetworkInstanceType int32
NetworkInstanceType : type of network instance.
const ( NetworkInstanceTypeFirst NetworkInstanceType = 0 NetworkInstanceTypeSwitch NetworkInstanceType = 1 NetworkInstanceTypeLocal NetworkInstanceType = 2 NetworkInstanceTypeCloud NetworkInstanceType = 3 NetworkInstanceTypeHoneyPot NetworkInstanceType = 5 NetworkInstanceTypeTransparent NetworkInstanceType = 6 NetworkInstanceTypeLast NetworkInstanceType = 255 )
These values should be same as the ones defined in zconfig.ZNetworkInstType
type NetworkMetric ¶
type NetworkMetric struct { IfName string TxBytes uint64 RxBytes uint64 TxDrops uint64 RxDrops uint64 TxPkts uint64 RxPkts uint64 TxErrors uint64 RxErrors uint64 TxAclDrops uint64 // For implicit deny/drop at end RxAclDrops uint64 // For implicit deny/drop at end TxAclRateLimitDrops uint64 // For all rate limited rules RxAclRateLimitDrops uint64 // For all rate limited rules }
NetworkMetric : metrics for a given network interface.
type NetworkMetrics ¶
type NetworkMetrics struct { MetricList []NetworkMetric TotalRuleCount uint64 }
NetworkMetrics are for all adapters Matches networkMetrics protobuf message.
func (NetworkMetrics) LogCreate ¶
func (nms NetworkMetrics) LogCreate(logBase *base.LogObject)
LogCreate :
func (NetworkMetrics) LogDelete ¶
func (nms NetworkMetrics) LogDelete(logBase *base.LogObject)
LogDelete :
func (NetworkMetrics) LogModify ¶
func (nms NetworkMetrics) LogModify(logBase *base.LogObject, old interface{})
LogModify :
func (*NetworkMetrics) LookupNetworkMetrics ¶
func (nms *NetworkMetrics) LookupNetworkMetrics(ifName string) (NetworkMetric, bool)
LookupNetworkMetrics : get metrics collected for a given interface.
type NetworkPortConfig ¶
type NetworkPortConfig struct { IfName string USBAddr string PCIAddr string Phylabel string // Physical name set by controller/model Logicallabel string // SystemAdapter's name which is logical label in phyio // Unlike the logicallabel, which is defined in the device model and unique // for each port, these user-configurable "shared" labels are potentially // assigned to multiple ports so that they can be used all together with // some config object (e.g. multiple ports assigned to NI). // Some special shared labels, such as "uplink" or "freeuplink", are assigned // to particular ports automatically. Alias string // From SystemAdapter's alias // NetworkUUID - UUID of the Network Object configured for the port. NetworkUUID uuid.UUID IsMgmt bool // Used to talk to controller IsL3Port bool // True if port is applicable to operate on the network layer // InvalidConfig is used to flag port config which failed parsing or (static) validation // checks, such as: malformed IP address, undefined required field, IP address not inside // the subnet, etc. InvalidConfig bool Cost uint8 // Zero is free MTU uint16 DhcpConfig ProxyConfig L2LinkConfig WirelessCfg WirelessConfig // TestResults - Errors from parsing plus success/failure from testing TestResults }
NetworkPortConfig has the configuration and some status like TestResults for one IfName. XXX odd to have ParseErrors and/or TestResults here but we don't have a corresponding Status struct. Note that if fields are added the MostlyEqual function needs to be updated.
func (*NetworkPortConfig) UpdateEveDefinedSharedLabels ¶
func (port *NetworkPortConfig) UpdateEveDefinedSharedLabels()
UpdateEveDefinedSharedLabels updates EVE-defined shared labels that this port should have based on its properties.
type NetworkPortStatus ¶
type NetworkPortStatus struct { IfName string Phylabel string // Physical name set by controller/model Logicallabel string // Unlike the logicallabel, which is defined in the device model and unique // for each port, these user-configurable "shared" labels are potentially // assigned to multiple ports so that they can be used all together with // some config object (e.g. multiple ports assigned to NI). // Some special shared labels, such as "uplink" or "freeuplink", are assigned // to particular ports automatically. Alias string // From SystemAdapter's alias IsMgmt bool // Used to talk to controller IsL3Port bool // True if port is applicable to operate on the network layer // InvalidConfig is used to flag port config which failed parsing or (static) validation // checks, such as: malformed IP address, undefined required field, IP address not inside // the subnet, etc. InvalidConfig bool Cost uint8 Dhcp DhcpType Type NetworkType // IPv4 or IPv6 or Dual stack Subnet net.IPNet NtpServer net.IP // This comes from network configuration DomainName string DNSServers []net.IP // If not set we use Gateway as DNS server NtpServers []net.IP // This comes from DHCP done on uplink port AddrInfoList []AddrInfo Up bool MacAddr net.HardwareAddr DefaultRouters []net.IP MTU uint16 WirelessCfg WirelessConfig WirelessStatus WirelessStatus ProxyConfig L2LinkConfig // TestResults provides recording of failure and success TestResults }
func GetPort ¶
func GetPort(dns DeviceNetworkStatus, ifname string) *NetworkPortStatus
func (NetworkPortStatus) HasIPAndDNS ¶
func (port NetworkPortStatus) HasIPAndDNS() bool
HasIPAndDNS - Check if the given port has a valid unicast IP along with DNS & Gateway.
type NetworkProxyType ¶
type NetworkProxyType uint8
NetworkProxyType is used to differentiate proxies for different network protocols.
const ( NetworkProxyTypeHTTP NetworkProxyType = iota NetworkProxyTypeHTTPS NetworkProxyTypeSOCKS NetworkProxyTypeFTP NetworkProxyTypeNOPROXY NetworkProxyTypeLAST = 255 )
Values if these definitions should match the values given to the types in zapi.ProxyProto
type NetworkType ¶
type NetworkType uint8
NetworkType decided IP version(s) that EVE should use for a given network port.
const ( // NetworkTypeNOOP : network type is undefined. NetworkTypeNOOP NetworkType = 0 // NetworkTypeIPv4 : IPv4 addresses. NetworkTypeIPv4 NetworkType = 4 // NetworkTypeIPV6 : IPv6 addresses. NetworkTypeIPV6 NetworkType = 6 // NetworkTypeIpv4Only : IPv4 addresses only NetworkTypeIpv4Only NetworkType = 5 // NetworkTypeIpv6Only : IPv6 addresses only NetworkTypeIpv6Only NetworkType = 7 // NetworkTypeDualStack : Run with dual stack NetworkTypeDualStack NetworkType = 8 )
type NetworkXObjectConfig ¶
type NetworkXObjectConfig struct { UUID uuid.UUID Type NetworkType Dhcp DhcpType // If DhcpTypeStatic or DhcpTypeClient use below Subnet net.IPNet Gateway net.IP DomainName string NTPServer net.IP DNSServers []net.IP // If not set we use Gateway as DNS server DhcpRange IPRange DNSNameToIPList []DNSNameToIP // Used for DNS and ACL ipset Proxy *ProxyConfig WirelessCfg WirelessConfig MTU uint16 // Any errors from the parser // ErrorAndTime provides SetErrorNow() and ClearError() ErrorAndTime }
NetworkXObjectConfig is extracted from the protobuf NetworkConfig. Used by zedagent as an intermediate structure when parsing network config from protobuf API into DevicePortConfig. XXX replace by inline once we have device model
func (NetworkXObjectConfig) Key ¶
func (config NetworkXObjectConfig) Key() string
func (NetworkXObjectConfig) LogCreate ¶
func (config NetworkXObjectConfig) LogCreate(logBase *base.LogObject)
LogCreate :
func (NetworkXObjectConfig) LogDelete ¶
func (config NetworkXObjectConfig) LogDelete(logBase *base.LogObject)
LogDelete :
func (NetworkXObjectConfig) LogModify ¶
func (config NetworkXObjectConfig) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type NewlogMetrics ¶
type NewlogMetrics struct { // logupload signal to newlogd FailedToSend bool // loguploader failed to send to cloud FailSentStartTime time.Time // failed to send start time LastTooManyReqTime time.Time // last response of status 429 // from loguploader TotalBytesUpload uint64 // total number of bytes uploaded to cloud Num4xxResponses uint32 // total 4xx response received NumTooManyRequest uint32 // total 429 response received CurrUploadIntvSec uint32 // current upload interval in second LogfileTimeoutSec uint32 // logfile delay time in second MaxGzipSize uint32 // largest gzip file size created AvgGzipSize uint32 // average gzip file size // from newlogd NumGZipFileRemoved uint32 // number of gzip file removed due to exceeding quota NumBreakGZipFile uint32 // total number of gzip file too large needs breakup NumSkipUploadAppFile uint32 // total number of gzip app file skipped upload NumKmessages uint64 // total input kmessages NumSyslogMessages uint64 // total input syslog message DevTop10InputBytesPCT map[string]uint32 // top 10 sources device log input in percentage // upload latency Latency cloudDelay // server side ServerStats serverStats // Dev and App file metrics DevMetrics logfileMetrics // Device metrics AppMetrics logfileMetrics // App metrics }
NewlogMetrics - Metrics from newlogd and loguploader
type NodeAgentStatus ¶
type NodeAgentStatus struct { Name string CurPart string UpdateInprogress bool RemainingTestTime time.Duration DeviceReboot bool DeviceShutdown bool DevicePoweroff bool AllDomainsHalted bool // Progression of reboot etc RebootReason string // From last reboot BootReason BootReason // From last reboot RebootStack string // From last reboot RebootTime time.Time // From last reboot RestartCounter uint32 RebootImage string LocalMaintenanceMode bool //enter Maintenance Mode LocalMaintenanceModeReason MaintenanceModeReason //reason for Maintenance Mode HVTypeKube bool }
NodeAgentStatus :
func (NodeAgentStatus) LogCreate ¶
func (status NodeAgentStatus) LogCreate(logBase *base.LogObject)
LogCreate :
func (NodeAgentStatus) LogDelete ¶
func (status NodeAgentStatus) LogDelete(logBase *base.LogObject)
LogDelete :
func (NodeAgentStatus) LogModify ¶
func (status NodeAgentStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type OldGlobalConfig ¶
type OldGlobalConfig struct { ConfigInterval uint32 // Try get of device config MetricInterval uint32 // push metrics to cloud ResetIfCloudGoneTime uint32 // reboot if no cloud connectivity FallbackIfCloudGoneTime uint32 // ... and shorter during update MintimeUpdateSuccess uint32 // time before zedagent declares success DownloadGCTime uint32 // Garbage collect if no use VdiskGCTime uint32 // Garbage collect RW disk if no use DownloadRetryTime uint32 // Retry failed download after N sec DomainBootRetryTime uint32 // Retry failed boot after N sec // Control NIM testing behavior: In seconds NetworkGeoRedoTime uint32 // Periodic IP geolocation NetworkGeoRetryTime uint32 // Redo IP geolocation failure NetworkTestDuration uint32 // Time we wait for DHCP to complete NetworkTestInterval uint32 // Re-test DevicePortConfig NetworkTestBetterInterval uint32 // Look for better DevicePortConfig NetworkFallbackAnyEth TriState // When no connectivity try any Ethernet, wlan, and wwan NetworkTestTimeout uint32 // Timeout for each test http/send // zedagent, etc NetworkSendTimeout uint32 // Timeout for each http/send // UsbAccess // Determines if Dom0 can use USB devices. // If false: // USB devices can only be passed through to the applications // ( pciBack=true). The devices are in pci-assignable-list // If true: // dom0 can use these devices as well. // All USB devices will be assigned to dom0. pciBack=false. // But these devices are still available in pci-assignable-list. UsbAccess bool // Normal operation is to SshAuthorizedKeys from EVE build or using // the configItem. SshAccess is used to enable/disable the filter. SshAccess bool SshAuthorizedKeys string AllowAppVnc bool // Dom0MinDiskUsagePercent - Percentage of available storage reserved for // dom0. The rest is available for Apps. Dom0MinDiskUsagePercent uint32 IgnoreMemoryCheckForApps bool IgnoreDiskCheckForApps bool DefaultLogLevel string DefaultRemoteLogLevel string // Per agent settings of log levels; if set for an agent it // overrides the Default*Level above AgentSettings map[string]PerAgentSettings }
OldGlobalConfig - Legacy version of global config. Kept for upgradeconverter
func ApplyDefaults ¶
func ApplyDefaults(newgc OldGlobalConfig) OldGlobalConfig
ApplyDefaults - applies defaults to an old global config
func EnforceGlobalConfigMinimums ¶
func EnforceGlobalConfigMinimums(newgc OldGlobalConfig) OldGlobalConfig
func (OldGlobalConfig) MoveBetweenConfigs ¶
func (config OldGlobalConfig) MoveBetweenConfigs() *ConfigItemValueMap
MoveBetweenConfigs - converts old config to new config
type OnboardingStatus ¶
OnboardingStatus - UUID, etc. advertised by client process
func (OnboardingStatus) Key ¶
func (status OnboardingStatus) Key() string
Key returns the key for pubsub
func (OnboardingStatus) LogCreate ¶
func (status OnboardingStatus) LogCreate(logBase *base.LogObject)
LogCreate :
func (OnboardingStatus) LogDelete ¶
func (status OnboardingStatus) LogDelete(logBase *base.LogObject)
LogDelete :
func (OnboardingStatus) LogModify ¶
func (status OnboardingStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type PCRExtendHashType ¶
type PCRExtendHashType uint8
PCRExtendHashType carries the hash algo used in PCR Extend operation
const ( PCRExtendHashAlgoNone PCRExtendHashType = iota + 0 PCRExtendHashAlgoSha1 PCRExtendHashAlgoSha256 )
PCR Extend Hash Algorithm used
type PCRValue ¶
type PCRValue struct { Index uint8 Algo PCRExtendHashType Digest []byte }
PCRValue contains value of single PCR
type PatchEnvelopeInfo ¶
type PatchEnvelopeInfo struct { Name string Version string AllowedApps []string PatchID string Errors []string State PatchEnvelopeState BinaryBlobs []BinaryBlobCompleted VolumeRefs []BinaryBlobVolumeRef }
PatchEnvelopeInfo - information about patch envelopes
func (*PatchEnvelopeInfo) Size ¶
func (pe *PatchEnvelopeInfo) Size() (size int64)
Size returns sum of all sizes of BinaryBlobs of given PatchEnvelope
type PatchEnvelopeInfoList ¶
type PatchEnvelopeInfoList struct {
Envelopes []PatchEnvelopeInfo
}
PatchEnvelopeInfoList will be shared with zedrouter after parsing in zedagent
func (*PatchEnvelopeInfoList) FindPatchEnvelopeByID ¶
func (pe *PatchEnvelopeInfoList) FindPatchEnvelopeByID(patchID string) *PatchEnvelopeInfo
FindPatchEnvelopeByID returns patch envelope with given patchId
func (*PatchEnvelopeInfoList) Get ¶
func (pe *PatchEnvelopeInfoList) Get(appUUID string) PatchEnvelopeInfoList
Get returns list of patch envelopes, which are available to appUUID
type PatchEnvelopeState ¶
type PatchEnvelopeState int32
PatchEnvelopeState repeats constants from patch_envelope.pb.go from info API
const ( // PatchEnvelopeStateError - there is an error with config or during download // or verification failed PatchEnvelopeStateError PatchEnvelopeState = iota // PatchEnvelopeStateRecieved - configuration received but no downloads started PatchEnvelopeStateRecieved // PatchEnvelopeStateDownloading - artifact/Volume download started // One or more of the artifacts are being downloaded PatchEnvelopeStateDownloading // PatchEnvelopeStateDownloaded - all downloads finished, verified and added to content tree PatchEnvelopeStateDownloaded // PatchEnvelopeStateReady - patch envelope ready for application instances // application instances will still not be // allowed to fetch the patch envelope contents PatchEnvelopeStateReady // PatchEnvelopeStateActive - application instances are now allowed to fetch contents PatchEnvelopeStateActive )
type PatchEnvelopeUsage ¶
type PatchEnvelopeUsage struct { AppUUID string PatchID string Version string // count the number of times app instance called patch APIs PatchAPICallCount uint64 // count the number of times app instance actually downloaded // whole patch envelope or part of it DownloadCount uint64 }
PatchEnvelopeUsage stores information on how patchEnvelopes are used by App Instances to send this information back to controller reflects ZInfoPatchEnvelopeUsage proto message
func PatchEnvelopeUsageFromInfo ¶
func PatchEnvelopeUsageFromInfo(peInfo PatchEnvelopeInfo) []PatchEnvelopeUsage
PatchEnvelopeUsageFromInfo returns PatchEnvelopeUsage structure from PatchEnvelopeInfo struct
type PerAgentSettings ¶
type PersistType ¶
type PersistType uint8
PersistType is type of persist we use
const ( PersistUnknown PersistType = iota PersistExt3 PersistExt4 PersistZFS )
Enum of PersistType variants
func ParsePersistType ¶
func ParsePersistType(persistFsString string) PersistType
ParsePersistType process provided string and returns PersistType
func (PersistType) String ¶
func (p PersistType) String() string
returns string representation of PersistType
type PhyIOUsagePolicy ¶
type PhyIOUsagePolicy struct { // FreeUplink is needed while we transition to just a Cost integer FreeUplink bool }
PhyIOUsagePolicy - Usage policy for the Adapter This is constructed from api/proto/config/devmodel.proto PhyIOUsagePolicy Keep the two structures consistent
type PhysicalAddress ¶
type PhysicalAddress struct { PciLong string Ifname string Serial string Irq string Ioports string UsbAddr string UsbProduct string // unknownType - If a type in config is unknown, store it here. UnknownType string }
PhysicalAddress - Structure that represents various attributes related to the addressing of the Adapter
type PhysicalIOAdapter ¶
type PhysicalIOAdapter struct { Ptype zcommon.PhyIoType // Type of IO Device Phylabel string // Label printed on the enclosure Phyaddr PhysicalAddress Logicallabel string // Label assigned by model creator Assigngrp string Parentassigngrp string Usage zcommon.PhyIoMemberUsage UsagePolicy PhyIOUsagePolicy Vfs sriov.VFList // Used only for Physical Functions PFs Cbattr map[string]string // Used for additional attributes }
PhysicalIOAdapter - Object used to store Adapter configuration (L1) from controller for each Adapter.
type PhysicalIOAdapterList ¶
type PhysicalIOAdapterList struct { Initialized bool AdapterList []PhysicalIOAdapter }
PhysicalIOAdapterList - List of Physical Adapters to be used on the device by EVE from the controller
func (PhysicalIOAdapterList) Key ¶
func (ioAdapterList PhysicalIOAdapterList) Key() string
Key returns the key for pubsub
func (PhysicalIOAdapterList) LogCreate ¶
func (ioAdapterList PhysicalIOAdapterList) LogCreate(logBase *base.LogObject)
LogCreate :
func (PhysicalIOAdapterList) LogDelete ¶
func (ioAdapterList PhysicalIOAdapterList) LogDelete(logBase *base.LogObject)
LogDelete :
func (PhysicalIOAdapterList) LogKey ¶
func (ioAdapterList PhysicalIOAdapterList) LogKey() string
LogKey :
func (PhysicalIOAdapterList) LogModify ¶
func (ioAdapterList PhysicalIOAdapterList) LogModify(logBase *base.LogObject, old interface{})
LogModify :
func (*PhysicalIOAdapterList) LookupAdapter ¶
func (ioAdapterList *PhysicalIOAdapterList) LookupAdapter( phylabel string) *PhysicalIOAdapter
LookupAdapter - look up an Adapter by its phylabel
type PodVIF ¶
type PodVIF struct { GuestIfName string IPAM cnirpc.PodIPAMConfig }
PodVIF : configuration parameters for VIF connecting Kubernetes pod with the host.
type PoolStatus ¶
type PoolStatus uint32
PoolStatus type value from ZFS
const ( PoolStatusUnspecified PoolStatus = iota // Unspecified PoolStatusCorruptCache // PoolStatusCorruptCache - corrupt /kernel/drv/zpool.cache PoolStatusMissingDevR // missing device with replicas PoolStatusMissingDevNr // missing device with no replicas PoolStatusCorruptLabelR // bad device label with replicas PoolStatusCorruptLabelNr // bad device label with no replicas PoolStatusBadGUIDSum // sum of device guids didn't match PoolStatusCorruptPool // pool metadata is corrupted PoolStatusCorruptData // data errors in user (meta)data PoolStatusFailingDev // device experiencing errors PoolStatusVersionNewer // newer on-disk version PoolStatusHostidMismatch // last accessed by another system PoolStatusHosidActive // currently active on another system PoolStatusHostidRequired // multihost=on and hostid=0 PoolStatusIoFailureWait // failed I/O, failmode 'wait' PoolStatusIoFailureContinue // failed I/O, failmode 'continue' PoolStatusIOFailureMMP // ailed MMP, failmode not 'panic' PoolStatusBadLog // cannot read log chain(s) PoolStatusErrata // informational errata available PoolStatusUnsupFeatRead // If the pool has unsupported features but cannot be opened at all, its status is ZPOOL_STATUS_UNSUP_FEAT_READ. PoolStatusUnsupFeatWrite // If the pool has unsupported features but can still be opened in read-only mode, its status is ZPOOL_STATUS_UNSUP_FEAT_WRITE PoolStatusFaultedDevR // faulted device with replicas PoolStatusFaultedDevNr // faulted device with no replicas PoolStatusVersionOlder // older legacy on-disk version PoolStatusFeatDisabled // supported features are disabled PoolStatusResilvering // device being resilvered PoolStatusOfflineDev // device offline PoolStatusRemovedDev // removed device PoolStatusRebuilding // device being rebuilt PoolStatusRebuildScrub // recommend scrubbing the pool PoolStatusNonNativeAshift // (e.g. 512e dev with ashift of 9) PoolStatusCompatibilityErr // bad 'compatibility' property PoolStatusIncompatibleFeat // feature set outside compatibility PoolStatusOk // the indicates a healthy pool. )
PoolStatus value.
The following correspond to faults as defined in enum zfs_error in the libzfs.h header file. But we add +1 to their values to that we can have a Unspecified=0 value to follow our conventions. Basically that the definitions should follow that in the (fault.fs.zfs.*) event namespace.
type ProbeIntfMetrics ¶
type ProbeIntfMetrics struct { IntfName string // interface name of the probed device port NexthopIPs []net.IP // interface local next-hop address(es) used for probing NexthopUP bool // Is local next-hop in UP status RemoteUP bool // Is remote endpoint in UP status NexthopUPCnt uint32 // local ping UP count NexthopDownCnt uint32 // local ping DOWN count RemoteUPCnt uint32 // remote probe UP count RemoteDownCnt uint32 // remote probe DOWN count LatencyToRemote uint32 // probe latency to remote in msec }
ProbeIntfMetrics - probe metrics for a device port (reported for a given NI)
type ProbeMetrics ¶
type ProbeMetrics struct { // Address of the destination network for which probing is used to select // the output port. DstNetwork string // Logical label of the currently selected output port for the route. SelectedPort string SelectedPortIfName string // interface name of the port that probing picked RemoteEndpoints []string // remote IP/URL addresses used for probing LocalPingIntvl uint32 // local ping interval in seconds RemotePingIntvl uint32 // remote probing interval in seconds PortCount uint32 // number of ports included in probing IntfProbeStats []ProbeIntfMetrics // metrics for all ports included in probing }
ProbeMetrics - metrics published for a NI multipath route with probing-based selection of the output port.
type ProcessMetric ¶
type ProcessMetric struct { Pid int32 Name string UserProcess bool Watched bool // watched by watchdog NumFDs int32 NumThreads int32 UserTime float64 // CPU seconds since create SystemTime float64 // CPU seconds since create CPUPercent float64 // UserTime and SystemTime provide time series CreateTime time.Time VMBytes uint64 RssBytes uint64 MemoryPercent float32 Stack string }
ProcessMetric captures information for a single process
func (ProcessMetric) LogCreate ¶
func (metric ProcessMetric) LogCreate(logBase *base.LogObject)
LogCreate :
func (ProcessMetric) LogDelete ¶
func (metric ProcessMetric) LogDelete(logBase *base.LogObject)
LogDelete :
func (ProcessMetric) LogModify ¶
func (metric ProcessMetric) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type ProxyConfig ¶
type ProxyConfig struct { Proxies []ProxyEntry Exceptions string Pacfile string // If Enable is set we use WPAD. If the URL is not set we try // the various DNS suffixes until we can download a wpad.dat file NetworkProxyEnable bool // Enable WPAD NetworkProxyURL string // Complete URL i.e., with /wpad.dat WpadURL string // The URL determined from DNS // List of certs which will be added to TLS trust ProxyCertPEM [][]byte `json:"pubsub-large-ProxyCertPEM"` //nolint:tagliatelle }
ProxyConfig : proxy configuration for a network port.
type ProxyEntry ¶
type ProxyEntry struct { Type NetworkProxyType `json:"type"` Server string `json:"server"` Port uint32 `json:"port"` }
ProxyEntry is used to store address of a single network proxy.
type RadioSilence ¶
type RadioSilence struct { // If true, all radio devices are switched off. Imposed bool // ChangeInProgress is true if change in the radio state is still in-progress. ChangeInProgress bool // Time when the last change in the radio state was requested (by a local profile server). ChangeRequestedAt time.Time // If the last radio configuration change failed, error message is reported here. ConfigError string }
RadioSilence : used in ZedAgentStatus to record the *requested* state of radio devices. Also used in DeviceNetworkStatus to publish the *actual* state of radios. InProgress is used to wait for the operation changing the radio state to finalize before publishing the status update. RequestedAt is used to match the request published by zedagent with the response published by nim.
When zedagent receives new radio configuration from the local profile server, it publishes new ZedAgentStatus with RadioSilence.ChangeRequestedAt set to time.Now(), RadioSilence.ChangeInProgress set to true and RadioSilence.Imposed copying RadioConfig.RadioSilence (true or false). When nim receives ZedAgentStatus, it checks if ChangeRequestedAt is greater than the timestamp of the last seen radio configuration change. If it is the case, it copies ChangeRequestedAt and ChangeInProgress (=true) from ZedAgentStatus. RadioSilence to DeviceNetworkStatus.RadioSilence and starts switching radios of wireless devices ON/OFF (in cooperation with wwan service). Once nim is done with all radio devices, it updates RadioSilence of DeviceNetworkStatus and sets ChangeInProgress to false and Imposed to reflect the actual radio state (could be different from the intended state if operation failed). When zedagent sees DeviceNetworkStatus with RadioSilence where CHangeRequestedAt equals the last configuration request time and ChangeInProgress has changed to false, it knows that the operation has finalized and it can publish the status up to the local profile server. Note that while ChangeInProgress is true, zedagent is neither publishing radio status nor obtaining configuration updates from the local profile server.
func (RadioSilence) String ¶
func (am RadioSilence) String() string
String prints the currently imposed state for radio transmitting. Note: to print the whole structure (including Change* and ConfigError fields), use %#v as the formatting directive.
type ResolveConfig ¶
ResolveConfig key/index to this is the combination of DatastoreID which is allocated by the controller, name and the sequence counter. It will resolve the tag in name to sha256
func (ResolveConfig) Key ¶
func (config ResolveConfig) Key() string
Key : DatastoreID, name and sequence counter are used to differentiate different config
func (ResolveConfig) LogCreate ¶
func (config ResolveConfig) LogCreate(logBase *base.LogObject)
LogCreate :
func (ResolveConfig) LogDelete ¶
func (config ResolveConfig) LogDelete(logBase *base.LogObject)
LogDelete :
func (ResolveConfig) LogModify ¶
func (config ResolveConfig) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type ResolveStatus ¶
type ResolveStatus struct { DatastoreID uuid.UUID Name string ImageSha256 string Counter uint32 RetryCount int // ErrorAndTime provides SetErrorNow() and ClearError() ErrorAndTime // We save the original error when we do a retry OrigError string }
ResolveStatus key/index to this is the combination of DatastoreID, name and the sequence counter which comes from the ResolveConfig
func (ResolveStatus) Key ¶
func (status ResolveStatus) Key() string
Key : DatastoreID, name and sequence counter are used to differentiate different config
func (ResolveStatus) LogCreate ¶
func (status ResolveStatus) LogCreate(logBase *base.LogObject)
LogCreate :
func (ResolveStatus) LogDelete ¶
func (status ResolveStatus) LogDelete(logBase *base.LogObject)
LogDelete :
func (ResolveStatus) LogModify ¶
func (status ResolveStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type STPConfig ¶
type STPConfig struct { // Either a single NI port referenced by its name (SystemAdapter.Name, aka logical label) // or an adapter shared-label matching zero or more NI ports. PortsWithBpduGuard string }
STPConfig : Spanning Tree Protocol configuration. Only applied for Switch NI with multiple ports.
type SenderStatus ¶
type SenderStatus uint8
SenderStatus - Enum to further clarify the reason for failed SendOnAllIntf/SendOnIntf
const ( SenderStatusNone SenderStatus = iota SenderStatusRefused // ECNNREFUSED SenderStatusUpgrade // 503 indicating controller upgrade in progress SenderStatusCertInvalid // Server cert expired or NotBefore; device might have wrong time SenderStatusCertMiss // remote signed senderCertHash we don't have SenderStatusSignVerifyFail // envelope signature verify failed SenderStatusAlgoFail // hash algorithm we don't support SenderStatusHashSizeError // senderCertHash length error SenderStatusCertUnknownAuthority // device may miss proxy certificate for MiTM SenderStatusCertUnknownAuthorityProxy // device configured proxy, may miss proxy certificate for MiTM SenderStatusNotFound // 404 indicating device might have been deleted in controller SenderStatusForbidden // 403 indicating integrity token might invalidated SenderStatusFailed // Other failure SenderStatusDebug // Not a failure )
Enum of http extra status for 'rtf'
type ServiceInitStatus ¶
ServiceInitStatus used to track/notify service init in zedbox
func (ServiceInitStatus) LogCreate ¶
func (s ServiceInitStatus) LogCreate(logBase *base.LogObject)
LogCreate :
func (ServiceInitStatus) LogDelete ¶
func (s ServiceInitStatus) LogDelete(logBase *base.LogObject)
LogDelete :
func (ServiceInitStatus) LogModify ¶
func (s ServiceInitStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type SimType ¶
type SimType int32
SimType : type of the SIM card.
const ( // SimTypeUnspecified : SIM card type is not specified/known. SimTypeUnspecified SimType = iota // SimTypePhysical : physical SIM card. SimTypePhysical // SimTypeEmbedded : embedded SIM card (eSIM). SimTypeEmbedded )
The values here should be same as the ones defined in info.proto of EVE API.
type SnapshotConfig ¶
type SnapshotConfig struct { ActiveSnapshot string // UUID of the active snapshot used by the app instance MaxSnapshots uint32 // Number of snapshots that may be created for the app instance RollbackCmd AppInstanceOpsCmd // Command to roll back the app instance to the active snapshot Snapshots []SnapshotDesc // List of snapshots known to the controller at the moment }
SnapshotConfig configuration of the snapshot handling for the app instance
type SnapshotDesc ¶
type SnapshotDesc struct { SnapshotID string // UUID of the snapshot SnapshotType SnapshotType // Type of the snapshot creation trigger }
SnapshotDesc a description of a snapshot instance
type SnapshotInstanceStatus ¶
type SnapshotInstanceStatus struct { // Snapshot contains the snapshot description Snapshot SnapshotDesc `mandatory:"true"` // Reported indicates if the snapshot has been reported to the controller Reported bool // TimeTriggered is the time when the snapshot was triggered. At the moment, it is used to check if the snapshot has // already been triggered. Later it can be used to order the snapshots for example in the case of choosing the // snapshot to be deleted. TimeTriggered time.Time // TimeCreated is the time when the snapshot was created. It's reported by FS-specific snapshot creation code. TimeCreated time.Time // AppInstanceID is the UUID of the app instance the snapshot belongs to AppInstanceID uuid.UUID `mandatory:"true"` // ConfigVersion is the version of the app instance config at the moment of the snapshot creation // It is reported to the controller, so it can use the proper config to roll back the app instance ConfigVersion UUIDandVersion `mandatory:"true"` // Error indicates if snapshot deletion or a rollback to the snapshot failed Error ErrorDescription }
SnapshotInstanceStatus status of a snapshot instance. Used as a zedmanager-level representation of a snapshot
type SnapshotType ¶
type SnapshotType int32
SnapshotType type of the snapshot creation trigger Must match the definition in appconfig.proto
const ( // SnapshotTypeUnspecified is the default value, and should not be used in practice SnapshotTypeUnspecified SnapshotType = 0 // SnapshotTypeAppUpdate is used when the snapshot is created as a result of an app update SnapshotTypeAppUpdate SnapshotType = 1 )
func (SnapshotType) ConvertToInfoSnapshotType ¶
func (s SnapshotType) ConvertToInfoSnapshotType() info.SnapshotType
ConvertToInfoSnapshotType converts from SnapshotType to info.SnapshotType
func (SnapshotType) String ¶
func (s SnapshotType) String() string
type SnapshottingStatus ¶
type SnapshottingStatus struct { // MaxSnapshots indicates the maximum number of snapshots to be kept for the app instance. MaxSnapshots uint32 // RequestedSnapshots contains the list of snapshots to be taken for the app instance. RequestedSnapshots []SnapshotInstanceStatus // AvailableSnapshots contains the list of snapshots available for the app instance. AvailableSnapshots []SnapshotInstanceStatus // SnapshotsToBeDeleted contains the list of snapshots to be deleted for the app instance. SnapshotsToBeDeleted []SnapshotDesc // PreparedVolumesSnapshotConfigs contains the list of snapshots to be triggered for the app instance. PreparedVolumesSnapshotConfigs []VolumesSnapshotConfig // SnapshotOnUpgrade indicates whether a snapshot should be taken during the app instance update. SnapshotOnUpgrade bool // HasRollbackRequest indicates whether there are any rollback requests for the app instance. // Set to true when a rollback is requested by controller, set to false when the rollback is triggered. HasRollbackRequest bool // ActiveSnapshot contains the id of the snapshot to be used for the rollback. ActiveSnapshot string // RollbackInProgress indicates whether a rollback is in progress for the app instance. // Set to true when a rollback is triggered, set to false when the rollback is completed. RollbackInProgress bool }
SnapshottingStatus contains the snapshot information for the app instance.
type StorageChildren ¶
type StorageChildren struct { DisplayName string CurrentRaid StorageRaidType // GUID - a unique value for the binding. // Since the DisplayName may not be unique. This may be important // for accurate matching with other information. // Actual case only for RAID or Mirror. GUID uint64 Disks []*StorageDiskState Children []*StorageChildren }
StorageChildren stores children of zfs pool
type StorageChildrenMetrics ¶
type StorageChildrenMetrics struct { DisplayName string // GUID - a unique value for the binding. // Since the DisplayName may not be unique. GUID uint64 // Metrics from ZFS. Displays the sum of metrics from all disks it consists of. Metrics *ZFSVDevMetrics Disks []*StorageDiskMetrics Children []*StorageChildrenMetrics }
StorageChildrenMetrics stores metrics for children of zfs pool
type StorageDiskMetrics ¶
type StorageDiskMetrics struct { DiskName *DiskDescription Metrics *ZFSVDevMetrics // metrics for disk from ZFS and /proc/diskstats }
StorageDiskMetrics represent metrics of disk
type StorageDiskState ¶
type StorageDiskState struct { DiskName *DiskDescription Status StorageStatus AuxState VDevAux AuxStateStr string // AuxState in string format }
StorageDiskState represent state of disk
type StorageRaidType ¶
type StorageRaidType int32
StorageRaidType indicates storage raid type
const ( StorageRaidTypeUnspecified StorageRaidType = 0 StorageRaidTypeRAID0 StorageRaidType = 1 // RAID-0 StorageRaidTypeRAID1 StorageRaidType = 2 // Mirror StorageRaidTypeRAID5 StorageRaidType = 3 // raidz1 (RAID-5) StorageRaidTypeRAID6 StorageRaidType = 4 // raidz2 (RAID-6) StorageRaidTypeRAID7 StorageRaidType = 5 // raidz3 (RAID-7) StorageRaidTypeNoRAID StorageRaidType = 6 // without RAID )
StorageRaidType enum should be in sync with info api
type StorageStatus ¶
type StorageStatus int32
StorageStatus indicates current status of storage
const ( StorageStatusUnspecified StorageStatus = 0 StorageStatusOnline StorageStatus = 1 // The device or virtual device is in normal working order. StorageStatusDegraded StorageStatus = 2 // The virtual device has experienced a failure but can still function. StorageStatusFaulted StorageStatus = 3 // The device or virtual device is completely inaccessible. StorageStatusOffline StorageStatus = 4 // The device has been explicitly taken offline by the administrator. StorageStatusRemoved StorageStatus = 6 // The device was physically removed while the system was running. StorageStatusSuspended StorageStatus = 7 // A pool that is waiting for device connectivity to be restored. )
StorageStatus enum should be in sync with info api
type StorageZVolMetrics ¶
type StorageZVolMetrics struct { VolumeID uuid.UUID // From VolumeStatus.VolumeID. Ex: c546e61f-ffd9-406e-9074-8b19b417510d Metrics *ZFSVDevMetrics // Metrics for zdev from /proc/diskstats }
StorageZVolMetrics stores metrics for zvol (/dev/zd*)
type SwState ¶
type SwState uint8
SwState started with enum names from OMA-TS-LWM2M_SwMgmt-V1_0-20151201-C but now has many additions. They are in order of progression We map this to info.ZSwState
const ( // INITIAL is 100 to be able to tell any confusion with ZSwState INITIAL SwState = iota + 100 // Initial value RESOLVING_TAG // Resolving an image tag RESOLVED_TAG // Tag has been resolved or resolution failed DOWNLOADING DOWNLOADED VERIFYING VERIFIED LOADING LOADED CREATING_VOLUME // Volume create in progress CREATED_VOLUME // Volume create done or failed INSTALLED // Available to be activated AWAITNETWORKINSTANCE START_DELAYED // Domain start is delayed to due to StartDelay being honored. BOOTING RUNNING PAUSING PAUSED HALTING // being halted HALTED BROKEN // BROKEN means domain is still alive, but its device model has failed UNKNOWN // UNKNOWN means state of the domain can't be determined // PENDING to start PENDING // SCHEDULING waiting to be scheduled SCHEDULING // FAILED to start FAILED MAXSTATE )
type Task ¶
type Task interface { Setup(DomainStatus, DomainConfig, *AssignableAdapters, *ConfigItemValueMap, *os.File) error VirtualTPMSetup(domainName string, wp *WatchdogParam) error VirtualTPMTerminate(domainName string, wp *WatchdogParam) error VirtualTPMTeardown(domainName string, wp *WatchdogParam) error Create(string, string, *DomainConfig) (int, error) Start(string) error Stop(string, bool) error Delete(string) error Info(string) (int, SwState, error) Cleanup(string) error }
Task represents any runnable entity on EVE
type TestResults ¶
type TestResults struct { LastFailed time.Time LastSucceeded time.Time LastError string // Set when LastFailed is updated LastWarning string // test succeeded but there is a potential issue }
TestResults is used to record when some test Failed or Succeeded. All zeros timestamps means it was never tested.
func (*TestResults) HasError ¶
func (trPtr *TestResults) HasError() bool
HasError returns true if there is an error Returns false if it was never tested i.e., both timestamps zero
func (*TestResults) HasWarning ¶
func (trPtr *TestResults) HasWarning() bool
HasWarning returns true if test succeeded but there is a warning reported.
func (*TestResults) RecordFailure ¶
func (trPtr *TestResults) RecordFailure(errStr string)
RecordFailure records a failure Keeps the LastSucceeded in place as history
func (*TestResults) RecordSuccess ¶
func (trPtr *TestResults) RecordSuccess()
RecordSuccess records a success Keeps the LastFailed in place as history
func (*TestResults) RecordSuccessWithWarning ¶
func (trPtr *TestResults) RecordSuccessWithWarning(warnStr string)
RecordSuccessWithWarning records a test success but warns user about a potential issue. Keeps the LastFailed in place as history
func (*TestResults) Update ¶
func (trPtr *TestResults) Update(src TestResults)
Update uses the src to add info to the results If src has newer information for the 'other' part we update that as well.
type TriState ¶
type TriState uint8
Use this for booleans which have a none/dontcare/notset value
func ParseTriState ¶
type UUIDPairAndIfIdxToNum ¶
type UUIDPairAndIfIdxToNum struct { AppInterfaceKey Number int NumType string CreateTime time.Time LastUseTime time.Time InUse bool }
UUIDPairAndIfIdxToNum is a legacy name for a structure holding number allocated to an application interface. Because this name is rather unspecific and quite clumsy, we now use the AppInterfaceToNum alias instead. However, in order to not break EVE upgrades (by changing pubsub topic name), we continue using this name for the underlying structure. Do NOT use this type name anywhere else in pillar anymore, use AppInterfaceToNum instead.
type UUIDandVersion ¶
UUID plus version
type UrlcloudMetrics ¶
type UrlcloudMetrics struct { TryMsgCount int64 TryByteCount int64 SentMsgCount int64 SentByteCount int64 RecvMsgCount int64 RecvByteCount int64 // Based on content-length which could be off TotalTimeSpent int64 SessionResume int64 }
UrlcloudMetrics are metrics for a particular URL
type UuidToNum ¶
type UuidToNum struct { UuidToNumKey Number int NumType string CreateTime time.Time LastUseTime time.Time InUse bool }
UuidToNum is used to store number allocated for an object with UUID. Currently used for appNum and bridgeNum (number types).
func (*UuidToNum) GetTimestamps ¶
GetTimestamps is used by objtonum.ObjNumPublisher.
func (*UuidToNum) IsReservedOnly ¶
IsReservedOnly is used by objtonum.ObjNumPublisher.
func (*UuidToNum) New ¶
func (info *UuidToNum) New(objKey objtonum.ObjKey) objtonum.ObjNumContainer
New is used by objtonum.ObjNumPublisher.
func (*UuidToNum) SetReservedOnly ¶
SetReservedOnly is used by objtonum.ObjNumPublisher.
type UuidToNumKey ¶
UuidToNumKey is used as a reference to an object with an allocated number stored inside UuidToNum.
func (UuidToNumKey) Key ¶
func (k UuidToNumKey) Key() string
Key returns string representation of the key.
type VDevAux ¶
type VDevAux uint64
VDevAux - vdev aux states
const ( VDevAuxUnspecified VDevAux = iota // Unspecified VDevAuxStatusOk // no error (normal state) VDevAuxOpenFailed // ldi_open_*() or vn_open() failed VDevAuxCorruptData // bad label or disk contents VDevAuxNoReplicas // insufficient number of replicas VDevAuxBadGUIDSum // vdev guid sum doesn't match VDevAuxTooSmall // vdev size is too small VDevAuxBadLabel // the label is OK but invalid VDevAuxVersionNewer // on-disk version is too new VDevAuxVersionOlder // on-disk version is too old VDevAuxUnsupFeat // unsupported features VDevAuxSpared // hot spare used in another pool VDevAuxErrExceeded // too many errors VDevAuxIOFailure // experienced I/O failure VDevAuxBadLog // cannot read log chain(s) VDevAuxExternal // external diagnosis VDevAuxSplitPool // vdev was split off into another pool VdevAuxBadAshift // vdev ashift is invalid VdevAuxExternalPersist // persistent forced fault VdevAuxActive // vdev active on a different host VdevAuxChildrenOffline // all children are offline VdevAuxAshiftTooBig // vdev's min block size is too large )
VDevAux - vdev aux states. When a vdev is in the CANT_OPEN state, the aux field of the vdev stats structure uses these constants to distinguish why.
But we add +1 to their values to that we can have a Unspecified=0 value to follow our conventions. Basically that the definitions should follow that in the vdev_aux enum in sys/fs/zfs.h.
type VLANConfig ¶
type VLANConfig struct { // Logical name of the parent port. ParentPort string // VLAN ID. ID uint16 }
VLANConfig - VLAN sub-interface configuration.
type VaultConfig ¶
type VaultConfig struct {
TpmKeyOnly bool
}
VaultConfig represents vault key to be used
type VaultStatus ¶
type VaultStatus struct { Name string Status info.DataSecAtRestStatus PCRStatus info.PCRStatus ConversionComplete bool // ErrorAndTime provides SetErrorNow() and ClearError() ErrorAndTime }
VaultStatus represents running status of a Vault
func (VaultStatus) Key ¶
func (status VaultStatus) Key() string
Key returns the key used for indexing into a list of vaults
func (VaultStatus) LogCreate ¶
func (status VaultStatus) LogCreate(logBase *base.LogObject)
LogCreate :
func (VaultStatus) LogDelete ¶
func (status VaultStatus) LogDelete(logBase *base.LogObject)
LogDelete :
func (VaultStatus) LogModify ¶
func (status VaultStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type VerifyImageConfig ¶
type VerifyImageConfig struct { ImageSha256 string // sha256 of immutable image Name string MediaType string // MIME type FileLocation string // Current location; should be info about file Size int64 //FileLocation size RefCount uint Expired bool // Used in delete handshake }
VerifyImageConfig captures the verifications which have been requested. The key/index to this is the ImageSha256 which is allocated by the controller or resolver.
func (VerifyImageConfig) Key ¶
func (config VerifyImageConfig) Key() string
Key returns the pubsub Key
func (VerifyImageConfig) LogCreate ¶
func (config VerifyImageConfig) LogCreate(logBase *base.LogObject)
LogCreate :
func (VerifyImageConfig) LogDelete ¶
func (config VerifyImageConfig) LogDelete(logBase *base.LogObject)
LogDelete :
func (VerifyImageConfig) LogModify ¶
func (config VerifyImageConfig) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type VerifyImageStatus ¶
type VerifyImageStatus struct { ImageSha256 string // sha256 of immutable image Name string FileLocation string // Current location Size int64 MediaType string // MIME type PendingAdd bool PendingModify bool PendingDelete bool State SwState // DELIVERED; LastErr* set if failed // ErrorAndTime provides SetErrorNow() and ClearError() ErrorAndTime RefCount uint Expired bool // Used in delete handshake }
VerifyImageStatus captures the verifications which have been requested. The key/index to this is the ImageSha256
func (VerifyImageStatus) Key ¶
func (status VerifyImageStatus) Key() string
Key returns the pubsub Key
func (VerifyImageStatus) LogCreate ¶
func (status VerifyImageStatus) LogCreate(logBase *base.LogObject)
LogCreate :
func (VerifyImageStatus) LogDelete ¶
func (status VerifyImageStatus) LogDelete(logBase *base.LogObject)
LogDelete :
func (VerifyImageStatus) LogModify ¶
func (status VerifyImageStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
func (VerifyImageStatus) Pending ¶
func (status VerifyImageStatus) Pending() bool
type VifConfig ¶
type VifConfig struct { Bridge string Vif string Mac net.HardwareAddr MTU uint16 // PodVif is only valid in the Kubernetes mode. PodVif PodVIF }
VifConfig configure vif
type VifNameMac ¶
type VifNameMac struct { Name string MacAddr net.HardwareAddr AppID uuid.UUID }
VifNameMac : name and MAC address assigned to app VIF.
type VlanAccessPort ¶
type VlanAccessPort struct { VlanID uint16 // Either a single NI port referenced by its name (SystemAdapter.Name, aka logical label) // or an adapter shared-label matching zero or more NI ports. PortLabel string }
VlanAccessPort : config applied to physical port(s) attached to a Switch NI.
type VlanMetrics ¶
VlanMetrics : VLAN metrics for a given NI.
type VmConfig ¶
type VmConfig struct { Kernel string // default "" Ramdisk string // default "" Memory int // in kbytes; Rounded up to Mbytes for xen MaxMem int // in kbytes; Default equal to 'Memory', so no ballooning for xen VCpus int // default 1 MaxCpus int // default VCpus RootDev string // default "/dev/xvda1" ExtraArgs string // added to bootargs BootLoader string // default "" // For CPU pinning CPUs []int // default nil, list of [1,2] // Needed for device passthru DeviceTree string // default ""; sets device_tree // Example: device_tree="guest-gpio.dtb" DtDev []string // default nil; sets dtdev // Example, DtDev=["/smb/gpio@f7020000","/smb/gpio@f8013000"] IRQs []int // default nil; sets irqs // Example, IRQs=[88,86] IOMem []string // default nil; sets iomem // Example, IOMem=["0xf7020,1","0xf8013,1"] VirtualizationMode VmMode EnableVnc bool VncDisplay uint32 VncPasswd string CPUsPinned bool VMMMaxMem int // in kbytes EnableVncShimVM bool }
VmConfig, Some of these items can be overridden by matching Targets in StorageConfigList. For example, a Target of "kernel" means to set/override the Kernel attribute below.
Keep in mind that the fields in this structure are considered so-called "fixed resources", which means that the virtual machine must be restarted before changes to the field will take effect.
type VolumeConfig ¶
type VolumeConfig struct { VolumeID uuid.UUID ContentID uuid.UUID VolumeContentOriginType zconfig.VolumeContentOriginType MaxVolSize uint64 ReadOnly bool GenerationCounter int64 LocalGenerationCounter int64 Encrypted bool DisplayName string HasNoAppReferences bool Target zconfig.Target CustomMeta string }
VolumeConfig specifies the needed information for volumes
func (VolumeConfig) Key ¶
func (config VolumeConfig) Key() string
Key is volume UUID which will be unique
func (VolumeConfig) LogCreate ¶
func (config VolumeConfig) LogCreate(logBase *base.LogObject)
LogCreate :
func (VolumeConfig) LogDelete ¶
func (config VolumeConfig) LogDelete(logBase *base.LogObject)
LogDelete :
func (VolumeConfig) LogModify ¶
func (config VolumeConfig) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type VolumeCreatePending ¶
type VolumeCreatePending struct { VolumeID uuid.UUID GenerationCounter int64 LocalGenerationCounter int64 ContentFormat zconfig.Format Encrypted bool }
VolumeCreatePending is temporary store for volumes that are creating After successful creating operation we should delete this object
func VolumeCreatePendingFromVolumeStatus ¶
func VolumeCreatePendingFromVolumeStatus(status VolumeStatus) VolumeCreatePending
VolumeCreatePendingFromVolumeStatus returns VolumeCreatePending for provided VolumeStatus
func (VolumeCreatePending) IsContainer ¶
func (status VolumeCreatePending) IsContainer() bool
IsContainer will return true if content tree attached to the volume is of container type
func (VolumeCreatePending) Key ¶
func (status VolumeCreatePending) Key() string
Key : VolumeCreatePending unique key
func (VolumeCreatePending) LogCreate ¶
func (status VolumeCreatePending) LogCreate(logBase *base.LogObject)
LogCreate :
func (VolumeCreatePending) LogDelete ¶
func (status VolumeCreatePending) LogDelete(logBase *base.LogObject)
LogDelete :
func (VolumeCreatePending) LogModify ¶
func (status VolumeCreatePending) LogModify(logBase *base.LogObject, old interface{})
LogModify :
func (VolumeCreatePending) PathName ¶
func (status VolumeCreatePending) PathName() string
PathName returns the path of the volume
func (VolumeCreatePending) ZVolName ¶
func (status VolumeCreatePending) ZVolName() string
ZVolName returns name of zvol for volume
type VolumeMgrStatus ¶
type VolumeMgrStatus struct { Name string Initialized bool RemainingSpace uint64 // In bytes. Takes into account "reserved" for dom0 }
VolumeMgrStatus :
func (VolumeMgrStatus) LogCreate ¶
func (status VolumeMgrStatus) LogCreate(logBase *base.LogObject)
LogCreate :
func (VolumeMgrStatus) LogDelete ¶
func (status VolumeMgrStatus) LogDelete(logBase *base.LogObject)
LogDelete :
func (VolumeMgrStatus) LogModify ¶
func (status VolumeMgrStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type VolumeRefConfig ¶
type VolumeRefConfig struct { // this part shows the link between the volume and the app VolumeID uuid.UUID GenerationCounter int64 LocalGenerationCounter int64 AppUUID uuid.UUID // this information comes from AppInstanceConfig and remains constant MountDir string // this part is for communication between zedmanager and volumemgr (set by zedmanager) VerifyOnly bool // controls whether the volumemgr should only download and verify the volume (true) or also create it (false) }
VolumeRefConfig : Used for communication from zedagent to volumemgr, contains info from AppInstanceConfig
func (VolumeRefConfig) Key ¶
func (config VolumeRefConfig) Key() string
Key : VolumeRefConfig unique key (used to uniquely identify the current struct, mostly for pubsub) - the same as for the corresponding VolumeRefStatus
func (VolumeRefConfig) LogCreate ¶
func (config VolumeRefConfig) LogCreate(logBase *base.LogObject)
LogCreate :
func (VolumeRefConfig) LogDelete ¶
func (config VolumeRefConfig) LogDelete(logBase *base.LogObject)
LogDelete :
func (VolumeRefConfig) LogModify ¶
func (config VolumeRefConfig) LogModify(logBase *base.LogObject, old interface{})
LogModify :
func (VolumeRefConfig) VolumeKey ¶
func (config VolumeRefConfig) VolumeKey() string
VolumeKey : Unique key of volume referenced in VolumeRefConfig (used to uniquely identify the volume, attached to the app instance)
type VolumeRefStatus ¶
type VolumeRefStatus struct { VolumeID uuid.UUID GenerationCounter int64 LocalGenerationCounter int64 AppUUID uuid.UUID State SwState ActiveFileLocation string ContentFormat zconfig.Format ReadOnly bool DisplayName string MaxVolSize uint64 PendingAdd bool // Flag to identify whether volume ref config published or not WWN string VerifyOnly bool Target zconfig.Target CustomMeta string ReferenceName string ErrorAndTimeWithSource }
VolumeRefStatus : Reference to a Volume specified separately in the API If a volume is purged (re-created from scratch) it will either have a new UUID or a new generationCount
func (VolumeRefStatus) IsContainer ¶
func (status VolumeRefStatus) IsContainer() bool
IsContainer will return true if content tree attached to the volume ref is of container type
func (VolumeRefStatus) Key ¶
func (status VolumeRefStatus) Key() string
Key : VolumeRefStatus unique key (used to uniquely identify the current struct, mostly for pubsub) - the same as for the corresponding VolumeRefConfig
func (VolumeRefStatus) LogCreate ¶
func (status VolumeRefStatus) LogCreate(logBase *base.LogObject)
LogCreate :
func (VolumeRefStatus) LogDelete ¶
func (status VolumeRefStatus) LogDelete(logBase *base.LogObject)
LogDelete :
func (VolumeRefStatus) LogModify ¶
func (status VolumeRefStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
func (VolumeRefStatus) VolumeKey ¶
func (status VolumeRefStatus) VolumeKey() string
VolumeKey : Unique key of volume referenced in VolumeRefStatus (used to uniquely identify the volume, attached to the app instance)
type VolumeStatus ¶
type VolumeStatus struct { VolumeID uuid.UUID ContentID uuid.UUID VolumeContentOriginType zconfig.VolumeContentOriginType MaxVolSize uint64 ReadOnly bool GenerationCounter int64 LocalGenerationCounter int64 Encrypted bool DisplayName string State SwState SubState volumeSubState RefCount uint LastRefCountChangeTime time.Time Progress uint // In percent i.e., 0-100 TotalSize int64 // expected size as reported by the downloader, if any CurrentSize int64 // current total downloaded size as reported by the downloader FileLocation string // Location of filestystem CreateTime time.Time ContentFormat zconfig.Format LastUse time.Time PreReboot bool // Was volume last use prior to device reboot? ReferenceName string WWN string Target zconfig.Target CustomMeta string ErrorAndTimeWithSource }
VolumeStatus is response from volumemgr about status of volumes
func (VolumeStatus) GetPVCName ¶
func (status VolumeStatus) GetPVCName() string
GetPVCName : returns the volume name for kubernetes(longhorn) Kubernetes does not allow special characters like '#' in the object names. so we need to generate a PVC name.
func (VolumeStatus) IsContainer ¶
func (status VolumeStatus) IsContainer() bool
IsContainer will return true if content tree attached to the volume is of container type
func (VolumeStatus) Key ¶
func (status VolumeStatus) Key() string
Key is volume UUID which will be unique
func (VolumeStatus) LogCreate ¶
func (status VolumeStatus) LogCreate(logBase *base.LogObject)
LogCreate :
func (VolumeStatus) LogDelete ¶
func (status VolumeStatus) LogDelete(logBase *base.LogObject)
LogDelete :
func (VolumeStatus) LogModify ¶
func (status VolumeStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
func (VolumeStatus) PathName ¶
func (status VolumeStatus) PathName() string
PathName returns the path of the volume
func (VolumeStatus) UseZVolDisk ¶
func (status VolumeStatus) UseZVolDisk(persistType PersistType) bool
UseZVolDisk returns true if we should use zvol for the provided VolumeStatus and PersistType
func (VolumeStatus) ZVolName ¶
func (status VolumeStatus) ZVolName() string
ZVolName returns name of zvol for volume
type VolumesSnapshotAction ¶
type VolumesSnapshotAction uint8
VolumesSnapshotAction is the action to perform on the snapshot
const ( // VolumesSnapshotUnspecifiedAction is the default value VolumesSnapshotUnspecifiedAction VolumesSnapshotAction = iota // VolumesSnapshotCreate is used to create a snapshot VolumesSnapshotCreate // VolumesSnapshotRollback is used to roll back to a snapshot VolumesSnapshotRollback // VolumesSnapshotDelete is used to delete a snapshot VolumesSnapshotDelete )
func (VolumesSnapshotAction) String ¶
func (action VolumesSnapshotAction) String() string
type VolumesSnapshotConfig ¶
type VolumesSnapshotConfig struct { // SnapshotID is the ID of the snapshot SnapshotID string // Action is the action to perform on the snapshot Action VolumesSnapshotAction // VolumeIDs is a list of volumes to snapshot VolumeIDs []uuid.UUID // AppUUID used as a backlink to the app AppUUID uuid.UUID }
VolumesSnapshotConfig is used to send snapshot requests from zedmanager to volumemgr
func (VolumesSnapshotConfig) Key ¶
func (config VolumesSnapshotConfig) Key() string
Key returns unique key for the snapshot
type VolumesSnapshotStatus ¶
type VolumesSnapshotStatus struct { // SnapshotID is the ID of the snapshot, critical field SnapshotID string `mandatory:"true"` // Metadata is a map of volumeID to metadata, depending on the volume type. Critical field. VolumeSnapshotMeta map[string]interface{} `mandatory:"true"` // TimeCreated is the time the snapshot was created, reported by FS-specific code TimeCreated time.Time // AppUUID used as a backlink to the app, critical field AppUUID uuid.UUID `mandatory:"true"` // RefCount is the number of times the snapshot is used. Necessary to trigger the handleModify handler RefCount int // ResultOfAction is the type of action that was performed on the snapshot that resulted in this status ResultOfAction VolumesSnapshotAction // ErrorAndTimeWithSource provides SetErrorNow() and ClearError() ErrorAndTimeWithSource }
VolumesSnapshotStatus is used to send snapshot status from volumemgr to zedmanager
func (VolumesSnapshotStatus) Key ¶
func (status VolumesSnapshotStatus) Key() string
Key returns unique key for the snapshot
type WatchdogParam ¶
type WatchdogParam struct { Ps *pubsub.PubSub AgentName string WarnTime time.Duration ErrTime time.Duration }
WatchdogParam is used in some proc functions that have a timeout, to tell the watchdog agent is still alive.
type WifiConfig ¶
type WifiConfig struct { SSID string // wifi SSID KeyScheme WifiKeySchemeType // such as WPA-PSK, WPA-EAP // XXX: to be deprecated, use CipherBlockStatus instead Identity string // identity or username for WPA-EAP // XXX: to be deprecated, use CipherBlockStatus instead Password string // string of pass phrase or password hash Priority int32 // CipherBlockStatus, for encrypted credentials CipherBlockStatus }
WifiConfig - Wifi structure
type WifiKeySchemeType ¶
type WifiKeySchemeType uint8
WifiKeySchemeType - types of key management
const ( KeySchemeNone WifiKeySchemeType = iota // enum for key scheme KeySchemeWpaPsk KeySchemeWpaEap KeySchemeOther )
Key Scheme type
type WirelessConfig ¶
type WirelessConfig struct { // WType : Wireless Type, either Cellular or WiFi. WType WirelessType // CellularV2 : configuration for Cellular connectivity. // This is version 2 of the cellular APIs. With the introduction of support // for multiple modems and multiple SIMs, the previously used CellConfig // structure was no longer suitable for storing all the new config attributes. CellularV2 CellNetPortConfig // Wifi : configuration for WiFi connectivity. Wifi []WifiConfig // Cellular : old and now deprecated structure for the cellular connectivity // configuration (aka version 1). // It is kept here only for backward-compatibility, i.e. to support upgrades from // EVE versions which still use this structure. Cellular []DeprecatedCellConfig }
WirelessConfig - wireless structure
func (WirelessConfig) IsEmpty ¶
func (wc WirelessConfig) IsEmpty() bool
IsEmpty returns true if the wireless config is empty.
type WirelessStatus ¶
type WirelessStatus struct { WType WirelessType Cellular WwanNetworkStatus }
WirelessStatus : state information for a single wireless device
type WirelessType ¶
type WirelessType uint8
WirelessType - types of wireless media
const ( WirelessTypeNone WirelessType = iota // enum for wireless type WirelessTypeCellular WirelessTypeWifi )
enum wireless type
type WwanAuthProtocol ¶
type WwanAuthProtocol string
WwanAuthProtocol : authentication protocol used by cellular network.
const ( // WwanAuthProtocolNone : no authentication. WwanAuthProtocolNone WwanAuthProtocol = "" // WwanAuthProtocolPAP : Password Authentication Protocol. WwanAuthProtocolPAP WwanAuthProtocol = "pap" // WwanAuthProtocolCHAP : Challenge-Handshake Authentication Protocol. WwanAuthProtocolCHAP WwanAuthProtocol = "chap" // WwanAuthProtocolPAPAndCHAP : Both PAP and CHAP. WwanAuthProtocolPAPAndCHAP WwanAuthProtocol = "pap-and-chap" )
type WwanCellModule ¶
type WwanCellModule struct { // Name is a module identifier. For example IMEI if available. // Guaranteed to be unique among all modems attached to the edge node. Name string // International Mobile Equipment Identity. IMEI string Model string Manufacturer string // Firmware version identifier. Revision string // QMI or MBIM. ControlProtocol WwanCtrlProt OpMode WwanOpMode }
WwanCellModule contains cellular module specs.
type WwanConfig ¶
type WwanConfig struct { // Key of the DevicePortConfig from which WwanConfig was generated. DPCKey string // Timestamp of the DevicePortConfig from which WwanConfig was generated. DPCTimestamp time.Time // Timestamp of the RadioSilence config applied into this WwanConfig. RSConfigTimestamp time.Time // Radio silence is the act of disabling all radio transmission // for safety or security reasons RadioSilence bool // One entry for every cellular modem. Networks []WwanNetworkConfig }
WwanConfig is published by nim and consumed by the wwan service.
func (WwanConfig) Equal ¶
func (wc WwanConfig) Equal(wc2 WwanConfig) bool
Equal compares two instances of WwanConfig for equality.
func (WwanConfig) GetNetworkConfig ¶
func (wc WwanConfig) GetNetworkConfig(logicalLabel string) *WwanNetworkConfig
GetNetworkConfig returns pointer to the network config corresponding to the modem with the given logical label.
func (WwanConfig) LogModify ¶
func (wc WwanConfig) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type WwanCtrlProt ¶
type WwanCtrlProt string
WwanCtrlProt : wwan control protocol
const ( // WwanCtrlProtUnspecified : control protocol is not specified WwanCtrlProtUnspecified WwanCtrlProt = "" // WwanCtrlProtQMI : modem is controlled using the QMI protocol WwanCtrlProtQMI WwanCtrlProt = "qmi" // WwanCtrlProtMBIM : modem is controlled using the MBIM protocol WwanCtrlProtMBIM WwanCtrlProt = "mbim" )
type WwanIPSettings ¶
WwanIPSettings : IP settings received from the connected network.
func (WwanIPSettings) Equal ¶
func (wips WwanIPSettings) Equal(wips2 WwanIPSettings) bool
Equal compares two instances of WwanIPSettings for equality.
type WwanLocationInfo ¶
type WwanLocationInfo struct { // Logical label of the device used to obtain this location information. LogicalLabel string // Latitude in the Decimal degrees (DD) notation. // Valid values are in the range <-90, 90>. Anything outside of this range // should be treated as an unavailable value. // Note that wwan microservice uses -32768 specifically when latitude is not known. Latitude float64 // Longitude in the Decimal degrees (DD) notation. // Valid values are in the range <-180, 180>. Anything outside of this range // should be treated as an unavailable value. // Note that wwan microservice uses -32768 specifically when longitude is not known. Longitude float64 // Altitude w.r.t. mean sea level in meters. // Negative value of -32768 is returned when altitude is not known. Altitude float64 // Circular horizontal position uncertainty in meters. // Negative values are not valid and represent unavailable uncertainty. // Note that wwan microservice uses -32768 specifically when horizontal // uncertainty is not known. HorizontalUncertainty float32 // Reliability of the provided information for latitude and longitude. HorizontalReliability LocReliability // Vertical position uncertainty in meters. // Negative values are not valid and represent unavailable uncertainty. // Note that wwan microservice uses -32768 specifically when vertical // uncertainty is not known. VerticalUncertainty float32 // Reliability of the provided information for altitude. VerticalReliability LocReliability // Unix timestamp in milliseconds. // Zero value represents unavailable UTC timestamp. UTCTimestamp uint64 }
WwanLocationInfo contains device location information obtained from a GNSS receiver integrated into an LTE modem.
func (WwanLocationInfo) LogCreate ¶
func (wli WwanLocationInfo) LogCreate(logBase *base.LogObject)
LogCreate :
func (WwanLocationInfo) LogDelete ¶
func (wli WwanLocationInfo) LogDelete(logBase *base.LogObject)
LogDelete :
func (WwanLocationInfo) LogModify ¶
func (wli WwanLocationInfo) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type WwanMetrics ¶
type WwanMetrics struct {
Networks []WwanNetworkMetrics
}
WwanMetrics is published by the wwan service.
func (WwanMetrics) Equal ¶
func (wm WwanMetrics) Equal(wm2 WwanMetrics) bool
Equal compares two instances of WwanMetrics for equality.
func (WwanMetrics) GetNetworkMetrics ¶
func (wm WwanMetrics) GetNetworkMetrics(logicalLabel string) *WwanNetworkMetrics
GetNetworkMetrics returns pointer to the network metrics corresponding to the modem with the given logical label.
func (WwanMetrics) LogModify ¶
func (wm WwanMetrics) LogModify(logBase *base.LogObject, old interface{})
LogModify :
func (WwanMetrics) LookupNetworkMetrics ¶
func (wm WwanMetrics) LookupNetworkMetrics(logicalLabel string) (WwanNetworkMetrics, bool)
LookupNetworkMetrics returns metrics corresponding to the given cellular network.
type WwanNetworkConfig ¶
type WwanNetworkConfig struct { // Logical label in PhysicalIO. LogicalLabel string // Physical address of the cellular modem. PhysAddrs WwanPhysAddrs // Configuration of the activated Access point. AccessPoint CellularAccessPoint // Proxies configured for the cellular network. Proxies []ProxyEntry // Probe used to detect broken connection. Probe WwanProbe // Some LTE modems have GNSS receiver integrated and can be used // for device location tracking. // Enable this option to have location info periodically obtained // from this modem and published by wwan microservice via topic WwanLocationInfo. LocationTracking bool // Maximum transmission unit (IP MTU) to apply on the wwan interface. MTU uint16 }
WwanNetworkConfig contains configuration for a single cellular network. In case there are multiple SIM cards/slots in the modem, WwanNetworkConfig contains config only for the activated one.
func (WwanNetworkConfig) Equal ¶
func (wnc WwanNetworkConfig) Equal(wnc2 WwanNetworkConfig) bool
Equal compares two instances of WwanNetworkConfig for equality.
type WwanNetworkMetrics ¶
type WwanNetworkMetrics struct { // Logical label of the cellular modem in PhysicalIO. // Can be empty if this device is not configured by the controller // (and hence logical label does not exist). LogicalLabel string PhysAddrs WwanPhysAddrs PacketStats WwanPacketStats SignalInfo WwanSignalInfo }
WwanNetworkMetrics contains metrics for a single cellular network.
type WwanNetworkStatus ¶
type WwanNetworkStatus struct { // Logical label of the cellular modem in PhysicalIO. // Can be empty if this device is not configured by the controller // (and hence logical label does not exist). LogicalLabel string PhysAddrs WwanPhysAddrs Module WwanCellModule // One entry for every SIM slot (incl. those without SIM card). SimCards []WwanSimCard // Non-empty if the wwan microservice failed to apply config submitted by NIM. ConfigError string // Error message from the last connectivity probing. ProbeError string // Network where the modem is currently registered. CurrentProvider WwanProvider // All networks that the modem is able to detect. // This will include the currently used provider as well as other visible networks. VisibleProviders []WwanProvider // The list of Radio Access Technologies (RATs) currently used for registering/connecting // to the network (typically just one). CurrentRATs []WwanRAT // Unix timestamp in seconds made when the current connection was established. // Zero value if the modem is not connected. ConnectedAt uint64 // IP settings received from the network when connection is established. IPSettings WwanIPSettings // True if location tracking is successfully running. LocationTracking bool }
WwanNetworkStatus contains status information for a single cellular network (i.e. one modem but possibly multiple SIM slots/cards).
func (WwanNetworkStatus) Equal ¶
func (wns WwanNetworkStatus) Equal(wns2 WwanNetworkStatus) bool
Equal compares two instances of WwanNetworkStatus for equality.
type WwanOpMode ¶
type WwanOpMode string
WwanOpMode : wwan operating mode
const ( // WwanOpModeUnspecified : operating mode is not specified WwanOpModeUnspecified WwanOpMode = "" // WwanOpModeOnline : modem is online but not connected WwanOpModeOnline WwanOpMode = "online" // WwanOpModeConnected : modem is online and connected WwanOpModeConnected WwanOpMode = "online-and-connected" // WwanOpModeRadioOff : modem has disabled radio transmission WwanOpModeRadioOff WwanOpMode = "radio-off" // WwanOpModeOffline : modem is offline WwanOpModeOffline WwanOpMode = "offline" // WwanOpModeUnrecognized : unrecognized operating mode WwanOpModeUnrecognized WwanOpMode = "unrecognized" )
type WwanPacketStats ¶
type WwanPacketStats struct { RxBytes uint64 RxPackets uint64 RxDrops uint64 TxBytes uint64 TxPackets uint64 TxDrops uint64 }
WwanPacketStats contains packet statistics recorded by a cellular modem.
type WwanPhysAddrs ¶
type WwanPhysAddrs struct { // Interface name. // For example: wwan0 Interface string // USB address in the format "<BUS>:[<PORT>]", with nested ports separated by dots. // For example: 1:2.3 USB string // PCI address in the long format. // For example: 0000:00:15.0 PCI string // Dev : device file representing the modem (e.g. /dev/cdc-wdm0). // This address is only published as part of the wwan status // and can't be configured from the controller. Dev string }
WwanPhysAddrs is a physical address of a cellular modem. Not all fields have to be defined. Empty WwanPhysAddrs will match the first modem found in sysfs. With multiple LTE modems the USB address is the most unambiguous and reliable.
type WwanProbe ¶
type WwanProbe struct { // If true, then probing is disabled. Disable bool // User-defined probe for cellular connectivity testing. UserDefinedProbe ConnectivityProbe }
WwanProbe : cellular connectivity verification probe.
type WwanProvider ¶
type WwanProvider struct { // Public Land Mobile Network identifier. PLMN string // Human-readable label identifying the provider. Description string // True if this is the provider currently being used. CurrentServing bool // True if data roaming is ON. Roaming bool // True if this provider is forbidden by SIM card config. Forbidden bool }
WwanProvider contains information about a cellular connectivity provider.
type WwanRAT ¶
type WwanRAT string
WwanRAT : Radio Access Technology.
const ( // WwanRATUnspecified : select RAT automatically. WwanRATUnspecified WwanRAT = "" // WwanRATGSM : Global System for Mobile Communications (2G). WwanRATGSM WwanRAT = "gsm" // WwanRATUMTS : Universal Mobile Telecommunications System (3G). WwanRATUMTS WwanRAT = "umts" // WwanRATLTE : Long-Term Evolution (4G). WwanRATLTE WwanRAT = "lte" // WwanRAT5GNR : 5th Generation New Radio (5G). WwanRAT5GNR WwanRAT = "5gnr" )
type WwanSignalInfo ¶
type WwanSignalInfo struct { // Received signal strength indicator (RSSI) measured in dBm (decibel-milliwatts). RSSI int32 // Reference Signal Received Quality (RSRQ) measured in dB (decibels). RSRQ int32 // Reference Signal Receive Power (RSRP) measured in dBm (decibel-milliwatts). RSRP int32 // Signal-to-Noise Ratio (SNR) measured in dB (decibels). SNR int32 }
WwanSignalInfo contains cellular signal strength information. The maximum value of int32 (0x7FFFFFFF) represents unspecified/unavailable metric.
type WwanSimCard ¶
type WwanSimCard struct { // Name is a SIM card/slot identifier. // Guaranteed to be unique across all modems and their SIM slots attached // to the edge node. Name string // SIM slot number which this WwanSimCard instance describes. SlotNumber uint8 // True if this SIM slot is activated, i.e. the inserted SIM card (if any) can be used // to connect to a cellular network. SlotActivated bool // Integrated Circuit Card Identifier. // Empty if no SIM card is inserted into the slot or if the SIM card is not recognized. ICCID string // International Mobile Subscriber Identity. // Empty if no SIM card is inserted into the slot or if the SIM card is not recognized. IMSI string // Type of the SIM card. Type SimType // The current state of the SIM card (absent, initialized, not recognized, etc.). // This state is not modeled using enum because the set of possible values differs // between QMI and MBIM protocols (used to control cellular modules) and there is // no 1:1 mapping between them. State string }
WwanSimCard describes either empty SIM slot or a slot with a SIM card inserted.
type WwanStatus ¶
type WwanStatus struct { // DPCKey is just copied from the last applied WwanConfig. DPCKey string // DPCTimestamp is just copied from the last applied WwanConfig. DPCTimestamp time.Time // RSConfigTimestamp is just copied from the last applied WwanConfig. RSConfigTimestamp time.Time // One entry for every cellular modem. Networks []WwanNetworkStatus }
WwanStatus is published by the wwan service and consumed by nim, zedagent and zedrouter.
func (WwanStatus) DoSanitize ¶
func (ws WwanStatus) DoSanitize()
DoSanitize fills in logical names for cellular modules and SIM cards.
func (WwanStatus) Equal ¶
func (ws WwanStatus) Equal(ws2 WwanStatus) bool
Equal compares two instances of WwanStatus for equality.
func (WwanStatus) GetNetworkStatus ¶
func (ws WwanStatus) GetNetworkStatus(logicalLabel string) *WwanNetworkStatus
GetNetworkStatus returns pointer to the network status corresponding to the modem with the given logical label.
func (WwanStatus) LogModify ¶
func (ws WwanStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type ZFSPoolMetrics ¶
type ZFSPoolMetrics struct { PoolName string CollectionTime time.Time // Time when the metrics was collected Metrics *ZFSVDevMetrics // Metrics and error counters for zfs pool ChildrenDataset []*StorageChildrenMetrics // Children metrics for datasets (RAID or Mirror) Disks []*StorageDiskMetrics // Metrics for disks that are not included in the RAID or mirror ZVols []*StorageZVolMetrics // Metrics for zvols from /proc/diskstats }
ZFSPoolMetrics - stores metrics for the pool including all child devices
type ZFSPoolStatus ¶
type ZFSPoolStatus struct { PoolName string ZfsVersion string CurrentRaid StorageRaidType CompressionRatio float64 ZpoolSize uint64 CountZvols uint32 StorageState StorageStatus Disks []*StorageDiskState CollectorErrors string Children []*StorageChildren PoolStatusMsg PoolStatus // pool status value from ZFS PoolStatusMsgStr string // pool status value from ZFS in string format }
ZFSPoolStatus stores collected information about zpool
type ZFSVDevMetrics ¶
type ZFSVDevMetrics struct { Alloc uint64 // space allocated (in byte) Space uint64 // total capacity (in byte) DSpace uint64 // deflated capacity (in byte) RSize uint64 // replaceable dev size (in byte) ESize uint64 // expandable dev size (in byte) ReadErrors uint64 // read errors WriteErrors uint64 // write errors ChecksumErrors uint64 // checksum errors Ops [ZIOTypeMax]uint64 // operation count Bytes [ZIOTypeMax]uint64 // bytes read/written IOsInProgress uint64 // IOsInProgress is number of I/Os currently in progress. ReadTicks uint64 // ReadTicks is the total number of milliseconds spent by all reads. WriteTicks uint64 // WriteTicks is the total number of milliseconds spent by all writes. IOsTotalTicks uint64 // IOsTotalTicks is the number of milliseconds spent doing I/Os. // WeightedIOTicks is the weighted number of milliseconds spent doing I/Os. // This can also be used to estimate average queue wait time for requests. WeightedIOTicks uint64 }
ZFSVDevMetrics metrics for VDev from ZFS and /proc/diskstats
type ZVolStatus ¶
ZVolStatus specifies the needed information for zfs volume
func (ZVolStatus) Key ¶
func (status ZVolStatus) Key() string
Key is Dataset with '/' replaced by '_'
type ZbootConfig ¶
ZbootConfig contains information fed from zedagent to baseosmgr. Only used to indicate that the testing of the image/partition is complete.
func (ZbootConfig) Key ¶
func (config ZbootConfig) Key() string
Key returns the key used in pubsub for ZbootConfig
func (ZbootConfig) LogCreate ¶
func (config ZbootConfig) LogCreate(logBase *base.LogObject)
LogCreate :
func (ZbootConfig) LogDelete ¶
func (config ZbootConfig) LogDelete(logBase *base.LogObject)
LogDelete :
func (ZbootConfig) LogKey ¶
func (config ZbootConfig) LogKey() string
LogKey : XXX note that this only the IMGx, while Status includes ShortVersion for logs
func (ZbootConfig) LogModify ¶
func (config ZbootConfig) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type ZbootStatus ¶
type ZbootStatus struct { PartitionLabel string PartitionDevname string PartitionState string ShortVersion string LongVersion string CurrentPartition bool TestComplete bool }
func (ZbootStatus) Key ¶
func (status ZbootStatus) Key() string
func (ZbootStatus) LogCreate ¶
func (status ZbootStatus) LogCreate(logBase *base.LogObject)
LogCreate :
func (ZbootStatus) LogDelete ¶
func (status ZbootStatus) LogDelete(logBase *base.LogObject)
LogDelete :
func (ZbootStatus) LogKey ¶
func (status ZbootStatus) LogKey() string
LogKey : XXX note that this includes the ShortVersion, while Status only the PartitionLabel
func (ZbootStatus) LogModify ¶
func (status ZbootStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
type ZedAgentStatus ¶
type ZedAgentStatus struct { Name string ConfigGetStatus ConfigGetStatus RebootCmd bool ShutdownCmd bool PoweroffCmd bool RequestedRebootReason string // Why we will reboot RequestedBootReason BootReason // Why we will reboot MaintenanceMode bool // Don't run apps etc ForceFallbackCounter int // Try image fallback when counter changes CurrentProfile string // Current profile RadioSilence RadioSilence // Currently requested state of radio devices DeviceState DeviceState AttestState AttestState AttestError string VaultStatus info.DataSecAtRestStatus PCRStatus info.PCRStatus VaultErr string }
ZedAgentStatus :
func (ZedAgentStatus) LogCreate ¶
func (status ZedAgentStatus) LogCreate(logBase *base.LogObject)
LogCreate :
func (ZedAgentStatus) LogDelete ¶
func (status ZedAgentStatus) LogDelete(logBase *base.LogObject)
LogDelete :
func (ZedAgentStatus) LogModify ¶
func (status ZedAgentStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify :
Source Files ¶
- agent.go
- assignableadapters.go
- attesttypes.go
- blob.go
- cachedresolvedip.go
- certinfotypes.go
- cipherinfotypes.go
- ciphermetrics.go
- clustertypes.go
- conntest.go
- contenttreetypes.go
- diskmetrics.go
- disktypes.go
- dns.go
- domainmgrtypes.go
- downloadertypes.go
- dpc.go
- edgenodetypes.go
- edgeviewtypes.go
- errors.go
- errortime.go
- exectypes.go
- flowlogmetrics.go
- global.go
- globalconfigold.go
- ifnametopci.go
- ledmanagertypes.go
- locationconsts.go
- memory.go
- newlogtypes.go
- onboardingtypes.go
- patchenvelopestypes.go
- persisttypes.go
- physicalioadapters.go
- processtypes.go
- resolvertypes.go
- smarttypes.go
- types.go
- vaultmgrtypes.go
- verifiertypes.go
- volumetypes.go
- watcher.go
- wwan.go
- zboottypes.go
- zedagenttypes.go
- zedbox.go
- zedcloudmetrics.go
- zedkubetypes.go
- zedmanagertypes.go
- zedroutertypes.go
- zedroutertypes_linux.go
- zfs.go