@@ -32,10 +32,10 @@ class ResourcePoolConf(dict):
3232
3333 def __init__ (
3434 self ,
35- resourcePoolId : str ,
36- queueName : str ,
37- resourcePoolType : str ,
38- resourcePoolName : str
35+ resourcePoolId , # type : str
36+ queueName , # type : str
37+ resourcePoolType , # type : str
38+ resourcePoolName # type : str
3939 ):
4040 super ().__init__ ()
4141 self ["resourcePoolId" ] = resourcePoolId
@@ -52,7 +52,7 @@ class PFSConfig(dict):
5252 InstanceId (str): PFS实例ID(如"pfs-12345")
5353 """
5454
55- def __init__ (self , sourcePath : str , InstanceId : str ):
55+ def __init__ (self , sourcePath , InstanceId ):
5656 super ().__init__ ()
5757 self ["sourcePath" ] = sourcePath
5858 self ["InstanceId" ] = InstanceId
@@ -72,9 +72,9 @@ class VolumnConf(dict):
7272
7373 def __init__ (
7474 self ,
75- volumeType : str ,
76- volumnName : str ,
77- pfs : Optional [dict ] = None
75+ volumeType , # type : str
76+ volumnName , # type : str
77+ pfs , # type : Optional[dict] = None
7878 ):
7979 super ().__init__ ()
8080 self ["volumeType" ] = volumeType
@@ -92,8 +92,8 @@ class StorageConf(dict):
9292
9393 def __init__ (
9494 self ,
95- shmSize : Optional [int ] = None ,
96- volumns : Optional [List [dict ]] = None
95+ shmSize , # type : Optional[int] = None,
96+ volumns # type : Optional[List[dict]] = None
9797 ):
9898 super ().__init__ ()
9999 if shmSize is not None :
@@ -116,10 +116,10 @@ class ImageConf(dict):
116116
117117 def __init__ (
118118 self ,
119- imageType : int ,
120- imageUrl : str ,
121- username : Optional [str ] = None ,
122- password : Optional [str ] = None
119+ imageType , # type : int
120+ imageUrl , # type : str
121+ username , # type : Optional[str]
122+ password # type : Optional[str]
123123 ):
124124 super ().__init__ ()
125125 self ["imageType" ] = imageType
@@ -136,7 +136,7 @@ class ExecAction(dict):
136136 command (list): 要执行的命令数组(如["/bin/sh", "-c", "echo ready"])
137137 """
138138
139- def __init__ (self , command : list ):
139+ def __init__ (self , command ): # type: list
140140 super ().__init__ ()
141141 self ["command" ] = command
142142
@@ -148,7 +148,7 @@ class HTTPGetAction(dict):
148148 port (int): 请求端口号(如8080)
149149 """
150150
151- def __init__ (self , path : str , port : int ):
151+ def __init__ (self , path , port ): # type: (str, int)
152152 super ().__init__ ()
153153 self ["path" ] = path
154154 self ["port" ] = port
@@ -160,7 +160,7 @@ class TCPSocketAction(dict):
160160 port (int): 要检查的端口号
161161 """
162162
163- def __init__ (self , port : int ):
163+ def __init__ (self , port ): # type: int
164164 super ().__init__ ()
165165 self ["port" ] = port
166166
@@ -177,9 +177,9 @@ class ProbeHandlerConf(dict):
177177
178178 def __init__ (
179179 self ,
180- exec : Optional [dict ] = None ,
181- httpGet : Optional [dict ] = None ,
182- tcpSocketAction : Optional [dict ] = None
180+ exec , # type : Optional[dict]
181+ httpGet , # type : Optional[dict]
182+ tcpSocketAction # type : Optional[dict]
183183 ):
184184 super ().__init__ ()
185185 if exec is not None :
@@ -203,12 +203,12 @@ class ProbeConf(dict):
203203
204204 def __init__ (
205205 self ,
206- initialDelaySeconds : int ,
207- timeoutSeconds : int ,
208- periodSeconds : int ,
209- successThreshold : int ,
210- failureThreshold : int ,
211- handler : dict
206+ initialDelaySeconds , # type : int
207+ timeoutSeconds , # type : int
208+ periodSeconds , # type : int
209+ successThreshold , # type : int
210+ failureThreshold , # type : int
211+ handler # type : dict
212212 ):
213213 super ().__init__ ()
214214 self ["initialDelaySeconds" ] = initialDelaySeconds
@@ -240,19 +240,19 @@ class ContainerConf(dict):
240240
241241 def __init__ (
242242 self ,
243- name : str ,
244- cpus : int ,
245- memory : int ,
246- acceleratorCount : int ,
247- image : dict ,
248- command : Optional [list ] = None ,
249- runArgs : Optional [list ] = None ,
250- ports : Optional [list ] = None ,
251- envs : Optional [dict ] = None ,
252- volumeMounts : Optional [list ] = None ,
253- readinessProbe : Optional [dict ] = None ,
254- startupsProbe : Optional [dict ] = None ,
255- livenessProbe : Optional [dict ] = None
243+ name , # type : str
244+ cpus , # type : int
245+ memory , # type : int
246+ acceleratorCount , # type : int
247+ image , # type : dict
248+ command , # type : Optional[list]
249+ runArgs , # type : Optional[list]
250+ ports , # type : Optional[list]
251+ envs , # type : Optional[dict]
252+ volumeMounts , # type : Optional[list]
253+ readinessProbe , # type : Optional[dict]
254+ startupsProbe , # type : Optional[dict]
255+ livenessProbe # type : Optional[dict]
256256 ):
257257 super ().__init__ ()
258258 self ["name" ] = name
@@ -286,7 +286,7 @@ class AiGatewayConf(dict):
286286 enableAuth (bool): 是否开启鉴权(True/False)
287287 """
288288
289- def __init__ (self , enableAuth : bool ):
289+ def __init__ (self , enableAuth ): # type: bool
290290 super ().__init__ ()
291291 self ["enableAuth" ] = enableAuth
292292
@@ -303,10 +303,10 @@ class AccessConf(dict):
303303
304304 def __init__ (
305305 self ,
306- publicAccess : Optional [bool ] = None ,
307- eip : Optional [str ] = None ,
308- aiGateway : Optional [dict ] = None ,
309- networkType : Optional [str ] = None
306+ publicAccess , # type : Optional[bool]
307+ eip , # type : Optional[str]
308+ aiGateway , # type : Optional[dict]
309+ networkType # type : Optional[str]
310310 ):
311311 super ().__init__ ()
312312 if publicAccess is not None :
@@ -326,7 +326,7 @@ class LogConf(dict):
326326 persistent (Optional[bool]): 是否持久化容器标准输出日志(默认False)
327327 """
328328
329- def __init__ (self , persistent : Optional [bool ] = None ):
329+ def __init__ (self , persistent = None ): # type: Optional[bool]
330330 super ().__init__ ()
331331 if persistent is not None : # 日志持久化开关
332332 self ["persistent" ] = persistent
@@ -344,8 +344,8 @@ class CanaryStrategyConf(dict):
344344
345345 def __init__ (
346346 self ,
347- maxSurge : Optional [int ] = None ,
348- maxUnavailable : Optional [int ] = None
347+ maxSurge , # type : Optional[int]
348+ maxUnavailable # type : Optional[int]
349349 ):
350350 super ().__init__ ()
351351 if maxSurge is not None :
@@ -361,7 +361,7 @@ class ScheduleConf(dict):
361361 priority (str): 优先级("high"/"normal"/"low")
362362 """
363363
364- def __init__ (self , priority : str ):
364+ def __init__ (self , priority ): # type: str
365365 super ().__init__ ()
366366 self ["priority" ] = priority
367367
@@ -399,11 +399,11 @@ class Misc(dict):
399399
400400 def __init__ (
401401 self ,
402- podLabels : Optional [dict ] = None ,
403- podAnnotations : Optional [dict ] = None ,
404- gracePeriodSec : Optional [int ] = None ,
405- fedPodsPerIns : Optional [int ] = None ,
406- enableRDMA : Optional [bool ] = None
402+ podLabels , # type : Optional[dict]
403+ podAnnotations , # type : Optional[dict]
404+ gracePeriodSec , # type : Optional[int]
405+ fedPodsPerIns , # type : Optional[int]
406+ enableRDMA # type : Optional[bool]
407407 ):
408408 super ().__init__ ()
409409 if podLabels is not None :
@@ -437,17 +437,17 @@ class ServiceConf(dict):
437437
438438 def __init__ (
439439 self ,
440- name : str ,
441- acceleratorType : str ,
442- workloadType : str ,
443- instanceCount : int ,
444- resourcePool : dict ,
445- containers : List [dict ],
446- storage : Optional [dict ] = None ,
447- access : Optional [dict ] = None ,
448- log : Optional [dict ] = None ,
449- deploy : Optional [dict ] = None ,
450- misc : Optional [dict ] = None
440+ name , # type : str
441+ acceleratorType , # type : str
442+ workloadType , # type : str
443+ instanceCount , # type : int
444+ resourcePool , # type : dict
445+ containers , # type : List[dict]
446+ storage , # type : Optional[dict]
447+ access , # type : Optional[dict]
448+ log , # type : Optional[dict]
449+ deploy , # type : Optional[dict]
450+ misc # type : Optional[dict]
451451 ):
452452 super ().__init__ ()
453453 self ["name" ] = name
@@ -485,15 +485,15 @@ class ModifyServiceConf(dict):
485485
486486 def __init__ (
487487 self ,
488- name : str ,
489- acceleratorType : str ,
490- instanceCount : int ,
491- resourcePool : dict ,
492- containers : List [dict ],
493- storage : Optional [dict ] = None ,
494- log : Optional [dict ] = None ,
495- deploy : Optional [dict ] = None ,
496- misc : Optional [dict ] = None
488+ name , # type : str
489+ acceleratorType , # type : str
490+ instanceCount , # type : int
491+ resourcePool , # type : dict
492+ containers , # type : List[dict]
493+ storage , # type : Optional[dict]
494+ log , # type : Optional[dict]
495+ deploy , # type : Optional[dict]
496+ misc # type : Optional[dict]
497497 ):
498498 super ().__init__ ()
499499 self ["name" ] = name
0 commit comments