Documentation
¶
Index ¶
- Constants
- Variables
- func CompletedBinaryBlobIdxByName(blobs []BinaryBlobCompleted, name string) int
- func CompletedCipherBlobIdxByName(blobs []BinaryCipherBlob, 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 DnsmasqLeaseFilePath(bridgeIfName string) string
- 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 GetDiagRemoteEndpointURLs(log *base.LogObject, gcp *ConfigItemValueMap) []*url.URL
- 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 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 GetTimestampFromGzipName(fName string) (time.Time, error)
- func GetVolumesSnapshotStatusFile(snapshotID string) string
- func GetZFSArcMaxSizeInBytes() (uint64, error)
- func IfRename(log *base.LogObject, ifname string, newIfname string) error
- func IfnameToResolvConf(ifname string) (filenames []string)
- 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 ResolvConfToIfname(resolvConf string) 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 Affinity
- type AgentRunner
- type AgentSettingKey
- type AppAndImageToHash
- type AppBlobsAvailable
- type AppBootConfig
- type AppBootInfo
- 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 AppKubeStatus
- 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) GetAllAppIPs() (appIPs []net.IP)
- 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 AppRuntimeType
- 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 BearerType
- type BinaryBlobCompleted
- type BinaryBlobVolumeRef
- type BinaryCipherBlob
- type BlobEncrytedType
- 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 BondARPMonitorStatus
- type BondArpMonitor
- type BondConfig
- type BondLACPChurnState
- type BondLACPStatus
- type BondMIIMonitor
- type BondMIIMonitorStatus
- type BondMemberLACPMetrics
- type BondMemberLACPStatus
- type BondMemberMetrics
- type BondMemberStatus
- type BondMetrics
- type BondMetricsList
- type BondMode
- type BondStatus
- type BootReason
- type CSRProfile
- 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 CertDistinguishedName
- type CertHashType
- type CertMetaData
- type CertMetaDataType
- type CertSubjectAlternativeName
- type CertType
- type ChangeInProgressType
- type CipherBlockStatus
- func (status *CipherBlockStatus) Equal(status2 CipherBlockStatus) bool
- 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 ClusterType
- type CollectInfoCmd
- 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 ControllerConnMetrics
- 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) IsPortUsedAsVlanParent(portLabel string) 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) IsPortAggregatedByBond(portLabel string) bool
- func (config DevicePortConfig) IsPortUsedAsVlanParent(portLabel string) bool
- func (config DevicePortConfig) LastTestTime() time.Time
- 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 DmiSystemInfo
- 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 EnrolledCertificateStatus
- 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 EvAuthType
- type EvDevPolicy
- type EvExtPolicy
- type EvKubPolicy
- type EvalPersist
- type EvalPhase
- type EvalStatus
- func (status EvalStatus) DetailedNote() string
- func (status EvalStatus) ElapsedTime() time.Duration
- func (status EvalStatus) IsOnboardingAllowed() bool
- func (status EvalStatus) Key() string
- func (status EvalStatus) LogCreate(logBase *base.LogObject)
- func (status EvalStatus) LogDelete(logBase *base.LogObject)
- func (status EvalStatus) LogKey() string
- func (status EvalStatus) LogModify(logBase *base.LogObject, old interface{})
- func (status EvalStatus) OnboardingBlockReason() string
- func (status EvalStatus) ProgressPercent() int
- func (status EvalStatus) RebootStatusString() string
- func (status EvalStatus) RemainingTime() time.Duration
- func (status EvalStatus) TimeStatusString() string
- type EvjwtAlgo
- type EvjwtInfo
- type FlowRec
- type FlowScope
- type FlowlogCounters
- type FlowlogMetrics
- type FsUsedMetric
- 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 KubeClusterUpdateStatus
- type KubeComp
- type KubeCompUpdateStatus
- type KubeConfig
- type KubeIngressInfo
- type KubeLBPoolStatus
- type KubeLeaderElectInfo
- type KubeNodeInfo
- type KubeNodeStatus
- type KubePodInfo
- type KubePodNameSpaceInfo
- type KubePodStatus
- type KubeServiceInfo
- type KubeStorageInfo
- type KubeUserServices
- type KubeVMIInfo
- type KubeVMIStatus
- type KubeVolumeInfo
- type KubeVolumeReplicaInfo
- type L2LinkConfig
- type L2LinkType
- type LBInterfaceConfig
- type LOCConfig
- type LPSConfig
- type LacpRate
- type LedBlinkCount
- type LedBlinkCounter
- type LocReliability
- type LocalAppCommand
- type LocalAppCounters
- type LocalCommands
- type MaintenanceModeMultiReason
- type MaintenanceModeReason
- type MemoryNotification
- type MetaDataType
- type MetricItem
- type MetricItemType
- type MetricsMap
- type NIPortProbe
- type NestedAppDomainStatus
- type NestedAppRuntimeDiskMetric
- type NetworkConfigOrigin
- 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 NodeAdmission
- 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 OemWindowsLicenseKeyInfo
- 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 PNACConfig
- type PNACMetrics
- type PNACMetricsList
- type PNACStatus
- 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 PortConfigSource
- type PowerOnTime
- type ProbeIntfMetrics
- type ProbeMetrics
- type ProcessMetric
- type ProxyConfig
- type ProxyEntry
- type RadioSilence
- type ResolveConfig
- type ResolveStatus
- type RetStatus
- type SCEPProfile
- type STPConfig
- type SenderStatus
- type ServiceInitStatus
- type ServiceStatus
- type SigAlg
- type SimType
- type SlotEvalState
- type SlotName
- type SnapshotConfig
- type SnapshotDesc
- type SnapshotInstanceStatus
- type SnapshotType
- type SnapshotWhen
- type SnapshottingStatus
- type StorageChildren
- type StorageChildrenMetrics
- type StorageDiskMetrics
- type StorageDiskState
- type StorageHealthStatus
- type StorageRaidType
- type StorageStatus
- type StorageVolumePvcStatus
- type StorageVolumeReplicaStatus
- type StorageVolumeRobustness
- type StorageVolumeState
- 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 TpmSanityStatus
- type TriState
- type UEvent
- type URLMetrics
- type UUIDPairAndIfIdxToNum
- type UUIDandVersion
- 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 VaultKeyPolicyPCR
- type VaultStatus
- func (status VaultStatus) IsVaultInError() bool
- func (status VaultStatus) Key() string
- func (status VaultStatus) LogCreate(logBase *base.LogObject)
- func (status VaultStatus) LogDelete(logBase *base.LogObject)
- func (status VaultStatus) LogKey() string
- func (status VaultStatus) LogModify(logBase *base.LogObject, old interface{})
- 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 VmiDescheduleConfig
- type VmiVNCConfig
- 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 WwanBearer
- type WwanCellModule
- type WwanCleartextCredentials
- 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 WwanIPType
- 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)
- func (wm WwanMetrics) ToProto(log *base.LogObject) []*metrics.CellularMetric
- type WwanNetworkConfig
- type WwanNetworkMetrics
- type WwanNetworkStatus
- func (wns WwanNetworkStatus) CellBearersToProto(log *base.LogObject) (bearers []*info.CellularBearer)
- func (wns WwanNetworkStatus) CellProfilesToProto(log *base.LogObject) (profiles []*info.CellularProfile)
- func (wns WwanNetworkStatus) CellProvidersToProto() (providers []*info.ZCellularProvider)
- func (wns WwanNetworkStatus) Equal(wns2 WwanNetworkStatus) bool
- func (wns WwanNetworkStatus) SimCardsToProto() (simCards []*info.ZSimcardInfo)
- type WwanOpMode
- type WwanPacketStats
- type WwanPhysAddrs
- type WwanProbe
- type WwanProfile
- 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
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 ( // ClusterStatusPort - Port for k3s server for cluster status advertise // See more detail description in pkg/pillar/docs/zedkube.md ClusterStatusPort = "12346" // VmiVNCDir is the directory for VNC parameter files. // VmiVNCDir specifies the directory for VNC parameter files used by both remote-console and edgeview VNC. VmiVNCDir = "/run/edgeview/VncParams" // VmiVNCFileName is the unified path for both remote-console and edgeview VNC configuration file. VmiVNCFileName = VmiVNCDir + "/vmiVNC.run" )
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 ( // LastResortKey : key used for the Last-Resort DPC. LastResortKey = "lastresort" // ManualDPCKey : key used for DPC submitted from TUI. ManualDPCKey = "manual" // LpsDPCKey : key used for DPC containing local configuration changes submitted by LPS. LpsDPCKey = "lps" )
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" // EdgeviewSigningCertFile - controller signing cert for edgeview JWT/data verification EdgeviewSigningCertFile = EdgeviewPath + "signing-cert.pem" // 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 an hour 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" // PersistKubelogDir - Location for kube service container logs PersistKubelogDir = PersistDir + "/kubelog" // 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" // ImportGlobalConfigFile - old legacy file with ConfigItemValueMap items for bootstrapping ImportGlobalConfigFile = IdentityDirname + "/GlobalConfig/global.json" // BaseAuthorizedKeysFile - for an initial SSH key BaseAuthorizedKeysFile = IdentityDirname + "/authorized_keys" // 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" 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" // NetTraceFolder - folder to store network traces NetTraceFolder = "/persist/nettrace" // 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" // CoverageDir - directory where coverage-instrumented zedbox binaries // write their binary coverage files (GOCOVERDIR). Only used when EVE // is built with COVER=y (go build -cover -covermode=atomic). CoverageDir = PersistDir + "/coverage" // CheckpointDirname - directory for persisting received configuration // (from controller, LPS, etc.). CheckpointDirname = PersistDir + "/checkpoint" // LocalActiveAppConfigDir - directory to put JSON of the apps that are running. LocalActiveAppConfigDir = "/persist/vault/active-app-instance-config/" // K3sInitialVersionPath - file to store the first k3s version a node initializes to K3sInitialVersionPath = PersistKubelogDir + "/initial_k3s_version" // PolicyPcrFile - file to store TPM PCR policy indexes, this // is just a hint to know which PCRs to use for sealing/unsealing, // changing this file does not change the actual policy, hence // needs not be protected. PolicyPcrFile = PersistStatusDir + "/policy-pcr.json" )
const ( // DevPrefix - general file prefix string for device log files DevPrefix = "dev.log." // DevPrefixUpload - file prefix string for device log files to upload DevPrefixUpload = "dev.log.upload." // DevPrefixKeep - file prefix string for device log files to keep on device DevPrefixKeep = "dev.log.keep." // 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 ( // KubeSvcRT : index of the routing table used for the Kubernetes service prefix. // Only used in the EVE 'k' image. KubeSvcRT = 400 // DPCBaseRTIndex : base index for per-port routing tables used for device // connectivity (between EVE and remote endpoints, such as the controller), // i.e. used for DevicePortConfig (abbreviated to DPC). // Routing table ID is a sum of the base with the interface index of the corresponding // physical interface. DPCBaseRTIndex = 500 // NIBaseRTIndex : base index for per-NI (network instance) routing tables used // for external connectivity (between applications and remote endpoints). // Routing table ID is a sum of the base with the "bridge number" allocated // (and persisted) for every network instance. NIBaseRTIndex = 800 // PbrNatOutGatewayPrio : IP rule priority for packets destined to gateway(bridge ip) coming from apps. PbrNatOutGatewayPrio = 9999 // PbrNatOutPrio : IP rule priority for packets destined to internet coming from apps PbrNatOutPrio = 10000 // PbrNatInPrio : IP rule priority for external packets coming in towards apps PbrNatInPrio = 11000 // PbrLocalDestPrio : IP rule priority for packets destined to locally owned addresses PbrLocalDestPrio = 12000 // PbrKubeNetworkPrio : IP rule priority for traffic flowing through the Kubernetes // network. PbrKubeNetworkPrio = 13000 // PbrLocalOrigPrio : IP rule priority for locally (dom0) generated packets PbrLocalOrigPrio = 15000 // MgmtPortBaseMetric is the base metric value for all management ports. // The final metric for each management port is calculated as: // MgmtPortBaseMetric + index_in_cost_order MgmtPortBaseMetric = 5000 // The final metric for each app-shared port is calculated as: // AppSharedPortBaseMetric + index_in_cost_order AppSharedPortBaseMetric = 10000 )
const ( // PNACStateDir is the directory containing per-interface PNAC state files. // // One file is created per network adapter, named after the interface // (e.g., /run/nim/pnac.state/eth0). // // Each file contains two fields: // STATE: <CONNECTED> or <DISCONNECTED> // TIMESTAMP: <Unix timestamp of the last state change> // // These files are updated automatically by the wpa_supplicant event watcher // to reflect the current port authentication state. PNACStateDir = "/run/nim/pnac.state" // WpaSupplicantCtrlSockDir is the directory containing per-interface // wpa_supplicant control sockets used by clients (e.g., wpa_cli) to send // commands and query status from the supplicant. Each interface has a // Unix domain socket named after the interface (e.g. /run/nim/wpa_supplicant/eth0). WpaSupplicantCtrlSockDir = "/run/nim/wpa_supplicant" )
const ( // DhcpcdResolvConfDir : directory where dhcpcd stores resolv.conf // files separately for every interface (named <interface>.dhcp). DhcpcdResolvConfDir = "/run/dhcpcd/resolv.conf" // WwanResolvConfDir : directory where wwan microservice stores resolv.conf // files separately for every interface (named <interface>.dhcp). WwanResolvConfDir = "/run/wwan/resolv.conf" )
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 ( // PolicyPCRRecoveredDefault indicate that the PCR policy was recovered using default PCRs. PolicyPCRRecoveredDefault = 0 // PolicyPCRRecovered indicate that the PCR policy was recovered locally by vaultmgr. PolicyPCRRecovered = -1 )
const ( VolumeSubStateInitial volumeSubState = iota VolumeSubStatePreparing VolumeSubStatePrepareDone VolumeSubStateCreated VolumeSubStateDeleting )
Enum of volumeSubState variants
const ( MaintenanceModeReasonNone = MaintenanceModeReason(info.MaintenanceModeReason_MAINTENANCE_MODE_REASON_NONE) MaintenanceModeReasonUserRequested = MaintenanceModeReason(info.MaintenanceModeReason_MAINTENANCE_MODE_REASON_USER_REQUESTED) MaintenanceModeReasonVaultLockedUp = MaintenanceModeReason(info.MaintenanceModeReason_MAINTENANCE_MODE_REASON_VAULT_LOCKED_UP) MaintenanceModeReasonNoDiskSpace = MaintenanceModeReason(info.MaintenanceModeReason_MAINTENANCE_MODE_REASON_LOW_DISK_SPACE) MaintenanceModeReasonTpmEncFailure = MaintenanceModeReason(info.MaintenanceModeReason_MAINTENANCE_MODE_REASON_TPM_ENCRYPTION_FAILURE) MaintenanceModeReasonTpmQuoteFailure = MaintenanceModeReason(info.MaintenanceModeReason_MAINTENANCE_MODE_REASON_TPM_QUOTE_FAILURE) MaintenanceModeReasonEdgeNodeCertsRefused = MaintenanceModeReason(info.MaintenanceModeReason_MAINTENANCE_MODE_REASON_EDGE_NODE_CERTS_REFUSED) )
MaintenanceModeReason codes for storing reason for getting into maintenance mode, this should match the values in api/proto/info/info.proto.MaintenanceModeReason
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 ( // DefaultDrainSkipK8sAPINotReachableTimeoutSeconds is the time duration which the drain request handler // will continue retrying the k8s api before declaring the node is unavailable and continuing // device operations (reboot/shutdown/upgrade) // This covers the following k8s.io/apimachinery/pkg/api/errors // IsInternalError // IsServerTimeout // IsServiceUnavailable // IsTimeout // IsTooManyRequests DefaultDrainSkipK8sAPINotReachableTimeoutSeconds = 300 // DefaultDrainTimeoutHours is time allowed for a node drain before a failure is returned DefaultDrainTimeoutHours = 24 // DefaultClusterWideDetectWindowMultiple is the multiplier applied to the config interval // to derive the cluster-wide simultaneous-drain detection window. // A value of 2 covers nodes that poll at opposite edges of their config fetch windows. DefaultClusterWideDetectWindowMultiple = 2 )
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 DnsmasqLeaseDir = "/run/zedrouter/dnsmasq.leases/"
DnsmasqLeaseDir is a directory with files (one per NI bridge) storing IP leases granted to applications by dnsmasq.
const EveOSVendorClassID = "LFEDGE-EVE"
EveOSVendorClassID is the DHCP Vendor Class Identifier (Option 60) used by EVE OS to identify itself to DHCP servers, which may use it for policy decisions such as address assignment or network access. For example, a network may grant access to the EVE controller when it detects an EVE device through this vendor class identifier.
const KubeContainerImagePrefix = "docker.io/"
KubeContainerImagePrefix : Container Image prefix adding to kubevirt container image name
const (
KubeServicePrefix = "10.43.0.0/16" // Standard K3s service CIDR
)
Define the K8s service CIDR that we want to exclude from external IP handling
const LonghornDiskReservedGBDisabled uint32 = 1024 * 1024
LonghornDiskReservedGBDisabled is the sentinel value for LonghornDiskReservedGB that disables EVE's override, leaving the current Longhorn storageReserved value untouched.
const VmiDescheduleEventBoot = "boot"
VmiDescheduleEventBoot is the KubernetesVmiDescheduleEvents token that enables the on-boot descheduler trigger.
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{ "none": 0, "emerg": 1, "alert": 2, "crit": 3, "critical": 3, "err": 4, "error": 4, "warning": 5, "warn": 5, "notice": 6, "info": 7, "debug": 8, "all": 99, } // 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" // TpmMeasurementLogFile is a kernel exposed variable that contains the // TPM measurements and events log. it is not a constant so tests can override it. TpmMeasurementLogFile = "/hostfs/sys/kernel/security/tpm0/binary_bios_measurements" // TpmMeasurefsEventLog is the file containing the event log from the measure-config. // it is not a constant so tests can override it. TpmMeasurefsEventLog = PersistStatusDir + "/measurefs_tpm_event_log" )
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, NetTraceFolder, PersistStatusDir, CertificateDirname, SealedDirName, ClearDirName, PersistDebugDir, PersistInstallerDir, NewlogDir, MemoryMonitorOutputDir, PersistDir + "/ingested", 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", PersistDir + "/kube-save-var-lib", }
ReportDirPaths Report directory usage for these paths
var ReportDiskPaths = []string{ "/", "/hostfs", IdentityDirname, PersistDir, }
ReportDiskPaths Report disk usage for these paths
var ResolveConfDirs = []string{DhcpcdResolvConfDir, WwanResolvConfDir}
ResolveConfDirs : directories where resolv.conf for an interface could be found.
Functions ¶
func CompletedBinaryBlobIdxByName ¶
func CompletedBinaryBlobIdxByName(blobs []BinaryBlobCompleted, name string) int
CompletedBinaryBlobIdxByName returns index of element in blobs list which FileName matches name
func CompletedCipherBlobIdxByName ¶
func CompletedCipherBlobIdxByName(blobs []BinaryCipherBlob, name string) int
CompletedCipherBlobIdxByName 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 DnsmasqLeaseFilePath ¶
DnsmasqLeaseFilePath returns the path to a file with IP leases granted to applications connected to a given bridge.
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 GetDiagRemoteEndpointURLs ¶
func GetDiagRemoteEndpointURLs(log *base.LogObject, gcp *ConfigItemValueMap) []*url.URL
GetDiagRemoteEndpointURLs returns diagnostic probe endpoint URLs configured in the provided ConfigItemValueMap. It looks up both HTTP and HTTPS endpoints, parses them into *url.URL values with the correct scheme enforced, and returns a slice containing all successfully parsed URLs.
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 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 GetTimestampFromGzipName ¶
GetTimestampFromGzipName - get timestamp from gzip file name
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 IfnameToResolvConf ¶
IfnameToResolvConf : Look for resolv.conf file(s) created by dhcpcd for a given interface.
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 ResolvConfToIfname ¶
ResolvConfToIfname : Returns the name of the interface for which the given resolv.conf file was created.
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 Affinity ¶
type Affinity uint8
Affinity - Cluster App Instance Node Affinity
const ( // PreferredDuringScheduling - designated_node_id is preferred for placement but // if the node is unhealthy, app can run on other nodes. PreferredDuringScheduling Affinity = iota // RequiredDuringScheduling - designated_node_id is required to be healthy for // app instance to boot, app will not failover to other nodes. RequiredDuringScheduling )
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 AppBootConfig ¶
type AppBootConfig struct {
AppUUID uuid.UUID // UUID of the application instance
DisplayName string // Display name for logging
BootOrder zcommon.BootOrder // Boot order setting from LPS
}
AppBootConfig contains boot configuration for a single application received from Local Profile Server (LPS). This is cached by localcommand and used by parseconfig to preserve LPS-set boot order when processing controller config.
type AppBootInfo ¶
type AppBootInfo struct {
AppUUID uuid.UUID // UUID of the application instance
DisplayName string // Display name for the application
BootOrder zcommon.BootOrder // Effective boot order applied
Source profile.BootOrderSource // Which source determined the boot order
}
AppBootInfo contains the effective boot order and its source for an application. This is published to LPS via POST /api/v1/appbootinfo.
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
// 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
// Am I Cluster Designated Node Id for this app
IsDesignatedNodeID bool
// Node Affinity for cluster IsDesignatedNodeID
AffinityType Affinity
// AppRuntimeType specifies the runtime type of the application
DeploymentType AppRuntimeType
// ControllerBootOrder stores the raw boot order value from the Controller API.
// This is used to re-evaluate the effective boot order when LPS clears its
// override or when device property changes. The effective boot order
// (FixedResources.BootOrder) is determined by precedence: LPS > Controller > DeviceProperty.
ControllerBootOrder zcommon.BootOrder
// BootOrderSource indicates which configuration source determined the effective
// boot order (FixedResources.BootOrder). This is stored at AppInstanceConfig level
// (not in FixedResources) because it's purely informational for LPS reporting
// and shouldn't trigger domain restarts when only the source changes.
BootOrderSource profile.BootOrderSource
}
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
// NoBootPriority indicates whether the application instance has no boot priority set.
// If true, the application instance will not be prioritized during the boot process.
NoBootPriority bool
// 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
// Not upload stats to controller if true
// This is used in cluster-mode to avoid multiple nodes
// updating the same app instance status
NoUploadStatsToController bool
// Am I Cluster Designated Node Id for this app
IsDesignatedNodeID bool
}
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 AppKubeStatus ¶
type AppKubeStatus uint8
AppKubeStatus represents this node's last view of an app's lifecycle in the kubernetes cluster. Each value comes from a distinct branch in zedkube's periodic poll. Consumers should treat any value other than AppKubeStatusRunning as "no authoritative evidence the app is running on a peer" and fail open accordingly.
const ( // AppKubeStatusUnknown - never polled (cold start; zero value). AppKubeStatusUnknown AppKubeStatus = iota // AppKubeStatusAPIUnreachable - kube API not reachable past the grace window. AppKubeStatusAPIUnreachable // AppKubeStatusNotInCluster - API ok, no pod found for this app. AppKubeStatusNotInCluster // AppKubeStatusNotRunningState - pod found, kubernetes phase != PodRunning. AppKubeStatusNotRunningState // AppKubeStatusRunningState - pod found, kubernetes phase == PodRunning. AppKubeStatusRunningState )
func (AppKubeStatus) String ¶
func (s AppKubeStatus) String() string
String returns a human-readable name for the AppKubeStatus.
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 uint32 // Order wrt. other virtual and also directly assigned network adapters
// 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 the controller
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
DeploymentType AppRuntimeType
}
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
DeploymentType AppRuntimeType
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) GetAllAppIPs ¶
func (status AppNetworkStatus) GetAllAppIPs() (appIPs []net.IP)
GetAllAppIPs returns all IPv4 and IPv6 addresses currently assigned to the application across its network adapters.
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 AppRuntimeType ¶
type AppRuntimeType int
AppRuntimeType specifies the runtime type of the application With the new types of runtime Apps running on EVE, we need to distinguish them to be able to handle them properly. For example, we need to query into the runtime to get the stats from the IoT-Edge runtime or from the Docker-Compose runtime, each of them having different ways and http endpoints to get the stats in various formats.
const ( // AppRuntimeTypeUnSpecified is the default value for AppRuntimeType, indicating an unspecified runtime type. AppRuntimeTypeUnSpecified AppRuntimeType = iota // AppRuntimeTypeDocker is used for applications running in a Docker Compose runtime. AppRuntimeTypeDocker )
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 BearerType ¶
type BearerType int32
BearerType : purpose of a given cellular bearer.
const ( // BearerTypeUnspecified : bearer type is not specified/known. BearerTypeUnspecified BearerType = iota // BearerTypeAttach : bearer used for the initial attach procedure. BearerTypeAttach // BearerTypeDefault : default connection bearer providing packet data access // to the network. BearerTypeDefault // BearerTypeDedicated : secondary context (2G/3G) or dedicated bearer (4G), // defined by the user of the API. These bearers use the same IP address used // by a primary context or default bearer and provide a dedicated flow for specific // traffic with different QoS settings. BearerTypeDedicated )
The values here should be same as the ones defined in info.proto of EVE API.
func (BearerType) ToProto ¶
func (bt BearerType) ToProto(log *base.LogObject) evecommon.BearerType
ToProto converts a BearerType to its corresponding protobuf enum representation.
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"`
// Encrypted ArtifactMetadata for blob
EncArtifactMeta CipherBlockStatus `json:"encArtifactMeta"`
URL string `json:"url"` //nolint:var-naming
Size int64 `json:"size"`
}
BinaryBlobCompleted is representation of binary blob ready to be downloaded by app instance
func (BinaryBlobCompleted) MarshalJSON ¶
func (b BinaryBlobCompleted) MarshalJSON() ([]byte, error)
MarshalJSON is used to customize the JSON output for BinaryBlobCompleted The blob structures are also used in the return of json formatted patchenvelope description request. This is to suppress the CipherBlockStatus cipher structure items detail when displaying. Implement the json.Marshaler interface for BinaryBlobCompleted
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"`
// Encrypted ArtifactMetadata for blob
EncArtifactMeta CipherBlockStatus `json:"encArtifactMeta"`
ImageID string `json:"imageId"`
}
BinaryBlobVolumeRef is representation of external binary blobs, which has not yet been downloaded
func (BinaryBlobVolumeRef) MarshalJSON ¶
func (b BinaryBlobVolumeRef) MarshalJSON() ([]byte, error)
MarshalJSON is used to customize the JSON output for BinaryBlobVolumeRef Implement the json.Marshaler interface for BinaryBlobVolumeRef
type BinaryCipherBlob ¶
type BinaryCipherBlob struct {
// EncType is type of encryption
EncType BlobEncrytedType `json:"encType"`
// ArtifactMetadata is generic info i.e. user info, desc etc.
ArtifactMetaData string `json:"artifactMetaData"`
// Encrypted ArtifactMetadata for blob
EncArtifactMeta CipherBlockStatus `json:"encArtifactMeta"`
// EncURL is URL to download encrypted binary blob in CipherBlockStatus format
// which contains either ONEOF inline or volume encrypted data
EncURL string `json:"encURL"`
// EncFileName is file name of the encrypted binary blob
EncFileName string `json:"encFileName"`
// Inline - used for post decrypt inline binary blob
Inline *BinaryBlobCompleted `json:"inline"`
// Volume - used for post decrypt volume binary blob
Volume *BinaryBlobVolumeRef `json:"volume"`
}
BinaryCipherBlob is encrypted binary blob for Binary Artifact
func (BinaryCipherBlob) MarshalJSON ¶
func (b BinaryCipherBlob) MarshalJSON() ([]byte, error)
MarshalJSON is used to customize the JSON output for BinaryCipherBlob Implement the json.Marshaler interface for BinaryBlobVolumeRef
type BlobEncrytedType ¶
type BlobEncrytedType int8
BlobEncrytedType - type of encrypted Binary blob
const ( // BlobEncrytedTypeNone - no encryption BlobEncrytedTypeNone BlobEncrytedType = iota // BlobEncrytedTypeInline - inline encryption BlobEncrytedTypeInline // BlobEncrytedTypeVolume - volume encryption BlobEncrytedTypeVolume )
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
RetryCount uint32
}
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 BondARPMonitorStatus ¶
type BondARPMonitorStatus struct {
Enabled bool
PollingInterval uint32 // in milliseconds
IPTargets []net.IP
MissedMax uint32
}
BondARPMonitorStatus : ARP monitoring status as applied by the bond driver.
func (BondARPMonitorStatus) Equal ¶
func (m BondARPMonitorStatus) Equal(m2 BondARPMonitorStatus) bool
Equal compares two BondARPMonitorStatus values.
type BondArpMonitor ¶
type BondArpMonitor struct {
Enabled bool `json:",omitempty"`
Interval uint32 `json:",omitempty"`
IPTargets []net.IP `json:",omitempty"`
}
BondArpMonitor : ARP-based link monitoring parameters (see devmodel.proto for description).
func (BondArpMonitor) Equal ¶
func (m BondArpMonitor) Equal(m2 BondArpMonitor) bool
Equal compares two BondArpMonitor configs for equality.
type BondConfig ¶
type BondConfig struct {
// Logical names of PhysicalIO network adapters aggregated by this bond.
AggregatedPorts []string `json:",omitempty"`
// Bonding policy.
Mode BondMode `json:",omitempty"`
// LACPDU packets transmission rate.
// Applicable for BondMode802Dot3AD only.
LacpRate LacpRate `json:",omitempty"`
// Link monitoring is either disabled or one of the monitors
// is enabled, never both at the same time.
MIIMonitor BondMIIMonitor `json:",omitempty"`
ARPMonitor BondArpMonitor `json:",omitempty"`
}
BondConfig - Bond (LAG) interface configuration.
func (BondConfig) Equal ¶
func (b BondConfig) Equal(b2 BondConfig) bool
Equal compares two BondConfig values for equality.
type BondLACPChurnState ¶
type BondLACPChurnState uint8
BondLACPChurnState represents the LACP churn detection state.
const ( // BondLACPChurnNone means no churn detected — LACP negotiation is stable. BondLACPChurnNone BondLACPChurnState = iota // BondLACPChurnMonitoring means waiting to confirm stability. BondLACPChurnMonitoring // BondLACPChurnChurned means the partner is frequently changing parameters. BondLACPChurnChurned )
type BondLACPStatus ¶
type BondLACPStatus struct {
Enabled bool
LACPRate LacpRate
ActiveAggregatorID uint16
PartnerMAC net.HardwareAddr
ActorKey uint16
PartnerKey uint16
}
BondLACPStatus : 802.3ad LACP status.
func (BondLACPStatus) Equal ¶
func (l BondLACPStatus) Equal(l2 BondLACPStatus) bool
Equal compares two BondLACPStatus values.
type BondMIIMonitor ¶
type BondMIIMonitor struct {
Enabled bool `json:",omitempty"`
Interval uint32 `json:",omitempty"`
UpDelay uint32 `json:",omitempty"`
DownDelay uint32 `json:",omitempty"`
}
BondMIIMonitor : MII link monitoring parameters (see devmodel.proto for description).
type BondMIIMonitorStatus ¶
type BondMIIMonitorStatus struct {
Enabled bool
PollingInterval uint32 // in milliseconds
UpDelay uint32 // in milliseconds
DownDelay uint32 // in milliseconds
}
BondMIIMonitorStatus : MII monitoring status as applied by the bond driver.
type BondMemberLACPMetrics ¶
type BondMemberLACPMetrics struct {
// ActorChurnedCount is the number of times the actor detected churn.
ActorChurnedCount uint64
// PartnerChurnedCount is the number of times the partner detected churn.
PartnerChurnedCount uint64
}
BondMemberLACPMetrics contains LACP (802.3ad) counters for a bond member.
type BondMemberLACPStatus ¶
type BondMemberLACPStatus struct {
// AggregatorID to which this member is assigned.
AggregatorID uint16
// ActorChurnState for this member.
ActorChurnState BondLACPChurnState
// PartnerChurnState for this member.
PartnerChurnState BondLACPChurnState
}
BondMemberLACPStatus : per-member LACP status.
type BondMemberMetrics ¶
type BondMemberMetrics struct {
// LogicalLabel of the member port.
LogicalLabel string
// IfName of the member interface.
IfName string
// LinkFailureCount is the cumulative number of link failures detected.
LinkFailureCount uint64
// LACP contains LACP-specific counters (802.3ad mode only).
LACP *BondMemberLACPMetrics
}
BondMemberMetrics contains metrics for a single member within a bond.
type BondMemberStatus ¶
type BondMemberStatus struct {
// Logicallabel of the member port.
Logicallabel string
// MIIUp indicates whether the member's MII link is up.
MIIUp bool
// LACP contains LACP-specific status (802.3ad only).
LACP *BondMemberLACPStatus
}
BondMemberStatus : per-member runtime status within a bond.
func (BondMemberStatus) Equal ¶
func (s BondMemberStatus) Equal(s2 BondMemberStatus) bool
Equal compares two BondMemberStatus values.
type BondMetrics ¶
type BondMetrics struct {
// LogicalLabel of the bond adapter.
LogicalLabel string
// Members contains per-member metrics.
Members []BondMemberMetrics
}
BondMetrics contains metrics for a single bond adapter.
type BondMetricsList ¶
type BondMetricsList struct {
Bonds []BondMetrics
}
BondMetricsList is published by nim and consumed by zedagent.
func (BondMetricsList) Key ¶
func (b BondMetricsList) Key() string
Key returns the pubsub message key for BondMetricsList.
type BondMode ¶
type BondMode uint8
BondMode specifies the policy indicating how bonding members are used during network transmissions.
const ( // BondModeUnspecified : default is Round-Robin BondModeUnspecified BondMode = iota // BondModeBalanceRR : Round-Robin BondModeBalanceRR // BondModeActiveBackup : Active/Backup BondModeActiveBackup // BondModeBalanceXOR : select member for a packet using a hash function BondModeBalanceXOR // BondModeBroadcast : send every packet on all members BondModeBroadcast // BondMode802Dot3AD : IEEE 802.3ad Dynamic link aggregation BondMode802Dot3AD // BondModeBalanceTLB : Adaptive transmit load balancing BondModeBalanceTLB // BondModeBalanceALB : Adaptive load balancing BondModeBalanceALB )
type BondStatus ¶
type BondStatus struct {
// Mode is the bonding mode currently applied.
Mode BondMode
// ActiveMember is the logical label of the currently active member interface.
// Applicable for active-backup, balance-tlb and balance-alb modes.
ActiveMember string
// MIIMonitor reports MII link monitoring parameters (if enabled).
MIIMonitor BondMIIMonitorStatus
// ARPMonitor reports ARP link monitoring parameters (if enabled).
ARPMonitor BondARPMonitorStatus
// LACP reports 802.3ad LACP status (only for BondMode802Dot3AD).
LACP BondLACPStatus
// Members contains per-member runtime status.
Members []BondMemberStatus
}
BondStatus : runtime status of a bond adapter. Only meaningful when L2Type == L2LinkTypeBond.
func (BondStatus) Equal ¶
func (s BondStatus) Equal(s2 BondStatus) bool
Equal compares two BondStatus values.
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 BootReasonKubeTransition // Transition to/from kubernetes single/cluster modes 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 CSRProfile ¶
type CSRProfile struct {
// Subject specifies the X.509 Distinguished Name (DN) for the certificate.
Subject CertDistinguishedName
// SAN specifies Subject Alternative Name extensions for the certificate.
SAN CertSubjectAlternativeName
// RenewPeriodPercent defines when renewal should be attempted,
// expressed as a percentage of the certificate validity period.
// Example: 80 means renewal will start after 80% of the lifetime.
// If unset (zero), a system-defined default may be applied.
RenewPeriodPercent uint8
// KeyType specifies the algorithm and parameters used to generate
// the private key
KeyType eveconfig.KeyType
// HashAlgorithm specifies the hash function used for:
// - CSR signing
// - SCEP message signing
HashAlgorithm eveconfig.HashAlgorithm
}
CSRProfile defines parameters used to construct a Certificate Signing Request (CSR) and control certificate renewal behavior.
func (CSRProfile) Equal ¶
func (p CSRProfile) Equal(other CSRProfile) bool
Equal returns true if two CSRProfile values are equivalent. Used to detect configuration changes that require certificate re-enrollment.
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 `json:",omitempty"`
// Probe used to detect broken connection.
Probe WwanProbe `json:",omitempty"`
// Enable to get location info from the GNSS receiver of the cellular modem.
LocationTracking bool `json:",omitempty"`
}
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 `json:",omitempty"`
// If true, then this configuration is currently activated.
Activated bool `json:",omitempty"`
// Access Point Network for the default bearer.
APN string `json:",omitempty"`
// The IP addressing type to use for the default bearer.
IPType WwanIPType `json:",omitempty"`
// Authentication protocol used for the default bearer.
AuthProtocol WwanAuthProtocol `json:",omitempty"`
// Cleartext user credentials for the default bearer.
// Used only for network configuration submitted via Local Profile Server.
CleartextCredentials WwanCleartextCredentials `json:",omitempty"`
// Encrypted user credentials for the default bearer and/or the attach bearer
// (when required).
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 `json:",omitempty"`
// The list of preferred Radio Access Technologies (RATs) to use for connecting
// to the network.
PreferredRATs []WwanRAT `json:",omitempty"`
// If true, then modem will avoid connecting to networks with roaming.
ForbidRoaming bool `json:",omitempty"`
// Access Point Network for the attach (aka initial) bearer.
AttachAPN string `json:",omitempty"`
// The IP addressing type to use for the attach bearer.
AttachIPType WwanIPType `json:",omitempty"`
// Authentication protocol used for the attach bearer.
AttachAuthProtocol WwanAuthProtocol `json:",omitempty"`
// Cleartext user credentials for the attach bearer.
// Used only for network configuration submitted via Local Profile Server.
AttachCleartextCredentials WwanCleartextCredentials `json:",omitempty"`
}
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 CertDistinguishedName ¶
type CertDistinguishedName struct {
CommonName string
SerialNumber string
Organization []string
OrganizationalUnit []string
Country []string
State []string
Locality []string
}
CertDistinguishedName represents selected X.509 Distinguished Name (DN) attributes. This structure includes commonly used fields but does not attempt to model the full ASN.1 DN grammar.
func (CertDistinguishedName) Equal ¶
func (n CertDistinguishedName) Equal(other CertDistinguishedName) bool
Equal returns true if two CertDistinguishedName values are equivalent. Multi-valued RDN components are compared as order-independent sets.
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 CertSubjectAlternativeName ¶
type CertSubjectAlternativeName struct {
DNSNames []string
EmailAddresses []string
IPAddresses []net.IP
URIs []string
}
CertSubjectAlternativeName represents X.509 Subject Alternative Name (SAN) extensions.
func (CertSubjectAlternativeName) Equal ¶
func (n CertSubjectAlternativeName) Equal(other CertSubjectAlternativeName) bool
Equal returns true if two CertSubjectAlternativeName values are equivalent. All SAN entries are compared as order-independent sets.
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) Equal ¶
func (status *CipherBlockStatus) Equal(status2 CipherBlockStatus) bool
Equal compares two instances of CipherBlockStatus for equality.
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 ClusterType ¶
type ClusterType uint8
ClusterType represents a cluster configuration type including various preinstalled components
const ( // ClusterTypeNone - default value ClusterTypeNone ClusterType = iota // ClusterTypeK3sBase - k3s,registration yaml ClusterTypeK3sBase // ClusterTypeReplicatedStorage - k3s,cdi,kubevirt,longhorn ClusterTypeReplicatedStorage // ClusterTypeHA - future use ClusterTypeHA )
type CollectInfoCmd ¶
CollectInfoCmd : passing this to trigger a collect-info.sh call
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) FromProto ¶
func (cp *ConnectivityProbe) FromProto(probe *evecommon.ConnectivityProbe) error
FromProto populates the ConnectivityProbe from its protobuf representation. Returns an error if the probe configuration is invalid.
func (ConnectivityProbe) String ¶
func (cp ConnectivityProbe) String() string
String returns human-readable description of the probe.
func (ConnectivityProbe) ToProto ¶
func (cp ConnectivityProbe) ToProto() *evecommon.ConnectivityProbe
ToProto converts ConnectivityProbe into its protobuf representation.
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
// Do we download on this node ?
IsLocal bool
}
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
IsLocal 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 ControllerConnMetrics ¶
type ControllerConnMetrics struct {
FailureCount uint64
SuccessCount uint64
LastFailure time.Time
LastSuccess time.Time
URLCounters map[string]URLMetrics
AuthFailCount uint64
}
ControllerConnMetrics holds communication statistics with the controller for a single interface. It tracks successes, failures, authentication failures, and per-URL metrics.
type DAttrTable ¶
type DAttrTable struct {
ID int
AttributeName string
Value int64
Worst uint8
Threshold uint8
Flags uint16
RawValue int
Type string
}
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 )
func (DPCState) Describe ¶
Describe returns a short human-readable description of the current DPC state.
func (DPCState) InProgress ¶
InProgress returns true if the DPC verification is still in progress (i.e., the state is not final).
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 `json:",omitempty"`
ProbeAddr string `json:",omitempty"`
DisableProbe bool `json:",omitempty"`
LocationTracking bool `json:",omitempty"`
}
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 // DevCommandGracefulReboot : shut down all app instances + reboot DevCommandGracefulReboot // DevCommandCollectInfo : starts a collect-info.sh DevCommandCollectInfo )
Integer values are in-sync with proto enum LocalDevCmd_Command.
func (DevCommand) String ¶
func (c DevCommand) String() string
String returns the human-readable name of the DevCommand. If the command is not recognized, it returns "Unknown".
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) IsPortUsedAsVlanParent ¶
func (status DeviceNetworkStatus) IsPortUsedAsVlanParent(portLabel string) bool
IsPortUsedAsVlanParent - returns true if port with the given logical label is used as a VLAN parent interface.
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 settable 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 `json:",omitempty"`
Key string `json:",omitempty"`
TimePriority time.Time `json:",omitempty"` // All zero's is fallback lowest priority
State DPCState `json:",omitempty"`
TestResults
LastIPAndDNS time.Time `json:",omitempty"` // Time when we got some IP addresses and DNS
Ports []NetworkPortConfig `json:",omitempty"`
}
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) IsPortAggregatedByBond ¶
func (config DevicePortConfig) IsPortAggregatedByBond(portLabel string) bool
IsPortAggregatedByBond - returns true if port with the given logical label is aggregated by a Bond (LAG).
func (DevicePortConfig) IsPortUsedAsVlanParent ¶
func (config DevicePortConfig) IsPortUsedAsVlanParent(portLabel string) bool
IsPortUsedAsVlanParent - returns true if port with the given logical label is used as a VLAN parent interface.
func (DevicePortConfig) LastTestTime ¶
func (config DevicePortConfig) LastTestTime() time.Time
LastTestTime returns the most recent test time.
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 `json:",omitempty"`
PortConfigList []DevicePortConfig `json:",omitempty"`
}
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 `json:",omitempty"` // If DhcpTypeStatic use below; if DhcpTypeNone do nothing
// AddrSubnet is in CIDR format (e.g., 192.168.1.44/24).
// It's a string (rather than *net.IPNet) to allow unmarshalling from
// user-edited override.json, since *net.IPNet does not implement
// encoding.TextUnmarshaler. (net.IP does, and is therefore used for
// Gateway and DNSServers)
AddrSubnet string `json:",omitempty"`
Gateway net.IP `json:",omitempty"`
DomainName string `json:",omitempty"`
NTPServers []netutils.HostnameOrIP `json:",omitempty"`
DNSServers []net.IP `json:",omitempty"` // If not set we use Gateway as DNS server
Type NetworkType `json:",omitempty"` // 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 a DHCP client to obtain an IP address. // For IPv6, we also use dhcpcd, but its behavior is RA-driven: // - dhcpcd listens to Router Advertisement (RA) messages. // - If the RA contains the M (Managed) flag, it runs stateful DHCPv6 to get an address. // - If the RA contains the O (Other) flag, it may run stateless DHCPv6 (e.g., for DNS). // - If neither flag is set, it uses only SLAAC and does not run DHCPv6. 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 DmiSystemInfo ¶
type DmiSystemInfo struct {
Manufacturer string
ProductName string
Version string
SerialNumber string
UUID string
SKUNumber string
Family string
}
DmiSystemInfo hold system information extracted from dmidecode
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
// UserActivate is the raw user intent from AppInstanceConfig.Activate
// resolved through the current profile only, with no override from cluster
// scheduling state. In kubevirt cluster mode, domainmgr uses this to avoid
// tearing down the cluster-shared VMIRS when Activate=false is a transient
// cluster-status cascade rather than an explicit user opt-out.
UserActivate bool
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 EVE k
KubeImageName string
// PurgeCounter is the sum of PurgeCmd.Counter and LocalPurgeCmd.Counter from the AppInstanceConfig.
// It is used in EVE-K to make the VMI/Pod ReplicaSet name unique across purge cycles,
// preventing AlreadyExists collisions when the old ReplicaSet is still terminating.
PurgeCounter uint32
// RestartCounter is the sum of RestartCmd.Counter and LocalRestartCmd.Counter from the
// AppInstanceConfig. In kubevirt mode it is ORed with PurgeCounter into the doInactivate
// cluster-trust guard so a controller-driven Restart (which bumps RestartCmd, not PurgeCmd)
// is treated as a real teardown signal rather than a transient cluster-status cascade.
RestartCounter uint32
// if this node is the DNiD of the App
IsDNidNode bool
// Node Affinity for cluster IsDesignatedNodeID
AffinityType Affinity
// 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
// OemWindowsLicenseKeyInfo provides the information required to propagate the OEM license key
// to the VM.
OemWindowsLicenseKeyInfo OemWindowsLicenseKeyInfo
DeploymentType AppRuntimeType
}
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
// PurgeCounter is the PurgeCounter that produced the current
// DomainName / kubeName binding. Used in kubevirt mode to detect a
// purge (kubeName change) so the old VMIRS is torn down before the
// new one is created.
PurgeCounter uint32
// RestartCounter is the RestartCounter currently bound to this DomainStatus.
// Used in kubevirt mode together with PurgeCounter to detect a controller
// Restart so the old VMIRS is torn down before the new one is created.
RestartCounter uint32
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
// PassthroughWindowsLicenseKey is true if eveything it available to propagate
// the OEM license key to the VM.
PassthroughWindowsLicenseKey bool
// DeploymentType is the type of deployment for the app
DeploymentType AppRuntimeType
// KubeTrustLoggedState is the last non-RUNNING state for which domainmgr
// emitted the "trusting cluster to recover" log line. Used to deduplicate
// that log to state transitions only. Zero = not yet logged. KubeVirt only.
KubeTrustLoggedState SwState `json:"-"`
}
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
LastRetry time.Time
}
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
// Used only when image verification fails after the download
LastRetry time.Time
}
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 // Pod for this app is scheduled on this node
AppKubeStatus AppKubeStatus // This node's view of the app's kube lifecycle
AppIsVMI bool // Is this a VMI app, vs a Pod app
VMIName string // Kube name of the VMI
VNCPort uint32 // VNC port for the VMI (e.g., 5901)
}
ENClusterAppStatus - Status of an App Instance in the multi-node cluster
func (ENClusterAppStatus) Equal ¶
func (enc ENClusterAppStatus) Equal(newEnc ENClusterAppStatus) bool
Equal returns true if all ENClusterAppStatus fields are equal
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 {
Initialized bool // To tell a subscriber that publisher is done
Valid bool // To tell a subscriber there is a cluster
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
// CipherGzipRegistrationManifestYaml, for compressed bytes of a registration yaml file
// Shares the same CipherBlock as CipherToken
CipherGzipRegistrationManifestYaml CipherBlockStatus
// ClusterType notes the base, replicated storage, ha attributes of the cluster
ClusterType ClusterType
// TieBreakerNodeID - uuid of a node which will be unscheduled for all workloads
TieBreakerNodeID UUIDandVersion
// LBInterfaces - load balancer interface configurations from the controller.
// Populated only for ClusterTypeK3sBase clusters. Mirrors the LoadBalancerService
// interfaces array from the protobuf; each entry holds one interface name and its
// first CIDR from address_cidrs.
LBInterfaces []LBInterfaceConfig
}
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 the
// resolved Linux interface name 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
// EncryptedClusterToken - for kubernetes cluster server token
// This token string is the decrypted from the CipherBlock in the EdgeNodeClusterConfig
// by zedkube using the Controller and Edge-node certificates. See decryptClusterToken()
EncryptedClusterToken string
// LBInterfaces - load balancer interface configurations.
// Only populated on the bootstrap node when LoadBalancerService is configured.
// IPPrefix strings are in CIDR notation consumed by cluster-init.sh via jq.
LBInterfaces []LBInterfaceConfig
// LBIPPrefixes - LB CIDR pool strings populated on every cluster node
// (bootstrap and non-bootstrap) whenever LoadBalancerService is configured.
// Used by dpcmanager to filter kube-vip VIPs (/32 host-route addresses) out
// of AddrInfoList on all nodes, not just the bootstrap node.
LBIPPrefixes []string
// LBConfigError is set on any cluster node (bootstrap or not) when the
// controller-supplied LB CIDR overlaps with a local IP on any L3 port of
// that node. On the bootstrap node the offending LBInterface entry is also
// omitted from LBInterfaces so kube-vip is not applied; non-bootstrap nodes
// only report here since they do not control kube-vip deployment.
LBConfigError ErrorDescription
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 ¶
type EncryptedVaultKeyFromController struct {
Name string
EncryptedVaultKey []byte
PolicyPcr VaultKeyPolicyPCR
}
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
// Credentials for the cellular default bearer:
CellularNetUsername string
CellularNetPassword string
// Credentials for the cellular attach bearer:
CellularNetAttachUsername string
CellularNetAttachPassword string
ProtectedUserData string
ClusterToken string
User zcommon.EncryptionBlockUser
EncryptedData string
GzipRegistrationManifestYaml []byte
SCEPChallengePassword string
}
EncryptionBlock - This is a Mirror of api/proto/config/acipherinfo.proto - EncryptionBlock Always need to keep these two consistent.
type EnrolledCertificateStatus ¶
type EnrolledCertificateStatus struct {
// Certificate enrollment profile used to obtain this certificate.
CertEnrollmentProfileName string
// Certificate Signing Request (CSR) profile used to enroll this certificate.
// Persisted as part of EnrolledCertificateStatus to detect changes in the
// enrollment configuration. If the CSR profile differs from the one currently
// defined in the enrollment profile, the certificate must be re-enrolled.
CSRProfile CSRProfile
// URL of the enrollment server used to obtain this certificate.
// Currently only SCEP servers are supported.
// Persisted as part of EnrolledCertificateStatus to detect changes
// to the configured server endpoint. If the server URL changes,
// the certificate must be re-enrolled against the new server.
EnrollmentServerURL string
// TrustAnchorFingerprints contains SHA-256 fingerprints (hex-encoded) of
// the trust anchor CA certificates from the enrollment profile.
// One entry per configured trust anchor certificate.
// Used to detect when the configured trust anchors change, which
// requires re-enrollment.
TrustAnchorFingerprints []string
// Error indicates if certificate enrollment/renewal failed or
// the enrollment profile config is invalid.
Error ErrorDescription
Subject CertDistinguishedName
Issuer CertDistinguishedName
SAN CertSubjectAlternativeName
// Certificate renewal settings.
// Published in the status in case the user left this unset in the CSR
// and EVE therefore picked the default value.
RenewPeriodPercent uint8
// Key algorithm and parameters used to generate the private key.
KeyType eveconfig.KeyType
// Hash algorithm used for signing operations
// (CSR generation, SCEP messages, etc.).
HashAlgorithm eveconfig.HashAlgorithm
// Certificate validity period.
IssueTimestamp time.Time
ExpirationTimestamp time.Time
// SHA-256 fingerprint of the certificate (hex-encoded).
SHA256Fingerprint string
// Current status of the certificate as observed by the device.
CertStatus eveinfo.CertStatus
// CertFilepath is the filesystem path to the installed certificate (PEM).
CertFilepath string
// CACertBundleFilepath is the filesystem path to the PEM-encoded CA cert bundle.
CACertBundleFilepath string
// PrivateKeyFilepath is the filesystem path to the associated private key (PEM).
// The private key is stored in the vault for protection.
PrivateKeyFilepath string
}
EnrolledCertificateStatus represents the runtime status of a certificate obtained via a certificate enrollment protocol (currently SCEP). This structure reflects the certificate actually installed on the device, including cryptographic parameters, validity, and storage location.
func (EnrolledCertificateStatus) Equivalent ¶
func (s EnrolledCertificateStatus) Equivalent(other EnrolledCertificateStatus) bool
Equivalent returns true if two EnrolledCertificateStatus values are equivalent, ignoring transient error information. This is used to detect configuration or status changes that may require re-enrollment or certificate update, without considering enrollment failures.
func (EnrolledCertificateStatus) Key ¶
func (s EnrolledCertificateStatus) Key() string
Key returns the pubsub message key for EnrolledCertificateStatus instance.
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 (ed *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
func (*ErrorDescription) ToProto ¶
func (ed *ErrorDescription) ToProto() *info.ErrorInfo
ToProto converts an ErrorDescription into its corresponding protobuf representation.
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 EvAuthType ¶
type EvAuthType int32
EvAuthType - enum for authentication type of edge-view
const ( EvAuthTypeUnspecified EvAuthType = iota // EvAuthTypeUnspecified - an unspecified authentication type. EvAuthTypeControllerCert // EvAuthTypeControllerCert - using authen of controller cert EvAuthTypeSSHRsaKeys // EvAuthTypeSSHRsaKeys - using ssh rsa keys )
EvAuthType defines the authentication types for edge-view.
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 EvalPersist ¶
type EvalPersist struct {
// Slots maps slot names to their evaluation state
Slots map[SlotName]SlotEvalState `json:"slots"`
// BestSlot is the slot determined to be the best after evaluation
BestSlot SlotName `json:"best_slot,omitempty"`
// Phase tracks the current evaluation phase
Phase EvalPhase `json:"phase"`
// LastUpdated timestamp of last state update
LastUpdated time.Time `json:"last_updated"`
}
EvalPersist represents the persistent state stored in /persist/eval/state.json
type EvalPhase ¶
type EvalPhase string
EvalPhase represents the current phase of evaluation
const ( // EvalPhaseInit - Initial phase, evaluation manager starting up EvalPhaseInit EvalPhase = "init" // EvalPhaseTesting - Currently testing slots one by one EvalPhaseTesting EvalPhase = "testing" // EvalPhaseFinal - Evaluation complete, best slot selected and running EvalPhaseFinal EvalPhase = "final" )
type EvalStatus ¶
type EvalStatus struct {
// IsEvaluationPlatform indicates if this is an evaluation device
IsEvaluationPlatform bool
// CurrentSlot is the currently booted slot
CurrentSlot SlotName
// Phase is the current evaluation phase
Phase EvalPhase
// AllowOnboard gates whether onboarding should proceed
AllowOnboard bool
// Note contains human-readable status information
Note string
// LastUpdated timestamp when this status was last updated
LastUpdated time.Time
// TestStartTime when current test phase started
TestStartTime time.Time
// TestDuration total duration for current test phase
TestDuration time.Duration
// RebootCountdown seconds until reboot (0 if no reboot pending)
RebootCountdown int
// InventoryCollected indicates if hardware inventory was collected for current slot
InventoryCollected bool
// InventoryDir is the directory path where inventory was stored (empty if not collected)
InventoryDir string
}
EvalStatus is published by evalmgr to communicate evaluation state
func (EvalStatus) DetailedNote ¶
func (status EvalStatus) DetailedNote() string
DetailedNote returns comprehensive status with timing info
func (EvalStatus) ElapsedTime ¶
func (status EvalStatus) ElapsedTime() time.Duration
ElapsedTime returns elapsed time since test started
func (EvalStatus) IsOnboardingAllowed ¶
func (status EvalStatus) IsOnboardingAllowed() bool
IsOnboardingAllowed returns whether onboarding should be allowed based on the current evaluation status. This method encapsulates the logic for determining onboarding permission based on multiple internal states.
func (EvalStatus) Key ¶
func (status EvalStatus) Key() string
Key returns the key for pubsub (single instance)
func (EvalStatus) LogCreate ¶
func (status EvalStatus) LogCreate(logBase *base.LogObject)
LogCreate logs the creation of EvalStatus
func (EvalStatus) LogDelete ¶
func (status EvalStatus) LogDelete(logBase *base.LogObject)
LogDelete logs the deletion of EvalStatus
func (EvalStatus) LogKey ¶
func (status EvalStatus) LogKey() string
LogKey returns the log key for EvalStatus
func (EvalStatus) LogModify ¶
func (status EvalStatus) LogModify(logBase *base.LogObject, old interface{})
LogModify logs modifications to EvalStatus
func (EvalStatus) OnboardingBlockReason ¶
func (status EvalStatus) OnboardingBlockReason() string
OnboardingBlockReason returns a human-readable reason why onboarding is blocked. Returns empty string if onboarding is allowed.
func (EvalStatus) ProgressPercent ¶
func (status EvalStatus) ProgressPercent() int
ProgressPercent returns test progress as percentage (0-100)
func (EvalStatus) RebootStatusString ¶
func (status EvalStatus) RebootStatusString() string
RebootStatusString returns reboot countdown status
func (EvalStatus) RemainingTime ¶
func (status EvalStatus) RemainingTime() time.Duration
RemainingTime returns the remaining time for current test phase
func (EvalStatus) TimeStatusString ¶
func (status EvalStatus) TimeStatusString() string
TimeStatusString returns human-readable time status
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
Aut EvAuthType `json:"aut"` // authentication type
}
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 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 FsUsedMetric ¶
FsUsedMetric - contains the used and allocated space of a NestedApp running on a runtime app instance.
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" // HardwareHealthInterval global setting key HardwareHealthInterval GlobalSettingKey = "timer.hardwarehealth.interval" // DevInfoInterval global setting key DevInfoInterval GlobalSettingKey = "timer.deviceinfo.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" // LonghornDiskReservedGB is the number of GB reserved per disk on the local Longhorn node. // Overrides Longhorn's default 25% reservation. 0 sets storageReserved to 0 bytes (no // reservation). Set to LonghornDiskReservedGBDisabled to disable EVE's override entirely. LonghornDiskReservedGB GlobalSettingKey = "storage.longhorn.disk.reserved.gigabytes" // 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" // BlobDownloadMaxRetries global setting key // how many times EVE will retry to download a blob if its checksum is not verified BlobDownloadMaxRetries GlobalSettingKey = "blob.download.max.retries" // 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" // WwanModemRecoveryWatchdog : trigger watchdog when cellular modem crashes and fails to recover. WwanModemRecoveryWatchdog GlobalSettingKey = "wwan.modem.recovery.watchdog" // WwanModemRecoveryReloadDrivers : reload QMI/MBIM/MHI drivers when cellular modem crashes // and fails to recover. This occurs before the watchdog mechanism is triggered (if enabled // by WwanModemRecoveryWatchdog). WwanModemRecoveryReloadDrivers GlobalSettingKey = "wwan.modem.recovery.reload.drivers" // WwanModemRecoveryRestartModemManager : If a modem firmware crash occurs and ModemManager // fails to properly recognize or manage the restarted modem, EVE will attempt to restart // ModemManager as a recovery step. This occurs before the watchdog mechanism is triggered // (if enabled by WwanModemRecoveryWatchdog) and can be combined with driver reload recovery // mechanism (see WwanModemRecoveryReloadDrivers). WwanModemRecoveryRestartModemManager GlobalSettingKey = "wwan.modem.recovery.restart.modemmanager" // KubernetesVmiDescheduleEvents : Comma-separated list of events that trigger VMI // descheduling. Currently only "boot" is supported. When empty (default), no // event-driven descheduling is performed. KubernetesVmiDescheduleEvents GlobalSettingKey = "kubernetes.vmi.deschedule.events" // 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" // Internal Memory Monitor settings // InternalMemoryMonitorStoreEnabled - collect probes and store CSV InternalMemoryMonitorStoreEnabled GlobalSettingKey = "internal-memory-monitor.store.enabled" // InternalMemoryMonitorAnalyzeEnabled - run analysis and compute scores InternalMemoryMonitorAnalyzeEnabled GlobalSettingKey = "internal-memory-monitor.analyze.enabled" // TriState Items // NetworkFallbackAnyEth global setting key NetworkFallbackAnyEth GlobalSettingKey = "network.fallback.any.eth" // MaintenanceMode global setting key MaintenanceMode GlobalSettingKey = "maintenance.mode" // AirGapMode should be enabled when device is operated in an air-gapped network environment, // where connectivity to the main controller is not available. AirGapMode GlobalSettingKey = "airgap.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 default level of logs produced by EVE microservices DefaultLogLevel GlobalSettingKey = "debug.default.loglevel" // DefaultRemoteLogLevel default level of logs sent by EVE microservices to the controller DefaultRemoteLogLevel GlobalSettingKey = "debug.default.remote.loglevel" // SyslogLogLevel level of the produced syslog messages SyslogLogLevel GlobalSettingKey = "debug.syslog.loglevel" // SyslogRemoteLogLevel level of the syslog messages sent to the controller SyslogRemoteLogLevel GlobalSettingKey = "debug.syslog.remote.loglevel" // KernelLogLevel level of the produced kernel messages KernelLogLevel GlobalSettingKey = "debug.kernel.loglevel" // KernelRemoteLogLevel level of the kernel messages sent to the controller KernelRemoteLogLevel GlobalSettingKey = "debug.kernel.remote.loglevel" // FmlCustomResolution global setting key FmlCustomResolution GlobalSettingKey = "app.fml.resolution" // AppBootOrder global setting key for device-wide default boot order for VMs // Supported values: "" (default), "usb" (prioritize USB), "nousb" (deprioritize USB) AppBootOrder GlobalSettingKey = "app.boot.order" // EdgeviewPublicKeys global setting key EdgeviewPublicKeys GlobalSettingKey = "edgeview.authen.publickey" // Log filtering and dedupliction // LogDedupWindowSize is a measure of how many log entries are saved to search for duplicates LogDedupWindowSize GlobalSettingKey = "log.dedup.window.size" // LogFilenamesToCount a comma-separated list of log filenames to count LogFilenamesToCount GlobalSettingKey = "log.count.filenames" // LogFilenamesToFilter a comma-separated list of log filenames to filter LogFilenamesToFilter GlobalSettingKey = "log.filter.filenames" // VectorEnabled is a global setting key to enable Vector VectorEnabled GlobalSettingKey = "vector.enabled" // VectorConfig is a full base64-encoded configuration for Vector in yaml format. VectorConfig GlobalSettingKey = "vector.config" // 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" // KubernetesDrainTimeout : how long in hours is allowed for a node drain before a failure is returned KubernetesDrainTimeout GlobalSettingKey = "kubernetes.drain.timeout" // DrainSkipK8sApiTimeout : specifies the time duration in seconds which the drain request handler // will continue retrying the k8s api before declaring the node is unavailable and continuing // device operations (reboot/shutdown/upgrade) // This covers the following k8s.io/apimachinery/pkg/api/errors // IsInternalError // IsServerTimeout // IsServiceUnavailable // IsTimeout // IsTooManyRequests DrainSkipK8sAPINotReachableTimeout GlobalSettingKey = "drain.skip.k8sapinotreachable.timeout" // KubernetesDrainAllNodesConfigMultiple : multiplier applied to timer.config.interval to // derive the cluster-wide simultaneous-drain detection window. After cordoning this node, // zedkube waits up to (multiple × config-interval) for all peer nodes to also become // unschedulable before deciding whether to skip pod eviction. Increase this value if nodes // fetch config at widely staggered intervals. Min 1, Max 1000, default 2. KubernetesDrainAllNodesConfigMultiple GlobalSettingKey = "kubernetes.drain.allnodes.config.multiple" // MemoryMonitorEnabled : Enable memory monitor MemoryMonitorEnabled GlobalSettingKey = "memory-monitor.enabled" // TUIMonitorLogLevel: log level for TUI monitor TUIMonitorLogLevel GlobalSettingKey = "debug.tui.loglevel" // IGPUGOPFile: filename (basename only) of a proprietary Intel GOP // Option ROM placed under /persist/vault/gop/. Used for iGPU // passthrough to provide a pre-OS UEFI framebuffer. Empty (default) // or a missing file falls back to the bundled VfioIgdPkg ROM (OS // display still works; just no pre-OS framebuffer). IGPUGOPFile GlobalSettingKey = "igpu.gop" // EnableEFIDebug: when true, OVMF DEBUG() output is captured to // /run/hypervisor/kvm/<dom>/efi-debug.log via QEMU's isa-debugcon at // I/O port 0x402. Off by default. Note that DEBUG() macros are // compiled out in a TARGET=RELEASE OVMF build (EVE's current // default); enabling this knob on a RELEASE OVMF creates the log // file but it stays empty. Useful primarily for diagnosing iGPU // passthrough firmware-side issues with a TARGET=DEBUG OVMF rebuild. EnableEFIDebug GlobalSettingKey = "debug.enable.efi" // MsrvPrometheusMetricsRequestPerSecond: limit the number of requests per second MsrvPrometheusMetricsRequestPerSecond GlobalSettingKey = "msrv.prometheus.metrics.rps" // MsrvPrometheusMetricsBurst: limit the burst of requests MsrvPrometheusMetricsBurst GlobalSettingKey = "msrv.prometheus.metrics.burst" // MsrvPrometheusMetricsIdleTimeoutSeconds: idle timeout for the connection MsrvPrometheusMetricsIdleTimeoutSeconds GlobalSettingKey = "msrv.prometheus.metrics.idletimeout.seconds" // DiagProbeRemoteHTTPEndpoint : remote endpoint queried over **HTTP** to assess // the state of network connectivity whenever the controller is not reachable. DiagProbeRemoteHTTPEndpoint GlobalSettingKey = "diag.probe.remote.http.endpoint" // DiagProbeRemoteHTTPSEndpoint : remote endpoint queried over **HTTPS** to assess // the state of network connectivity whenever the controller is not reachable. DiagProbeRemoteHTTPSEndpoint GlobalSettingKey = "diag.probe.remote.https.endpoint" // EnableTCPMSSClamping : Configuration property to enable or disable TCP MSS clamping // for application traffic forwarded by EVE. EnableTCPMSSClamping GlobalSettingKey = "app.enable.tcp.mss.clamping" // K3s Config Overrides: To properly override existing config settings, the following rules must be followed: // - config merge: https://docs.k3s.io/installation/configuration#value-merge-behavior // - server config spec: https://docs.k3s.io/cli/server // - agent config spec: https://docs.k3s.io/cli/agent K3sConfigOverride GlobalSettingKey = "k3s.config.override" // K3sVersionOverride : user override k3s version. This version will take priority // over any EVE-OS baseos version defined k3s version (pkg/kube/cluster-update.sh) K3sVersionOverride GlobalSettingKey = "k3s.version" // SCEPRetryInterval defines the time interval between retry attempts // for certificates that previously failed to enroll or returned PENDING // from the SCEP server. SCEPRetryInterval GlobalSettingKey = "scep.retry.interval" // PnacDHCPReacquireMaxRetries defines the maximum number of DHCP reacquire // retries after a PNAC (802.1X) port authentication state change. // When the network switch reassigns the port to a different access VLAN // based on the authentication result, EVE retries the DHCP lease acquisition // with exponential backoff (2s, 4s, 8s, ...) until the IP subnet changes // or the retry limit is reached. Setting this value to 0 disables DHCP reacquire. PnacDHCPReacquireMaxRetries GlobalSettingKey = "pnac.dhcp.reacquire.max.retries" // DHCPEnableVendorClassID controls whether the DHCP client sends a Vendor Class // Identifier (Option 60) to identify the device as EVE OS. // When enabled, "LFEDGE-EVE" is sent in DHCP requests, allowing networks or DHCP // servers to apply policies such as VLAN assignment or granting access to the // EVE controller. // However, some badly configured DHCP servers may reject unknown vendor class IDs. // Set this to false to disable sending a vendor class ID. DHCPEnableVendorClassID GlobalSettingKey = "dhcp.enable.vendorclassid" // LpsProfileInterval defines interval between LPS local profile GETs. LpsProfileInterval GlobalSettingKey = "timer.lps.profile.interval" // LpsRadioInterval defines interval between LPS radio status POSTs. LpsRadioInterval GlobalSettingKey = "timer.lps.radio.interval" // LpsAppInfoInterval defines interval between LPS app info POSTs. LpsAppInfoInterval GlobalSettingKey = "timer.lps.appinfo.interval" // LpsDevInfoInterval defines interval between LPS device info POSTs. LpsDevInfoInterval GlobalSettingKey = "timer.lps.devinfo.interval" // LpsNetworkInterval defines interval between LPS network config POSTs. LpsNetworkInterval GlobalSettingKey = "timer.lps.network.interval" // LpsAppBootInfoInterval defines interval between LPS app boot info POSTs. LpsAppBootInfoInterval GlobalSettingKey = "timer.lps.appbootinfo.interval" )
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
IntfOrder uint32 // Interface order across both virtual and passthrough network devices.
}
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.
func (IoBundle) IsUSBController ¶
IsUSBController checks if the IoBundle is a USB controller, including when using the deprecated type IoUSB
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 `json:"pubsub-large-AppPods"` // List of EVE application pods
AppVMIs []KubeVMIInfo `json:"pubsub-large-AppVMIs"` // List of VirtualMachineInstance
Storage KubeStorageInfo `json:"pubsub-large-Storage"` // Distributed storage info
PodNsInfo []KubePodNameSpaceInfo // General namespace pod running/failed count
}
KubeClusterInfo - Information about a Kubernetes cluster
type KubeClusterUpdateStatus ¶
type KubeClusterUpdateStatus struct {
CurrentNode string
Component KubeComp
Status KubeCompUpdateStatus
DestinationKubeUpdateVersion uint32
// error strings across all steps/StorageStatus
// ErrorAndTime provides SetErrorNow() and ClearError()
ErrorAndTime
}
KubeClusterUpdateStatus tracks the cluster update progress of various infrastructure components used for networking, hypervisor, and storage services.
type KubeComp ¶
type KubeComp uint8
KubeComp is a Kubernetes Component / infrastructure service
const ( CompUnknown KubeComp = iota + 0 // CompUnknown an unknown component defined CompContainerd // CompContainerd embedded containerd in k3s CompK3s // CompK3s k3s running in kube service container CompMultus // CompMultus networking services CompKubevirt // CompKubevirt vm services CompCdi // CompCdi disk image uploading CompLonghorn // CompLonghorn replicated storage volumes )
Enum of KubeComp
func KubeCompFromStr ¶
KubeCompFromStr converts from a string to KubeComp
type KubeCompUpdateStatus ¶
type KubeCompUpdateStatus uint8
KubeCompUpdateStatus is the update progress of KubeComp
const ( CompStatusUnknown KubeCompUpdateStatus = iota + 0 // CompStatusUnknown Unable to determine CompStatusDownload // CompStatusDownload begun CompStatusDownloadFailed // CompStatusDownloadFailed download failed CompStatusInProgress // CompStatusInProgress update in progress CompStatusFailed // CompStatusFailed update CompStatusCompleted // CompStatusCompleted update )
Enum of KubeCompUpdateStatus
func KubeCompUpdateStatusFromStr ¶
func KubeCompUpdateStatusFromStr(status string) KubeCompUpdateStatus
KubeCompUpdateStatusFromStr converts a string representation to KubeCompUpdateStatus
func (KubeCompUpdateStatus) KubeCompUpdateStatus ¶
func (state KubeCompUpdateStatus) KubeCompUpdateStatus() info.KubeCompUpdateStatus
KubeCompUpdateStatus converts KubeCompUpdateStatus to the eve-api info.KubeCompUpdateStatus
type KubeConfig ¶
type KubeConfig struct {
K3sVersion string
VmiDescheduleEvents VmiDescheduleConfig
}
KubeConfig : A root level structure to pass config from pillar to kube service container
type KubeIngressInfo ¶
type KubeIngressInfo struct {
Name string // Name of the Ingress resource
Namespace string // Namespace of the Ingress resource
Hostname string // e.g. "example.com"
Path string // e.g. "/api/v1"
PathType string // "Prefix" or "Exact"
Protocol string // "http" or "https"
Service string // Target service name
ServicePort int32 // Target service port
ServiceType corev1.ServiceType // Type of the target service (LoadBalancer, NodePort, etc.)
IngressIP []string // LoadBalancer IPs if available
}
KubeIngressInfo represents information about a Kubernetes Ingress
type KubeLBPoolStatus ¶
type KubeLBPoolStatus struct {
Interface string // Network interface for VIP advertisement
IPPrefix string // CIDR pool (e.g. "192.168.86.200/29")
AllocatedIPs []string // IPs currently assigned to LoadBalancer-type services
// Error is populated when zedkube rejects the controller-supplied LB config
Error ErrorDescription
}
KubeLBPoolStatus reports the kube-vip load balancer pool configuration and which IPs from the pool are currently assigned to services.
type KubeLeaderElectInfo ¶
type KubeLeaderElectInfo struct {
InLeaderElection bool
IsStatsLeader bool
ElectionRunning bool
LeaderIdentity string
LatestChange time.Time
}
KubeLeaderElectInfo - Information about the status reporter leader election
type KubeNodeInfo ¶
type KubeNodeInfo struct {
Name string
Status KubeNodeStatus
IsMaster bool
UsesEtcd bool
CreationTime time.Time
LastTransitionTime time.Time // Of Ready Condition
KubeletVersion string
InternalIP string
ExternalIP string
Schedulable bool
Admission NodeAdmission
NodeID string
}
KubeNodeInfo - Information about a Kubernetes node
func (KubeNodeInfo) ZKubeNodeInfo ¶
func (kni KubeNodeInfo) ZKubeNodeInfo() *info.KubeNodeInfo
ZKubeNodeInfo - Converts pubsub KubeNodeInfo to eve-api info.KubeNodeInfo
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
func (KubePodInfo) ZKubeEVEAppPodInfo ¶
func (kpi KubePodInfo) ZKubeEVEAppPodInfo() *info.KubeEVEAppPodInfo
ZKubeEVEAppPodInfo Converts pubsub KubePodInfo to eve-api info.KubeEVEAppPodInfo
type KubePodNameSpaceInfo ¶
type KubePodNameSpaceInfo struct {
// Name of the namespace
Name string
// Number of pods in the namespace
PodCount uint32
// Number of pods in the namespace that are running
PodRunningCount uint32
// Number of pods in the namespace that are pending
PodPendingCount uint32
// Number of pods in the namespace that are failed
PodFailedCount uint32
// Number of pods in the namespace that are succeeded
PodSucceededCount uint32
}
KubePodNameSpaceInfo - pod counts by state in a namespace of a Kubernetes cluster
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 )
func (KubePodStatus) ZKubePodStatus ¶
func (status KubePodStatus) ZKubePodStatus() info.KubePodStatus
ZKubePodStatus - Converts pubsub KubePodStatus to eve-api info.KubePodStatus
type KubeServiceInfo ¶
type KubeServiceInfo struct {
Name string // Name of the service
Namespace string // Namespace of the service
Protocol corev1.Protocol // Protocol used by the service (TCP, UDP, etc.)
Port int32 // Port number for the service
NodePort int32 // NodePort number for NodePort services
Type corev1.ServiceType // Type of the service (ClusterIP, NodePort, LoadBalancer, etc.)
LoadBalancerIP string // IP address assigned to LoadBalancer service
ACEenabled bool // Authorized Cluster Endpoint access is enabled
}
KubeServiceInfo represents information about a Kubernetes Service
type KubeStorageInfo ¶
type KubeStorageInfo struct {
Health ServiceStatus
TransitionTime time.Time
Volumes []KubeVolumeInfo
}
KubeStorageInfo - Information about the storage services health in a Kubernetes cluster This also includes all clustered volumes
func (KubeStorageInfo) ZKubeStorageInfo ¶
func (ksi KubeStorageInfo) ZKubeStorageInfo() *info.KubeStorageInfo
ZKubeStorageInfo - Converts pubsub KubeStorageInfo to eve-api info.KubeStorageInfo
type KubeUserServices ¶
type KubeUserServices struct {
UserService []KubeServiceInfo
UserIngress []KubeIngressInfo
LBPoolStatus *KubeLBPoolStatus
// ServiceError carries warnings or errors about user services that require
// operator attention (e.g. orphaned LoadBalancer services after kube-vip removal).
ServiceError ErrorDescription
}
KubeUserServices - Collected User services from kubernetes
func (KubeUserServices) Equal ¶
func (s KubeUserServices) Equal(s2 KubeUserServices) bool
Equal checks if two KubeUserServices instances are equal
type KubeVMIInfo ¶
type KubeVMIInfo struct {
Name string
Status KubeVMIStatus
CreationTime time.Time
LastTransitionTime time.Time
IsReady bool
NodeName string
}
KubeVMIInfo - Information about a VirtualMachineInstance
func (KubeVMIInfo) ZKubeVMIInfo ¶
func (kvi KubeVMIInfo) ZKubeVMIInfo() *info.KubeVMIInfo
ZKubeVMIInfo - Converts KubeVMIInfo to info.KubeVMIInfo
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 )
func (KubeVMIStatus) ZKubeVMIStatus ¶
func (status KubeVMIStatus) ZKubeVMIStatus() info.KubeVMIStatus
ZKubeVMIStatus - Converts pubsub KubeVMIStatus to eve-api info.KubeVMIStatus
type KubeVolumeInfo ¶
type KubeVolumeInfo struct {
Name string
State StorageVolumeState
Robustness StorageVolumeRobustness
CreatedAt time.Time
ProvisionedBytes uint64
AllocatedBytes uint64
PvcStatus StorageVolumePvcStatus
Replicas []KubeVolumeReplicaInfo
RobustnessSubstate StorageHealthStatus
VolumeID string
}
KubeVolumeInfo - Information about a clustered volume in a kubernetes cluster
func (KubeVolumeInfo) ZKubeVolumeInfo ¶
func (kvi KubeVolumeInfo) ZKubeVolumeInfo() *info.KubeVolumeInfo
ZKubeVolumeInfo - Converts pubsub KubeVolumeInfo to eve-api info.KubeVolumeInfo
type KubeVolumeReplicaInfo ¶
type KubeVolumeReplicaInfo struct {
Name string
OwnerNode string
RebuildProgressPercentage uint8
Status StorageVolumeReplicaStatus
}
KubeVolumeReplicaInfo - Information about a replica of a clustered volume in a kubernetes cluster
func (KubeVolumeReplicaInfo) ZKubeVolumeReplicaInfo ¶
func (kvri KubeVolumeReplicaInfo) ZKubeVolumeReplicaInfo() *info.KubeVolumeReplicaInfo
ZKubeVolumeReplicaInfo - Converts pubsub KubeVolumeReplicaInfo to eve-api info.KubeVolumeReplicaInfo
type L2LinkConfig ¶
type L2LinkConfig struct {
L2Type L2LinkType `json:",omitempty"`
VLAN VLANConfig `json:",omitempty"`
Bond BondConfig `json:",omitempty"`
}
L2LinkConfig - contains either VLAN or Bond interface configuration, depending on the L2Type.
func (L2LinkConfig) Equal ¶
func (l L2LinkConfig) Equal(l2 L2LinkConfig) bool
Equal compares two L2LinkConfig values for equality.
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 LBInterfaceConfig ¶
type LBInterfaceConfig struct {
// Interface is the logical label of the network interface.
Interface string
// IPPrefix is the IP CIDR pool for load balancer IP allocation, in CIDR
// notation (e.g. "192.168.1.24/29"). The host bits are preserved so that
// jq consumers in cluster-init.sh see the original address, not the
// network address.
IPPrefix string
}
LBInterfaceConfig pairs a network interface name with the IP CIDR pool that kube-vip uses to allocate load balancer IPs on that interface. Used in both EdgeNodeClusterConfig and EdgeNodeClusterStatus.
type LOCConfig ¶
type LOCConfig struct {
// LOC URL
LocURL string
// Collect-Info Datastore UUID
CollectInfoDatastore DatastoreConfig
}
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 // LedBlinkOnboardingFailureConflict - LED indication of device being onboarded but having a conflict with another device. LedBlinkOnboardingFailureConflict // LedBlinkOnboardingFailureNotFound - LED indication of device being onboarded but not found in the controller. LedBlinkOnboardingFailureNotFound )
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 the controller 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 : app 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 MaintenanceModeMultiReason ¶
type MaintenanceModeMultiReason []MaintenanceModeReason
MaintenanceModeMultiReason captures multiple reasons for entering into maintenance mode
func (MaintenanceModeMultiReason) String ¶
func (mmmr MaintenanceModeMultiReason) String() string
String returns the verbose equivalent of MaintenanceModeMultiReason code
func (MaintenanceModeMultiReason) ToProto ¶
func (mmmr MaintenanceModeMultiReason) ToProto() []info.MaintenanceModeReason
ToProto return the protobuf representation of multiple maintenance mode reasons.
type MaintenanceModeReason ¶
type MaintenanceModeReason info.MaintenanceModeReason
MaintenanceModeReason captures a reason for entering 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]ControllerConnMetrics
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 NestedAppDomainStatus ¶
type NestedAppDomainStatus struct {
UUIDandVersion UUIDandVersion // UUID of the nested app, e.g. a Docker-Compose App UUID
DisplayName string // nested App name
DisableLogs bool // if app log is disabled
ParentAppUUID uuid.UUID // parent app, a runtime VM UUID
}
NestedAppDomainStatus - status of a nested app domain This is the struct of the nested app reported by runtime agent, and it is published by zedrouter. One use case is for 'newlogd' to get the App structure set up the same mechainsm as if it learned from the domainmgr's DomainStatus. Because this nested app domain is configured through the Patch-envelop directly to the runtime agent, and bypasses the EVE pillar, although some of the EVE services may still want to know about those nested apps.
func (NestedAppDomainStatus) Key ¶
func (status NestedAppDomainStatus) Key() string
Key - returns the UUID for the nested app domain status
type NestedAppRuntimeDiskMetric ¶
type NestedAppRuntimeDiskMetric struct {
UUID string
TotalMb float64
UsedMb float64
AllocatedMb float64
// DependentSpaceMb is a representation of the space used by Nested Apps
// which share a persistent filesystem of a runtime.
// Key is a nested app instance uuid running on the runtime,
// a NestedAppDomainStatus uuid.
DependentSpaceMb map[string]FsUsedMetric
}
NestedAppRuntimeDiskMetric - contains the overall fs usage of a volume instance attached to a runtime app instance. All storage of child/NestedApps running in this runtime app instance is included.
func (NestedAppRuntimeDiskMetric) Key ¶
func (metric NestedAppRuntimeDiskMetric) Key() string
Key - returns the UUID for the nested app runtime disk metric
type NetworkConfigOrigin ¶
type NetworkConfigOrigin uint8
NetworkConfigOrigin enumerates all possible origins of a network port configuration. The values directly match those from the corresponding proto definition (evecommon.NetworkConfigOrigin).
const ( // NetworkConfigOriginUnspecified : unknown or unset origin. NetworkConfigOriginUnspecified NetworkConfigOrigin = iota // NetworkConfigOriginController : config received from the controller. NetworkConfigOriginController // NetworkConfigOriginBootstrap : initial device config embedded in the EVE installer, // signed by the controller. NetworkConfigOriginBootstrap // NetworkConfigOriginOverride : manually created JSON config injected into // the installer. NetworkConfigOriginOverride // NetworkConfigOriginLastResort : fallback configuration automatically generated // to enable DHCP on all Ethernet ports when no network config is available or when // "network.fallback.any.eth" is enabled and none of the existing configs provide // controller connectivity. NetworkConfigOriginLastResort // NetworkConfigOriginTUI : config entered via the terminal UI (TUI). NetworkConfigOriginTUI // NetworkConfigOriginLOC : configuration signed by the controller and delivered // through the Local Operator Console (LOC) in an air-gapped environment. NetworkConfigOriginLOC // NetworkConfigOriginLPS : config changes made locally through the Local Profile // Server (LPS). NetworkConfigOriginLPS )
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
NtpServers []netutils.HostnameOrIP
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
// Enables forwarding of LLDP (Link Layer Discovery Protocol) frames across this
// network instance.
// LLDP is used by devices to advertise identity and capabilities to directly
// connected neighbors, and is often required for topology discovery and network
// management tools.
// When enabled, LLDP frames (EtherType 0x88cc) are not dropped or suppressed
// by the forwarding plane.
ForwardLLDP bool
// 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
// Name of a (dummy) interface where ICMP, ARP, DNS and DHCP packets
// are mirrored from the bridge and can be used for monitoring purposes.
// Empty if mirroring is not available.
MirrorIfName string
// 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 []netutils.HostnameOrIP
// 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 `json:",omitempty"`
USBAddr string `json:",omitempty"`
PCIAddr string `json:",omitempty"`
Phylabel string `json:",omitempty"` // Physical name set by controller/model
Logicallabel string `json:",omitempty"` // 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 `json:",omitempty"` // From SystemAdapter's alias
// Allow the local operator to make (limited) configuration changes to this
// network adapter using Local Profile Server.
AllowLocalModifications bool `json:",omitempty"`
// NetworkUUID - UUID of the Network Object configured for the port.
NetworkUUID uuid.UUID `json:",omitempty"`
IsMgmt bool `json:",omitempty"` // Used to talk to controller
IsL3Port bool `json:",omitempty"` // 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 `json:",omitempty"`
Cost uint8 `json:",omitempty"` // Zero is free
MTU uint16 `json:",omitempty"`
DhcpConfig
ProxyConfig
L2LinkConfig
WirelessCfg WirelessConfig `json:",omitempty"`
PNAC PNACConfig `json:",omitempty"`
// TestResults - Errors from parsing plus success/failure from testing
TestResults
IgnoreDhcpNtpServers bool `json:",omitempty"` // Ignore NTP servers from DHCP
IgnoreDhcpIPAddresses bool `json:",omitempty"` // Ignore IP addresses from DHCP
IgnoreDhcpGateways bool `json:",omitempty"` // Ignore gateways from DHCP
IgnoreDhcpDNSConfig bool `json:",omitempty"` // Ignore DNS config (DomainName + DNSServers) from DHCP
ConfigSource PortConfigSource `json:",omitempty"`
}
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
ConfiguredSubnet *net.IPNet // entered by user in the static IP config
ConfiguredIP net.IP // entered by user in the static IP config
IgnoredDhcpIPs bool // true if IPs received from DHCP are not used
IPv4Subnet *net.IPNet // actually configured on the interface (IPv4)
IPv6Subnets []*net.IPNet // actually configured on the interface (IPv6)
DomainName string // from DHCP or static configuration
DNSServers []net.IP // from DHCP + static combined (with Gateway as fallback)
NtpServers []netutils.HostnameOrIP // from DHCP + static combined
AddrInfoList []AddrInfo // from DHCP + static combined
ClusterIPAddr net.IP // ClusterIPAddr is the cluster IP address assigned to this port
DefaultRouters []net.IP // from DHCP + static combined
Up bool
MacAddr net.HardwareAddr
MTU uint16
WirelessCfg WirelessConfig
WirelessStatus WirelessStatus
PNAC PNACStatus
BondStatus BondStatus // only populated when L2Type == L2LinkTypeBond
ConfigSource PortConfigSource
ProxyConfig
L2LinkConfig
// TestResults provides recording of failure and success
TestResults
// Error message related to configuration submitted via the Local Profile
// Server (LPS). Reported only back to LPS and never sent to the controller.
LpsConfigError string
}
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 `json:",omitempty"`
Type NetworkType `json:",omitempty"`
Dhcp DhcpType `json:",omitempty"`
// IP addresses.
Subnet *net.IPNet `json:",omitempty"`
DhcpRange IPRange `json:",omitempty"`
IgnoreDhcpIPAddresses bool `json:",omitempty"`
// IP gateway.
Gateway net.IP `json:",omitempty"`
IgnoreDhcpGateways bool `json:",omitempty"`
// DNS configuration.
DomainName string `json:",omitempty"`
// If Dhcp=DhcpTypeStatic and DNSServers are not set, Gateway is used as DNS server.
DNSServers []net.IP `json:",omitempty"`
DNSNameToIPList []DNSNameToIP `json:",omitempty"` // Used for DNS and ACL ipset
IgnoreDhcpDNSConfig bool `json:",omitempty"`
// NTP servers.
NTPServers []netutils.HostnameOrIP `json:",omitempty"`
IgnoreDhcpNtpServers bool `json:",omitempty"`
Proxy *ProxyConfig `json:",omitempty"`
WirelessCfg WirelessConfig `json:",omitempty"`
MTU uint16 `json:",omitempty"`
// 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
Key : called to get the key for pubsub
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
TotalSizeLogs uint64 // total size of logs on device
OldestSavedDeviceLog time.Time // timestamp of the latest device log saved on device
// 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 NodeAdmission ¶
type NodeAdmission uint8
NodeAdmission - Enum for the admission status of a node in a cluster
const ( NodeAdmissionUnknown NodeAdmission = iota // NodeAdmissionUnknown - Node admission status is unknown NodeAdmissionNotClustered // NodeAdmissionNotClustered - Node is not part of the cluster NodeAdmissionLeaving // NodeAdmissionLeaving - Node is leaving the cluster NodeAdmissionJoining // NodeAdmissionJoining - Node is joining the cluster NodeAdmissionJoined // NodeAdmissionJoined - Node has joined the cluster )
func (NodeAdmission) ZNodeAdmission ¶
func (status NodeAdmission) ZNodeAdmission() info.NodeAdmission
ZNodeAdmission - Converts pubsub NodeAdmission to eve-api info.NodeAdmission
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
LocalMaintenanceModeReasons MaintenanceModeMultiReason // reason for Maintenance Mode
HVTypeKube bool
WaitDrainInProgress 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 OemWindowsLicenseKeyInfo ¶
type OemWindowsLicenseKeyInfo struct {
SystemInfo DmiSystemInfo
Qemu struct {
DomainArguments []string
}
Xen struct{}
}
OemWindowsLicenseKeyInfo contains the information required to propagate the OEM license key to the VM. Currently only QEMU/KVM is supported.
type OldGlobalConfig ¶
type OldGlobalConfig struct {
ConfigInterval uint32 // Try get of device config
MetricInterval uint32 // push metrics to cloud
ResetIfCloudGoneTime uint32 // reboot if no controller 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 PNACConfig ¶
type PNACConfig struct {
// Indicates whether 802.1X authentication is enabled on the given port.
Enabled bool
// EAP identity (optional).
// Even when certificate-based authentication is used (e.g., EAP-TLS),
// an explicit EAP identity may be configured and does not need to match
// the certificate’s DN or SAN attributes.
// If no EAP identity is configured and a certificate-based EAP method
// is used, EVE will derive the identity from the enrolled certificate,
// preferring the subject common name (CN), or the SAN URI if CN is absent.
EAPIdentity string `json:",omitempty"`
// EAP method to use for authentication.
// Currently, only EAP-TLS is supported; additional methods may be added in the future.
EAPMethod eveconfig.EAPMethod `json:",omitempty"`
// Certificate enrollment profile to use for authentication.
// Relevant only when the selected EAP method requires a certificate (e.g., EAP-TLS).
//
// This field references the ProfileName of a certificate enrollment profile defined
// in EdgeDevConfig (currently SCEP profiles only, see EdgeDevConfig.ScepProfiles).
// While SCEP is the only supported enrollment protocol today, this field is
// intended to reference any supported enrollment profile in the future.
CertEnrollmentProfileName string `json:",omitempty"`
// CACertPEM contains the trusted CA certificate chain in PEM format.
//
// The chain is used for verifying the authentication server's TLS certificate
// during EAP-TLS (802.1X) authentication. Each certificate in the chain is
// applied to validate the server presented by the switch, access point, or
// other 802.1X authenticator to ensure a trusted TLS session.
CACertPEM [][]byte `json:"pubsub-large-ProxyCertPEM"` //nolint:tagliatelle
}
PNACConfig : configuration for Port-based Network Access Control (PNAC).
type PNACMetrics ¶
type PNACMetrics struct {
// Logical label identifying the network port associated with these metrics.
LogicalLabel string
// Total number of EAPOL frames received from the authenticator.
EAPOLFramesRx uint64
// Total number of EAPOL frames transmitted to the authenticator.
EAPOLFramesTx uint64
// Number of EAPOL-Start frames transmitted to initiate authentication.
EAPOLStartFramesTx uint64
// Number of EAPOL-Logoff frames transmitted to terminate authentication.
EAPOLLogoffFramesTx uint64
// Number of EAP-Response frames transmitted in response to authentication requests.
EAPOLRespFramesTx uint64
// Number of EAP-Request Identity frames received from the authenticator.
EAPOLReqIDFramesRx uint64
// Total number of other EAP-Request frames received from the authenticator.
EAPOLReqFramesRx uint64
// Number of invalid or malformed EAPOL frames received.
EAPOLInvalidFramesRx uint64
// Number of received EAPOL frames with incorrect length or truncated payload.
EAPLengthErrorFramesRx uint64
}
PNACMetrics : IEEE 802.1X Port-Based Network Access Control (PNAC) metrics reported by the device for the given port.
type PNACMetricsList ¶
type PNACMetricsList struct {
Ports []PNACMetrics
}
PNACMetricsList contains PNAC metrics for all network ports with IEEE 802.1X enabled.
func (PNACMetricsList) Key ¶
func (p PNACMetricsList) Key() string
Key returns the pubsub message key for PNACMetricsList instance.
type PNACStatus ¶
type PNACStatus struct {
// Indicates whether 802.1X authentication is enabled on the given port.
Enabled bool
// Current supplicant state as reported by the 802.1X client.
State eveinfo.SupplicantState
// Timestamp of the most recent successful 802.1X authentication.
// Unset if authentication has not yet completed successfully.
LastAuthTimestamp time.Time
// Error reported by the supplicant during authentication.
// May include authentication failures, certificate validation errors,
// or timeouts.
Error ErrorDescription
}
PNACStatus : device-reported status of Port-Based Network Access Control (PNAC) using IEEE 802.1X on a specific network port.
type PatchEnvelopeInfo ¶
type PatchEnvelopeInfo struct {
Name string
Version string
AllowedApps []string
PatchID string
Errors []string
State PatchEnvelopeState
BinaryBlobs []BinaryBlobCompleted
VolumeRefs []BinaryBlobVolumeRef
CipherBlobs []BinaryCipherBlob
}
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 PortConfigSource ¶
type PortConfigSource struct {
// Indicates where EVE obtained the network config.
Origin NetworkConfigOrigin `json:",omitempty"`
// Timestamp when the port’s configuration was originally submitted
// or created at its source.
//
// Meaning depends on the origin:
// - Controller, LOC, bootstrap: timestamp provided by the controller.
// - Local override.json: when the file was first loaded by EVE.
// - Last-resort: when EVE generated the fallback config.
// - LPS modifications: when the modified config was received.
// - TUI: when the user submitted the configuration.
//
// This is different from DevicePortConfig.TimePriority, which is used
// to compare and prioritize different sources of network configuration
// (and may be synthetic for some sources, e.g. year 2000 for override.json,
// epoch 0 for last-resort). By contrast, SubmittedAt represents when the
// port’s configuration first came into existence, regardless of when or whether
// the device applied it.
//
// Note: this is a per-port timestamp. The underlying network config may
// cover multiple ports, but only the portion relevant to this port is
// reflected here.
SubmittedAt time.Time `json:",omitempty"`
}
PortConfigSource describes the origin of the configuration used for a network port. It helps distinguish between controller-provided, locally-modified, or initial configs.
func (PortConfigSource) Equal ¶
func (src PortConfigSource) Equal(src2 PortConfigSource) bool
Equal compares two PortConfigSource instances for equality.
func (PortConfigSource) ToProto ¶
func (src PortConfigSource) ToProto() *evecommon.PortConfigSource
ToProto converts PortConfigSource into its protobuf representation.
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 `json:",omitempty"`
Exceptions string `json:",omitempty"`
Pacfile string `json:",omitempty"`
// 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 `json:",omitempty"` // Enable WPAD
NetworkProxyURL string `json:",omitempty"` // Complete URL i.e., with /wpad.dat
WpadURL string `json:",omitempty"` // 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,omitempty"`
Server string `json:"server,omitempty"`
Port uint32 `json:"port,omitempty"`
}
ProxyEntry is used to store address of a single network proxy.
func (*ProxyEntry) FromProto ¶
func (pe *ProxyEntry) FromProto(proxy *evecommon.ProxyServer)
FromProto populates a ProxyEntry from its protobuf representation.
func (ProxyEntry) ToProto ¶
func (pe ProxyEntry) ToProto() *evecommon.ProxyServer
ToProto converts a ProxyEntry to its protobuf representation.
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. ChangeInProgress 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 SCEPProfile ¶
type SCEPProfile struct {
// ProfileName is a user-assigned logical identifier for this
// certificate enrollment configuration.
ProfileName string
// Full SCEP server URL, including scheme, host, and path.
// Example: https://ca.example.com/scep
SCEPServerURL string
// UseControllerProxy determines how SCEP traffic is routed:
// - true: Requests are sent via the controller-provided SCEP proxy.
// - false: The device connects directly to SCEPServerURL.
UseControllerProxy bool
// Encrypted SCEP challenge password.
EncryptedChallengePassword CipherBlockStatus
// CACertPEM contains the trusted CA certificate chain in PEM format.
//
// The chain is used for:
// - Validating the CA signature on SCEP responses
// - Encrypting the symmetric key in the PKCS#7 enrollment request
// (certificates capable of key encryption will receive a copy)
CACertPEM [][]byte `json:"pubsub-large-ProxyCertPEM"` //nolint:tagliatelle
// CSRProfile defines parameters used to generate the Certificate Signing Request.
CSRProfile CSRProfile
// ParsingError indicates if SCEP profile parsing failed.
ParsingError ErrorDescription
}
SCEPProfile defines configuration required to enroll a device certificate using SCEP (Simple Certificate Enrollment Protocol).
It specifies:
- How to reach the SCEP server (directly or via controller proxy)
- Trust anchors used to validate SCEP responses
- Parameters for CSR generation
func (SCEPProfile) Key ¶
func (p SCEPProfile) Key() string
Key returns the pubsub message key for SCEPProfile instance.
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 ServiceStatus ¶
type ServiceStatus int8
ServiceStatus - Enum for the status of a service
const ( ServiceStatusUnset ServiceStatus = iota // ServiceStatusUnset - Service status is unset ServiceStatusFailed // ServiceStatusFailed - Service status is failed ServiceStatusDegraded // ServiceStatusDegraded - Service status is degraded ServiceStatusHealthy // ServiceStatusHealthy - Service status is healthy )
func (ServiceStatus) ZServiceStatus ¶
func (state ServiceStatus) ZServiceStatus() info.ServiceStatus
ZServiceStatus - Converts pubsub ServiceStatus to eve-api info.ServiceStatus
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 SlotEvalState ¶
type SlotEvalState struct {
// Tried indicates if this slot has been attempted to boot
Tried bool `json:"tried"`
// Success indicates if the slot booted successfully
Success bool `json:"success"`
// Note contains additional information about this slot's evaluation
Note string `json:"note,omitempty"`
// AttemptTime when this slot was last attempted
AttemptTime time.Time `json:"attempt_time,omitempty"`
}
SlotEvalState tracks the evaluation state of a single slot
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 means no snapshot should be taken SnapshotTypeUnspecified SnapshotType = 0 // SnapshotTypeAppUpdate is used when the snapshot is created as a result of an app update SnapshotTypeAppUpdate SnapshotType = 1 // SnapshotTypeImmediate is used when the snapshot is created immediately SnapshotTypeImmediate SnapshotType = 2 )
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 SnapshotWhen ¶
type SnapshotWhen uint8
SnapshotWhen describes when a snapshot should be taken, see info below
const ( // NoSnapshotTake indicated no snapshot should be taken, f.e. because it already exists. NoSnapshotTake SnapshotWhen = iota // SnapshotImmediate indicates whether a snapshot should be taken immediately. SnapshotImmediate // SnapshotOnUpgrade indicates whether a snapshot should be taken during the app instance update. SnapshotOnUpgrade )
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
// SnapshotTakenType indicates if and when a snapshot should be taken
SnapshotTakenType SnapshotWhen
// 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 StorageHealthStatus ¶
type StorageHealthStatus uint8
StorageHealthStatus - Enum for the redundancy level and replication status of a storage volume
const ( StorageHealthStatusUnknown StorageHealthStatus = iota // StorageHealthStatusUnknown - Storage health status is unknown StorageHealthStatusHealthy // StorageHealthStatusHealthy - All replicas healthy StorageHealthStatusDegraded2ReplicaAvailableReplicating // StorageHealthStatusDegraded2ReplicaAvailableReplicating - replicating to third replica StorageHealthStatusDegraded2ReplicaAvailableNotReplicating // StorageHealthStatusDegraded2ReplicaAvailableNotReplicating - not replicating to third replica StorageHealthStatusDegraded1ReplicaAvailableReplicating // StorageHealthStatusDegraded1ReplicaAvailableReplicating - replicating to one or two replicas StorageHealthStatusDegraded1ReplicaAvailableNotReplicating // StorageHealthStatusDegraded1ReplicaAvailableNotReplicating - no redundancy, not replicating StorageHealthStatusFailed // StorageHealthStatusFailed - no healthy replicas )
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 StorageVolumePvcStatus ¶
type StorageVolumePvcStatus uint8
StorageVolumePvcStatus - Enum for the status of a PVC associated with a volume instance
const ( StorageVolumePvcStatusUnknown StorageVolumePvcStatus = iota // StorageVolumePvcStatusUnknown - PVC status is unknown StorageVolumePvcStatusBound // StorageVolumePvcStatusBound - PVC is bound StorageVolumePvcStatusPending // StorageVolumePvcStatusPending - PVC is pending StorageVolumePvcStatusAvailable // StorageVolumePvcStatusAvailable - PVC is available StorageVolumePvcStatusReleased // StorageVolumePvcStatusReleased - PVC is released StorageVolumePvcStatusFaulted // StorageVolumePvcStatusFaulted - PVC is faulted )
type StorageVolumeReplicaStatus ¶
type StorageVolumeReplicaStatus uint8
StorageVolumeReplicaStatus - Enum for the status of a replica of a storage volume
const ( StorageVolumeReplicaStatusUnknown StorageVolumeReplicaStatus = iota // StorageVolumeReplicaStatusUnknown - Replica status is unknown StorageVolumeReplicaStatusRebuilding // StorageVolumeReplicaStatusRebuilding - Replica is rebuilding StorageVolumeReplicaStatusOnline // StorageVolumeReplicaStatusOnline - Replica is online StorageVolumeReplicaStatusFailed // StorageVolumeReplicaStatusFailed - Replica has failed StorageVolumeReplicaStatusOffline // StorageVolumeReplicaStatusOffline - Replica is offline StorageVolumeReplicaStatusStarting // StorageVolumeReplicaStatusStarting - Replica is starting StorageVolumeReplicaStatusStopping // StorageVolumeReplicaStatusStopping - Replica is stopping )
func (StorageVolumeReplicaStatus) ZStorageVolumeReplicaStatus ¶
func (svrs StorageVolumeReplicaStatus) ZStorageVolumeReplicaStatus() info.StorageVolumeReplicaStatus
ZStorageVolumeReplicaStatus - Converts pubsub StorageVolumeReplicaStatus to eve-api info.StorageVolumeReplicaStatus
type StorageVolumeRobustness ¶
type StorageVolumeRobustness uint8
StorageVolumeRobustness - Enum for the replica robustness of a storage volume
const ( StorageVolumeRobustnessUnknown StorageVolumeRobustness = iota // StorageVolumeRobustnessUnknown - Volume robustness is unknown StorageVolumeRobustnessHealthy // StorageVolumeRobustnessHealthy - All Volume replicas healthy StorageVolumeRobustnessDegraded // StorageVolumeRobustnessDegraded - One or more Volume replicas degraded StorageVolumeRobustnessFaulted // StorageVolumeRobustnessFaulted - no healthy replicas )
type StorageVolumeState ¶
type StorageVolumeState uint8
StorageVolumeState - Enum for the attachment state of a storage volume
const ( StorageVolumeStateUnknown StorageVolumeState = iota // StorageVolumeStateUnknown - Volume state is unknown StorageVolumeStateCreating // StorageVolumeStateCreating - Volume is being created StorageVolumeStateAttached // StorageVolumeStateAttached - Volume is attached StorageVolumeStateDetached // StorageVolumeStateDetached - Volume is detached StorageVolumeStateAttaching // StorageVolumeStateAttaching - Volume is being attached StorageVolumeStateDetaching // StorageVolumeStateDetaching - Volume is being detached StorageVolumeStateDeleting // StorageVolumeStateDeleting - Volume is being deleted )
func (StorageVolumeState) ZStorageVolumeState ¶
func (svs StorageVolumeState) ZStorageVolumeState() info.StorageVolumeState
ZStorageVolumeState - Converts pubsub StorageVolumeState to eve-api info.StorageVolumeState
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 // REMOTELOADED used for content tree which was loaded in other node REMOTELOADED 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
OemWindowsLicenseKeySetup(*OemWindowsLicenseKeyInfo) 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 TpmSanityStatus ¶
type TpmSanityStatus struct {
Name string
Status MaintenanceModeReason
ErrorAndTime
}
TpmSanityStatus is used to report TPM status after some runtime sanity checks
func (TpmSanityStatus) Key ¶
func (status TpmSanityStatus) Key() string
Key returns name for the TpmSanityStatus
type TriState ¶
type TriState uint8
Use this for booleans which have a none/dontcare/notset value
func ParseTriState ¶
type URLMetrics ¶
type URLMetrics 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
}
URLMetrics are metrics for a particular URL
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 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 `json:",omitempty"`
// VLAN ID.
ID uint16 `json:",omitempty"`
}
VLANConfig - VLAN sub-interface configuration.
type VaultConfig ¶
type VaultConfig struct {
TpmKeyOnly bool
}
VaultConfig represents vault key to be used
type VaultKeyPolicyPCR ¶
VaultKeyPolicyPCR defines the PCR policy associated with a vault key, it is received from the controller along with the encrypted vault key.
type VaultStatus ¶
type VaultStatus struct {
Name string
Status info.DataSecAtRestStatus
PCRStatus info.PCRStatus
ConversionComplete bool
// only valid if TPM is enabled and Sealed key is used
MismatchingPCRs []int
// ErrorAndTime provides SetErrorNow() and ClearError()
ErrorAndTime
}
VaultStatus represents running status of a Vault
func (VaultStatus) IsVaultInError ¶
func (status VaultStatus) IsVaultInError() bool
IsVaultInError :
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
// Interface order across both VIFs and directly attached network devices.
// Note that we cannot use attribute name "IntfOrder" here, otherwise it would
// overlap with IntfOrder from AppNetAdapterConfig inside AppNetAdapterStatus.
VifOrder uint32
}
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 []uint32 // 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
// Enables enforcement of user-defined ordering for network interfaces.
EnforceNetworkInterfaceOrder bool
// EnableOemWinLicenseKey indicates the app should receive the embedded Windows license key (if available)
EnableOemWinLicenseKey bool
// DisableVirtualTPM disables virtual TPM for the domain
DisableVirtualTPM bool
// BootOrder controls boot device priority for this VM.
// This setting can be configured via:
// 1. Controller API (VmConfig.boot_order in EdgeDevConfig)
// 2. LPS API (/api/v1/app-boot-config endpoint)
// LPS takes precedence over controller when both are set.
// The setting is passed to OVMF via fw_cfg "opt/eve.bootorder".
BootOrder zcommon.BootOrder
}
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 VmiDescheduleConfig ¶
type VmiDescheduleConfig struct {
OnBoot bool // trigger descheduler once per boot
}
VmiDescheduleConfig holds the set of trigger events for VMI descheduling.
type VmiVNCConfig ¶
type VmiVNCConfig struct {
VMIName string `json:"VMIName"`
VNCPort uint32 `json:"VNCPort"`
AppUUID string `json:"AppUUID,omitempty"` // UUID of the app owning this session
CallerPID int `json:"CallerPID,omitempty"` // Set by edgeview; absent for remote-console
}
VmiVNCConfig is the JSON structure for vmiVNC.run file. VmiVNCConfig defines the unified format used by both remote-console and edgeview VNC.
func (VmiVNCConfig) OwnerAlive ¶
func (c VmiVNCConfig) OwnerAlive() bool
OwnerAlive reports whether CallerPID refers to a live edge-view process. Returns false when CallerPID is unset (remote-console file), when the PID is dead, or when the PID has been reused by a different program.
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
// This is a replicated volume
IsReplicated bool
// This volume is container image for native container.
// We will find out from NOHYPER flag in appinstanceconfig
IsNativeContainer bool
}
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
// Is this a replicated volume
IsReplicated bool
// Is this volume actually a container image for native container deployment
// We find that info from NOHYPER flag set in appinstance.
IsNativeContainer bool
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 `json:",omitempty"` // wifi SSID
KeyScheme WifiKeySchemeType `json:",omitempty"` // such as WPA-PSK, WPA-EAP
// XXX: to be deprecated, use CipherBlockStatus instead
Identity string `json:",omitempty"` // identity or username for WPA-EAP
// XXX: to be deprecated, use CipherBlockStatus instead
Password string `json:",omitempty"` // string of pass phrase or password hash
Priority int32 `json:",omitempty"`
// 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
func (*WifiKeySchemeType) FromProto ¶
func (kt *WifiKeySchemeType) FromProto(protoKeyScheme evecommon.WiFiKeyScheme) error
FromProto sets the WifiKeySchemeType from the protobuf value. Returns an error if the protobuf value is unrecognized.
func (WifiKeySchemeType) ToProto ¶
func (kt WifiKeySchemeType) ToProto() evecommon.WiFiKeyScheme
ToProto converts a WifiKeySchemeType to its protobuf representation.
type WirelessConfig ¶
type WirelessConfig struct {
// WType : Wireless Type, either Cellular or WiFi.
WType WirelessType `json:",omitempty"`
// 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 `json:",omitempty"`
// Wifi : configuration for WiFi connectivity.
Wifi []WifiConfig `json:",omitempty"`
// 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 `json:",omitempty"`
}
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
func (WirelessType) String ¶
func (wt WirelessType) String() string
String returns a human-readable representation of WirelessType.
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" )
func (*WwanAuthProtocol) FromProto ¶
func (wp *WwanAuthProtocol) FromProto(authProtocol evecommon.CellularAuthProtocol) error
FromProto converts proto enum CellularAuthProtocol to the corresponding WwanAuthProtocol.
func (WwanAuthProtocol) ToProto ¶
func (wp WwanAuthProtocol) ToProto() evecommon.CellularAuthProtocol
ToProto converts WwanAuthProtocol into the corresponding proto enum CellularAuthProtocol.
type WwanBearer ¶
type WwanBearer struct {
// Access Point Network of the bearer.
APN string
// Purpose of the bearer.
Type BearerType
// The IP addressing type to use for the bearer.
IPType WwanIPType
// Indicates whether or not the bearer is connected.
Connected bool
// Provides additional information specifying the reason why the modem is not connected
// (either due to a failed connection attempt, or due to a network initiated disconnection).
ConnectionError string
// Unix timestamp in seconds made when the current connection was established.
// Zero value if the bearer is not connected.
ConnectedAt uint64
}
WwanBearer represents a logical connection established between a User Equipment (UE) and a cellular network.
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.
func (WwanCellModule) ToProto ¶
func (m WwanCellModule) ToProto(log *base.LogObject) *info.ZCellularModuleInfo
ToProto converts internal representation of the cellular module spec into the corresponding proto definition from EVE API.
type WwanCleartextCredentials ¶
WwanCleartextCredentials stores plain-text APN credentials. Used only with LPS where cipher context is unavailable. Must never be transmitted outside of secure local use.
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 WwanIPType ¶
type WwanIPType string
WwanIPType : the IP addressing type to use for a given attach or default bearer.
const ( // WwanIPTypeUnspecified : IP type is not specified. WwanIPTypeUnspecified WwanIPType = "" // WwanIPTypeIPv4 : IPv4 only. WwanIPTypeIPv4 WwanIPType = "ipv4" // WwanIPTypeIPv4AndIPv6 : IPv4 and IPv6. WwanIPTypeIPv4AndIPv6 WwanIPType = "ipv4v6" // WwanIPTypeIPv6 : IPv6 only. WwanIPTypeIPv6 WwanIPType = "ipv6" )
func (*WwanIPType) FromProto ¶
func (ipt *WwanIPType) FromProto(ipType evecommon.CellularIPType) error
FromProto converts proto enum CellularIPType to the corresponding WwanIPType.
func (WwanIPType) ToProto ¶
func (ipt WwanIPType) ToProto(log *base.LogObject) evecommon.CellularIPType
ToProto converts a WwanIPType to its corresponding protobuf value.
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.
func (WwanMetrics) ToProto ¶
func (wm WwanMetrics) ToProto(log *base.LogObject) []*metrics.CellularMetric
ToProto converts internal representation of the cellular metrics into the corresponding proto definition from EVE API.
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
// Metric assigned to routes configured for this wwan interface.
RouteMetric uint32
}
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
// Contains all bearers currently associated with the cellular connection,
// including the attach (initial) bearer.
Bearers []WwanBearer
// Cellular connection profiles stored on the modem.
Profiles []WwanProfile
}
WwanNetworkStatus contains status information for a single cellular network (i.e. one modem but possibly multiple SIM slots/cards).
func (WwanNetworkStatus) CellBearersToProto ¶
func (wns WwanNetworkStatus) CellBearersToProto( log *base.LogObject) (bearers []*info.CellularBearer)
CellBearersToProto converts internal representation of the cellular bearers info into the corresponding proto definition from EVE API.
func (WwanNetworkStatus) CellProfilesToProto ¶
func (wns WwanNetworkStatus) CellProfilesToProto( log *base.LogObject) (profiles []*info.CellularProfile)
CellProfilesToProto converts internal representation of the cellular profiles info into the corresponding proto definition from EVE API.
func (WwanNetworkStatus) CellProvidersToProto ¶
func (wns WwanNetworkStatus) CellProvidersToProto() (providers []*info.ZCellularProvider)
CellProvidersToProto exports proto-representation of all network providers listed inside the WwanNetworkStatus.
func (WwanNetworkStatus) Equal ¶
func (wns WwanNetworkStatus) Equal(wns2 WwanNetworkStatus) bool
Equal compares two instances of WwanNetworkStatus for equality.
func (WwanNetworkStatus) SimCardsToProto ¶
func (wns WwanNetworkStatus) SimCardsToProto() (simCards []*info.ZSimcardInfo)
SimCardsToProto converts internal representation of the cellular SIM cards info into the corresponding proto definition from EVE API.
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 WwanProfile ¶
type WwanProfile struct {
// The name of the profile.
Name string
// Access Point Name used by the profile.
APN string
// Which bearer type this profile is for.
BearerType BearerType
// The IP addressing type used by the profile.
IPType WwanIPType
// When true, the modem will not connect to networks that require roaming
// when using this profile.
ForbidRoaming bool
}
WwanProfile is a modem-stored configuration that defines how the device connects to a network. It is used mostly during the initial attach procedure.
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.
func (WwanProvider) ToProto ¶
func (wp WwanProvider) ToProto() (provider *info.ZCellularProvider)
ToProto converts internal representation of the cellular network provider spec into the corresponding proto definition from EVE API.
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
MaintenanceModeReasons MaintenanceModeMultiReason
EdgeNodeCertsRefused bool // Causes maintenance mode
ForceFallbackCounter uint32 // 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
AirgapMode bool
LOCUrl 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
- bond.go
- cachedresolvedip.go
- certinfotypes.go
- cipherinfotypes.go
- ciphermetrics.go
- clustertypes.go
- clusterupdatetypes.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
- evaluation.go
- flowlogmetrics.go
- global.go
- globalconfigold.go
- ifnametopci.go
- ledmanagertypes.go
- locationconsts.go
- memory.go
- newlogtypes.go
- onboardingtypes.go
- patchenvelopestypes.go
- pbr.go
- persisttypes.go
- physicalioadapters.go
- pnac.go
- processtypes.go
- resolver.go
- resolvertypes.go
- scep.go
- smarttypes.go
- tpmmgrtypes.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