diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/dns/CreateDnsRecordCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/dns/CreateDnsRecordCmd.java
index ab00c8d8c7e..ff350ce065d 100644
--- a/api/src/main/java/org/apache/cloudstack/api/command/user/dns/CreateDnsRecordCmd.java
+++ b/api/src/main/java/org/apache/cloudstack/api/command/user/dns/CreateDnsRecordCmd.java
@@ -50,10 +50,10 @@ public class CreateDnsRecordCmd extends BaseAsyncCmd {
description = "ID of the DNS zone")
private Long dnsZoneId;
- @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "Record name")
+ @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "DNS record name")
private String name;
- @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, required = true, description = "Record type (A, CNAME)")
+ @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, required = true, description = "DNS record type (e.g., A, AAAA, CNAME, MX, TXT, etc.)")
private String type;
@Parameter(name = ApiConstants.CONTENTS, type = CommandType.LIST, collectionType = CommandType.STRING, required = true,
diff --git a/plugins/dns/powerdns/pom.xml b/plugins/dns/powerdns/pom.xml
index ef915559f47..3edb74f1ce6 100644
--- a/plugins/dns/powerdns/pom.xml
+++ b/plugins/dns/powerdns/pom.xml
@@ -27,11 +27,4 @@
4.23.0.0-SNAPSHOT
../../pom.xml
-
-
- 11
- 11
- UTF-8
-
-
diff --git a/plugins/dns/powerdns/src/test/java/org/apache/cloudstack/dns/DnsProviderUtilTest.java b/plugins/dns/powerdns/src/test/java/org/apache/cloudstack/dns/DnsProviderUtilTest.java
index 25d8f158372..a2b571b154f 100644
--- a/plugins/dns/powerdns/src/test/java/org/apache/cloudstack/dns/DnsProviderUtilTest.java
+++ b/plugins/dns/powerdns/src/test/java/org/apache/cloudstack/dns/DnsProviderUtilTest.java
@@ -18,7 +18,7 @@
package org.apache.cloudstack.dns;
import static org.apache.cloudstack.dns.DnsProviderUtil.appendPublicSuffixToZone;
-import static org.apache.cloudstack.dns.DnsProviderUtil.normalizeDomain;
+import static org.apache.cloudstack.dns.DnsProviderUtil.normalizeDomainForDb;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
@@ -89,13 +89,13 @@ public class DnsProviderUtilTest {
if (Strings.isNotBlank(publicSuffix)) {
result = executeAppendSuffixTest(userZoneName, publicSuffix);
} else {
- result = appendPublicSuffixToZone(normalizeDomain(userZoneName), publicSuffix);
+ result = appendPublicSuffixToZone(normalizeDomainForDb(userZoneName), publicSuffix);
}
assertEquals(expectedResult, result);
}
}
String executeAppendSuffixTest(String zoneName, String domainSuffix) {
- return appendPublicSuffixToZone(normalizeDomain(zoneName), domainSuffix);
+ return appendPublicSuffixToZone(normalizeDomainForDb(zoneName), domainSuffix);
}
}
diff --git a/plugins/dns/powerdns/src/test/java/org/apache/cloudstack/dns/NormalizeDnsRecordValueTest.java b/plugins/dns/powerdns/src/test/java/org/apache/cloudstack/dns/NormalizeDnsRecordValueTest.java
new file mode 100644
index 00000000000..f5bd16a8190
--- /dev/null
+++ b/plugins/dns/powerdns/src/test/java/org/apache/cloudstack/dns/NormalizeDnsRecordValueTest.java
@@ -0,0 +1,197 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.dns;
+
+import static org.apache.cloudstack.dns.DnsRecord.RecordType.A;
+import static org.apache.cloudstack.dns.DnsRecord.RecordType.AAAA;
+import static org.apache.cloudstack.dns.DnsRecord.RecordType.CNAME;
+import static org.apache.cloudstack.dns.DnsRecord.RecordType.MX;
+import static org.apache.cloudstack.dns.DnsRecord.RecordType.NS;
+import static org.apache.cloudstack.dns.DnsRecord.RecordType.PTR;
+import static org.apache.cloudstack.dns.DnsRecord.RecordType.SRV;
+import static org.apache.cloudstack.dns.DnsRecord.RecordType.TXT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+@RunWith(Parameterized.class)
+public class NormalizeDnsRecordValueTest {
+
+ private final String description;
+ private final String input;
+ private final DnsRecord.RecordType recordType;
+ private final String expected;
+ private final boolean expectException;
+
+ public NormalizeDnsRecordValueTest(String description, String input,
+ DnsRecord.RecordType recordType,
+ String expected, boolean expectException) {
+ this.description = description;
+ this.input = input;
+ this.recordType = recordType;
+ this.expected = expected;
+ this.expectException = expectException;
+ }
+
+ @Parameterized.Parameters(name = "{0}")
+ public static Collection