mcsmapi 0.1.6__py3-none-any.whl → 0.1.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
mcsmapi/models/daemon.py CHANGED
@@ -1,93 +1,65 @@
1
- from typing import Any, List
1
+ from typing import Any
2
2
  from pydantic import BaseModel
3
3
  from mcsmapi.models.instance import InstanceCreateResult
4
-
5
-
6
- class CpuMemChart(BaseModel):
7
- """节点资源使用率信息"""
8
-
9
- """cpu使用率"""
10
- cpu: float = 0
11
- """内存使用率"""
12
- mem: float = 0
13
-
14
-
15
- class ProcessInfo(BaseModel):
16
- """节点进程详细信息"""
17
-
18
- """远程节点使用的cpu资源(单位: byte)"""
19
- cpu: int = 0
20
- """远程节点使用的内存资源(单位: byte)"""
21
- memory: int = 0
22
- """远程节点的工作路径"""
23
- cwd: str = ""
24
-
25
-
26
- class InstanceInfo(BaseModel):
27
- """实例统计信息"""
28
-
29
- """运行中实例数量"""
30
- running: int = 0
31
- """全部实例数量"""
32
- total: int = 0
4
+ from mcsmapi.models.common import ProcessInfo, InstanceInfo, CpuMemChart
33
5
 
34
6
 
35
7
  class SystemInfo(BaseModel):
36
8
  """节点系统信息"""
37
9
 
10
+ type: str
38
11
  """系统类型"""
39
- type: str = ""
12
+ hostname: str
40
13
  """主机名"""
41
- hostname: str = ""
14
+ platform: str
42
15
  """平台架构"""
43
- platform: str = ""
16
+ release: str
44
17
  """系统版本"""
45
- release: str = ""
18
+ uptime: float
46
19
  """系统运行时间(单位: sec)"""
47
- uptime: float = 0
20
+ cwd: str
48
21
  """远程节点运行路径"""
49
- cwd: str = ""
22
+ loadavg: list[float]
50
23
  """系统负载平均值(仅适用于 Linux 和 macOS),表示过去 **1 分钟、5 分钟、15 分钟** 内的 CPU 负载情况"""
51
- loadavg: List[float] = []
24
+ freemem: int
52
25
  """可用内存(单位: byte)"""
53
- freemem: int = 0
26
+ cpuUsage: float
54
27
  """cpu使用率"""
55
- cpuUsage: float = 0
28
+ memUsage: float
56
29
  """内存使用率"""
57
- memUsage: float = 0
30
+ totalmem: int
58
31
  """内存总量(单位: byte)"""
59
- totalmem: int = 0
60
- """未知,在MCSM代码中始终为0"""
61
- processCpu: int = 0
62
- """未知,在MCSM代码中始终为0"""
63
- processMem: int = 0
32
+ processCpu: int
33
+ """未知"""
34
+ processMem: int
35
+ """未知"""
64
36
 
65
37
 
66
38
  class DaemonModel(BaseModel):
67
39
  """节点详细信息"""
68
40
 
41
+ version: str
69
42
  """远程节点版本"""
70
- version: str = ""
43
+ process: ProcessInfo
71
44
  """远程节点的基本信息"""
72
- process: ProcessInfo = ProcessInfo()
45
+ instance: InstanceInfo
73
46
  """远程节点实例基本信息"""
74
- instance: InstanceInfo = InstanceInfo()
47
+ system: SystemInfo
75
48
  """远程节点系统信息"""
76
- system: SystemInfo = SystemInfo()
49
+ cpuMemChart: list[CpuMemChart]
77
50
  """cpu和内存使用趋势"""
78
- cpuMemChart: List[CpuMemChart] = []
51
+ uuid: str
79
52
  """远程节点的uuid"""
80
- uuid: str = ""
53
+ ip: str
81
54
  """远程节点的ip"""
82
- ip: str = ""
55
+ port: int
83
56
  """远程节点的端口"""
84
- port: int = 24444
57
+ prefix: str
85
58
  """远程节点的路径前缀"""
86
- prefix: str = ""
59
+ available: bool
87
60
  """远程节点的可用状态"""
88
- available: bool = False
89
- """远程节点的备注"""
90
- remarks: str = ""
61
+ remarks: str
62
+ """远程节点的名称"""
91
63
 
92
64
  def delete(self) -> bool:
93
65
  """
@@ -98,7 +70,7 @@ class DaemonModel(BaseModel):
98
70
  """
99
71
  from mcsmapi.apis.daemon import Daemon
100
72
 
101
- return Daemon().delete(self.uuid)
73
+ return Daemon.delete(self.uuid)
102
74
 
103
75
  def link(self) -> bool:
104
76
  """
@@ -109,7 +81,7 @@ class DaemonModel(BaseModel):
109
81
  """
110
82
  from mcsmapi.apis.daemon import Daemon
111
83
 
112
- return Daemon().link(self.uuid)
84
+ return Daemon.link(self.uuid)
113
85
 
114
86
  def updateConfig(self, config: dict[str, Any]) -> bool:
115
87
  """
@@ -123,18 +95,18 @@ class DaemonModel(BaseModel):
123
95
  """
124
96
  from mcsmapi.apis.daemon import Daemon
125
97
 
126
- updated_config = self.dict()
98
+ updated_config = self.model_dump()
127
99
  updated_config.update(config)
128
100
  # 过滤节点配置中不需要的字段
129
101
  daemon_config_dict = {
130
102
  key: updated_config[key]
131
- for key in DaemonConfig.__fields__.keys()
103
+ for key in DaemonConfig.model_fields.keys()
132
104
  if key in updated_config
133
105
  }
134
106
 
135
- daemon_config = DaemonConfig(**daemon_config_dict).dict()
107
+ daemon_config = DaemonConfig(**daemon_config_dict).model_dump()
136
108
 
137
- return Daemon().update(self.uuid, daemon_config)
109
+ return Daemon.update(self.uuid, daemon_config)
138
110
 
139
111
  def createInstance(self, config: dict[str, Any]) -> "InstanceCreateResult":
140
112
  """
@@ -149,7 +121,7 @@ class DaemonModel(BaseModel):
149
121
  from mcsmapi.apis.instance import Instance
150
122
  from .instance import InstanceConfig
151
123
 
152
- return Instance().create(self.uuid, InstanceConfig(**config).dict())
124
+ return Instance.create(self.uuid, InstanceConfig(**config).dict())
153
125
 
154
126
  def deleteInstance(self, uuids: list[str], deleteFile=False) -> list[str]:
155
127
  """
@@ -164,19 +136,19 @@ class DaemonModel(BaseModel):
164
136
  """
165
137
  from mcsmapi.apis.instance import Instance
166
138
 
167
- return Instance().delete(self.uuid, uuids, deleteFile)
139
+ return Instance.delete(self.uuid, uuids, deleteFile)
168
140
 
169
141
 
170
142
  class DaemonConfig(BaseModel):
171
143
  """节点配置信息"""
172
144
 
173
- """远程节点的ip"""
174
145
  ip: str = "localhost"
175
- """远程节点的端口"""
146
+ """远程节点的ip"""
176
147
  port: int = 24444
177
- """远程节点的路径前缀"""
148
+ """远程节点的端口"""
178
149
  prefix: str = ""
179
- """远程节点的备注"""
150
+ """远程节点的路径前缀"""
180
151
  remarks: str = "New Daemon"
181
- """远程节点的可用状态"""
152
+ """远程节点的备注"""
182
153
  available: bool = True
154
+ """远程节点的可用状态"""
mcsmapi/models/file.py CHANGED
@@ -1,29 +1,34 @@
1
+ from enum import IntEnum
1
2
  from pydantic import BaseModel
2
- from typing import List
3
3
  import os
4
4
 
5
5
 
6
+ class FileType(IntEnum):
7
+ FOLDER = 0
8
+ FILE = 1
9
+
10
+
6
11
  class FileItem(BaseModel):
7
12
  """文件信息"""
8
13
 
14
+ name: str
9
15
  """文件名称"""
10
- name: str = ""
16
+ size: int
11
17
  """文件大小(单位: byte)"""
12
- size: int = 0 # byte
18
+ time: str
13
19
  """文件修改时间"""
14
- time: str = ""
20
+ mode: int
15
21
  """文件操作权限(仅适用于Linux)"""
16
- mode: int = 777 # Linux file permission
17
- """文件类型,`0`为文件夹,`1`为文件"""
18
- type: int = 0 # 0 = Folder, 1 = File
19
- """远程节点uuid"""
22
+ type: FileType
23
+ """文件类型"""
20
24
  daemonId: str = ""
21
- """实例的uiid"""
25
+ """远程节点uuid"""
22
26
  uuid: str = ""
23
- """文件所在路径"""
27
+ """实例的uiid"""
24
28
  target: str = ""
29
+ """文件所在路径"""
30
+ file_name: str
25
31
  """当前文件列表过滤条件"""
26
- file_name: str = ""
27
32
 
28
33
  def rename(self, newName: str) -> bool:
29
34
  """
@@ -37,7 +42,7 @@ class FileItem(BaseModel):
37
42
  """
38
43
  from mcsmapi.apis.file import File
39
44
 
40
- return File().rename(
45
+ return File.rename(
41
46
  self.daemonId, self.uuid, os.path.join(self.target, self.name), newName
42
47
  )
43
48
 
@@ -50,14 +55,14 @@ class FileItem(BaseModel):
50
55
  """
51
56
  from mcsmapi.apis.file import File
52
57
 
53
- return File().delete(
58
+ return File.delete(
54
59
  self.daemonId, self.uuid, [os.path.join(self.target, self.name)]
55
60
  )
56
61
 
57
62
  def copy(self, target: str) -> bool:
58
63
  from mcsmapi.apis.file import File
59
64
 
60
- return File().copyOne(
65
+ return File.copyOne(
61
66
  self.daemonId, self.uuid, os.path.join(self.target, self.name), target
62
67
  )
63
68
 
@@ -73,7 +78,7 @@ class FileItem(BaseModel):
73
78
  """
74
79
  from mcsmapi.apis.file import File
75
80
 
76
- return File().moveOne(
81
+ return File.moveOne(
77
82
  self.daemonId, self.uuid, os.path.join(self.target, self.name), target
78
83
  )
79
84
 
@@ -85,7 +90,7 @@ class FileItem(BaseModel):
85
90
  """
86
91
  from mcsmapi.apis.file import File
87
92
 
88
- return File().content(
93
+ return File.content(
89
94
  self.daemonId, self.uuid, os.path.join(self.target, self.name)
90
95
  )
91
96
 
@@ -101,7 +106,7 @@ class FileItem(BaseModel):
101
106
  """
102
107
  from mcsmapi.apis.file import File
103
108
 
104
- return File().zip(
109
+ return File.zip(
105
110
  self.daemonId, self.uuid, os.path.join(self.target, self.name), targets
106
111
  )
107
112
 
@@ -119,7 +124,7 @@ class FileItem(BaseModel):
119
124
  """
120
125
  from mcsmapi.apis.file import File
121
126
 
122
- return File().unzip(
127
+ return File.unzip(
123
128
  self.daemonId, self.uuid, os.path.join(self.target, self.name), target, code
124
129
  )
125
130
 
@@ -133,7 +138,7 @@ class FileItem(BaseModel):
133
138
  """
134
139
  from mcsmapi.apis.file import File
135
140
 
136
- return File().update(
141
+ return File.update(
137
142
  self.daemonId, self.uuid, os.path.join(self.target, self.name), text
138
143
  )
139
144
 
@@ -145,7 +150,7 @@ class FileItem(BaseModel):
145
150
  """
146
151
  from mcsmapi.apis.file import File
147
152
 
148
- return File().download(
153
+ return File.download(
149
154
  self.daemonId, self.uuid, os.path.join(self.target, self.name)
150
155
  )
151
156
 
@@ -153,22 +158,22 @@ class FileItem(BaseModel):
153
158
  class FileList(BaseModel):
154
159
  """文件列表"""
155
160
 
161
+ items: list[FileItem]
156
162
  """文件信息列表"""
157
- items: List[FileItem]
163
+ page: int
158
164
  """当前页数"""
159
- page: int = 0
165
+ pageSize: int
160
166
  """文件列表单页大小"""
161
- pageSize: int = 100
167
+ total: int
162
168
  """总页数"""
163
- total: int = 0
169
+ absolutePath: str
164
170
  """当前路径在远程节点的绝对路径"""
165
- absolutePath: str = "\\"
171
+ daemonId: str
166
172
  """远程节点uuid"""
167
- daemonId: str = ""
173
+ uuid: str
168
174
  """实例uuid"""
169
- uuid: str = ""
175
+ target: str
170
176
  """文件(名称或目录)路径"""
171
- target: str = ""
172
177
 
173
178
  def __init__(self, **data: str):
174
179
  super().__init__(**data)
@@ -190,7 +195,7 @@ class FileList(BaseModel):
190
195
  """
191
196
  from mcsmapi.apis.file import File
192
197
 
193
- return await File().upload(self.daemonId, self.uuid, file, upload_dir)
198
+ return await File.upload(self.daemonId, self.uuid, file, upload_dir)
194
199
 
195
200
  def createFile(self, target: str) -> bool:
196
201
  """
@@ -204,9 +209,9 @@ class FileList(BaseModel):
204
209
  """
205
210
  from mcsmapi.apis.file import File
206
211
 
207
- return File().createFile(self.daemonId, self.uuid, target)
212
+ return File.createFile(self.daemonId, self.uuid, target)
208
213
 
209
- def createFloder(self, target: str) -> bool:
214
+ def createFolder(self, target: str) -> bool:
210
215
  """
211
216
  创建文件夹
212
217
 
@@ -218,11 +223,12 @@ class FileList(BaseModel):
218
223
  """
219
224
  from mcsmapi.apis.file import File
220
225
 
221
- return File().createFloder(self.daemonId, self.uuid, target)
226
+ return File.createFolder(self.daemonId, self.uuid, target)
227
+
222
228
 
229
+ class FileDownloadConfig(BaseModel):
223
230
 
224
- class CommonConfig(BaseModel):
231
+ password: str
225
232
  """文件下载密码"""
226
- password: str = ""
233
+ addr: str
227
234
  """文件下载地址"""
228
- addr: str = ""
mcsmapi/models/image.py CHANGED
@@ -1,207 +1,209 @@
1
- from typing import List, Optional, Union
1
+ from typing import Literal
2
2
  from pydantic import BaseModel
3
3
 
4
4
 
5
5
  class DockerConfig(BaseModel):
6
6
  """容器配置"""
7
7
 
8
- """容器名称"""
9
8
  containerName: str = ""
10
- """镜像名称"""
9
+ """容器名称"""
11
10
  image: str = ""
11
+ """镜像名称"""
12
+ memory: int = 0
12
13
  """容器分配内存(单位: MB)"""
13
- memory: int = 0 # in MB
14
- """容器端口映射"""
15
- ports: List[str] = [] # ["25565:25565/tcp"]
14
+ ports: list[str] = []
15
+ """容器端口映射, eg:["25565:25565/tcp"]"""
16
+ extraVolumes: list[str] = []
16
17
  """额外挂载卷路径"""
17
- extraVolumes: List[str] = []
18
+ maxSpace: int | None = None
18
19
  """容器可使用的最大磁盘空间(单位: MB)"""
19
- maxSpace: Optional[int] = None
20
+ network: str | int | None = None
20
21
  """网络配置,可以是网络名称或ID"""
21
- network: Optional[Union[str, int]] = None
22
+ io: str | int | None = None
22
23
  """容器的 IO 限制"""
23
- io: Optional[Union[str, int]] = None
24
- """网络模式(例如: bridge, host)"""
25
24
  networkMode: str = "bridge"
25
+ """网络模式(例如: bridge, host)"""
26
+ networkAliases: list[str] = []
26
27
  """网络别名列表"""
27
- networkAliases: List[str] = []
28
- """绑定的 CPU 核心"""
29
- cpusetCpus: str = "" # 例如 `0,1`
30
- """CPU 使用率(单位: %)"""
28
+ cpusetCpus: str = ""
29
+ """绑定的 CPU 核心, eg: `0,1`"""
31
30
  cpuUsage: int = 100
32
- """工作目录"""
31
+ """CPU 使用率(单位: %)"""
33
32
  workingDir: str = ""
33
+ """工作目录"""
34
+ env: list[str] = []
34
35
  """环境变量设置"""
35
- env: List[str] = []
36
36
 
37
37
 
38
38
  class DockerImageItem(BaseModel):
39
39
  """Docker 镜像信息"""
40
40
 
41
- """镜像唯一 ID"""
42
41
  Id: str = ""
43
- """父镜像 ID"""
42
+ """镜像唯一 ID"""
44
43
  ParentId: str = ""
45
- """镜像仓库标签"""
46
- RepoTags: List[str] = [] # 例如 ["ubuntu:latest"]
44
+ """父镜像 ID"""
45
+ RepoTags: list[str] = []
46
+ """镜像仓库标签, eg: ["ubuntu:latest"]"""
47
+ RepoDigests: list[str] = []
47
48
  """镜像摘要"""
48
- RepoDigests: List[str] = []
49
- """镜像创建时间(Unix 时间戳)"""
50
49
  Created: int = 0
51
- """镜像大小(单位: 字节)"""
50
+ """镜像创建时间(Unix 时间戳)"""
52
51
  Size: int = 0
53
- """镜像的虚拟大小"""
52
+ """镜像大小(单位: 字节)"""
54
53
  VirtualSize: int = 0
55
- """共享存储空间大小"""
54
+ """镜像的虚拟大小"""
56
55
  SharedSize: int = 0
57
- """镜像标签"""
56
+ """共享存储空间大小"""
58
57
  Labels: dict[str, str] = {}
59
- """依赖该镜像运行的容器数量"""
58
+ """镜像标签"""
60
59
  Containers: int = 0
60
+ """依赖该镜像运行的容器数量"""
61
61
 
62
62
 
63
63
  class DockerContainerItemPort(BaseModel):
64
64
  """Docker 容器端口映射"""
65
65
 
66
- """容器内部端口"""
67
66
  PrivatePort: int = 0
67
+ """容器内部端口"""
68
+ PublicPort: int | None = None
68
69
  """映射到宿主机的端口"""
69
- PublicPort: Optional[int] = None
70
- """端口类型(tcp/udp)"""
71
- Type: str = ""
70
+ Type: Literal["tcp", "udp"] = "tcp"
71
+ """端口类型"""
72
72
 
73
73
 
74
74
  class DockerContainerItemNetworkSettingsNetwork(BaseModel):
75
75
  """Docker 容器网络设置信息"""
76
76
 
77
- """网络 ID"""
78
77
  NetworkID: str = ""
79
- """网络端点 ID"""
78
+ """网络 ID"""
80
79
  EndpointID: str = ""
81
- """网关地址"""
80
+ """网络端点 ID"""
82
81
  Gateway: str = ""
83
- """分配的 IP 地址"""
82
+ """网关地址"""
84
83
  IPAddress: str = ""
85
- """IP 地址前缀长度"""
84
+ """分配的 IP 地址"""
86
85
  IPPrefixLen: int = 0
87
- """IPv6 网关地址"""
86
+ """IP 地址前缀长度"""
88
87
  IPv6Gateway: str = ""
89
- """IPv6 地址"""
88
+ """IPv6 网关地址"""
90
89
  GlobalIPv6Address: str = ""
91
- """IPv6 地址前缀长度"""
90
+ """IPv6 地址"""
92
91
  GlobalIPv6PrefixLen: int = 0
93
- """MAC 地址"""
92
+ """IPv6 地址前缀长度"""
94
93
  MacAddress: str = ""
94
+ """MAC 地址"""
95
95
 
96
96
 
97
97
  class DockerContainerItemNetworkSettings(BaseModel):
98
98
  """Docker 容器的网络配置信息"""
99
99
 
100
- """容器连接的所有网络"""
101
100
  Networks: dict[str, DockerContainerItemNetworkSettingsNetwork] = {}
101
+ """容器连接的所有网络"""
102
102
 
103
103
 
104
104
  class DockerContainerItemMount(BaseModel):
105
105
  """容器挂载点信息"""
106
106
 
107
- """挂载名称"""
108
107
  Name: str = ""
109
- """源路径"""
108
+ """挂载名称"""
110
109
  Source: str = ""
111
- """目标路径"""
110
+ """源路径"""
112
111
  Destination: str = ""
113
- """驱动类型"""
112
+ """目标路径"""
114
113
  Driver: str = ""
115
- """挂载模式"""
114
+ """驱动类型"""
116
115
  Mode: str = ""
117
- """是否允许读写"""
116
+ """挂载模式"""
118
117
  RW: bool = False
119
- """传播模式"""
118
+ """是否允许读写"""
120
119
  Propagation: str = ""
120
+ """传播模式"""
121
121
 
122
122
 
123
123
  class DockerContainerItemHostConfig(BaseModel):
124
124
  """Docker 宿主机配置"""
125
125
 
126
- """网络模式"""
127
126
  NetworkMode: str = ""
127
+ """网络模式"""
128
128
 
129
129
 
130
130
  class DockerContainerItem(BaseModel):
131
131
  """Docker 容器详细信息"""
132
132
 
133
- """容器 ID"""
134
133
  Id: str = ""
134
+ """容器 ID"""
135
+ Names: list[str] = []
135
136
  """容器名称列表"""
136
- Names: List[str] = []
137
- """运行的镜像名称"""
138
137
  Image: str = ""
139
- """镜像 ID"""
138
+ """运行的镜像名称"""
140
139
  ImageID: str = ""
141
- """容器启动命令"""
140
+ """镜像 ID"""
142
141
  Command: str = ""
143
- """容器创建时间(Unix 时间戳)"""
142
+ """容器启动命令"""
144
143
  Created: int = 0
145
- """容器状态"""
144
+ """容器创建时间(Unix 时间戳)"""
146
145
  State: str = ""
147
- """容器运行状态描述"""
146
+ """容器状态"""
148
147
  Status: str = ""
148
+ """容器运行状态描述"""
149
+ Ports: list[DockerContainerItemPort] = []
149
150
  """端口映射信息"""
150
- Ports: List[DockerContainerItemPort] = []
151
- """容器标签信息"""
152
151
  Labels: dict[str, str] = {}
153
- """读写层大小(单位: 字节)"""
152
+ """容器标签信息"""
154
153
  SizeRw: int = 0
155
- """根文件系统大小(单位: 字节)"""
154
+ """读写层大小(单位: 字节)"""
156
155
  SizeRootFs: int = 0
157
- """宿主机配置"""
156
+ """根文件系统大小(单位: 字节)"""
158
157
  HostConfig: DockerContainerItemHostConfig = DockerContainerItemHostConfig()
158
+ """宿主机配置"""
159
+ NetworkSettings: DockerContainerItemNetworkSettings = (
160
+ DockerContainerItemNetworkSettings()
161
+ )
159
162
  """容器网络配置"""
160
- NetworkSettings: DockerContainerItemNetworkSettings = DockerContainerItemNetworkSettings()
163
+ Mounts: list[DockerContainerItemMount] = []
161
164
  """容器挂载信息"""
162
- Mounts: List[DockerContainerItemMount] = []
163
165
 
164
166
 
165
167
  class DockerNetworkItemIPAMConfig(BaseModel):
166
168
  """Docker 网络 IPAM 配置信息"""
167
169
 
168
- """子网地址"""
169
170
  Subnet: str = ""
171
+ """子网地址"""
170
172
 
171
173
 
172
174
  class DockerNetworkItemIPAM(BaseModel):
173
175
  """Docker 网络的 IP 地址管理"""
174
176
 
175
- """驱动类型"""
176
177
  Driver: str = ""
178
+ """驱动类型"""
179
+ Config: list[DockerNetworkItemIPAMConfig] = []
177
180
  """IPAM 配置"""
178
- Config: List[DockerNetworkItemIPAMConfig] = []
179
181
 
180
182
 
181
183
  class DockerNetworkItem(BaseModel):
182
184
  """Docker 网络详细信息"""
183
185
 
184
- """网络名称"""
185
186
  Name: str = ""
186
- """网络 ID"""
187
+ """网络名称"""
187
188
  Id: str = ""
188
- """网络创建时间"""
189
+ """网络 ID"""
189
190
  Created: str = ""
190
- """网络作用范围(local/global)"""
191
+ """网络创建时间"""
191
192
  Scope: str = ""
192
- """网络驱动类型"""
193
+ """网络作用范围(local/global)"""
193
194
  Driver: str = ""
194
- """是否启用 IPv6"""
195
+ """网络驱动类型"""
195
196
  EnableIPv6: bool = False
196
- """是否为内部网络"""
197
+ """是否启用 IPv6"""
197
198
  Internal: bool = False
198
- """是否可附加"""
199
+ """是否为内部网络"""
199
200
  Attachable: bool = False
200
- """是否为入口网络"""
201
+ """是否可附加"""
201
202
  Ingress: bool = False
202
- """IPAM 配置信息"""
203
+ """是否为入口网络"""
203
204
  IPAM: DockerNetworkItemIPAM = DockerNetworkItemIPAM()
204
- """网络选项"""
205
+ """IPAM 配置信息"""
205
206
  Options: dict[str, str] = {}
207
+ """网络选项"""
208
+ Containers: dict[str, dict] = {}
206
209
  """连接到此网络的容器信息"""
207
- Containers: Optional[dict[str, dict]] = {}