示例#1
0
 def __init__(self, **data):
     """
     constructor of the object
     """
     Device.__init__(self, **data)
     refAttributeNames = getRefAttributeNames(HardwareAppliance)
     for (name, value) in data.items():
         if name in IHardwareAppliance.names() and \
            name not in refAttributeNames:
             setattr(self, name, value)
     self.ikRevision = __version__
示例#2
0
 def __init__(self, **data):
     """
     constructor of the object
     """
     Device.__init__(self, **data)
     refAttributeNames = getRefAttributeNames(PersonalComputer)
     for (name, value) in data.items():
         if name in IPersonalComputer.names() and \
            name not in refAttributeNames:
             setattr(self, name, value)
     self.ikRevision = __version__
示例#3
0
 def __init__(self, **data):
     """
     constructor of the object
     """
     Device.__init__(self, **data)
     refAttributeNames = getRefAttributeNames(Switch)
     print "dddd: ", refAttributeNames
     for (name, value) in data.items():
         if name in ISwitch.names() and \
            name not in refAttributeNames:
             setattr(self, name, value)
     self.ikRevision = __version__
示例#4
0
 def store_refs(self, **data):
     Device.store_refs(self, **data)
     refAttributeNames = self.getRefAttributeNames()
     for (name, value) in data.items():
         if name in refAttributeNames:
             setattr(self, name, value)