-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathinfo.proto
1367 lines (1203 loc) · 50.1 KB
/
info.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright(c) 2017-2022 Zededa, Inc.
// SPDX-License-Identifier: Apache-2.0
syntax = "proto3";
package org.lfedge.eve.info;
option go_package = "github.com/lf-edge/eve-api/go/info";
option java_package = "org.lfedge.eve.info";
import "google/protobuf/timestamp.proto";
import "evecommon/devmodelcommon.proto";
import "evecommon/evecommon.proto";
import "info/patch_envelope.proto";
import "info/ntpsources.proto";
import "info/edge_node_cluster.proto";
// Deprecated: see deprecatedMetricItem below
enum DepMetricItemType {
DepMetricItemOther = 0; // E.g., a string like an ESSID
DepMetricItemGauge = 1; // Goes up and down over time
DepMetricItemCounter = 2; // Monotonically increasing (until reboot)
DepMetricItemState = 3; // Toggles on and off; count transitions
}
// A generic metric item.
// Deprecated: Prefer to use dedicated proto message definitions for all metrics.
message deprecatedMetricItem {
string key = 1;
DepMetricItemType type = 2;
oneof metricItemValue {
bool boolValue = 3;
uint32 uint32Value = 4; // If timer this is in seconds
uint64 uint64Value = 5;
float floatValue = 6;
string stringValue = 7; // Use with care
}
}
// Map from MAC to IP addresses
message ZmetIPAssignmentEntry {
string macAddress = 1;
repeated string ipAddress = 2;
}
// Map from vifname to other info
message ZmetVifInfo {
string vifName = 1;
string macAddress = 2;
string appID = 3; // UUID
}
/*
* Broadly there are two types
* Info : information that is discovered/rarely changes
* Metrics: information that gets updated periodically
* Protobuf definitions in this file follow the convention.
*/
enum ZInfoTypes {
reserved 2, 4, 5, 15;
ZiNop = 0;
ZiDevice = 1;
ZiApp = 3;
ZiNetworkInstance = 6;
ZiVolume = 7;
ZiContentTree = 8;
ZiBlobList = 9;
ZiAppInstMetaData = 10;
ZiHardware = 11;
ZiEdgeview = 12;
ZiLocation = 13;
ZiPatchEnvelope = 14;
ZiNTPSources = 16;
ZiKubeCluster = 17;
ZiKubeClusterUpdateStatus = 18;
}
// Information about assignable I/O adapter bundles
message ZioBundle {
org.lfedge.eve.common.PhyIoType type = 1;
string name = 2; // Short hand name such as "com"
repeated string members = 3; // E.g., "com1", "com2"
string usedByAppUUID = 4;
bool usedByBaseOS = 5;
repeated IoAddresses ioAddressList = 6; // One per member
org.lfedge.eve.common.PhyIoMemberUsage usage = 7; // Usage of the IoBundle
ErrorInfo err = 8; // Any errors on the IoBundle
}
message IoAddresses {
string macAddress = 1;
VfPublishedInfo vf_info = 2;
}
// Information published for Virtual Function (VF) created by SR-IOV
// Used only for Virtual Functions (VFs) not Physical Functions (PFs)
// Reference structure in pkg/pillar/assignableadapters.go VfInfo
message VfPublishedInfo {
uint32 index = 1;
uint32 vlan_id = 2;
}
// Manufacturing info, product name, model, version etc.
// From dmidecode/BIOS on Intel
message ZInfoManufacturer {
string manufacturer = 1;
string productName = 2;
string version = 3;
string serialNumber = 4;
string UUID = 5; // From BIOS; different than device UUID
string compatible = 6; // From /proc/device-tree/compatible on ARM
string biosVendor = 7;
string biosVersion = 8;
string biosReleaseDate = 9;
}
message ZInfoNetwork {
// deprecated = 1;
// deprecated = 2;
string macAddr = 3;
// devName - Must be set to SystemAdapter.Name which is the Logicallabel
string devName = 4;
// alias - Must be set to SystemAdapter.alias
string alias = 40;
repeated string IPAddrs = 5; // All IP addresses with /N for subnet
repeated string defaultRouters = 6; // If DHCP assigned
ZInfoDNS dns = 7; // If DHCP assigned
bool ipv4_up = 8; // operational up/down status.
GeoLoc location = 9;
bool uplink = 10; // Uplink interface // XXX rename to isMgmt
ErrorInfo networkErr = 11; // For instance bad proxy config
// Ifname from PhysicalIo - eth0, eth1 etc
string localName = 12;
ProxyStatus proxy = 13;
// IP address leased by dnsmasq to app does not match the IP address allocated by zedrouter
bool ip_addr_mis_match = 14;
// IP addresses of NTP servers being used
repeated string ntp_servers = 15;
}
// From an IP address-based geolocation service
// XXX later define GPS coordinates from device
message GeoLoc {
string UnderlayIP = 1;
string Hostname = 2;
string City = 3;
string Region = 4;
string Country = 5;
string Loc = 6;
string Org = 7;
string Postal = 8;
}
// This is used both to represent the information we receive from DHCP
// for each interface, and the information the device is using
// (from /etc/resolv.conf). The latter could be different than what's received
// from DHCP on all the interfaces
message ZInfoDNS {
repeated string DNSservers = 1;
string DNSdomain = 2;
repeated string DNSsearch = 3;
}
// Enum names from OMA-TS-LWM2M_SwMgmt-V1_0-20151201-C
// plus additions starting at BOOTING
// This is used for Existing Objects. For any New objects, create and use
// a Separate enum for SwState specific to that object. Ex: ZDeviceState
enum ZSwState {
INVALID = 0;
INITIAL = 1; // Config received
DOWNLOAD_STARTED = 2; // Download in-progress
DOWNLOADED = 3; // Download completed, verification in-progress
DELIVERED = 4; // Verification completed
INSTALLED = 5; // Installed, ready for activation
BOOTING = 6; // booting. Booting and above means that App is activated.
// Terminal State
// For AppInstance, RUNNING is equivalent to ONLINE.
RUNNING = 7; // Object is Online / Running
HALTING = 8; // being halted
HALTED = 9; // Halted
RESTARTING = 10; // Restarting due to restart command
PURGING = 11; // Purging due to purge command
// Prior to DOWNLOAD_STARTED we go through these:
RESOLVING_TAG = 12; // Resolving an image tag
RESOLVED_TAG = 13; // Tag has been resolved/failed
// Prior to INSTALLED we go through these:
CREATING_VOLUME = 14; // Volume create in progress
// Terminal State for Volumes
// For Volumes, CREATED_VOLUME is equivalent to ONLINE.
CREATED_VOLUME = 15; // Volume create done/failed
VERIFYING = 16; // Verification in-progress
VERIFIED = 17; // Verification completed
LOADING = 18; // Loading blob in CAS
// Terminal State for some objects.
// For objects like ContentTree and Blob, Loaded is equivalent to
// ONLINE state for the object
LOADED = 19; // Loaded blob in CAS
AWAITNETWORKINSTANCE = 20; // Wait for network instance
// Terminal State - Object in Error State
// If an App Instance encounters an Error, it will be in ERROR
// state. If an App Instance is in ERROR state, it means there is NO DOMAIN
// currently running.
ERROR = 21; // Error State
// It would have been ideal to leave a gap before the ERROR state.
// Since we cannot change the existing states now, introduce the
// START_DELAYED state after ERROR.
// Had to prefix with Z_SW_STATE_ to satisfy yetus checks.
START_DELAYED = 22; // App has been configured to start with delay by user
PENDING = 23; // Kubernetes app in pending state
SCHEDULING = 24; // Kubernetes app in scheduling state
}
// SW Info for Apps
// XXX to be deprecated once we've completely moved to volumes
message ZInfoSW {
string swVersion = 2;
string swHash = 3;
ZSwState state = 4; // State of Software Image download/install
string target = 6; // E.g., "disk", "kernel", "device-tree"
string vdev = 7; // E.g., "xvda"
uint32 downloadProgress = 8; // Download progress; 0-100 percent
string imageName = 9; // Name of the disk image
}
// Errors in response to the application of configuration
message ErrorInfo {
string description = 1;
google.protobuf.Timestamp timestamp = 2; // Timestamp at which error had occurred
Severity severity = 3; // Severity of the error
repeated DeviceEntity entities = 4; // objects referenced by the description or retry_condition
string retry_condition = 5; // condition to retry
}
// DeviceEntity contains the device entity details
message DeviceEntity {
Entity entity = 1; // entity type
string entity_id = 2; // entity uuid
string entity_name = 3; // entity name
}
// Entity contains the entity type
enum Entity {
// Invalid Device Entity
ENTITY_UNSPECIFIED = 0;
// Base OS entity
ENTITY_BASE_OS = 1;
// System Adapter Entity
ENTITY_SYSTEM_ADAPTER = 2;
// Vault Entity
ENTITY_VAULT = 3;
// Attestation Entity
ENTITY_ATTESTATION = 4;
// App Instance Entity
ENTITY_APP_INSTANCE = 5;
// Port Entity
ENTITY_PORT = 6;
// Network Entity
ENTITY_NETWORK = 7;
// Network Instance Entity
ENTITY_NETWORK_INSTANCE = 8;
// ContentTree Entity
ENTITY_CONTENT_TREE = 9;
// Blob Entity
ENTITY_CONTENT_BLOB = 10;
// VOLUME Entity
ENTITY_VOLUME = 11;
}
// Severity tells the severity type
enum Severity {
SEVERITY_UNSPECIFIED = 0; // severity unspecified
SEVERITY_NOTICE = 1; // severity notice
SEVERITY_WARNING = 2; // severity warning
SEVERITY_ERROR = 3; // severity error
}
enum HwSecurityModuleStatus {
UNKNOWN = 0; //HSM Status is not known
NOTFOUND = 1; //No HSM found
DISABLED = 2; //HSM found, but not being used
ENABLED = 3; //HSM is found and being actively used
}
enum DataSecAtRestStatus {
DATASEC_AT_REST_UNKNOWN = 0; // Status is unknown
DATASEC_AT_REST_DISABLED = 1; // Enabled, but not being used
DATASEC_AT_REST_ENABLED = 2; // Enabled, and used
DATASEC_AT_REST_ERROR = 4; // Enabled, but encountered an error
}
enum PCRStatus {
PCR_UNKNOWN = 0; // Status is unknown
PCR_ENABLED = 1; // Enabled PCR
PCR_DISABLED = 2; // Disabled PCR
}
message VaultInfo {
string name = 1; //Name of the vault
DataSecAtRestStatus status = 2; //Status of the vault
ErrorInfo vaultErr = 3; //Additional info in case of failure
PCRStatus pcrStatus = 4; //Status of the PCR
}
message DataSecAtRest {
DataSecAtRestStatus status = 1; // Deprecated
string info = 2; // Deprecated
repeated VaultInfo vaultList = 3; // per-Vault Info
}
message SecurityInfo {
bytes sha_root_ca = 1; // sha256 of /config/root-certificate.pem
bytes sha_tls_root_ca = 2; // sha256 of /config/v2tlsbaseroot-certificates.pem
}
message ZInfoConfigItem {
string value = 1;
string error = 2;
}
message ZInfoConfigItemStatus {
map<string, ZInfoConfigItem> configItems = 1;
map<string, ZInfoConfigItem> unknownConfigItems = 2;
}
// ZInfoAppInstance - send a summary of App Instance so that controller knows
// how many App Instances are still present on the device. Controller
// can then use it to wait for an app to be fully deleted etc.
message ZInfoAppInstance {
string uuid = 1;
string name = 2;
string domainName = 3;
}
// ZInfoDeviceTasks - send a summary of tasks so that controller knows
// how many app instance tasks are still present on the device. Controller
// can then use it to wait for an app to be fully deleted etc.
message ZInfoDeviceTasks {
string name = 1;
string namespace = 2;
// deprecated 3
}
// ZSimcardInfo describes either empty SIM slot or a slot with a SIM card inserted.
message ZSimcardInfo {
// Name is a SIM card/slot identifier.
// Guaranteed to be unique only in the scope of the edge node.
// Used as a reference from ZCellularStatus.sim_cards.
string name = 1;
// Reference to ZCellularModuleInfo.name
string cell_module_name = 2;
// International Mobile Subscriber Identity.
string imsi = 3;
// Integrated Circuit Card Identifier.
string iccid = 4;
reserved 5; // legacy sim card status enum
// 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.
string state = 6;
// SIM slot number (of the modem referenced by cell_module_name) which this ZSimcardInfo
// describes.
uint32 slot_number = 7;
// True if this SIM slot is activated (i.e. inserted SIM card can be used to connect
// to cellular network).
bool slot_activated = 8;
// Type of the SIM card.
SimType type = 9;
}
// SimType : type of the SIM card.
enum SimType {
SIM_TYPE_UNSPECIFIED = 0; // SIM type is not specified
SIM_TYPE_PHYSICAL = 1; // physical SIM card
SIM_TYPE_ESIM = 2; // eSIM (embedded-SIM)
}
message ZCellularModuleInfo {
// Name is a module identifier. For example IMEI if available.
// Guaranteed to be unique only in the scope of the edge node.
string name = 1;
string imei = 2;
string firmware_version = 3;
string model = 4;
ZCellularOperatingState operating_state = 5;
ZCellularControlProtocol control_protocol = 6;
string manufacturer = 7;
}
enum ZCellularOperatingState {
Z_CELLULAR_OPERATING_STATE_UNSPECIFIED = 0;
Z_CELLULAR_OPERATING_STATE_OFFLINE = 1;
Z_CELLULAR_OPERATING_STATE_RADIO_OFF = 2; // AKA Radio-Silence mode
Z_CELLULAR_OPERATING_STATE_ONLINE = 3;
Z_CELLULAR_OPERATING_STATE_ONLINE_AND_CONNECTED = 4;
Z_CELLULAR_OPERATING_STATE_UNRECOGNIZED = 5;
}
enum ZCellularControlProtocol {
Z_CELLULAR_CONTROL_PROTOCOL_UNSPECIFIED = 0;
Z_CELLULAR_CONTROL_PROTOCOL_QMI = 1;
Z_CELLULAR_CONTROL_PROTOCOL_MBIM = 2;
}
message ZCellularProvider {
// Public land mobile network code.
string plmn = 1;
string description = 2;
// True if this is the provider currently being used.
bool current_serving = 3;
bool roaming = 4;
// True if this provider is forbidden by SIM card config.
bool forbidden = 5;
}
// Device Run State
enum ZDeviceState {
// Just to handle Un-Initialized runState variable Internally
ZDEVICE_STATE_UNSPECIFIED = 0;
// Device is Online. This only means all components of EVE are up.
// This does not indicate the Status of Apps or other configured objects.
// During booting up after reboot, Device might be reported as ONLINE
// while apps are still being processed.
ZDEVICE_STATE_ONLINE = 1;
// Device Reboot in Progress. Device is in the process of going down.
// Once the device comes back up and Eve is started, device reports the
// the state as "BOOTING"
ZDEVICE_STATE_REBOOTING = 2;
ZDEVICE_STATE_MAINTENANCE_MODE = 3;
// Device BaseOs Update in Progress
ZDEVICE_STATE_BASEOS_UPDATING = 4;
// Device is booting up. This state is reported when EVE is started and
// is able to communicate with the controller. When all the components of
// EVE are up, it transitions to ONLINE.
ZDEVICE_STATE_BOOTING = 5;
// device preparing power off - shutting down all app instances
ZDEVICE_STATE_PREPARING_POWEROFF = 6;
// device powering off from local profile server
ZDEVICE_STATE_POWERING_OFF = 7;
// device prepared power off - all app instances are shut down
ZDEVICE_STATE_PREPARED_POWEROFF = 8;
}
enum StorageStatus {
STORAGE_STATUS_UNSPECIFIED = 0;
STORAGE_STATUS_ONLINE = 1; // The device or virtual device is in normal working order.
STORAGE_STATUS_DEGRADED = 2; // The virtual device has experienced a failure but can still function.
STORAGE_STATUS_FAULTED = 3; // The device or virtual device is completely inaccessible.
STORAGE_STATUS_OFFLINE = 4; // The device has been explicitly taken offline by the administrator.
STORAGE_STATUS_UNAVAIL = 5; // The device or virtual device cannot be opened. In some cases, pools with UNAVAIL devices appear in DEGRADED mode.
STORAGE_STATUS_REMOVED = 6; // The device was physically removed while the system was running.
STORAGE_STATUS_SUSPENDED = 7; // A pool that is waiting for device connectivity to be restored.
}
message StorageDiskState {
org.lfedge.eve.common.DiskDescription disk_name = 1;
StorageStatus status = 2; // In ZFS
string state = 3; // VDev aux state
}
enum StorageRaidType {
STORAGE_RAID_TYPE_UNSPECIFIED = 0;
STORAGE_RAID_TYPE_RAID0 = 1; // RAID-0
STORAGE_RAID_TYPE_RAID1 = 2; // Mirror
STORAGE_RAID_TYPE_RAID5 = 3; // raidz1 (RAID-5)
STORAGE_RAID_TYPE_RAID6 = 4; // raidz2 (RAID-6)
STORAGE_RAID_TYPE_RAID7 = 5; // raidz3 (RAID-7)
STORAGE_RAID_TYPE_NORAID = 6; // without RAID
}
enum StorageTypeInfo {
STORAGE_TYPE_INFO_UNSPECIFIED = 0;
STORAGE_TYPE_INFO_EXT4 = 1;
STORAGE_TYPE_INFO_ZFS = 2;
}
message SmartAttr {
uint32 id = 1;
uint64 value = 2; // the current value of the parameter
uint64 worst = 3; // worst value that Value has ever reached
uint64 thresh = 4; // the value that the Value of the same attribute must reach for the attribute's state to be considered critical.
string when_failed = 5; // critical state if no empty
uint64 raw_value = 6; // Contains miscellaneous meter readings (where applicable)
}
message SmartMetric {
SmartAttr reallocated_sector_ct = 1; // Count of reallocated sectors. The higher the attribute value, the more sectors were reallocated
SmartAttr power_on_hours = 2; // Count of hours in power-on state.
SmartAttr power_cycle_count = 3; // This attribute indicates the count of full hard disk power on/off cycles
SmartAttr reallocated_event_count = 4; // Count of remap operations. Shows the total count of attempts.
SmartAttr current_pending_sector = 5; // Count of "unstable" sectors (waiting to be remapped, because of unrecoverable read errors)
bool need_update = 6; // Indicates that data has changed
SmartAttr temperature = 7; // Indicates the device temperature, if the appropriate sensor is fitted.
}
message StorageDiskInfo {
string disk_name = 1;
repeated SmartMetric smart_data = 3; // smartctl output
string wwn = 4;
string serial_number = 5;
string model = 6; // Intel 123456F
string collector_errors = 7; // Reports errors when collecting information. Default and normal value = ""
}
// For nested structures like pool of stripes of mirrors we should define this structure
message StorageChildren {
StorageRaidType current_raid = 1;
repeated StorageDiskState disks = 2;
repeated StorageChildren children = 3;
string display_name = 4; // A string which can be used to organize the display. Not unique.
uint64 g_u_i_d = 5; // A unique identifier for the storage object (RAID or mirror)
}
// Information about storage system
message StorageInfo {
string pool_name = 1;
StorageTypeInfo storage_type = 2; // Storage type zfs or ext4
string zfs_version = 3;
StorageRaidType current_raid = 4; // Current RAID configuration. When no have RAID send STORAGE_RAID_TYPE_NORAID
double compression_ratio = 5; // Compression ratio
uint64 zpool_size = 6; // Storage pool size.
uint32 count_zvols = 7; // zvols count
StorageStatus storage_state = 8; // zfs zpool status
repeated StorageDiskState disks = 9; // Disks lists in EVE (use in storage)
string collector_errors = 10; // Reports errors when collecting information. Default and normal value = ""
repeated StorageChildren children = 11; // If we have nested objects we should define them here
string pool_status_msg = 12; // pool status msg
}
// Information about the system that is sent once when the system boots
message ZInfoHardware {
repeated StorageDiskInfo disks = 1; // S.M.A.R.T. info for disks
}
// Base device info, as discovered by Xen (or OS on bare metal)
message ZInfoDevice {
string machineArch = 4;
string cpuArch = 5;
string platform = 6;
uint32 ncpu = 7;
// memory - Total system memory available (in MBytes). Firmware might use
// some memory making it unavailable to the hypervisor - So this could be
// less than the amount stated by the hardware manufacturer
uint64 memory = 8;
uint64 storage = 9; // in MBytes for the currently active image filesystem
// Value of'Power_Cycle_Count' from SMART.
// -1 is assigned if SMART is disabled or 'Power_Cycle_Count' is unavailable.
int64 powerCycleCounter = 10;
ZInfoManufacturer minfo = 11;
// OBSOLETE. The information will be provided by DevicePort instead.
// Newer versions will not fill in this information. Controller Needs
// to check check if this is empty - if yes, use the DevicePortStatus instead.
repeated ZInfoNetwork network = 13;
repeated ZioBundle assignableAdapters = 15;
ZInfoDNS dns = 16; // What is used in resolv.conf
repeated ZInfoStorage storageList = 17;
google.protobuf.Timestamp bootTime = 18;
repeated ZInfoDevSW swList = 19;
string HostName = 20;
repeated deprecatedMetricItem metricItems = 21; // For instance, static LTE network info
string lastRebootReason = 22;
google.protobuf.Timestamp lastRebootTime = 23;
SystemAdapterInfo systemAdapter = 24;
uint32 restartCounter = 25; // Number of times zedagent has restarted i.e., device reboot
HwSecurityModuleStatus HSMStatus = 26; //State of hardware security modules, like TPM
string HSMInfo = 27; //Information about HSM like TPM vendor, TEE type etc.
string lastRebootStack = 28;
DataSecAtRest dataSecAtRestInfo = 29; //Info about Data At Rest Security
SecurityInfo sec_info = 30;
ZInfoConfigItemStatus configItemStatus = 31;
repeated ZInfoAppInstance appInstances = 32;
// rebootConfigCounter - reboot command counter from config last processed by
// eve
uint32 rebootConfigCounter = 33;
BootReason last_boot_reason = 34;
// Cellular / LTE related information
repeated ZCellularModuleInfo cell_radios = 35;
repeated ZSimcardInfo sims = 36;
repeated ZInfoDeviceTasks tasks = 37;
bool maintenance_mode = 38;
// XXX to be deprecated in favor of maintenance_mode_reasons
MaintenanceModeReason maintenance_mode_reason = 39 [deprecated=true];
// Is /dev/watchdog present in the system
bool hardware_watchdog_present = 40;
// Are we in the process of rebooting EVE?
bool reboot_inprogress = 41;
// Information about hardware capabilities
Capabilities capabilities = 42;
// BaseOsUpdate Counter. This must be updated only when:
// 1) if the configured BaseOs partition is set to UPDATED, mirror
// the current value of baseos_update.counter
// 2) At the start if a BaseOs update (either from a partition in error state
// or from UPDATED state of another version), copy over current
// deviceConfig.baseOs_update_counter
uint32 baseos_update_counter = 43;
// Device State
ZDeviceState state = 44;
// Is there a local_profile from a local_profile_server?
// The global_profile from the controller is not echoed in this field.
string local_profile = 45;
repeated MaintenanceModeReason maintenance_mode_reasons = 46;
string dormant_time = 47 [deprecated = true];
repeated StorageInfo storage_info = 48;
// shutdown command counter from EdgeDevConfig last processed by eve
uint32 shutdown_config_counter = 49;
// state of attestation process of eve
AttestationInfo attestation_info = 50;
// Capability indicating which new EdgeDevConfig fields which are supported
APICapability api_capability = 51;
// Reports the remote access status
bool remote_access_disabled = 52;
// OptionalCapabilities of the device
OptionalCapabilities optional_capabilities = 53;
}
// OptionalCapabilities indicates any additional capabilities device wants
// to publish to controller. For example Kubevirt hypervisor is not supported by
// all eve flavors.
message OptionalCapabilities {
// Virtualization type Kubevirt
bool hv_type_kubevirt = 1;
}
// Capabilities indicates features in the EdgeDevConfig where there is
// no easy way to otherwise determine whether or not they are parsed and
// supported by EVE-OS
// A larger number indicates all lower numbers are also supported thus
// this works similar to a version field for the EdgeDevConfig support.
enum APICapability {
API_CAPABILITY_UNSPECIFIED = 0;
API_CAPABILITY_RETRY_UPDATE = 1; // BaseOs.retry_update counter supported
API_CAPABILITY_SHUTDOWN = 2; // shutdown DevOpsCmd support
API_CAPABILITY_START_DELAY_IN_SECONDS = 3; // start_delay_in_seconds supported
API_CAPABILITY_EDGEVIEW = 4; // edgeview and edgeview.token supported
API_CAPABILITY_VOLUME_SNAPSHOTS = 5; // Volume snapshots supported
API_CAPABILITY_NETWORK_INSTANCE_ROUTING = 6; // routing config in NetworkInstanceConfig supported
API_CAPABILITY_BOOT_MODE = 7; // Support different boot modes for Edge Applications (VMs)
API_CAPABILITY_MTU = 8; // Allows to set MTU for network adapters and network instances
API_CAPABILITY_ADAPTER_USER_LABELS = 9; // Supports user-defined shared network adapter labels
API_CAPABILITY_ENFORCED_NET_INTERFACE_ORDER = 10; // EVE is able to enforce the user-defined order of application network interfaces
API_CAPABILITY_NTPS_FQDN = 11; // Allow to set NTP server via FQDN instead of only IP and allow setting several NTP servers
// Add new values as new EdgeDevConfig API features are implemented
}
// Different reasons for a boot/reboot
// Must match the values in pkg/pillar/types.BootReason
enum BootReason {
BOOT_REASON_UNSPECIFIED = 0;
BOOT_REASON_FIRST = 1;
BOOT_REASON_REBOOT_CMD = 2;
BOOT_REASON_UPDATE = 3;
BOOT_REASON_FALLBACK = 4;
BOOT_REASON_DISCONNECT = 5;
BOOT_REASON_FATAL = 6;
BOOT_REASON_OOM = 7;
BOOT_REASON_WATCHDOG_HUNG = 8;
BOOT_REASON_WATCHDOG_PID = 9;
BOOT_REASON_KERNEL = 10;
BOOT_REASON_POWER_FAIL = 11;
BOOT_REASON_UNKNOWN = 12;
BOOT_REASON_VAULT_FAILED = 13;
BOOT_REASON_POWEROFF_CMD = 14; // From Local Profile Server poweroff
BOOT_REASON_PARSE_FAIL = 255;
}
// Different reasons why we are in maintenance mode
enum MaintenanceModeReason {
MAINTENANCE_MODE_REASON_NONE = 0;
MAINTENANCE_MODE_REASON_USER_REQUESTED = 1;
MAINTENANCE_MODE_REASON_VAULT_LOCKED_UP = 2;
MAINTENANCE_MODE_REASON_LOW_DISK_SPACE = 3;
MAINTENANCE_MODE_REASON_TPM_ENCRYPTION_FAILURE = 4;
MAINTENANCE_MODE_REASON_TPM_QUOTE_FAILURE = 5;
}
// Information about attestation process
message AttestationInfo {
AttestationState state = 1; //current state of attestation
ErrorInfo error = 2; //last error
}
// Different states of attestation process
// Must match the values in pkg/pillar/attest.State
// We do not expect StateAny to be published as not a real state
enum AttestationState {
ATTESTATION_STATE_UNSPECIFIED = 0; //State when (Re)Starting attestation
ATTESTATION_STATE_NONCE_WAIT = 1; //Waiting for response from Controller for Nonce request
ATTESTATION_STATE_TPM_QUOTE_WAIT = 2; //Waiting for TPM PCR quote to be published from the tpmmgr
ATTESTATION_STATE_TPM_ESCROW_WAIT = 3; //Waiting for TPM Escrow data to be published from the tpmmgr
ATTESTATION_STATE_ATTEST_WAIT = 4; //Waiting for response from Controller for PCR quote
ATTESTATION_STATE_ATTEST_ESCROW_WAIT = 5; //Waiting for response from Controller for Escrow data
ATTESTATION_STATE_RESTART_WAIT = 6; //Waiting for restart timer to expire, to start all over again
ATTESTATION_STATE_COMPLETE = 7; //Everything w.r.t attestation is complete
}
// Different types of app instance metadata
enum AppInstMetaDataType {
APP_INST_META_DATA_TYPE_NONE = 0;
APP_INST_META_DATA_TYPE_KUBE_CONFIG = 1;
APP_INST_META_DATA_TYPE_CUSTOM_STATUS = 2;
}
// The current and fallback system adapter information
message SystemAdapterInfo {
uint32 currentIndex = 1; // Zero means the first/highest priority is used
repeated DevicePortStatus status = 2;
}
message DevicePortStatus {
uint32 version = 1;
string key = 2;
google.protobuf.Timestamp timePriority = 3;
google.protobuf.Timestamp lastFailed = 4;
google.protobuf.Timestamp lastSucceeded = 5;
repeated DevicePort ports = 6;
string lastError = 7;
}
message DevicePort {
string ifname = 1;
string name = 2; // Logical name set by controller; same as logicallabel
bool isMgmt = 3;
bool free = 4; // DEPRECATED - use cost instead with zero cost meaning free
// DhcpConfig
uint32 dhcpType = 11;
string subnet = 12;
// gateway - OBSOLETE - obsoleted by defaultRouters
string gateway = 13;
// domainname - OBSOLETE - obsoleted by dns
string domainname = 14;
// ntpServer and more_ntp_servers are used to report several NTP servers
string ntpServer = 15;
repeated string more_ntp_servers = 35;
// dnsServers - OBSOLETE - obsoleted by dns
repeated string dnsServers = 16;
string dhcpRangeLow = 17;
string dhcpRangeHigh = 18;
ProxyStatus proxy = 21;
string macAddr = 22;
repeated string IPAddrs = 23; // All IP addresses with /N for subnet
repeated string defaultRouters = 24; // If DHCP assigned
ZInfoDNS dns = 25; // If DHCP assigned
bool up = 26; // operational up/down status.
GeoLoc location = 27;
ErrorInfo err = 29; // Any errors on the interface.
org.lfedge.eve.common.PhyIoMemberUsage usage = 30; // Usage of the Device port
string networkUUID = 31; // Network UUID configured for the port.
uint32 cost = 32; // Zero is free. Max is 255.
WirelessStatus wireless_status = 33; // defined for cellular/WiFi ports only
uint32 mtu = 34; // MTU of the port
}
message ProxyStatus {
repeated ProxyEntry proxies = 1;
string exceptions = 2;
string pacfile = 3;
bool networkProxyEnable = 4;
string networkProxyURL = 5;
string wpadURL = 6;
// XXX add? In config
// repeated bytes proxyCertPEM = 7;
}
message ProxyEntry {
uint32 type = 1; // From NPT_ types aka proxyProto
string server = 2;
uint32 port = 3;
}
message WirelessStatus {
WirelessType type = 1;
ZCellularStatus cellular = 2;
// later we may add status for WiFi
}
enum WirelessType {
WIRELESS_TYPE_UNSPECIFIED = 0;
WIRELESS_TYPE_WIFI = 1;
WIRELESS_TYPE_CELLULAR = 2;
}
message ZCellularStatus {
// Name reference (ZCellularModuleInfo.name) to the corresponding cellular module
// from the list ZInfoDevice.cell_radios.
string cellular_module = 1;
// Each item is a name reference (ZSimcardInfo.name) to a SIM card from the list ZInfoDevice.sims.
// Ordered by slot numbers.
repeated string sim_cards = 2;
// List of available cellular service providers.
// If the modem is registered to a network, the list is guaranteed to contain an entry
// with ZCellularProvider.current_serving set to true, describing the current provider.
repeated ZCellularProvider providers = 3;
// The list of Radio Access Technologies (RATs) currently used for registering/connecting
// to the network (typically just one).
repeated org.lfedge.eve.common.RadioAccessTechnology current_rats = 4;
// Time when the current connection was established.
// Zero timestamp if the modem is not connected.
google.protobuf.Timestamp connected_at = 5;
// If EVE failed to configure the cellular connection, the error is published here.
string config_error = 10;
// if the connectivity probing is failing, error is reported here
// (see CellularConnectivityProbe).
string probe_error = 11;
}
// SW Info for the device base OS
// Many of these fields are for debug purposes. The ones intended
// for the UI/cli are userStatus, subStatus*, shortVersion, and swErr
message ZInfoDevSW {
bool activated = 2;
string partitionLabel = 3; // E.g., "IMGA"
string partitionDevice = 4;// /dev/something
string partitionState = 5; // state obtained from cboot
// Once BaseOs start using ContentTrees, this field may be deprecated.
ZSwState status = 6; // E.g., "DOWNLOADED"
string shortVersion = 7; // From rootfs i.e., image
string longVersion = 8; // E.g., the yml file content from build
ErrorInfo swErr = 9;
uint32 downloadProgress = 10; // Download progress; 0-100 percent
BaseOsStatus userStatus = 11;
string subStatusStr = 12; // English formatted string
BaseOsSubStatus subStatus = 13;
uint32 subStatusProgress = 14; // Context-dependent; percentage or time
}
enum BaseOsStatus {
NONE = 0; // Should be ignored in output
DOWNLOADING = 1; // subStatus will have more details
DOWNLOAD_DONE = 2; // Terminal state if user action was to download
UPDATING = 3; // subStatus will have more details including
// whether it is rebooting, or testing
UPDATED = 4; // Running the configured baseimage
FALLBACK = 5; // Fallback image during testing
FAILED = 6; // See ErrInfo for details
}
enum BaseOsSubStatus {
NONE_SUBSTATUS = 0;
DOWNLOAD_INPROGRESS = 1; // subStatusProgress is percentage
VERIFY_INPROGRESS = 2; // subStatusProgress is percentage
UPDATE_INITIALIZING = 3;
UPDATE_REBOOTING = 4; // subStatusProgress is time left
UPDATE_TESTING = 5; // subStatusProgress is time left
UPDATE_NEED_TEST_CONFIRM = 6; // waiting for controller to commit to new
UPDATE_DEFERRED = 7; // waiting for current update to finish
}
// Per filesystem/partition information
message ZInfoStorage {
string device = 1; // E.g., "sda3"
string mountPath = 2; // E.g., "/", or "/config"
uint64 total = 3; // in MBytes
bool storageLocation = 4; // Storage location for app disks, images etc.
}
// Type of the snapshot creation reason
enum SnapshotType {
SNAPSHOT_TYPE_UNSPECIFIED = 0;
SNAPSHOT_TYPE_APP_UPDATE = 1; // Snapshot created as a result of an application update
}
// Per snapshot information
message ZInfoSnapshot {
// identifier for the snapshot, required
// The format of the ID is a standard UUIDv4.
// Should be unique within the app instance. If the snapshot creation was
// triggered on the Controller side, the Controller should have generate the
// ID, so here the device just sends it back. If the snapshot creation was
// triggered locally, the Controller doesn't know the ID, so EVE should
// generate it and report back to the Controller.
string id = 1;
// an app instance configuration id and version, optional
// EVE needs to send these fields only in the cases when the snapshot was
// triggered locally. In this case, the fields contain the value of the
// EdgeDevConfig.id field that has come from the Controller with the latest
// received EdgeDevConfig message. The field in that message is described in
// the `devconfig.proto` file and has the UUIDandVersion type. It contains
// both the id and the version of the configuration.
// In this message EVE has to send the id and the version of the
// configuration in two different fields, because the UUIDandVersion type
// is not available here.
string config_id = 2;
// see the comment for the config_id field
string config_version = 3;
// a timestamp when the snapshot was created
google.protobuf.Timestamp create_time = 4;
// a reason for the snapshot creation
SnapshotType type = 5;
// an error that happened during the snapshot handling (creation/deletion/rollback)
ErrorInfo snap_err = 6;
}
enum ZInfoClusterNodeStatus {
Z_INFO_CLUSTER_NODE_STATUS_UNSPECIFIED = 0;
Z_INFO_CLUSTER_NODE_STATUS_READY = 1; // cluster reports our node is ready
Z_INFO_CLUSTER_NODE_STATUS_NOTREADY = 2; // cluster reports our node is NOT ready
Z_INFO_CLUSTER_NODE_STATUS_DOWN = 3; // cluster API server can not be reached
}
message ZInfoClusterNode {
ZInfoClusterNodeStatus node_status = 1;
}
message ZInfoApp {
reserved 9 to 11, 19; // deprecated
string AppID = 1;
string appVersion = 2;
bool systemApp = 6;
string AppName = 7;
// EVE stopped sending this. Can be removed.
repeated ZInfoSW softwareList = 8; // XXX to be deprecated in favor of volumeRefs
google.protobuf.Timestamp bootTime = 12;
repeated ZioBundle assignedAdapters = 13;
repeated ErrorInfo appErr = 14;
ZSwState state = 15;
repeated ZInfoNetwork network = 16; // up/down; allocated IP
repeated string volumeRefs = 17; // volume UUIDs
repeated ZInfoSnapshot snapshots = 18; // optional field, used to send list of snapshots on device
// Deployed app is scheduled, or rescheduled and launched on this node,
// it has the Pod Spec-name of this node, the app can be in any operating state.
bool cluster_app_running = 20;
}
// ipSec state information
enum ZInfoVpnState {
VPN_INVALID = 0;
VPN_INITIAL = 1; // Config received
VPN_CONNECTING = 2; // Connection is in-progress
VPN_ESTABLISHED = 3; // Connection established
VPN_INSTALLED = 4; // SAs/Routes Installed
VPN_REKEYED = 5; // SAs Rekeyed
VPN_DELETED = 10; // Connection deleted
}
// tunnel link details
message ZInfoVpnLinkInfo {
string spiId = 1; // Security Parameter Index
string subNet = 2; // Associate Subnet
bool direction = 3; // 0 = local, 1 = remote
}
// Esp details
message ZInfoVpnLink {
string id = 1; // esp id
string name = 2; // connection name
string reqId = 3; // request id
uint64 instTime = 4; // in seconds
string espInfo = 5; // esp info
ZInfoVpnState state = 6; // esp state
ZInfoVpnLinkInfo lInfo = 10; // local
ZInfoVpnLinkInfo rInfo = 11; // remote