def test_write(self): sessRec = DepiMcastSessionRecord() sessRec.LocalLcceIpAddr = "0.0.0.0" sessRec.write() sessRec.LocalLcceIpAddr = "134.123.123.213" sessRec.write() sessRec.read() self.assertEquals(sessRec.LocalLcceIpAddr, "134.123.123.213")
def create_ipv4_ipv6_mcast(self, test_count): # create test_count records for ipv4 and test_count records for ipv6 sessRec = DepiMcastSessionRecord() for test_session in range(0, test_count): sessRec.updateDepiMcastSessionKey(IpAddrType=1, GroupIpAddr="10.79.31.1", SrcIpAddr="10.79.31.1", SessionId=test_session) sessRec.LocalLcceIpAddr = "10.79.31.2" sessRec.RemoteLcceIpAddr = "10.79.31.1" sessRec.JoinTime = time.time() sessRec.write() sessRec.updateDepiMcastSessionKey(IpAddrType=2, GroupIpAddr="ff15:7079:7468:6f6e:6465:6d6f:6d63:6173", SrcIpAddr="2001::1", SessionId=test_session) sessRec.LocalLcceIpAddr = "2001::2" sessRec.RemoteLcceIpAddr = "2001::1" sessRec.JoinTime = time.time() sessRec.write()