Skip to content

Commit 8e9fe78

Browse files
committed
overload findById for dnsServer
1 parent 1da794f commit 8e9fe78

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

api/src/main/java/org/apache/cloudstack/api/command/user/dns/UpdateDnsServerCmd.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ public class UpdateDnsServerCmd extends BaseCmd {
7676
private String publicDomainSuffix;
7777

7878
@Parameter(name = ApiConstants.NAME_SERVERS, type = CommandType.LIST, collectionType = CommandType.STRING,
79-
required = true,
8079
description = "Comma separated list of name servers; used to create NS records for the DNS Zone (for example, ns1.example.com, ns2.example.com)")
8180
private List<String> nameServers;
8281

server/src/main/java/org/apache/cloudstack/dns/dao/DnsServerDao.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
import com.cloud.utils.db.GenericDao;
3030

3131
public interface DnsServerDao extends GenericDao<DnsServerVO, Long> {
32+
33+
DnsServerVO findById(long dnsServerId);
34+
3235
DnsServer findByUrlAndAccount(String url, long accountId);
3336

3437
List<Long> listDnsServerIdsByAccountId(Long accountId);

server/src/main/java/org/apache/cloudstack/dns/dao/DnsServerDaoImpl.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ public DnsServerDaoImpl() {
7474

7575
}
7676

77+
@Override
78+
public DnsServerVO findById(long dnsServerId) {
79+
DnsServerVO dnsServer = super.findById(dnsServerId);
80+
loadDetails(dnsServer);
81+
return dnsServer;
82+
}
83+
7784
@Override
7885
public DnsServer findByUrlAndAccount(String url, long accountId) {
7986
SearchCriteria<DnsServerVO> sc = AccountUrlSearch.create();

0 commit comments

Comments
 (0)