in aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/ModifyEciScalingConfigurationRequest.py [0:0]
def set_InitContainers(self, InitContainer): # RepeatList
for depth1 in range(len(InitContainer)):
if InitContainer[depth1].get('Image') is not None:
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.Image', InitContainer[depth1].get('Image'))
if InitContainer[depth1].get('InitContainerEnvironmentVar') is not None:
for depth2 in range(len(InitContainer[depth1].get('InitContainerEnvironmentVar'))):
if InitContainer[depth1].get('InitContainerEnvironmentVar')[depth2].get('FieldRef.FieldPath') is not None:
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.InitContainerEnvironmentVar.' + str(depth2 + 1) + '.FieldRef.FieldPath', InitContainer[depth1].get('InitContainerEnvironmentVar')[depth2].get('FieldRef.FieldPath'))
if InitContainer[depth1].get('InitContainerEnvironmentVar')[depth2].get('Value') is not None:
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.InitContainerEnvironmentVar.' + str(depth2 + 1) + '.Value', InitContainer[depth1].get('InitContainerEnvironmentVar')[depth2].get('Value'))
if InitContainer[depth1].get('InitContainerEnvironmentVar')[depth2].get('Key') is not None:
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.InitContainerEnvironmentVar.' + str(depth2 + 1) + '.Key', InitContainer[depth1].get('InitContainerEnvironmentVar')[depth2].get('Key'))
if InitContainer[depth1].get('SecurityContext.Capability.Add') is not None:
for depth2 in range(len(InitContainer[depth1].get('SecurityContext.Capability.Add'))):
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.SecurityContext.Capability.Add.' + str(depth2 + 1), InitContainer[depth1].get('SecurityContext.Capability.Add')[depth2])
if InitContainer[depth1].get('Memory') is not None:
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.Memory', InitContainer[depth1].get('Memory'))
if InitContainer[depth1].get('WorkingDir') is not None:
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.WorkingDir', InitContainer[depth1].get('WorkingDir'))
if InitContainer[depth1].get('Cpu') is not None:
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.Cpu', InitContainer[depth1].get('Cpu'))
if InitContainer[depth1].get('Gpu') is not None:
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.Gpu', InitContainer[depth1].get('Gpu'))
if InitContainer[depth1].get('ImagePullPolicy') is not None:
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.ImagePullPolicy', InitContainer[depth1].get('ImagePullPolicy'))
if InitContainer[depth1].get('Command') is not None:
for depth2 in range(len(InitContainer[depth1].get('Command'))):
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.Command.' + str(depth2 + 1), InitContainer[depth1].get('Command')[depth2])
if InitContainer[depth1].get('SecurityContext.RunAsUser') is not None:
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.SecurityContext.RunAsUser', InitContainer[depth1].get('SecurityContext.RunAsUser'))
if InitContainer[depth1].get('InitContainerPort') is not None:
for depth2 in range(len(InitContainer[depth1].get('InitContainerPort'))):
if InitContainer[depth1].get('InitContainerPort')[depth2].get('Protocol') is not None:
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.InitContainerPort.' + str(depth2 + 1) + '.Protocol', InitContainer[depth1].get('InitContainerPort')[depth2].get('Protocol'))
if InitContainer[depth1].get('InitContainerPort')[depth2].get('Port') is not None:
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.InitContainerPort.' + str(depth2 + 1) + '.Port', InitContainer[depth1].get('InitContainerPort')[depth2].get('Port'))
if InitContainer[depth1].get('Arg') is not None:
for depth2 in range(len(InitContainer[depth1].get('Arg'))):
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.Arg.' + str(depth2 + 1), InitContainer[depth1].get('Arg')[depth2])
if InitContainer[depth1].get('Name') is not None:
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.Name', InitContainer[depth1].get('Name'))
if InitContainer[depth1].get('InitContainerVolumeMount') is not None:
for depth2 in range(len(InitContainer[depth1].get('InitContainerVolumeMount'))):
if InitContainer[depth1].get('InitContainerVolumeMount')[depth2].get('MountPath') is not None:
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.InitContainerVolumeMount.' + str(depth2 + 1) + '.MountPath', InitContainer[depth1].get('InitContainerVolumeMount')[depth2].get('MountPath'))
if InitContainer[depth1].get('InitContainerVolumeMount')[depth2].get('ReadOnly') is not None:
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.InitContainerVolumeMount.' + str(depth2 + 1) + '.ReadOnly', InitContainer[depth1].get('InitContainerVolumeMount')[depth2].get('ReadOnly'))
if InitContainer[depth1].get('InitContainerVolumeMount')[depth2].get('MountPropagation') is not None:
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.InitContainerVolumeMount.' + str(depth2 + 1) + '.MountPropagation', InitContainer[depth1].get('InitContainerVolumeMount')[depth2].get('MountPropagation'))
if InitContainer[depth1].get('InitContainerVolumeMount')[depth2].get('Name') is not None:
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.InitContainerVolumeMount.' + str(depth2 + 1) + '.Name', InitContainer[depth1].get('InitContainerVolumeMount')[depth2].get('Name'))
if InitContainer[depth1].get('InitContainerVolumeMount')[depth2].get('SubPath') is not None:
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.InitContainerVolumeMount.' + str(depth2 + 1) + '.SubPath', InitContainer[depth1].get('InitContainerVolumeMount')[depth2].get('SubPath'))
if InitContainer[depth1].get('SecurityContext.ReadOnlyRootFilesystem') is not None:
self.add_query_param('InitContainer.' + str(depth1 + 1) + '.SecurityContext.ReadOnlyRootFilesystem', InitContainer[depth1].get('SecurityContext.ReadOnlyRootFilesystem'))