public void WriteBackRootHintDatafileTest() { var target = GetRootHints().FirstOrDefault(); Server server = ServerTest.GetServer(); target.WriteBackRootHintDatafile(server); }
public static Domain[] GetDomain() { var server = ServerTest.GetServer(); var domains = server.GetDomains(); return(domains); }
public static RootHints[] GetRootHints() { var server = ServerTest.GetServer(); var roothints = server.GetRootHints(); return(roothints); }
public void GetObjectByTextRepresentationTest() { var aa = GetRR(); var server = ServerTest.GetServer(); var zone = ZoneTest.GetZone(); var actual = ResourceRecord.GetObjectByTextRepresentation(server, server.Name, zone.Name, "aa A 192.168.0.1"); Assert.IsNotNull(actual); }
public void ForceRefreshTest() { //need to test on secondary zones, otherwise it will fail var server = ServerTest.GetServer(); var secondaryzone = server.GetZones().FirstOrDefault(i => i.ZoneType == Zone.ZoneTypeEnum.Secondary); Assert.IsNotNull(secondaryzone, "Need a secondary zone to run this test, please create one and rerun"); secondaryzone.ForceRefresh(); }
public static SOAType GetSOARR() { var server = ServerTest.GetServer(); var zone = ZoneTest.GetZone(); var record = zone.GetRecords().FirstOrDefault(i => i.ResourceRecordType == ResourceRecord.ResourceRecordEnum.SOA); return((SOAType)record.UnderlyingRecord); }
public void CreateInstanceFromTextRepresentationTest() { var target = GetRR(); target.Delete(); var server = ServerTest.GetServer(); var zone = ZoneTest.GetZone(); var actual = ResourceRecord.CreateInstanceFromTextRepresentation(server, server.Name, zone.Name, "aa A 192.168.0.1"); Assert.IsNotNull(actual); }
public void UpdateFromDSTest() { var server = ServerTest.GetServer(); var target = server.GetZones().FirstOrDefault(i => i.DsIntegrated == true); if (target == null) { Assert.Inconclusive("No DsIntegrated zones were found for this test"); } target.UpdateFromDS(); }
public static Zone ZoneGetReverseZone() { var server = ServerTest.GetServer(); var zone = server.GetZones().FirstOrDefault(i => i.Name == "34.33.167.in-addr.arpa"); if (zone == null) { zone = Zone.CreateZone(server, "34.33.167.in-addr.arpa", Zone.ZoneTypeCreate.Primary, false, "", new string[] { "192.168.0.1" }, "*****@*****.**"); } return(zone); }
public void CreateDeleteZoneTest() { var server = ServerTest.GetServer(); var zonename = Guid.NewGuid().ToString(); var zone = Zone.CreateZone(server, zonename, Zone.ZoneTypeCreate.Primary, false, string.Empty, new string[] { "192.168.0.1" }, "*****@*****.**"); Assert.IsNotNull(zone, "Unable to create zone"); //cleanup zone.Delete(); }
public static TXTType GetTXTRR() { var server = ServerTest.GetServer(); var zone = ZoneTest.GetZone(); var record = zone.GetRecords().FirstOrDefault(i => i.OwnerName == "txt." + zone.Name); if (record == null) { record = TXTType.CreateInstanceFromPropertyData(server, server.Name, zone.Name, "txt." + zone.Name, DNSManagement.RR.ResourceRecord.RecordClassEnum.IN, null, "descriptivetext1"); } return((TXTType)record.UnderlyingRecord); }
public static AAAAType GetAAAARR() { var server = ServerTest.GetServer(); var zone = ZoneTest.GetZone(); var record = zone.GetRecords().FirstOrDefault(i => i.OwnerName == "aaaa." + zone.Name); if (record == null) { record = AAAAType.CreateInstanceFromPropertyData(server, server.Name, zone.Name, "aaaa." + zone.Name, DNSManagement.RR.ResourceRecord.RecordClassEnum.IN, null, "2002:2ed2:2e40::2ed2:2e40"); } return((AAAAType)record.UnderlyingRecord); }
public static AFSDBType GetAFSDBRR() { var server = ServerTest.GetServer(); var zone = ZoneTest.GetZone(); var record = zone.GetRecords().FirstOrDefault(i => i.OwnerName == "afsdb." + zone.Name); if (record == null) { record = AFSDBType.CreateInstanceFromPropertyData(server, server.Name, zone.Name, "afsdb." + zone.Name, DNSManagement.RR.ResourceRecord.RecordClassEnum.IN, null, AFSDBType.SubtypeEnum.AuthNS, "hello"); } return((AFSDBType)record.UnderlyingRecord); }
public static CNAMEType GetCNAMERR() { var server = ServerTest.GetServer(); var zone = ZoneTest.GetZone(); var record = zone.GetRecords().FirstOrDefault(i => i.OwnerName == "cname." + zone.Name); if (record == null) { record = CNAMEType.CreateInstanceFromPropertyData(server, server.Name, zone.Name, "cname." + zone.Name, DNSManagement.RR.ResourceRecord.RecordClassEnum.IN, null, "primaryname1"); } return((CNAMEType)record.UnderlyingRecord); }
public static ISDNType GetISDNRR() { var server = ServerTest.GetServer(); var zone = ZoneTest.GetZone(); var record = zone.GetRecords().FirstOrDefault(i => i.OwnerName == "isdn." + zone.Name); if (record == null) { record = ISDNType.CreateInstanceFromPropertyData(server, server.Name, zone.Name, "isdn." + zone.Name, DNSManagement.RR.ResourceRecord.RecordClassEnum.IN, null, "123456", "subaddr1"); } return((ISDNType)record.UnderlyingRecord); }
public static RPType GetRPRR() { var server = ServerTest.GetServer(); var zone = ZoneTest.GetZone(); var record = zone.GetRecords().FirstOrDefault(i => i.OwnerName == "rp." + zone.Name); if (record == null) { record = RPType.CreateInstanceFromPropertyData(server, server.Name, zone.Name, "rp." + zone.Name, DNSManagement.RR.ResourceRecord.RecordClassEnum.IN, null, "rpmb", "domain1"); } return((RPType)record.UnderlyingRecord); }
public static WINSType GetWINSRR() { var server = ServerTest.GetServer(); var zone = ZoneTest.GetZone(); var record = zone.GetRecords().FirstOrDefault(i => i.ResourceRecordType == ResourceRecord.ResourceRecordEnum.WINS); if (record == null) { record = WINSType.CreateInstanceFromPropertyData(server, server.Name, zone.Name, zone.Name, DNSManagement.RR.ResourceRecord.RecordClassEnum.IN, null, WINSType.MappingFlagEnum.NonReplication, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(10), "1.1.1.1"); } return((WINSType)record.UnderlyingRecord); }
public static WKSType GetWKSRR() { var server = ServerTest.GetServer(); var zone = ZoneTest.GetZone(); var record = zone.GetRecords().FirstOrDefault(i => i.OwnerName == "wks." + zone.Name); if (record == null) { record = WKSType.CreateInstanceFromPropertyData(server, server.Name, zone.Name, "wks." + zone.Name, DNSManagement.RR.ResourceRecord.RecordClassEnum.IN, null, "192.168.0.1", "tcp", "finger"); } return((WKSType)record.UnderlyingRecord); }
public static MINFOType GetMINFORR() { var server = ServerTest.GetServer(); var zone = ZoneTest.GetZone(); var record = zone.GetRecords().FirstOrDefault(i => i.OwnerName == "minfo." + zone.Name); if (record == null) { record = MINFOType.CreateInstanceFromPropertyData(server, server.Name, zone.Name, "minfo." + zone.Name, DNSManagement.RR.ResourceRecord.RecordClassEnum.IN, null, "respMailbox", "errMailbox"); zone.WriteBackZone(); record = zone.GetRecords().FirstOrDefault(i => i.OwnerName == "minfo." + zone.Name); } return((MINFOType)record.UnderlyingRecord); }
public static MXType GetMXRR() { var server = ServerTest.GetServer(); var zone = ZoneTest.GetZone(); var record = zone.GetRecords().FirstOrDefault(i => i.OwnerName == "mx." + zone.Name); if (record == null) { record = MXType.CreateInstanceFromPropertyData(server, server.Name, zone.Name, "mx." + zone.Name, DNSManagement.RR.ResourceRecord.RecordClassEnum.IN, null, 1, "mxrec1"); //workaround for non-standard implementation zone.WriteBackZone(); record = zone.GetRecords().FirstOrDefault(i => i.OwnerName == "mx." + zone.Name); } return((MXType)record.UnderlyingRecord); }
public void ClearCacheTest() { Server server = ServerTest.GetServer(); Cache.ClearCache(server); }
public static Statistic[] GetStatistic() { var server = ServerTest.GetServer(); return(server.GetStatistics()); }
public static Cache[] GetCache() { var server = ServerTest.GetServer(); return(server.GetCache()); }