Beispiel #1
0
 def __init__(self,
              node=None,
              nodeInfo=None,
              sdsName=None,
              protectionDomain=None,
              faultSet=None,
              allIPs=None,
              sdsOnlyIPs=None,
              sdcOnlyIPs=None,
              devices=None,
              optimized=None,
              port=None):
     self.node = Node_Object.from_dict(node)
     self.nodeInfo = nodeInfo
     self.sdsName = sdsName
     self.protectionDomain = protectionDomain
     self.faultSet = faultSet  # Is this as easy as giving a string with a Faultset name??? (Its not documented)
     self.allIPs = []
     for allIp in allIPs:
         self.allIPs.append(allIp)
     self.sdsOnlyIPs = []
     if sdsOnlyIPs:
         for sdsOnlyIp in sdsOnlyIPs:
             self.sdsOnlyIPs.append(sdsOnlyIp)
     self.sdcOnlyIPs = []
     if sdcOnlyIPs:
         for sdcOnlyIp in sdcOnlyIPs:
             self.sdcOnlyIPs.append(sdcOnlyIp)
     self.devices = []
     if devices:
         for device in devices:
             self.devices.append(Sds_Device_Object.from_dict(device))
     self.optimized = optimized
     self.port = port
Beispiel #2
0
 def __init__(self,
     node=None,
     nodeInfo=None,
     sdsName=None,
     protectionDomain=None,
     faultSet=None,
     allIPs=None,
     sdsOnlyIPs=None,
     sdcOnlyIPs=None,
     devices=None,
     optimized=None,
     port=None
 ):
     self.node=Node_Object.from_dict(node)
     self.nodeInfo=nodeInfo
     self.sdsName=sdsName
     self.protectionDomain = protectionDomain
     self.faultSet=faultSet # Is this as easy as giving a string with a Faultset name??? (Its not documented)
     self.allIPs=[]
     for allIp in allIPs:
         self.allIPs.append(allIp)
     self.sdsOnlyIPs=[]
     if sdsOnlyIPs:
         for sdsOnlyIp in sdsOnlyIPs:
             self.sdsOnlyIPs.append(sdsOnlyIp)
     self.sdcOnlyIPs=[]
     if sdcOnlyIPs:
         for sdcOnlyIp in sdcOnlyIPs:
             self.sdcOnlyIPs.append(sdcOnlyIp)
     self.devices=[]
     if devices:
         for device in devices:
             self.devices.append(Sds_Device_Object.from_dict(device))
     self.optimized=optimized
     self.port=port
Beispiel #3
0
 def addDevice(self, devicePath, storagePool, deviceName):
     #print "Add Device:"
     device_dict = {
         'devicePath': devicePath,
         'storagePool': storagePool,
         'deviceName': deviceName
     }
     #pprint (device_dict) #(Sds_Device_Object(devicePath, storagePool, deviceName).to_JSON())
     self.devices.append(Sds_Device_Object.from_dict(device_dict))
Beispiel #4
0
 def addDevice(self, devicePath, storagePool, deviceName):
     #print "Add Device:"
     device_dict = {'devicePath': devicePath, 'storagePool': storagePool, 'deviceName': deviceName}
     #pprint (device_dict) #(Sds_Device_Object(devicePath, storagePool, deviceName).to_JSON())
     self.devices.append(Sds_Device_Object.from_dict(device_dict))