本文整理汇总了Python中sclib.sc.scobject.SCObject.startElement方法的典型用法代码示例。如果您正苦于以下问题:Python SCObject.startElement方法的具体用法?Python SCObject.startElement怎么用?Python SCObject.startElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sclib.sc.scobject.SCObject
的用法示例。
在下文中一共展示了SCObject.startElement方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: startElement
# 需要导入模块: from sclib.sc.scobject import SCObject [as 别名]
# 或者: from sclib.sc.scobject.SCObject import startElement [as 别名]
def startElement(self, name, attrs, connection):
ret = SCObject.startElement(self, name, attrs, connection)
if ret is not None:
return ret
if name == 'securityGroup':
for key, value in attrs.items():
if key in self.ValidAttributes:
setattr(self, key, value)
return self
elif name == 'securityRuleList':
if not self.securityRuleList:
self.securityRuleList = ResultSet(
[('securityRule', SecurityRule)], name)
return self.securityRuleList
elif name == 'vmList':
self.__vmList = ResultSet([('vm', VirtualMachine)], name)
return self.vmList
elif name == 'successAction':
self.successAction = SecurityGroupAction(connection, name)
return self.successAction.startElement(name, attrs, connection)
elif name == 'failedAction':
self.failedAction = SecurityGroupAction(connection, name)
return self.failedAction.startElement(name, attrs, connection)
else:
return None
示例2: startElement
# 需要导入模块: from sclib.sc.scobject import SCObject [as 别名]
# 或者: from sclib.sc.scobject.SCObject import startElement [as 别名]
def startElement(self, name, attrs, connection):
ret = SCObject.startElement(self, name, attrs, connection)
if ret is not None:
return ret
if name == 'device':
for key, value in attrs.items():
setattr(self, key, value)
elif name == 'volume':
self.volume = Volume(connection)
self.volume.startElement(name, attrs, connection)
return self.volume
elif name == 'provider':
self.provider = Provider(connection)
self.provider.startElement(name, attrs, connection)
return self.provider
elif name == 'partitionList':
partitionList = ResultSet([('partition', Partition)], name)
return self.partitionList
elif name == 'subDevices':
self.__subDevices = ResultSet([('subDevices', Device)], name)
return self.subDevices
else:
return None
示例3: startElement
# 需要导入模块: from sclib.sc.scobject import SCObject [as 别名]
# 或者: from sclib.sc.scobject.SCObject import startElement [as 别名]
def startElement(self, name, attrs, connection):
ret = SCObject.startElement(self, name, attrs, connection)
if ret is not None:
return ret
if name == 'right':
pass
else:
return None
示例4: startElement
# 需要导入模块: from sclib.sc.scobject import SCObject [as 别名]
# 或者: from sclib.sc.scobject.SCObject import startElement [as 别名]
def startElement(self, name, attrs, connection):
ret = SCObject.startElement(self, name, attrs, connection)
if ret is not None:
return ret
if name == 'provider':
for key, value in attrs.items():
setattr(self, key, value)
else:
return None
示例5: startElement
# 需要导入模块: from sclib.sc.scobject import SCObject [as 别名]
# 或者: from sclib.sc.scobject.SCObject import startElement [as 别名]
def startElement(self, name, attrs, connection):
ret = SCObject.startElement(self, name, attrs, connection)
if ret is not None:
return ret
if name == 'certificate':
self.id = attrs['level']
self.encoding = attrs['encoding']
else:
return None
示例6: startElement
# 需要导入模块: from sclib.sc.scobject import SCObject [as 别名]
# 或者: from sclib.sc.scobject.SCObject import startElement [as 别名]
def startElement(self, name, attrs, connection):
ret = SCObject.startElement(self, name, attrs, connection)
if ret is not None:
return ret
if name == 'securecloudAgent':
for key, value in attrs.items():
setattr(self, key, value)
return self
else:
return None
示例7: startElement
# 需要导入模块: from sclib.sc.scobject import SCObject [as 别名]
# 或者: from sclib.sc.scobject.SCObject import startElement [as 别名]
def startElement(self, name, attrs, connection):
ret = SCObject.startElement(self, name, attrs, connection)
if ret is not None:
return ret
if name == "DSMConnSettings":
for key, value in attrs.items():
if key in self.ValidAttributes:
setattr(self, key, value)
else:
return None