summaryrefslogtreecommitdiff
path: root/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2014-04-18 23:29:01 -0400
committerJoey Hess2014-04-18 23:29:01 -0400
commit21bb63ab58fe4fde0bc9ff15e1e98dcacc2f845b (patch)
treeba352b3d8de8ebd2ddf260fc08dc6f6c9a4cb62c /Propellor/Property
parent8dcd8fb0bda98eb2bdf34ad8d9c6590c2e8a76e5 (diff)
add SOA
Diffstat (limited to 'Propellor/Property')
-rw-r--r--Propellor/Property/Dns.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Propellor/Property/Dns.hs b/Propellor/Property/Dns.hs
index e4dfb199..7abeb552 100644
--- a/Propellor/Property/Dns.hs
+++ b/Propellor/Property/Dns.hs
@@ -141,6 +141,7 @@ rField (CNAME _) = "CNAME"
rField (MX _ _) = "MX"
rField (NS _) = "NS"
rField (TXT _) = "TXT"
+rField (SRV _ _ _ _) = "SRV"
rValue :: Record -> String
rValue (Address (IPv4 addr)) = addr
@@ -148,6 +149,12 @@ rValue (Address (IPv6 addr)) = addr
rValue (CNAME d) = dValue d
rValue (MX pri d) = show pri ++ " " ++ dValue d
rValue (NS d) = dValue d
+rValue (SRV priority weight port target) = unwords
+ [ show priority
+ , show weight
+ , show port
+ , dValue target
+ ]
rValue (TXT s) = [q] ++ filter (/= q) s ++ [q]
where
q = '"'