Search
82 | 83 |86 | Please activate JavaScript to enable the search 87 | functionality. 88 |
89 |93 | Searching for multiple words only shows matches that contain 94 | all words. 95 |
96 | 97 | 98 | 103 | 104 | 105 | 106 |├── VERSION ├── docs ├── html ├── requirements.txt ├── build │ └── html │ │ ├── _static │ │ ├── default.css │ │ ├── py.png │ │ ├── file.png │ │ ├── plus.png │ │ ├── minus.png │ │ ├── custom.css │ │ ├── caret-down.svg │ │ ├── documentation_options.js │ │ ├── py.svg │ │ ├── menu.js │ │ ├── copybutton.js │ │ ├── pygments.css │ │ ├── classic.css │ │ ├── sidebar.js │ │ ├── doctools.js │ │ ├── language_data.js │ │ └── pydoctheme.css │ │ ├── objects.inv │ │ ├── _sources │ │ ├── client.rst.txt │ │ ├── exceptions.rst.txt │ │ ├── interface.rst.txt │ │ └── index.rst.txt │ │ ├── .buildinfo │ │ ├── searchindex.js │ │ ├── search.html │ │ ├── _modules │ │ ├── index.html │ │ ├── powerdns.html │ │ └── powerdns │ │ │ └── exceptions.html │ │ ├── py-modindex.html │ │ ├── exceptions.html │ │ ├── index.html │ │ └── genindex.html ├── custom.css ├── index.html ├── source │ ├── client.rst │ ├── exceptions.rst │ ├── interface.rst │ ├── index.rst │ └── conf.py └── Makefile ├── requirements.txt ├── tests ├── requirements.txt ├── __init__.py ├── test_client.py ├── test_exceptions.py └── test_interface.py ├── .gitignore ├── files ├── pdns.conf └── Dockerfile ├── LICENSE ├── CHANGES ├── powerdns ├── exceptions.py ├── __init__.py └── client.py ├── setup.py ├── bin ├── pdns-create-zone ├── pdns-copy-zone └── pdns-remote-copy-zone └── README.md /VERSION: -------------------------------------------------------------------------------- 1 | 2.1.0 2 | -------------------------------------------------------------------------------- /docs/html: -------------------------------------------------------------------------------- 1 | build/html -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | requests>=2 2 | -------------------------------------------------------------------------------- /tests/requirements.txt: -------------------------------------------------------------------------------- 1 | coverage 2 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | Sphinx 2 | python-docs-theme 3 | -------------------------------------------------------------------------------- /docs/build/html/_static/default.css: -------------------------------------------------------------------------------- 1 | @import url("classic.css"); 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/* 2 | dist/* 3 | python_powerdns.egg-info/* 4 | *.pyc 5 | private_bin 6 | -------------------------------------------------------------------------------- /docs/build/html/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/outini/python-powerdns/HEAD/docs/build/html/objects.inv -------------------------------------------------------------------------------- /docs/build/html/_static/py.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/outini/python-powerdns/HEAD/docs/build/html/_static/py.png -------------------------------------------------------------------------------- /docs/build/html/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/outini/python-powerdns/HEAD/docs/build/html/_static/file.png -------------------------------------------------------------------------------- /docs/build/html/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/outini/python-powerdns/HEAD/docs/build/html/_static/plus.png -------------------------------------------------------------------------------- /docs/build/html/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/outini/python-powerdns/HEAD/docs/build/html/_static/minus.png -------------------------------------------------------------------------------- /docs/custom.css: -------------------------------------------------------------------------------- 1 | 2 | @import url("pydoctheme.css"); 3 | 4 | div.body { 5 | min-width: 450px; 6 | max-width: 1200px; 7 | } 8 | -------------------------------------------------------------------------------- /docs/build/html/_static/custom.css: -------------------------------------------------------------------------------- 1 | 2 | @import url("pydoctheme.css"); 3 | 4 | div.body { 5 | min-width: 450px; 6 | max-width: 1200px; 7 | } 8 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /docs/source/client.rst: -------------------------------------------------------------------------------- 1 | python-powerdns -- Client 2 | ========================= 3 | 4 | .. autoclass:: powerdns.client.PDNSApiClient 5 | :members: 6 | -------------------------------------------------------------------------------- /docs/build/html/_sources/client.rst.txt: -------------------------------------------------------------------------------- 1 | python-powerdns -- Client 2 | ========================= 3 | 4 | .. autoclass:: powerdns.client.PDNSApiClient 5 | :members: 6 | -------------------------------------------------------------------------------- /docs/source/exceptions.rst: -------------------------------------------------------------------------------- 1 | python-powerdns -- Exceptions 2 | ============================= 3 | 4 | .. autoclass:: powerdns.exceptions.PDNSCanonicalError 5 | :members: 6 | 7 | .. autoclass:: powerdns.exceptions.PDNSError 8 | :members: 9 | -------------------------------------------------------------------------------- /files/pdns.conf: -------------------------------------------------------------------------------- 1 | setuid=pdns 2 | setgid=pdns 3 | 4 | launch=gsqlite3 5 | gsqlite3-database=/pdns/pdns.sqlite3 6 | gsqlite3-dnssec=on 7 | 8 | api=yes 9 | api-key=MySupErS3cureK3y 10 | webserver-address=0.0.0.0:8081 11 | webserver-allow-from=0.0.0.0/0 12 | -------------------------------------------------------------------------------- /docs/build/html/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 0aaf607029f57b8d9e72b2bb3c73d75b 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/build/html/_sources/exceptions.rst.txt: -------------------------------------------------------------------------------- 1 | python-powerdns -- Exceptions 2 | ============================= 3 | 4 | .. autoclass:: powerdns.exceptions.PDNSCanonicalError 5 | :members: 6 | 7 | .. autoclass:: powerdns.exceptions.PDNSError 8 | :members: 9 | -------------------------------------------------------------------------------- /docs/build/html/_static/caret-down.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /files/Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | FROM debian:latest 3 | RUN apt-get update 4 | RUN apt-get install -y pdns-server pdns-backend-sqlite3 sqlite3 5 | 6 | ADD pdns.conf /pdns/pdns.conf 7 | 8 | # prepare the pdns sqlite3 database 9 | RUN sqlite3 /pdns/pdns.sqlite3 7 | .. sectionauthor:: Denis 'jawa' Pompilio86 | Please activate JavaScript to enable the search 87 | functionality. 88 |
89 |93 | Searching for multiple words only shows matches that contain 94 | all words. 95 |
96 | 97 | 98 | 103 | 104 | 105 | 106 |' + _('Hide Search Matches') + '
') 239 | .appendTo($('#searchbox')); 240 | } 241 | }, 242 | 243 | /** 244 | * init the domain index toggle buttons 245 | */ 246 | initIndexTable : function() { 247 | var togglers = $('img.toggler').click(function() { 248 | var src = $(this).attr('src'); 249 | var idnum = $(this).attr('id').substr(7); 250 | $('tr.cg-' + idnum).toggle(); 251 | if (src.substr(-9) === 'minus.png') 252 | $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); 253 | else 254 | $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); 255 | }).css('display', ''); 256 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { 257 | togglers.click(); 258 | } 259 | }, 260 | 261 | /** 262 | * helper function to hide the search marks again 263 | */ 264 | hideSearchWords : function() { 265 | $('#searchbox .highlight-link').fadeOut(300); 266 | $('span.highlighted').removeClass('highlighted'); 267 | }, 268 | 269 | /** 270 | * make the url absolute 271 | */ 272 | makeURL : function(relativeURL) { 273 | return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; 274 | }, 275 | 276 | /** 277 | * get the current relative url 278 | */ 279 | getCurrentURL : function() { 280 | var path = document.location.pathname; 281 | var parts = path.split(/\//); 282 | $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { 283 | if (this === '..') 284 | parts.pop(); 285 | }); 286 | var url = parts.join('/'); 287 | return path.substring(url.lastIndexOf('/') + 1, path.length - 1); 288 | }, 289 | 290 | initOnKeyListeners: function() { 291 | $(document).keydown(function(event) { 292 | var activeElementType = document.activeElement.tagName; 293 | // don't navigate when in search box, textarea, dropdown or button 294 | if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' 295 | && activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey 296 | && !event.shiftKey) { 297 | switch (event.keyCode) { 298 | case 37: // left 299 | var prevHref = $('link[rel="prev"]').prop('href'); 300 | if (prevHref) { 301 | window.location.href = prevHref; 302 | return false; 303 | } 304 | case 39: // right 305 | var nextHref = $('link[rel="next"]').prop('href'); 306 | if (nextHref) { 307 | window.location.href = nextHref; 308 | return false; 309 | } 310 | } 311 | } 312 | }); 313 | } 314 | }; 315 | 316 | // quick alias for translations 317 | _ = Documentation.gettext; 318 | 319 | $(document).ready(function() { 320 | Documentation.init(); 321 | }); 322 | -------------------------------------------------------------------------------- /docs/build/html/_static/language_data.js: -------------------------------------------------------------------------------- 1 | /* 2 | * language_data.js 3 | * ~~~~~~~~~~~~~~~~ 4 | * 5 | * This script contains the language-specific data used by searchtools.js, 6 | * namely the list of stopwords, stemmer, scorer and splitter. 7 | * 8 | * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. 9 | * :license: BSD, see LICENSE for details. 10 | * 11 | */ 12 | 13 | var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"]; 14 | 15 | 16 | /* Non-minified version is copied as a separate JS file, is available */ 17 | 18 | /** 19 | * Porter Stemmer 20 | */ 21 | var Stemmer = function() { 22 | 23 | var step2list = { 24 | ational: 'ate', 25 | tional: 'tion', 26 | enci: 'ence', 27 | anci: 'ance', 28 | izer: 'ize', 29 | bli: 'ble', 30 | alli: 'al', 31 | entli: 'ent', 32 | eli: 'e', 33 | ousli: 'ous', 34 | ization: 'ize', 35 | ation: 'ate', 36 | ator: 'ate', 37 | alism: 'al', 38 | iveness: 'ive', 39 | fulness: 'ful', 40 | ousness: 'ous', 41 | aliti: 'al', 42 | iviti: 'ive', 43 | biliti: 'ble', 44 | logi: 'log' 45 | }; 46 | 47 | var step3list = { 48 | icate: 'ic', 49 | ative: '', 50 | alize: 'al', 51 | iciti: 'ic', 52 | ical: 'ic', 53 | ful: '', 54 | ness: '' 55 | }; 56 | 57 | var c = "[^aeiou]"; // consonant 58 | var v = "[aeiouy]"; // vowel 59 | var C = c + "[^aeiouy]*"; // consonant sequence 60 | var V = v + "[aeiou]*"; // vowel sequence 61 | 62 | var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 63 | var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 64 | var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 65 | var s_v = "^(" + C + ")?" + v; // vowel in stem 66 | 67 | this.stemWord = function (w) { 68 | var stem; 69 | var suffix; 70 | var firstch; 71 | var origword = w; 72 | 73 | if (w.length < 3) 74 | return w; 75 | 76 | var re; 77 | var re2; 78 | var re3; 79 | var re4; 80 | 81 | firstch = w.substr(0,1); 82 | if (firstch == "y") 83 | w = firstch.toUpperCase() + w.substr(1); 84 | 85 | // Step 1a 86 | re = /^(.+?)(ss|i)es$/; 87 | re2 = /^(.+?)([^s])s$/; 88 | 89 | if (re.test(w)) 90 | w = w.replace(re,"$1$2"); 91 | else if (re2.test(w)) 92 | w = w.replace(re2,"$1$2"); 93 | 94 | // Step 1b 95 | re = /^(.+?)eed$/; 96 | re2 = /^(.+?)(ed|ing)$/; 97 | if (re.test(w)) { 98 | var fp = re.exec(w); 99 | re = new RegExp(mgr0); 100 | if (re.test(fp[1])) { 101 | re = /.$/; 102 | w = w.replace(re,""); 103 | } 104 | } 105 | else if (re2.test(w)) { 106 | var fp = re2.exec(w); 107 | stem = fp[1]; 108 | re2 = new RegExp(s_v); 109 | if (re2.test(stem)) { 110 | w = stem; 111 | re2 = /(at|bl|iz)$/; 112 | re3 = new RegExp("([^aeiouylsz])\\1$"); 113 | re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 114 | if (re2.test(w)) 115 | w = w + "e"; 116 | else if (re3.test(w)) { 117 | re = /.$/; 118 | w = w.replace(re,""); 119 | } 120 | else if (re4.test(w)) 121 | w = w + "e"; 122 | } 123 | } 124 | 125 | // Step 1c 126 | re = /^(.+?)y$/; 127 | if (re.test(w)) { 128 | var fp = re.exec(w); 129 | stem = fp[1]; 130 | re = new RegExp(s_v); 131 | if (re.test(stem)) 132 | w = stem + "i"; 133 | } 134 | 135 | // Step 2 136 | re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; 137 | if (re.test(w)) { 138 | var fp = re.exec(w); 139 | stem = fp[1]; 140 | suffix = fp[2]; 141 | re = new RegExp(mgr0); 142 | if (re.test(stem)) 143 | w = stem + step2list[suffix]; 144 | } 145 | 146 | // Step 3 147 | re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; 148 | if (re.test(w)) { 149 | var fp = re.exec(w); 150 | stem = fp[1]; 151 | suffix = fp[2]; 152 | re = new RegExp(mgr0); 153 | if (re.test(stem)) 154 | w = stem + step3list[suffix]; 155 | } 156 | 157 | // Step 4 158 | re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; 159 | re2 = /^(.+?)(s|t)(ion)$/; 160 | if (re.test(w)) { 161 | var fp = re.exec(w); 162 | stem = fp[1]; 163 | re = new RegExp(mgr1); 164 | if (re.test(stem)) 165 | w = stem; 166 | } 167 | else if (re2.test(w)) { 168 | var fp = re2.exec(w); 169 | stem = fp[1] + fp[2]; 170 | re2 = new RegExp(mgr1); 171 | if (re2.test(stem)) 172 | w = stem; 173 | } 174 | 175 | // Step 5 176 | re = /^(.+?)e$/; 177 | if (re.test(w)) { 178 | var fp = re.exec(w); 179 | stem = fp[1]; 180 | re = new RegExp(mgr1); 181 | re2 = new RegExp(meq1); 182 | re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 183 | if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) 184 | w = stem; 185 | } 186 | re = /ll$/; 187 | re2 = new RegExp(mgr1); 188 | if (re.test(w) && re2.test(w)) { 189 | re = /.$/; 190 | w = w.replace(re,""); 191 | } 192 | 193 | // and turn initial Y back to y 194 | if (firstch == "y") 195 | w = firstch.toLowerCase() + w.substr(1); 196 | return w; 197 | } 198 | } 199 | 200 | 201 | 202 | 203 | var splitChars = (function() { 204 | var result = {}; 205 | var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648, 206 | 1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702, 207 | 2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971, 208 | 2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345, 209 | 3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761, 210 | 3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823, 211 | 4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125, 212 | 8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695, 213 | 11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587, 214 | 43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141]; 215 | var i, j, start, end; 216 | for (i = 0; i < singles.length; i++) { 217 | result[singles[i]] = true; 218 | } 219 | var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709], 220 | [722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161], 221 | [1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568], 222 | [1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807], 223 | [1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047], 224 | [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383], 225 | [2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450], 226 | [2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547], 227 | [2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673], 228 | [2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820], 229 | [2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946], 230 | [2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023], 231 | [3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173], 232 | [3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332], 233 | [3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481], 234 | [3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718], 235 | [3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791], 236 | [3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095], 237 | [4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205], 238 | [4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687], 239 | [4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968], 240 | [4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869], 241 | [5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102], 242 | [6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271], 243 | [6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592], 244 | [6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822], 245 | [6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167], 246 | [7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959], 247 | [7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143], 248 | [8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318], 249 | [8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483], 250 | [8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101], 251 | [10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567], 252 | [11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292], 253 | [12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444], 254 | [12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783], 255 | [12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311], 256 | [19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511], 257 | [42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774], 258 | [42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071], 259 | [43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263], 260 | [43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519], 261 | [43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647], 262 | [43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967], 263 | [44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295], 264 | [57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274], 265 | [64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007], 266 | [65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381], 267 | [65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]]; 268 | for (i = 0; i < ranges.length; i++) { 269 | start = ranges[i][0]; 270 | end = ranges[i][1]; 271 | for (j = start; j <= end; j++) { 272 | result[j] = true; 273 | } 274 | } 275 | return result; 276 | })(); 277 | 278 | function splitQuery(query) { 279 | var result = []; 280 | var start = -1; 281 | for (var i = 0; i < query.length; i++) { 282 | if (splitChars[query.charCodeAt(i)]) { 283 | if (start !== -1) { 284 | result.push(query.slice(start, i)); 285 | start = -1; 286 | } 287 | } else if (start === -1) { 288 | start = i; 289 | } 290 | } 291 | if (start !== -1) { 292 | result.push(query.slice(start)); 293 | } 294 | return result; 295 | } 296 | 297 | 298 | -------------------------------------------------------------------------------- /docs/build/html/_static/pydoctheme.css: -------------------------------------------------------------------------------- 1 | @import url("default.css"); 2 | 3 | body { 4 | background-color: white; 5 | margin-left: 1em; 6 | margin-right: 1em; 7 | } 8 | 9 | .mobile-nav, 10 | .menu-wrapper { 11 | display: none; 12 | } 13 | 14 | div.related { 15 | margin-bottom: 1.2em; 16 | padding: 0.5em 0; 17 | border-bottom: 1px solid #ccc; 18 | margin-top: 0.5em; 19 | } 20 | 21 | div.related a:hover { 22 | color: #0095C4; 23 | } 24 | 25 | div.related ~ div.related { 26 | border-top: 1px solid #ccc; 27 | border-bottom: none; 28 | } 29 | 30 | .related .switchers { 31 | display: inline-flex; 32 | } 33 | 34 | .switchers > div { 35 | margin-right: 5px; 36 | } 37 | 38 | .version_switcher_placeholder, 39 | .language_switcher_placeholder { 40 | padding-left: 5px; 41 | background-color: white; 42 | } 43 | 44 | .inline-search { 45 | display: inline; 46 | } 47 | form.inline-search input { 48 | display: inline; 49 | } 50 | form.inline-search input[type="submit"] { 51 | width: 40px; 52 | } 53 | 54 | div.sphinxsidebar { 55 | background-color: #eeeeee; 56 | border-radius: 5px; 57 | line-height: 130%; 58 | font-size: smaller; 59 | } 60 | 61 | div.sphinxsidebar h3, div.sphinxsidebar h4 { 62 | margin-top: 1.5em; 63 | } 64 | 65 | div.sphinxsidebarwrapper > h3:first-child { 66 | margin-top: 0.2em; 67 | } 68 | 69 | div.sphinxsidebarwrapper > ul > li > ul > li { 70 | margin-bottom: 0.4em; 71 | } 72 | 73 | div.sphinxsidebar a:hover { 74 | color: #0095C4; 75 | } 76 | 77 | form.inline-search input, 78 | div.sphinxsidebar input { 79 | font-family: 'Lucida Grande',Arial,sans-serif; 80 | border: 1px solid #999999; 81 | font-size: smaller; 82 | border-radius: 3px; 83 | } 84 | 85 | div.sphinxsidebar input[type=text] { 86 | max-width: 150px; 87 | } 88 | 89 | div.body { 90 | padding: 0 0 0 1.2em; 91 | } 92 | 93 | div.body p { 94 | line-height: 140%; 95 | } 96 | 97 | div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 { 98 | margin: 0; 99 | border: 0; 100 | padding: 0.3em 0; 101 | } 102 | 103 | div.body hr { 104 | border: 0; 105 | background-color: #ccc; 106 | height: 1px; 107 | } 108 | 109 | div.body pre { 110 | border-radius: 3px; 111 | border: 1px solid #ac9; 112 | } 113 | 114 | div.body div.admonition, div.body div.impl-detail { 115 | border-radius: 3px; 116 | } 117 | 118 | div.body div.impl-detail > p { 119 | margin: 0; 120 | } 121 | 122 | div.body div.seealso { 123 | border: 1px solid #dddd66; 124 | } 125 | 126 | div.body a { 127 | color: #0072aa; 128 | } 129 | 130 | div.body a:visited { 131 | color: #6363bb; 132 | } 133 | 134 | div.body a:hover { 135 | color: #00B0E4; 136 | } 137 | 138 | tt, code, pre { 139 | font-family: monospace, sans-serif; 140 | font-size: 96.5%; 141 | } 142 | 143 | div.body tt, div.body code { 144 | border-radius: 3px; 145 | } 146 | 147 | div.body tt.descname, div.body code.descname { 148 | font-size: 120%; 149 | } 150 | 151 | div.body tt.xref, div.body a tt, div.body code.xref, div.body a code { 152 | font-weight: normal; 153 | } 154 | 155 | table.docutils { 156 | border: 1px solid #ddd; 157 | min-width: 20%; 158 | border-radius: 3px; 159 | margin-top: 10px; 160 | margin-bottom: 10px; 161 | } 162 | 163 | table.docutils td, table.docutils th { 164 | border: 1px solid #ddd !important; 165 | border-radius: 3px; 166 | } 167 | 168 | table p, table li { 169 | text-align: left !important; 170 | } 171 | 172 | table.docutils th { 173 | background-color: #eee; 174 | padding: 0.3em 0.5em; 175 | } 176 | 177 | table.docutils td { 178 | background-color: white; 179 | padding: 0.3em 0.5em; 180 | } 181 | 182 | table.footnote, table.footnote td { 183 | border: 0 !important; 184 | } 185 | 186 | div.footer { 187 | line-height: 150%; 188 | margin-top: -2em; 189 | text-align: right; 190 | width: auto; 191 | margin-right: 10px; 192 | } 193 | 194 | div.footer a:hover { 195 | color: #0095C4; 196 | } 197 | 198 | .refcount { 199 | color: #060; 200 | } 201 | 202 | .stableabi { 203 | color: #229; 204 | } 205 | 206 | .highlight { 207 | background: none !important; 208 | } 209 | 210 | dl > dt span ~ em { 211 | font-family: monospace, sans-serif; 212 | } 213 | 214 | .toctree-wrapper ul { 215 | padding-left: 20px; 216 | } 217 | 218 | @media (max-width: 1023px) { 219 | /* Body layout */ 220 | div.body { 221 | min-width: 100%; 222 | padding: 0; 223 | font-size: 0.875rem; 224 | } 225 | div.bodywrapper { 226 | margin: 0; 227 | } 228 | /* Typography */ 229 | div.body h1 { 230 | font-size: 1.625rem; 231 | } 232 | div.body h2 { 233 | font-size: 1.25rem; 234 | } 235 | div.body h3, div.body h4, div.body h5 { 236 | font-size: 1rem; 237 | } 238 | /* Remove sidebar and top related bar */ 239 | div.related, .sphinxsidebar { 240 | display: none; 241 | } 242 | /* Anchorlinks are not hidden by fixed-positioned navbar when scrolled to */ 243 | html { 244 | scroll-padding-top: 40px; 245 | } 246 | 247 | /* Top navigation bar */ 248 | .mobile-nav { 249 | display: block; 250 | height: 40px; 251 | width: 100%; 252 | position: fixed; 253 | top: 0; 254 | left: 0; 255 | background-color: white; 256 | box-shadow: rgba(0, 0, 0, 0.25) 0 0 2px 0; 257 | z-index: 1; 258 | } 259 | .mobile-nav * { 260 | box-sizing: border-box; 261 | } 262 | .nav-content { 263 | position: absolute; 264 | z-index: 2; 265 | left: 0; 266 | top: 0; 267 | height: 40px; 268 | width: 100%; 269 | padding: 0 1rem 0 45px; 270 | display: flex; 271 | align-items: center; 272 | background-color: white; 273 | } 274 | .nav-logo { 275 | margin-right: 0.7rem; 276 | display: flex; 277 | flex: 0 0 auto; 278 | } 279 | .nav-content img { 280 | width: 20px; 281 | height: auto; 282 | } 283 | .version_switcher_placeholder { 284 | flex: 0 1 0; 285 | margin-right: 1rem; 286 | } 287 | .version_switcher_placeholder select { 288 | height: 30px; 289 | border-radius: 0; 290 | } 291 | .nav-content .search { 292 | display: flex; 293 | flex: 1 1 auto; 294 | align-items: center; 295 | padding: 0 0 0 2px; 296 | border: 1px solid #a9a9a9; 297 | height: 30px; 298 | overflow: hidden; 299 | } 300 | .nav-content .search:hover { 301 | box-shadow: 0 1px 6px 0 rgba(32,33,36,0.28); 302 | border-color: rgba(223,225,229,0); 303 | } 304 | .nav-content .search input[type=text] { 305 | border: 0; 306 | outline: 0; 307 | box-shadow: none; 308 | width: 40px; 309 | height: 28px; 310 | flex: 1 1 auto; 311 | } 312 | .nav-content .search input[type=submit] { 313 | height: 100%; 314 | border: 0; 315 | box-shadow: none; 316 | outline: 1px solid #999; 317 | cursor: pointer; 318 | } 319 | .nav-content .search svg { 320 | flex: 0 0 20px; 321 | fill: #333; 322 | } 323 | .toggler__input { 324 | width: 40px; 325 | height: 40px; 326 | left: 0; 327 | opacity: 0; 328 | position: absolute; 329 | z-index: 3; 330 | margin: 0; 331 | } 332 | .toggler__label { 333 | width: 40px; 334 | height: 40px; 335 | margin: 0; 336 | position: absolute; 337 | cursor: pointer; 338 | top: 0; 339 | left: 0; 340 | background-color: transparent; 341 | border: 1px solid white; 342 | box-shadow: none; 343 | z-index: 3; 344 | display: flex; 345 | align-items: center; 346 | justify-content: center; 347 | padding: 0 8px; 348 | } 349 | .toggler__label:focus { 350 | background-color: #eee; 351 | border: 1px solid #ededed; 352 | box-shadow: rgba(0, 0, 0, 0.25) 1px 0 2px 0; 353 | } 354 | .toggler__label:hover { 355 | background-color: #eee; 356 | border: 1px solid #ededed; 357 | box-shadow: rgba(0, 0, 0, 0.25) 1px 0 2px 0; 358 | } 359 | .toggler__label > span { 360 | position: relative; 361 | flex: none; 362 | height: 2px; 363 | width: 100%; 364 | background: #444; 365 | transition: all 400ms ease; 366 | } 367 | .toggler__label > span::before, 368 | .toggler__label > span::after { 369 | content: ''; 370 | height: 2px; 371 | width: 100%; 372 | background: inherit; 373 | position: absolute; 374 | left: 0; 375 | top: -8px; 376 | } 377 | .toggler__label > span::after { 378 | top: 8px; 379 | } 380 | .toggler__input:checked ~ .toggler__label span { 381 | transform: rotate(135deg); 382 | } 383 | .toggler__input:checked ~ .toggler__label span::before { 384 | transform: rotate(90deg); 385 | } 386 | .toggler__input:checked ~ .toggler__label span::before, 387 | .toggler__input:checked ~ .toggler__label span::after { 388 | top: 0; 389 | } 390 | .toggler__input:checked:hover ~ .toggler__label span { 391 | transform: rotate(315deg); 392 | } 393 | .toggler__input:checked ~ .menu-wrapper { 394 | visibility: visible; 395 | left: 0; 396 | } 397 | 398 | /* Sliding side menu */ 399 | .menu-wrapper { 400 | display: block; 401 | position: fixed; 402 | top: 0; 403 | transition: left 400ms ease; 404 | left: -310px; 405 | width: 300px; 406 | height: 100%; 407 | background-color: #eee; 408 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); 409 | overflow-y: auto; 410 | } 411 | .menu-wrapper.open { 412 | visibility: visible; 413 | left: 0; 414 | } 415 | .menu { 416 | padding: 40px 10px 30px 20px; 417 | } 418 | .menu-wrapper h3, 419 | .menu-wrapper h4 { 420 | margin-bottom: 0; 421 | font-weight: normal; 422 | } 423 | .menu-wrapper h4 { 424 | font-size: 1.3em; 425 | } 426 | .menu-wrapper h3 { 427 | color: #444444; 428 | font-size: 1.4em; 429 | } 430 | .menu-wrapper h3 + p, 431 | .menu-wrapper h4 + p { 432 | margin-top: 0.5rem; 433 | } 434 | .menu a { 435 | font-size: smaller; 436 | color: #444444; 437 | text-decoration: none; 438 | } 439 | .menu ul { 440 | list-style: none; 441 | line-height: 1.4; 442 | overflow-wrap: break-word; 443 | padding-left: 0; 444 | } 445 | .menu ul ul { 446 | margin-left: 20px; 447 | list-style: square; 448 | } 449 | .menu ul li { 450 | margin-bottom: 0.5rem; 451 | } 452 | .language_switcher_placeholder, 453 | .version_switcher_placeholder { 454 | position: relative; 455 | border: 1px solid #a8a8a8; 456 | height: 30px; 457 | } 458 | .language_switcher_placeholder { 459 | margin-top: 2rem; 460 | } 461 | .language_switcher_placeholder::after, 462 | .version_switcher_placeholder::after { 463 | content: url('../_static/caret-down.svg'); 464 | position: absolute; 465 | top: 7px; 466 | width: 15px; 467 | height: 15px; 468 | right: 3px; 469 | pointer-events: none; 470 | } 471 | .language_switcher_placeholder select, 472 | .version_switcher_placeholder select { 473 | appearance: none; 474 | border: 0; 475 | height: 100%; 476 | } 477 | .language_switcher_placeholder select { 478 | width: 100%; 479 | } 480 | .document { 481 | padding-top: 40px; 482 | position: relative; 483 | z-index: 0; 484 | } 485 | /*Responsive tables*/ 486 | .responsive-table__container { 487 | width: 100%; 488 | overflow-x: auto; 489 | } 490 | } 491 | -------------------------------------------------------------------------------- /docs/build/html/exceptions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |131 |144 |
The powerdns package provides an intuitive and easy to use WEB API of
124 | PowerDNS admin. It defines the following attribute:
126 |151 |
108 | # -*- coding: utf-8 -*-
109 | #
110 | # PowerDNS web api python client and interface (python-powerdns)
111 | #
112 | # Copyright (C) 2018 Denis Pompilio (jawa) <denis.pompilio@gmail.com>
113 | #
114 | # This file is part of python-powerdns
115 | #
116 | # This program is free software; you can redistribute it and/or
117 | # modify it under the terms of the MIT License.
118 | #
119 | # This program is distributed in the hope that it will be useful,
120 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
121 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
122 | # MIT License for more details.
123 | #
124 | # You should have received a copy of the MIT License along with this
125 | # program; if not, see <https://opensource.org/licenses/MIT>.
126 |
127 | """
128 | powerdns - PowerDNS API client and interface
129 | """
130 |
131 | import logging
132 | from logging.handlers import SysLogHandler
133 | from .client import PDNSApiClient
134 | from .interface import PDNSEndpoint, RRSet, Comment
135 |
136 |
137 | #: Current version of the package as :class:`str`.
138 | __version__ = "2.0.0"
139 |
140 | LOG_LEVELS = [
141 | logging.ERROR,
142 | logging.WARN,
143 | logging.INFO,
144 | logging.DEBUG
145 | ]
146 |
147 |
148 | [docs]def basic_logger(name=None, clevel=2, slevel=1):
149 | """Configure a basic logger
150 |
151 | :param str name: Logger name
152 | :param int clevel: Console log level
153 | :param int slevel: Syslog log level
154 | :return: Logger object
155 | """
156 | logger = logging.getLogger(name)
157 | logger.setLevel(LOG_LEVELS[clevel])
158 | fmt_syslog = logging.Formatter('%(name)s %(levelname)s: %(message)s')
159 | fmt_stream = logging.Formatter('%(name)s %(levelname)s: %(message)s')
160 | stream_handler = logging.StreamHandler()
161 | stream_handler.setFormatter(fmt_stream)
162 | logger.addHandler(stream_handler)
163 | syslog_handler = SysLogHandler(address='/dev/log')
164 | syslog_handler.setFormatter(fmt_syslog)
165 | syslog_handler.setLevel(LOG_LEVELS[slevel])
166 | logger.addHandler(syslog_handler)
167 | return logger
168 |
109 | # -*- coding: utf-8 -*-
110 | #
111 | # PowerDNS web api python client and interface (python-powerdns)
112 | #
113 | # Copyright (C) 2018 Denis Pompilio (jawa) <denis.pompilio@gmail.com>
114 | #
115 | # This file is part of python-powerdns
116 | #
117 | # This program is free software; you can redistribute it and/or
118 | # modify it under the terms of the MIT License.
119 | #
120 | # This program is distributed in the hope that it will be useful,
121 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
122 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
123 | # MIT License for more details.
124 | #
125 | # You should have received a copy of the MIT License along with this
126 | # program; if not, see <https://opensource.org/licenses/MIT>.
127 |
128 | """
129 | powerdns.exceptions - PowerDNS API interface exceptions
130 | """
131 |
132 |
133 | [docs]class PDNSCanonicalError(SyntaxError):
134 | """PowerDNS Canonical Error
135 | """
136 | def __init__(self, name):
137 | """Initialization"""
138 | self.name = name
139 | self.message = "'%s' is not canonical" % name
140 | super(PDNSCanonicalError, self).__init__()
141 |
142 |
143 | [docs]class PDNSError(Exception):
144 | """PowerDNS API Exception
145 | """
146 | def __str__(self):
147 | return "code=%d %s: %s" % (self.status_code, self.url, self.message)
148 |
149 | def __repr__(self):
150 | return "PDNSError(\"%s\", %d, \"%s\")" % (self.url,
151 | self.status_code,
152 | self.message)
153 |
154 | def __init__(self, url, status_code, message):
155 | """Initialization"""
156 | self.url = url
157 | self.status_code = status_code
158 | self.message = message
159 | super(PDNSError, self).__init__()
160 |
|
130 |
|
138 |
|
142 |
|
152 |
|
158 |
|
168 |
|
174 |
|
182 |
|
190 |
|
196 |
|
209 |
|
217 |
|
235 |
|
252 |
|
262 |
|
268 |
|
276 |
|
282 |
|
290 |