4
"github.com/containers/common/libnetwork/types"
5
"github.com/containers/storage/pkg/idtools"
8
// Info is the overall struct that describes the host system
9
// running libpod/podman
10
// swagger:model LibpodInfo
12
Host *HostInfo `json:"host"`
13
Store *StoreInfo `json:"store"`
14
Registries map[string]interface{} `json:"registries"`
15
Plugins Plugins `json:"plugins"`
16
Version Version `json:"version"`
19
// SecurityInfo describes the libpod host
20
type SecurityInfo struct {
21
AppArmorEnabled bool `json:"apparmorEnabled"`
22
DefaultCapabilities string `json:"capabilities"`
23
Rootless bool `json:"rootless"`
24
SECCOMPEnabled bool `json:"seccompEnabled"`
25
SECCOMPProfilePath string `json:"seccompProfilePath"`
26
SELinuxEnabled bool `json:"selinuxEnabled"`
29
// HostInfo describes the libpod host
31
Arch string `json:"arch"`
32
BuildahVersion string `json:"buildahVersion"`
33
CgroupManager string `json:"cgroupManager"`
34
CgroupsVersion string `json:"cgroupVersion"`
35
CgroupControllers []string `json:"cgroupControllers"`
36
Conmon *ConmonInfo `json:"conmon"`
37
CPUs int `json:"cpus"`
38
CPUUtilization *CPUUsage `json:"cpuUtilization"`
39
DatabaseBackend string `json:"databaseBackend"`
40
Distribution DistributionInfo `json:"distribution"`
41
EventLogger string `json:"eventLogger"`
42
FreeLocks *uint32 `json:"freeLocks,omitempty"`
43
Hostname string `json:"hostname"`
44
IDMappings IDMappings `json:"idMappings,omitempty"`
45
Kernel string `json:"kernel"`
46
LogDriver string `json:"logDriver"`
47
MemFree int64 `json:"memFree"`
48
MemTotal int64 `json:"memTotal"`
49
NetworkBackend string `json:"networkBackend"`
50
NetworkBackendInfo types.NetworkInfo `json:"networkBackendInfo"`
51
OCIRuntime *OCIRuntimeInfo `json:"ociRuntime"`
53
// RemoteSocket returns the UNIX domain socket the Podman service is listening on
54
RemoteSocket *RemoteSocket `json:"remoteSocket,omitempty"`
55
// RootlessNetworkCmd returns the default rootless network command (slirp4netns or pasta)
56
RootlessNetworkCmd string `json:"rootlessNetworkCmd"`
57
RuntimeInfo map[string]interface{} `json:"runtimeInfo,omitempty"`
58
// ServiceIsRemote is true when the podman/libpod service is remote to the client
59
ServiceIsRemote bool `json:"serviceIsRemote"`
60
Security SecurityInfo `json:"security"`
61
Slirp4NetNS SlirpInfo `json:"slirp4netns,omitempty"`
62
Pasta PastaInfo `json:"pasta,omitempty"`
64
SwapFree int64 `json:"swapFree"`
65
SwapTotal int64 `json:"swapTotal"`
66
Uptime string `json:"uptime"`
67
Variant string `json:"variant"`
68
Linkmode string `json:"linkmode"`
71
// RemoteSocket describes information about the API socket
72
type RemoteSocket struct {
73
Path string `json:"path,omitempty"`
74
Exists bool `json:"exists"`
77
// SlirpInfo describes the slirp executable that is being used
78
type SlirpInfo struct {
79
Executable string `json:"executable"`
80
Package string `json:"package"`
81
Version string `json:"version"`
84
// PastaInfo describes the pasta executable that is being used
85
type PastaInfo struct {
86
Executable string `json:"executable"`
87
Package string `json:"package"`
88
Version string `json:"version"`
91
// IDMappings describe the GID and UID mappings
92
type IDMappings struct {
93
GIDMap []idtools.IDMap `json:"gidmap"`
94
UIDMap []idtools.IDMap `json:"uidmap"`
97
// DistributionInfo describes the host distribution for libpod
98
type DistributionInfo struct {
99
Distribution string `json:"distribution"`
100
Variant string `json:"variant,omitempty"`
101
Version string `json:"version"`
102
Codename string `json:"codename,omitempty"`
105
// ConmonInfo describes the conmon executable being used
106
type ConmonInfo struct {
107
Package string `json:"package"`
108
Path string `json:"path"`
109
Version string `json:"version"`
112
// OCIRuntimeInfo describes the runtime (crun or runc) being
114
type OCIRuntimeInfo struct {
115
Name string `json:"name"`
116
Package string `json:"package"`
117
Path string `json:"path"`
118
Version string `json:"version"`
121
// StoreInfo describes the container storage and its
123
type StoreInfo struct {
124
ConfigFile string `json:"configFile"`
125
ContainerStore ContainerStore `json:"containerStore"`
126
GraphDriverName string `json:"graphDriverName"`
127
GraphOptions map[string]interface{} `json:"graphOptions"`
128
GraphRoot string `json:"graphRoot"`
129
// GraphRootAllocated is how much space the graphroot has in bytes
130
GraphRootAllocated uint64 `json:"graphRootAllocated"`
131
// GraphRootUsed is how much of graphroot is used in bytes
132
GraphRootUsed uint64 `json:"graphRootUsed"`
133
GraphStatus map[string]string `json:"graphStatus"`
134
ImageCopyTmpDir string `json:"imageCopyTmpDir"`
135
ImageStore ImageStore `json:"imageStore"`
136
RunRoot string `json:"runRoot"`
137
VolumePath string `json:"volumePath"`
138
TransientStore bool `json:"transientStore"`
141
// ImageStore describes the image store. Right now only the number
143
type ImageStore struct {
144
Number int `json:"number"`
147
// ContainerStore describes the quantity of containers in the
149
type ContainerStore struct {
150
Number int `json:"number"`
151
Paused int `json:"paused"`
152
Running int `json:"running"`
153
Stopped int `json:"stopped"`
157
Volume []string `json:"volume"`
158
Network []string `json:"network"`
159
Log []string `json:"log"`
160
// Authorization is provided for compatibility, will always be nil as Podman has no daemon
161
Authorization []string `json:"authorization"`
164
type CPUUsage struct {
165
UserPercent float64 `json:"userPercent"`
166
SystemPercent float64 `json:"systemPercent"`
167
IdlePercent float64 `json:"idlePercent"`