Package org.bremersee.dccon.api
Interface NameServerManagementApi
-
@Validated public interface NameServerManagementApiThe name server management api.- Author:
- Christian Bremer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<DnsZone>addDnsZone(@Valid DnsZone request)Add dns zone.org.springframework.http.ResponseEntity<Void>deleteAllDnsNodes(String zoneName, List<String> nodeNames)Delete all dns nodes.org.springframework.http.ResponseEntity<Boolean>deleteDnsNode(String zoneName, String nodeName)Delete dns node.org.springframework.http.ResponseEntity<Boolean>deleteDnsZone(String zoneName)Delete dns zone.org.springframework.http.ResponseEntity<List<DhcpLease>>getDhcpLeases(Boolean all, String sort)Gets dhcp leases.org.springframework.http.ResponseEntity<DnsNode>getDnsNode(String zoneName, String nodeName, UnknownFilter unknownFilter)Get dns node.org.springframework.http.ResponseEntity<List<DnsNode>>getDnsNodes(String zoneName, UnknownFilter unknownFilter, String query)Get dns nodes.org.springframework.http.ResponseEntity<List<DnsZone>>getDnsZones()Get dns zones.org.springframework.http.ResponseEntity<List<DnsNode>>query(String query, UnknownFilter unknownFilter)Query dns nodes.org.springframework.http.ResponseEntity<DnsNode>saveDnsNode(String zoneName, @Valid DnsNode dnsNode)Save dns node.
-
-
-
Method Detail
-
query
@RequestMapping(value="/api/dns", produces="application/json", method=GET) org.springframework.http.ResponseEntity<List<DnsNode>> query(@RequestParam(name="q") String query, @RequestParam(name="filter",defaultValue="NO_UNKNOWN") UnknownFilter unknownFilter)Query dns nodes.- Parameters:
query- the query, can be a host name, an IP or a MAC addressunknownFilter- the unknown filter- Returns:
- found dns nodes
-
getDhcpLeases
@RequestMapping(value="/api/dns/dhcp-leases", produces="application/json", method=GET) org.springframework.http.ResponseEntity<List<DhcpLease>> getDhcpLeases(@RequestParam(value="all",defaultValue="false") Boolean all, @RequestParam(value="sort",defaultValue="begin,desc|hostname") String sort)Gets dhcp leases.- Parameters:
all- iftrue, expired leases will also be returned, otherwise only active ones (default isfalse)sort- the sort order (default isDhcpLease.SORT_ORDER_BEGIN_HOSTNAME)- Returns:
- the dhcp leases
-
getDnsZones
@RequestMapping(value="/api/dns/zones", produces="application/json", method=GET) org.springframework.http.ResponseEntity<List<DnsZone>> getDnsZones()Get dns zones.- Returns:
- the dns zones
-
addDnsZone
@RequestMapping(value="/api/dns/zones", produces="application/json", consumes="application/json", method=POST) org.springframework.http.ResponseEntity<DnsZone> addDnsZone(@Valid @RequestBody @Valid DnsZone request)Add dns zone.- Parameters:
request- the request- Returns:
- the added dns zone
-
deleteDnsZone
@RequestMapping(value="/api/dns/zones/{zoneName}", produces="application/json", method=DELETE) org.springframework.http.ResponseEntity<Boolean> deleteDnsZone(@PathVariable("zoneName") String zoneName)Delete dns zone.- Parameters:
zoneName- the zone name- Returns:
trueif the dns zone was deleted, otherwisefalse
-
getDnsNodes
@RequestMapping(value="/api/dns/zones/{zoneName}", produces="application/json", method=GET) org.springframework.http.ResponseEntity<List<DnsNode>> getDnsNodes(@PathVariable("zoneName") String zoneName, @RequestParam(name="filter",defaultValue="NO_UNKNOWN") UnknownFilter unknownFilter, @RequestParam(name="q",required=false) String query)Get dns nodes.- Parameters:
zoneName- the zone nameunknownFilter- the unknown filterquery- the query- Returns:
- the dns nodes
-
saveDnsNode
@RequestMapping(value="/api/dns/zones/{zoneName}", produces="application/json", consumes="application/json", method=POST) org.springframework.http.ResponseEntity<DnsNode> saveDnsNode(@PathVariable("zoneName") String zoneName, @Valid @RequestBody @Valid DnsNode dnsNode)Save dns node.- Parameters:
zoneName- the dns zone namednsNode- the dns node- Returns:
- the saved dns node
-
getDnsNode
@RequestMapping(value="/api/dns/zones/{zoneName}/{nodeName}", produces="application/json", method=GET) org.springframework.http.ResponseEntity<DnsNode> getDnsNode(@PathVariable("zoneName") String zoneName, @PathVariable("nodeName") String nodeName, @RequestParam(name="filter",defaultValue="NO_UNKNOWN") UnknownFilter unknownFilter)Get dns node.- Parameters:
zoneName- the dns zone namenodeName- the dns node nameunknownFilter- the unknown filter- Returns:
- the dns node
-
deleteDnsNode
@RequestMapping(value="/api/dns/zones/{zoneName}/{nodeName}", produces="application/json", method=DELETE) org.springframework.http.ResponseEntity<Boolean> deleteDnsNode(@PathVariable("zoneName") String zoneName, @PathVariable("nodeName") String nodeName)Delete dns node.- Parameters:
zoneName- the dns zone namenodeName- the dns node name- Returns:
trueif the dns node was removed;falseif dns node didn't exist
-
deleteAllDnsNodes
@RequestMapping(value="/api/dns/zones/{zoneName}/nodes/all", produces="application/json", method=DELETE) org.springframework.http.ResponseEntity<Void> deleteAllDnsNodes(@PathVariable("zoneName") String zoneName, @RequestParam(value="nodeNames",required=false) List<String> nodeNames)Delete all dns nodes.- Parameters:
zoneName- the zone namenodeNames- the node names (if the list is empty, all dns nodes will be deleted)- Returns:
- void response entity
-
-