TestDeletePtrRecord() { using (VmDnsClient client = new VmDnsClient(hostname, username, domain, password)) { var zone = FindZone(client, "vsphere.local"); IList <VmDnsRecord> records; var data = new VMDNS_PTR_DATA(); data.hostName = "dns1.TestZone"; var record = new VMDNS_RECORD_PTR(); record.data = data; record.common.iClass = 1; record.common.pszName = "11.1.168.192.in.arpa"; record.common.type = (UInt16)RecordType.VMDNS_RR_TYPE_PTR; zone.AddRecord(new VmDnsRecordPTR(record)); var srvdata = new VMDNS_SRV_DATA(); srvdata.pNameTarget = "dns1.TestZone"; var srvrecord = new VMDNS_RECORD_SRV(); srvrecord.data = srvdata; srvrecord.common.iClass = 1; srvrecord.common.pszName = "_kerberos._tcp"; srvrecord.common.type = (UInt16)RecordType.VMDNS_RR_TYPE_SRV; records = zone.QueryRecords( "_kerberos._tcp", RecordType.VMDNS_RR_TYPE_SRV, 0); zone.DeleteRecord(records[0]); } }
public override VmDnsRecord GetRecordDataFromUIFields() { VmDnsRecord addressRecord = null; UIErrorHelper.CheckedExec(delegate() { DoValidateControls(); var data = new VMDNS_PTR_DATA(); data.hostName = AddRecordFrm.CNameRecordHostNameText.Text; var record = new VMDNS_RECORD_CNAME(); record.data = data; record.common.iClass = 1; record.common.pszName = AddRecordFrm.CNameRecordNameText.Text; record.common.type = (UInt16)RecordType.VMDNS_RR_TYPE_CNAME; addressRecord = new VmDnsRecordCNAME(record); }); return(addressRecord); }
TestAddNSRecord() { using (VmDnsClient client = new VmDnsClient(hostname, username, domain, password)) { var zone = FindZone(client, "TestZone"); var data = new VMDNS_PTR_DATA(); data.hostName = "dns1.TestZone"; var record = new VMDNS_RECORD_NS(); record.data = data; record.common.pszName = "TestZone"; record.common.type = (UInt16)RecordType.VMDNS_RR_TYPE_NS; zone.AddRecord(new VmDnsRecordNS(record)); } }
public override VmDnsRecord GetRecordDataFromUIFields() { VmDnsRecord addressRecord = null; UIErrorHelper.CheckedExec(delegate() { DoValidateControls(); var data = new VMDNS_PTR_DATA(); data.hostName = HostNameField.StringValue; var record = new VMDNS_RECORD_PTR(); record.data = data; record.common.iClass = 1; record.common.pszName = IPAddressField.StringValue; record.common.type = (UInt16)RecordType.VMDNS_RR_TYPE_PTR; addressRecord = new VmDnsRecordPTR(record); }); return(addressRecord); }
TestDeletePtrRecord() { using (VmDnsClient client = new VmDnsClient(hostname, username, domain, password)) { var zone = FindZone(client, "TestZone"); IList <VmDnsRecord> records; var data = new VMDNS_PTR_DATA(); data.hostName = "dns1.TestZone"; var record = new VMDNS_RECORD_PTR(); record.data = data; record.common.iClass = 1; record.common.pszName = "11.1.168.192.in.arpa"; record.common.type = (UInt16)RecordType.VMDNS_RR_TYPE_PTR; zone.AddRecord(new VmDnsRecordPTR(record)); records = zone.QueryRecords( record.common.pszName, RecordType.VMDNS_RR_TYPE_PTR, 0); zone.DeleteRecord(new VmDnsRecordPTR(record)); } }
public override VmDnsRecord GetRecordDataFromUIFields() { VmDnsRecord addressRecord = null; UIErrorHelper.CheckedExec(delegate() { DoValidateControls(); var data = new VMDNS_PTR_DATA(); //FQDN check if (!HostNameField.StringValue.EndsWith(".")) { HostNameField.StringValue += "."; } data.hostName = HostNameField.StringValue; var record = new VMDNS_RECORD_NS(); record.data = data; record.common.iClass = 1; record.common.pszName = NSDomainField.StringValue; record.common.type = (UInt16)RecordType.VMDNS_RR_TYPE_NS; addressRecord = new VmDnsRecordNS(record); }); return(addressRecord); }
public override VmDnsRecord GetRecordDataFromUIFields() { VmDnsRecord addressRecord = null; UIErrorHelper.CheckedExec(delegate() { DoValidateControls(); var data = new VMDNS_PTR_DATA(); data.hostName = AddRecordFrm.NSRecordHostNameText.Text; //FQDN check if (!data.hostName.EndsWith(".")) { data.hostName += "."; } var record = new VMDNS_RECORD_NS(); record.data = data; record.common.iClass = 1; record.common.pszName = AddRecordFrm.NSRecordDomainText.Text; record.common.type = (UInt16)RecordType.VMDNS_RR_TYPE_NS; addressRecord = new VmDnsRecordNS(record); }); return(addressRecord); }