Created
July 18, 2012 16:46
-
-
Save pegli/3137381 to your computer and use it in GitHub Desktop.
list function for `mx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_id": "_design/configs", | |
"_rev": "4-a0b96a31984e1267e6ecf46302744451", | |
"views": { | |
"subnet": { | |
"map": "function(doc) {\n emit(null, doc);\n};" | |
} | |
}, | |
"lists": { | |
"conf_fmt": "function(head, req) {\n var row;\n start({\n \"headers\": {\n \"Content-Type\": \"text/plain\"\n }\n });\n\n while(row = getRow()) {\n send(\"subnet \" + row.value.network + \" netmask \" + row.value.netmask + \"{ option routers \" + row.value.gateway + \"; }\\n\" );\n }\n}" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment