<s> '''<STR_LIT>''' <EOL> import uuid <EOL> import math <EOL> from sqlalchemy . ext . declarative import declarative_base <EOL> from sqlalchemy import Column , Integer , BigInteger , String , ForeignKey , Enum , UniqueConstraint , Index <EOL> import propLoader <EOL> if propLoader . OpenClosProperty ( ) . isSqliteUsed ( ) : <EOL> from sqlalchemy import BLOB <EOL> else : <EOL> from sqlalchemy . dialects . mysql import MEDIUMBLOB as BLOB <EOL> from sqlalchemy . orm import relationship , backref <EOL> from netaddr import IPAddress , IPNetwork , AddrFormatError <EOL> from crypt import Cryptic <EOL> import util <EOL> from exception import EnumerationMismatch , InvalidUplinkThreshold , MissingMandatoryAttribute , InvalidIpFormat <EOL> Base = declarative_base ( ) <EOL> class ManagedElement ( object ) : <EOL> def __init__ ( self , ** kwargs ) : <EOL> self . __dict__ . update ( kwargs ) <EOL> def __str__ ( self ) : <EOL> return str ( self . __dict__ ) <EOL> def __repr__ ( self ) : <EOL> return self . __str__ ( ) <EOL> @ staticmethod <EOL> def validateEnum ( enumName , value , enumList ) : <EOL> error = False <EOL> if isinstance ( value , list ) : <EOL> error = set ( value ) - set ( enumList ) <EOL> else : <EOL> error = value not in enumList <EOL> if error : <EOL> raise EnumerationMismatch ( "<STR_LIT>" % ( enumName , value , enumList ) ) <EOL> class Pod ( ManagedElement , Base ) : <EOL> __tablename__ = '<STR_LIT>' <EOL> id = Column ( String ( <NUM_LIT> ) , primary_key = True ) <EOL> name = Column ( String ( <NUM_LIT:255> ) , index = True , nullable = False ) <EOL> description = Column ( String ( <NUM_LIT> ) ) <EOL> spineCount = Column ( Integer ) <EOL> spineDeviceType = Column ( String ( <NUM_LIT:100> ) ) <EOL> spineJunosImage = Column ( String ( <NUM_LIT> ) ) <EOL> leafCount = Column ( Integer ) <EOL> leafUplinkcountMustBeUp = Column ( Integer ) <EOL> leafSettings = relationship ( "<STR_LIT>" , order_by = '<STR_LIT>' , cascade = '<STR_LIT>' ) <EOL> hostOrVmCountPerLeaf = Column ( Integer ) <EOL> interConnectPrefix = Column ( String ( <NUM_LIT:32> ) ) <EOL> vlanPrefix = Column ( String ( <NUM_LIT:32> ) ) <EOL> loopbackPrefix = Column ( String ( <NUM_LIT:32> ) ) <EOL> managementPrefix = Column ( String ( <NUM_LIT:32> ) ) <EOL> managementStartingIP = Column ( String ( <NUM_LIT:32> ) ) <EOL> managementMask = Column ( Integer ) <EOL> spineAS = Column ( BigInteger ) <EOL> leafAS = Column ( BigInteger ) <EOL> topologyType = Column ( Enum ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> outOfBandAddressList = Column ( String ( <NUM_LIT> ) ) <EOL> outOfBandGateway = Column ( String ( <NUM_LIT:32> ) ) <EOL> allocatedInterConnectBlock = Column ( String ( <NUM_LIT:32> ) ) <EOL> allocatedIrbBlock = Column ( String ( <NUM_LIT:32> ) ) <EOL> allocatedLoopbackBlock = Column ( String ( <NUM_LIT:32> ) ) <EOL> allocatedSpineAS = Column ( BigInteger ) <EOL> allocatefLeafAS = Column ( BigInteger ) <EOL> inventoryData = Column ( String ( <NUM_LIT> ) ) <EOL> encryptedPassword = Column ( String ( <NUM_LIT:100> ) ) <EOL> cryptic = Cryptic ( ) <EOL> cablingPlan = relationship ( "<STR_LIT>" , uselist = False , cascade = '<STR_LIT>' ) <EOL> def __init__ ( self , name , podDict ) : <EOL> '''<STR_LIT>''' <EOL> super ( Pod , self ) . __init__ ( ) <EOL> self . update ( None , name , podDict ) <EOL> def copyAdditionalFields ( self , podDict ) : <EOL> '''<STR_LIT>''' <EOL> def update ( self , id , name , podDict ) : <EOL> '''<STR_LIT>''' <EOL> if id : <EOL> self . id = id <EOL> elif podDict . get ( '<STR_LIT:id>' ) : <EOL> self . id = podDict . get ( '<STR_LIT:id>' ) <EOL> else : <EOL> self . id = str ( uuid . uuid4 ( ) ) <EOL> if name is not None : <EOL> self . name = name <EOL> elif '<STR_LIT:name>' in podDict : <EOL> self . name = podDict . get ( '<STR_LIT:name>' ) <EOL> self . description = podDict . get ( '<STR_LIT:description>' ) <EOL> self . spineCount = podDict . get ( '<STR_LIT>' ) <EOL> self . spineDeviceType = podDict . get ( '<STR_LIT>' ) <EOL> self . leafCount = podDict . get ( '<STR_LIT>' ) <EOL> leafSettings = podDict . get ( '<STR_LIT>' ) <EOL> if leafSettings is not None : <EOL> self . leafSettings = [ ] <EOL> for leafSetting in leafSettings : <EOL> junosImage = leafSetting . get ( '<STR_LIT>' ) <EOL> self . leafSettings . append ( LeafSetting ( leafSetting [ '<STR_LIT>' ] , self . id , junosImage = junosImage ) ) <EOL> self . leafUplinkcountMustBeUp = podDict . get ( '<STR_LIT>' ) <EOL> if self . leafUplinkcountMustBeUp is None : <EOL> self . leafUplinkcountMustBeUp = <NUM_LIT:2> <EOL> self . hostOrVmCountPerLeaf = podDict . get ( '<STR_LIT>' ) <EOL> self . interConnectPrefix = podDict . get ( '<STR_LIT>' ) <EOL> self . vlanPrefix = podDict . get ( '<STR_LIT>' ) <EOL> self . loopbackPrefix = podDict . get ( '<STR_LIT>' ) <EOL> self . managementPrefix = podDict . get ( '<STR_LIT>' ) <EOL> self . managementStartingIP = podDict . get ( '<STR_LIT>' ) <EOL> self . managementMask = podDict . get ( '<STR_LIT>' ) <EOL> spineAS = podDict . get ( '<STR_LIT>' ) <EOL> if spineAS is not None : <EOL> self . spineAS = int ( spineAS ) <EOL> leafAS = podDict . get ( '<STR_LIT>' ) <EOL> if leafAS is not None : <EOL> self . leafAS = int ( leafAS ) <EOL> self . topologyType = podDict . get ( '<STR_LIT>' ) <EOL> outOfBandAddressList = podDict . get ( '<STR_LIT>' ) <EOL> if outOfBandAddressList is not None and len ( outOfBandAddressList ) > <NUM_LIT:0> : <EOL> addressList = [ ] <EOL> if isinstance ( outOfBandAddressList , list ) == True : <EOL> addressList = outOfBandAddressList <EOL> else : <EOL> addressList . append ( outOfBandAddressList ) <EOL> self . outOfBandAddressList = '<STR_LIT:U+002C>' . join ( addressList ) <EOL> self . outOfBandGateway = podDict . get ( '<STR_LIT>' ) <EOL> self . spineJunosImage = podDict . get ( '<STR_LIT>' ) <EOL> devicePassword = podDict . get ( '<STR_LIT>' ) <EOL> if devicePassword is not None and len ( devicePassword ) > <NUM_LIT:0> : <EOL> self . encryptedPassword = self . cryptic . encrypt ( devicePassword ) <EOL> self . copyAdditionalFields ( podDict ) <EOL> def calculateEffectiveLeafUplinkcountMustBeUp ( self ) : <EOL> if self . leafUplinkcountMustBeUp is not None and self . leafUplinkcountMustBeUp > <NUM_LIT:0> : <EOL> return self . leafUplinkcountMustBeUp <EOL> deployedSpines = <NUM_LIT:0> <EOL> for device in self . devices : <EOL> if device . role == '<STR_LIT>' and device . deployStatus == '<STR_LIT>' : <EOL> deployedSpines += <NUM_LIT:1> <EOL> count = int ( math . ceil ( float ( deployedSpines ) / <NUM_LIT:2> ) ) <EOL> if count < <NUM_LIT:2> : <EOL> count = <NUM_LIT:2> <EOL> return count <EOL> def getCleartextPassword ( self ) : <EOL> '''<STR_LIT>''' <EOL> if self . encryptedPassword is not None and len ( self . encryptedPassword ) > <NUM_LIT:0> : <EOL> return self . cryptic . decrypt ( self . encryptedPassword ) <EOL> else : <EOL> return None <EOL> def getHashPassword ( self ) : <EOL> '''<STR_LIT>''' <EOL> cleartext = self . getCleartextPassword ( ) <EOL> if cleartext is not None : <EOL> return self . cryptic . hashify ( cleartext ) <EOL> else : <EOL> return None <EOL> '''<STR_LIT>''' <EOL> def validate ( self ) : <EOL> self . validateRequiredFields ( ) <EOL> self . validateIPaddr ( ) <EOL> if self . leafUplinkcountMustBeUp < <NUM_LIT:2> or self . leafUplinkcountMustBeUp > self . spineCount : <EOL> raise InvalidUplinkThreshold ( '<STR_LIT>' % ( self . leafUplinkcountMustBeUp , self . spineCount ) ) <EOL> def validateRequiredFields ( self ) : <EOL> error = '<STR_LIT>' <EOL> if self . spineCount is None : <EOL> error += '<STR_LIT>' <EOL> if self . spineDeviceType is None : <EOL> error += '<STR_LIT>' <EOL> if self . leafCount is None : <EOL> error += '<STR_LIT>' <EOL> if self . leafSettings is None or len ( self . leafSettings ) == <NUM_LIT:0> : <EOL> error += '<STR_LIT>' <EOL> if self . hostOrVmCountPerLeaf is None : <EOL> error += '<STR_LIT>' <EOL> if self . interConnectPrefix is None : <EOL> error += '<STR_LIT>' <EOL> if self . vlanPrefix is None : <EOL> error += '<STR_LIT>' <EOL> if self . loopbackPrefix is None : <EOL> error += '<STR_LIT>' <EOL> if self . managementPrefix is None and ( self . managementStartingIP is None or self . managementMask is None ) : <EOL> error += '<STR_LIT>' <EOL> if self . spineAS is None : <EOL> error += '<STR_LIT>' <EOL> if self . leafAS is None : <EOL> error += '<STR_LIT>' <EOL> if self . topologyType is None : <EOL> error += '<STR_LIT>' <EOL> if self . encryptedPassword is None : <EOL> error += '<STR_LIT>' <EOL> if error != '<STR_LIT>' : <EOL> raise MissingMandatoryAttribute ( '<STR_LIT>' + error ) <EOL> def validateIPaddr ( self ) : <EOL> error = '<STR_LIT>' <EOL> try : <EOL> IPNetwork ( self . interConnectPrefix ) <EOL> except AddrFormatError : <EOL> error += '<STR_LIT>' <EOL> try : <EOL> IPNetwork ( self . vlanPrefix ) <EOL> except AddrFormatError : <EOL> error += '<STR_LIT>' <EOL> try : <EOL> IPNetwork ( self . loopbackPrefix ) <EOL> except AddrFormatError : <EOL> error += '<STR_LIT>' <EOL> try : <EOL> if self . managementPrefix is not None : <EOL> IPNetwork ( self . managementPrefix ) <EOL> except AddrFormatError : <EOL> error += '<STR_LIT>' <EOL> try : <EOL> if self . managementStartingIP is not None : <EOL> IPAddress ( self . managementStartingIP ) <EOL> except AddrFormatError : <EOL> error += '<STR_LIT>' <EOL> if error != '<STR_LIT>' : <EOL> raise InvalidIpFormat ( '<STR_LIT>' + error ) <EOL> class LeafSetting ( ManagedElement , Base ) : <EOL> __tablename__ = '<STR_LIT>' <EOL> deviceFamily = Column ( String ( <NUM_LIT:100> ) , primary_key = True ) <EOL> pod_id = Column ( String ( <NUM_LIT> ) , ForeignKey ( '<STR_LIT>' ) , nullable = False , primary_key = True ) <EOL> junosImage = Column ( String ( <NUM_LIT> ) ) <EOL> config = Column ( BLOB ) <EOL> def __init__ ( self , deviceFamily , podId , junosImage = None , config = None ) : <EOL> self . deviceFamily = deviceFamily <EOL> self . pod_id = podId <EOL> self . junosImage = junosImage <EOL> self . config = config <EOL> class CablingPlan ( ManagedElement , Base ) : <EOL> __tablename__ = '<STR_LIT>' <EOL> pod_id = Column ( String ( <NUM_LIT> ) , ForeignKey ( '<STR_LIT>' ) , nullable = False , primary_key = True ) <EOL> json = Column ( BLOB ) <EOL> dot = Column ( BLOB ) <EOL> def __init__ ( self , podId , json = None , dot = None ) : <EOL> self . pod_id = podId <EOL> self . json = json <EOL> self . dot = dot <EOL> class Device ( ManagedElement , Base ) : <EOL> __tablename__ = '<STR_LIT>' <EOL> id = Column ( String ( <NUM_LIT> ) , primary_key = True ) <EOL> name = Column ( String ( <NUM_LIT:255> ) , nullable = False ) <EOL> username = Column ( String ( <NUM_LIT:100> ) , default = '<STR_LIT:root>' ) <EOL> encryptedPassword = Column ( String ( <NUM_LIT:100> ) ) <EOL> role = Column ( Enum ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> macAddress = Column ( String ( <NUM_LIT:32> ) ) <EOL> serialNumber = Column ( String ( <NUM_LIT:32> ) ) <EOL> managementIp = Column ( String ( <NUM_LIT:32> ) ) <EOL> family = Column ( String ( <NUM_LIT:100> ) , default = '<STR_LIT>' ) <EOL> asn = Column ( BigInteger ) <EOL> l2Status = Column ( Enum ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:error>' ) , default = '<STR_LIT>' ) <EOL> l2StatusReason = Column ( String ( <NUM_LIT> ) ) <EOL> l3Status = Column ( Enum ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:error>' ) , default = '<STR_LIT>' ) <EOL> l3StatusReason = Column ( String ( <NUM_LIT> ) ) <EOL> configStatus = Column ( Enum ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:error>' ) , default = '<STR_LIT>' ) <EOL> configStatusReason = Column ( String ( <NUM_LIT> ) ) <EOL> config = relationship ( "<STR_LIT>" , uselist = False , cascade = '<STR_LIT>' ) <EOL> pod_id = Column ( String ( <NUM_LIT> ) , ForeignKey ( '<STR_LIT>' ) , nullable = False ) <EOL> pod = relationship ( "<STR_LIT>" , backref = backref ( '<STR_LIT>' , order_by = name , cascade = '<STR_LIT>' ) ) <EOL> deployStatus = Column ( Enum ( '<STR_LIT>' , '<STR_LIT>' ) , default = '<STR_LIT>' ) <EOL> cryptic = Cryptic ( ) <EOL> __table_args__ = ( <EOL> Index ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:name>' , unique = True ) , <EOL> ) <EOL> def __init__ ( self , name , family , username , password , role , macAddress , managementIp , pod , deployStatus = None , serialNumber = None ) : <EOL> '''<STR_LIT>''' <EOL> self . id = str ( uuid . uuid4 ( ) ) <EOL> self . name = name <EOL> self . family = family <EOL> self . username = username <EOL> if password is not None and len ( password ) > <NUM_LIT:0> : <EOL> self . encryptedPassword = self . cryptic . encrypt ( password ) <EOL> elif pod is not None : <EOL> self . encryptedPassword = pod . encryptedPassword <EOL> self . role = role <EOL> self . macAddress = macAddress <EOL> self . managementIp = managementIp <EOL> self . pod = pod <EOL> self . deployStatus = deployStatus <EOL> self . serialNumber = serialNumber <EOL> def update ( self , name , family , username , password , macAddress , deployStatus , serialNumber ) : <EOL> '''<STR_LIT>''' <EOL> self . name = name <EOL> self . username = username <EOL> self . family = family <EOL> if password is not None and len ( password ) > <NUM_LIT:0> : <EOL> self . encryptedPassword = self . cryptic . encrypt ( password ) <EOL> self . macAddress = macAddress <EOL> self . deployStatus = deployStatus <EOL> self . serialNumber = serialNumber <EOL> def getCleartextPassword ( self ) : <EOL> '''<STR_LIT>''' <EOL> if self . encryptedPassword is not None and len ( self . encryptedPassword ) > <NUM_LIT:0> : <EOL> return self . cryptic . decrypt ( self . encryptedPassword ) <EOL> else : <EOL> return self . pod . getCleartextPassword ( ) <EOL> def getHashPassword ( self ) : <EOL> '''<STR_LIT>''' <EOL> cleartext = self . getCleartextPassword ( ) <EOL> if cleartext is not None : <EOL> return self . cryptic . hashify ( cleartext ) <EOL> else : <EOL> return None <EOL> class DeviceConfig ( ManagedElement , Base ) : <EOL> __tablename__ = '<STR_LIT>' <EOL> device_id = Column ( String ( <NUM_LIT> ) , ForeignKey ( '<STR_LIT>' ) , nullable = False , primary_key = True ) <EOL> config = Column ( BLOB ) <EOL> def __init__ ( self , deviceId , config ) : <EOL> self . device_id = deviceId <EOL> self . config = config <EOL> class Interface ( ManagedElement , Base ) : <EOL> __tablename__ = '<STR_LIT>' <EOL> id = Column ( String ( <NUM_LIT> ) , primary_key = True ) <EOL> name = Column ( String ( <NUM_LIT:100> ) , nullable = False ) <EOL> sequenceNum = Column ( BigInteger , nullable = False ) <EOL> type = Column ( String ( <NUM_LIT:100> ) ) <EOL> device_id = Column ( String ( <NUM_LIT> ) , ForeignKey ( '<STR_LIT>' ) , nullable = False ) <EOL> device = relationship ( "<STR_LIT>" , backref = backref ( '<STR_LIT>' , order_by = sequenceNum , cascade = '<STR_LIT>' ) ) <EOL> peer_id = Column ( String ( <NUM_LIT> ) , ForeignKey ( '<STR_LIT>' ) ) <EOL> peer = relationship ( '<STR_LIT>' , foreign_keys = [ peer_id ] , uselist = False , post_update = True , ) <EOL> layer_below_id = Column ( String ( <NUM_LIT> ) , ForeignKey ( '<STR_LIT>' ) ) <EOL> layerAboves = relationship ( '<STR_LIT>' , foreign_keys = [ layer_below_id ] ) <EOL> deployStatus = Column ( Enum ( '<STR_LIT>' , '<STR_LIT>' ) , default = '<STR_LIT>' ) <EOL> __table_args__ = ( <EOL> Index ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , unique = True ) , <EOL> ) <EOL> __mapper_args__ = { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : type <EOL> } <EOL> def __init__ ( self , name , device , deployStatus = None ) : <EOL> self . id = str ( uuid . uuid4 ( ) ) <EOL> self . name = name <EOL> self . device = device <EOL> self . deployStatus = deployStatus <EOL> self . sequenceNum = util . interfaceNameToUniqueSequenceNumber ( self . name ) <EOL> def updateName ( self , name ) : <EOL> self . name = name <EOL> self . sequenceNum = util . interfaceNameToUniqueSequenceNumber ( self . name ) <EOL> class InterfaceLogical ( Interface ) : <EOL> __tablename__ = '<STR_LIT>' <EOL> id = Column ( String ( <NUM_LIT> ) , ForeignKey ( '<STR_LIT>' ) , primary_key = True ) <EOL> ipaddress = Column ( String ( <NUM_LIT> ) ) <EOL> mtu = Column ( Integer ) <EOL> __mapper_args__ = { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } <EOL> def __init__ ( self , name , device , ipaddress = None , mtu = <NUM_LIT:0> , deployStatus = None ) : <EOL> '''<STR_LIT>''' <EOL> super ( InterfaceLogical , self ) . __init__ ( name , device , deployStatus ) <EOL> self . ipaddress = ipaddress <EOL> self . mtu = mtu <EOL> class InterfaceDefinition ( Interface ) : <EOL> __tablename__ = '<STR_LIT>' <EOL> id = Column ( String ( <NUM_LIT> ) , ForeignKey ( '<STR_LIT>' ) , primary_key = True ) <EOL> role = Column ( String ( <NUM_LIT> ) ) <EOL> mtu = Column ( Integer ) <EOL> status = Column ( Enum ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:error>' ) , default = '<STR_LIT>' ) <EOL> __mapper_args__ = { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } <EOL> def __init__ ( self , name , device , role , mtu = <NUM_LIT:0> , deployStatus = None ) : <EOL> super ( InterfaceDefinition , self ) . __init__ ( name , device , deployStatus ) <EOL> self . mtu = mtu <EOL> self . role = role <EOL> class TrapGroup ( ManagedElement , Base ) : <EOL> __tablename__ = '<STR_LIT>' <EOL> id = Column ( Integer , primary_key = True , autoincrement = True ) <EOL> name = Column ( String ( <NUM_LIT:100> ) , index = True , nullable = False ) <EOL> targetAddress = Column ( String ( <NUM_LIT> ) ) <EOL> port = Column ( Integer , default = <NUM_LIT> ) <EOL> def __init__ ( self , name , targetAddress , port ) : <EOL> self . name = name <EOL> self . targetAddress = targetAddress <EOL> self . port = port <EOL> class AdditionalLink ( ManagedElement , Base ) : <EOL> __tablename__ = '<STR_LIT>' <EOL> id = Column ( String ( <NUM_LIT> ) , primary_key = True ) <EOL> device1 = Column ( String ( <NUM_LIT> ) ) <EOL> port1 = Column ( String ( <NUM_LIT:100> ) ) <EOL> device2 = Column ( String ( <NUM_LIT> ) ) <EOL> port2 = Column ( String ( <NUM_LIT:100> ) ) <EOL> lldpStatus = Column ( Enum ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:error>' ) , default = '<STR_LIT>' ) <EOL> __table_args__ = ( <EOL> UniqueConstraint ( '<STR_LIT>' , '<STR_LIT>' , name = '<STR_LIT>' ) , <EOL> ) <EOL> def __init__ ( self , device1 , port1 , device2 , port2 , lldpStatus = '<STR_LIT>' ) : <EOL> self . id = str ( uuid . uuid4 ( ) ) <EOL> self . device1 = device1 <EOL> self . port1 = port1 <EOL> self . device2 = device2 <EOL> self . port2 = port2 <EOL> self . lldpStatus = lldpStatus <EOL> class BgpLink ( ManagedElement , Base ) : <EOL> __tablename__ = '<STR_LIT>' <EOL> id = Column ( String ( <NUM_LIT> ) , primary_key = True ) <EOL> device_id = Column ( String ( <NUM_LIT> ) ) <EOL> pod_id = Column ( String ( <NUM_LIT> ) ) <EOL> device1 = Column ( String ( <NUM_LIT:100> ) ) <EOL> device1Ip = Column ( String ( <NUM_LIT> ) ) <EOL> device1As = Column ( Integer ) <EOL> device2 = Column ( String ( <NUM_LIT:100> ) ) <EOL> device2Ip = Column ( String ( <NUM_LIT> ) ) <EOL> device2As = Column ( Integer ) <EOL> input_msg_count = Column ( Integer ) <EOL> output_msg_count = Column ( Integer ) <EOL> out_queue_count = Column ( Integer ) <EOL> flap_count = Column ( Integer ) <EOL> link_state = Column ( String ( <NUM_LIT:100> ) , default = '<STR_LIT>' ) <EOL> act_rx_acc_route_count = Column ( String ( <NUM_LIT:100> ) ) <EOL> def __init__ ( self , podId , deviceId , linkDict ) : <EOL> self . id = str ( uuid . uuid4 ( ) ) <EOL> self . pod_id = podId <EOL> self . device_id = deviceId <EOL> self . device1 = linkDict . get ( '<STR_LIT>' ) <EOL> self . device1Ip = linkDict . get ( '<STR_LIT>' ) <EOL> self . device1As = linkDict . get ( '<STR_LIT>' ) <EOL> self . device2 = linkDict . get ( '<STR_LIT>' ) <EOL> self . device2Ip = linkDict . get ( '<STR_LIT>' ) <EOL> self . device2As = linkDict . get ( '<STR_LIT>' ) <EOL> self . input_msg_count = linkDict . get ( '<STR_LIT>' ) <EOL> self . output_msg_count = linkDict . get ( '<STR_LIT>' ) <EOL> self . out_queue_count = linkDict . get ( '<STR_LIT>' ) <EOL> self . flap_count = linkDict . get ( '<STR_LIT>' ) <EOL> self . link_state = linkDict . get ( '<STR_LIT>' ) <EOL> self . act_rx_acc_route_count = linkDict . get ( '<STR_LIT>' ) </s>
