[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Freeipa-devel] [PATCH] 080-085 DNS UI update



Tickets: #2349 #2350 #2351 #2367

Attached patches reflect recent dns plugin changes:

 * DNS Zone UI: added new attributes
 * DNS UI: added A,AAAA create reverse options to adder dialog
 * Fixed displaying of A6 Record
 * New UI for DNS global configuration

Two prerequisites:

 * Static metadata update - new DNS options
 * New checkboxes option: Mutual exclusive

If acked, should be pushed after Martin's 195-199, 202

--
Petr Vobornik
From 51b372924af66acc8b49a7b24ab17e9a442ae0a7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Voborn=C3=ADk?= <pvoborni redhat com>
Date: Wed, 15 Feb 2012 15:33:13 +0100
Subject: [PATCH] Static metadata update - new DNS options

Tickets: #2349 #2350 #2351 #2367
---
 install/ui/test/data/ipa_init_objects.json |  807 ++++++++++++++++++++++++----
 1 files changed, 694 insertions(+), 113 deletions(-)

diff --git a/install/ui/test/data/ipa_init_objects.json b/install/ui/test/data/ipa_init_objects.json
index a3fa55e6cfaaffbcf9c8522f7552c146eb56cfb4..b51c5dc536dbf1207fc766d5218b698144aa2389 100644
--- a/install/ui/test/data/ipa_init_objects.json
+++ b/install/ui/test/data/ipa_init_objects.json
@@ -558,7 +558,8 @@
                     "ipacertificatesubjectbase",
                     "ipapwdexpadvnotify",
                     "ipaselinuxusermaporder",
-                    "ipaselinuxusermapdefault"
+                    "ipaselinuxusermapdefault",
+                    "ipaconfigstring"
                 ],
                 "hidden_attributes": [
                     "objectclass",
@@ -1044,35 +1045,31 @@
                         "alwaysask": false,
                         "attribute": false,
                         "autofill": false,
-                        "class": "Str",
+                        "class": "StrEnum",
                         "cli_name": "ipaconfigstring",
                         "cli_short_name": null,
-                        "csv": false,
+                        "csv": true,
                         "csv_separator": ",",
                         "csv_skipspace": true,
                         "default": null,
                         "doc": "Extra hashes to generate in password plug-in",
                         "exclude": null,
-                        "flags": [
-                            "no_update"
-                        ],
+                        "flags": [],
                         "hint": null,
                         "include": null,
                         "label": "Password plugin features",
-                        "length": null,
-                        "maxlength": null,
-                        "minlength": null,
-                        "multivalue": false,
+                        "multivalue": true,
                         "name": "ipaconfigstring",
-                        "noextrawhitespace": true,
                         "option_group": null,
-                        "pattern": null,
-                        "pattern_errmsg": null,
                         "primary_key": false,
                         "query": false,
                         "required": false,
                         "sortorder": 2,
-                        "type": "unicode"
+                        "type": "unicode",
+                        "values": [
+                            "AllowLMhash",
+                            "AllowNThash"
+                        ]
                     },
                     {
                         "alwaysask": false,
@@ -1309,7 +1306,13 @@
                     "hostmask",
                     "houseidentifier",
                     "idnsallowdynupdate",
+                    "idnsallowquery",
+                    "idnsallowsyncptr",
+                    "idnsallowtransfer",
+                    "idnsforwarders",
+                    "idnsforwardpolicy",
                     "idnsname",
+                    "idnspersistentsearch",
                     "idnssoaexpire",
                     "idnssoaminimum",
                     "idnssoamname",
@@ -1319,6 +1322,7 @@
                     "idnssoaserial",
                     "idnsupdatepolicy",
                     "idnszoneactive",
+                    "idnszonerefresh",
                     "inetdomainbasedn",
                     "inetdomainstatus",
                     "inetsubscriberaccountid",
@@ -2364,6 +2368,227 @@
                     }
                 ]
             },
+            "dnsconfig": {
+                "aciattrs": [],
+                "attribute_members": {},
+                "bindable": false,
+                "container_dn": "",
+                "default_attributes": [
+                    "idnsforwardpolicy",
+                    "idnsforwarders",
+                    "idnsallowsyncptr",
+                    "idnszonerefresh",
+                    "idnspersistentsearch"
+                ],
+                "hidden_attributes": [
+                    "objectclass",
+                    "aci"
+                ],
+                "label": "DNS Global Configuration",
+                "label_singular": "DNS Global Configuration",
+                "methods": [
+                    "mod",
+                    "show"
+                ],
+                "name": "dnsconfig",
+                "object_class": [],
+                "object_class_config": null,
+                "object_name": "DNS configuration options",
+                "object_name_plural": "entries",
+                "parent_object": "",
+                "rdn_attribute": "",
+                "relationships": {
+                    "member": [
+                        "Member",
+                        "",
+                        "no_"
+                    ],
+                    "memberindirect": [
+                        "Indirect Member",
+                        null,
+                        "no_indirect_"
+                    ],
+                    "memberof": [
+                        "Member Of",
+                        "in_",
+                        "not_in_"
+                    ],
+                    "memberofindirect": [
+                        "Indirect Member Of",
+                        null,
+                        "not_in_indirect_"
+                    ]
+                },
+                "takes_params": [
+                    {
+                        "alwaysask": false,
+                        "attribute": false,
+                        "autofill": false,
+                        "class": "StrEnum",
+                        "cli_name": "forward_policy",
+                        "cli_short_name": null,
+                        "csv": false,
+                        "csv_separator": ",",
+                        "csv_skipspace": true,
+                        "default": null,
+                        "doc": "Forward policy",
+                        "exclude": null,
+                        "flags": [],
+                        "hint": null,
+                        "include": null,
+                        "label": "Forward policy",
+                        "multivalue": false,
+                        "name": "idnsforwardpolicy",
+                        "option_group": null,
+                        "primary_key": false,
+                        "query": false,
+                        "required": false,
+                        "sortorder": 2,
+                        "type": "unicode",
+                        "values": [
+                            "only",
+                            "first"
+                        ]
+                    },
+                    {
+                        "alwaysask": false,
+                        "attribute": false,
+                        "autofill": false,
+                        "class": "Str",
+                        "cli_name": "forwarder",
+                        "cli_short_name": null,
+                        "csv": true,
+                        "csv_separator": ",",
+                        "csv_skipspace": true,
+                        "default": null,
+                        "doc": "A list of global forwarders",
+                        "exclude": null,
+                        "flags": [],
+                        "hint": null,
+                        "include": null,
+                        "label": "Global forwarders",
+                        "length": null,
+                        "maxlength": null,
+                        "minlength": null,
+                        "multivalue": true,
+                        "name": "idnsforwarders",
+                        "noextrawhitespace": true,
+                        "option_group": null,
+                        "pattern": null,
+                        "pattern_errmsg": null,
+                        "primary_key": false,
+                        "query": false,
+                        "required": false,
+                        "sortorder": 2,
+                        "type": "unicode"
+                    },
+                    {
+                        "alwaysask": false,
+                        "attribute": false,
+                        "autofill": false,
+                        "class": "Bool",
+                        "cli_name": "allow_sync_ptr",
+                        "cli_short_name": null,
+                        "csv": false,
+                        "csv_separator": ",",
+                        "csv_skipspace": true,
+                        "default": null,
+                        "doc": "Allow synchronization of forward (A, AAAA) and reverse (PTR) records",
+                        "exclude": null,
+                        "falsehoods": [
+                            0,
+                            "0",
+                            "false",
+                            "FALSE"
+                        ],
+                        "flags": [],
+                        "hint": null,
+                        "include": null,
+                        "label": "Allow PTR sync",
+                        "multivalue": false,
+                        "name": "idnsallowsyncptr",
+                        "option_group": null,
+                        "primary_key": false,
+                        "query": false,
+                        "required": false,
+                        "sortorder": 2,
+                        "truths": [
+                            "1",
+                            1,
+                            "true",
+                            "TRUE"
+                        ],
+                        "type": "bool"
+                    },
+                    {
+                        "alwaysask": false,
+                        "attribute": false,
+                        "autofill": false,
+                        "class": "Int",
+                        "cli_name": "zone_refresh",
+                        "cli_short_name": null,
+                        "csv": false,
+                        "csv_separator": ",",
+                        "csv_skipspace": true,
+                        "default": null,
+                        "doc": "An interval between regular polls of the name server for new DNS zones",
+                        "exclude": null,
+                        "flags": [],
+                        "hint": null,
+                        "include": null,
+                        "label": "Zone refresh interval",
+                        "maxvalue": 2147483647,
+                        "minvalue": 0,
+                        "multivalue": false,
+                        "name": "idnszonerefresh",
+                        "option_group": null,
+                        "primary_key": false,
+                        "query": false,
+                        "required": false,
+                        "sortorder": 2,
+                        "type": "int"
+                    },
+                    {
+                        "alwaysask": false,
+                        "attribute": false,
+                        "autofill": false,
+                        "class": "Bool",
+                        "cli_name": "persistent_search",
+                        "cli_short_name": null,
+                        "csv": false,
+                        "csv_separator": ",",
+                        "csv_skipspace": true,
+                        "default": null,
+                        "doc": "Enable persistent search mechanism for the name server data change detection",
+                        "exclude": null,
+                        "falsehoods": [
+                            0,
+                            "0",
+                            "false",
+                            "FALSE"
+                        ],
+                        "flags": [],
+                        "hint": null,
+                        "include": null,
+                        "label": "Persistent search",
+                        "multivalue": false,
+                        "name": "idnspersistentsearch",
+                        "option_group": null,
+                        "primary_key": false,
+                        "query": false,
+                        "required": false,
+                        "sortorder": 2,
+                        "truths": [
+                            "1",
+                            1,
+                            "true",
+                            "TRUE"
+                        ],
+                        "type": "bool"
+                    }
+                ],
+                "uuid_attribute": ""
+            },
             "dnsrecord": {
                 "aciattrs": [
                     "a6record",
@@ -2731,7 +2956,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "arecord",
                         "include": null,
                         "label": "A IP Address",
                         "length": null,
@@ -2752,6 +2977,48 @@
                     {
                         "alwaysask": false,
                         "attribute": false,
+                        "autofill": true,
+                        "class": "Flag",
+                        "cli_name": "a_create_reverse",
+                        "cli_short_name": null,
+                        "csv": false,
+                        "csv_separator": ",",
+                        "csv_skipspace": true,
+                        "default": false,
+                        "doc": "Create reverse record for this IP Address",
+                        "exclude": null,
+                        "falsehoods": [
+                            0,
+                            "0",
+                            "false",
+                            "FALSE"
+                        ],
+                        "flags": [
+                            "no_update",
+                            "dnsrecord_extra",
+                            "virtual_attribute"
+                        ],
+                        "hint": "arecord",
+                        "include": null,
+                        "label": "A Create reverse",
+                        "multivalue": false,
+                        "name": "a_extra_create_reverse",
+                        "option_group": "A Record",
+                        "primary_key": false,
+                        "query": false,
+                        "required": false,
+                        "sortorder": 2,
+                        "truths": [
+                            "1",
+                            1,
+                            "true",
+                            "TRUE"
+                        ],
+                        "type": "bool"
+                    },
+                    {
+                        "alwaysask": false,
+                        "attribute": false,
                         "autofill": false,
                         "class": "AAAARecord",
                         "cli_name": "aaaa_rec",
@@ -2800,7 +3067,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "aaaarecord",
                         "include": null,
                         "label": "AAAA IP Address",
                         "length": null,
@@ -2821,6 +3088,48 @@
                     {
                         "alwaysask": false,
                         "attribute": false,
+                        "autofill": true,
+                        "class": "Flag",
+                        "cli_name": "aaaa_create_reverse",
+                        "cli_short_name": null,
+                        "csv": false,
+                        "csv_separator": ",",
+                        "csv_skipspace": true,
+                        "default": false,
+                        "doc": "Create reverse record for this IP Address",
+                        "exclude": null,
+                        "falsehoods": [
+                            0,
+                            "0",
+                            "false",
+                            "FALSE"
+                        ],
+                        "flags": [
+                            "no_update",
+                            "dnsrecord_extra",
+                            "virtual_attribute"
+                        ],
+                        "hint": "aaaarecord",
+                        "include": null,
+                        "label": "AAAA Create reverse",
+                        "multivalue": false,
+                        "name": "aaaa_extra_create_reverse",
+                        "option_group": "AAAA Record",
+                        "primary_key": false,
+                        "query": false,
+                        "required": false,
+                        "sortorder": 2,
+                        "truths": [
+                            "1",
+                            1,
+                            "true",
+                            "TRUE"
+                        ],
+                        "type": "bool"
+                    },
+                    {
+                        "alwaysask": false,
+                        "attribute": false,
                         "autofill": false,
                         "class": "A6Record",
                         "cli_name": "a6_rec",
@@ -2856,6 +3165,41 @@
                         "alwaysask": false,
                         "attribute": false,
                         "autofill": false,
+                        "class": "Str",
+                        "cli_name": "a6_data",
+                        "cli_short_name": null,
+                        "csv": false,
+                        "csv_separator": ",",
+                        "csv_skipspace": true,
+                        "default": null,
+                        "doc": "Record data",
+                        "exclude": null,
+                        "flags": [
+                            "dnsrecord_part",
+                            "virtual_attribute"
+                        ],
+                        "hint": "a6record",
+                        "include": null,
+                        "label": "A6 Record data",
+                        "length": null,
+                        "maxlength": null,
+                        "minlength": null,
+                        "multivalue": false,
+                        "name": "a6_part_data",
+                        "noextrawhitespace": true,
+                        "option_group": "A6 Record",
+                        "pattern": null,
+                        "pattern_errmsg": null,
+                        "primary_key": false,
+                        "query": false,
+                        "required": false,
+                        "sortorder": 2,
+                        "type": "unicode"
+                    },
+                    {
+                        "alwaysask": false,
+                        "attribute": false,
+                        "autofill": false,
                         "class": "AFSDBRecord",
                         "cli_name": "afsdb_rec",
                         "cli_short_name": null,
@@ -2904,7 +3248,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "afsdbrecord",
                         "include": null,
                         "label": "AFSDB Subtype",
                         "maxvalue": 65535,
@@ -2935,7 +3279,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "afsdbrecord",
                         "include": null,
                         "label": "AFSDB Hostname",
                         "length": null,
@@ -3040,7 +3384,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "certrecord",
                         "include": null,
                         "label": "CERT Certificate Type",
                         "maxvalue": 65535,
@@ -3071,7 +3415,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "certrecord",
                         "include": null,
                         "label": "CERT Key Tag",
                         "maxvalue": 65535,
@@ -3102,7 +3446,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "certrecord",
                         "include": null,
                         "label": "CERT Algorithm",
                         "maxvalue": 255,
@@ -3133,7 +3477,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "certrecord",
                         "include": null,
                         "label": "CERT Certificate/CRL",
                         "length": null,
@@ -3202,7 +3546,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "cnamerecord",
                         "include": null,
                         "label": "CNAME Hostname",
                         "length": null,
@@ -3343,7 +3687,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "dnamerecord",
                         "include": null,
                         "label": "DNAME Target",
                         "length": null,
@@ -3448,7 +3792,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "dsrecord",
                         "include": null,
                         "label": "DS Key Tag",
                         "maxvalue": 65535,
@@ -3479,7 +3823,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "dsrecord",
                         "include": null,
                         "label": "DS Algorithm",
                         "maxvalue": 255,
@@ -3510,7 +3854,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "dsrecord",
                         "include": null,
                         "label": "DS Digest Type",
                         "maxvalue": 255,
@@ -3541,7 +3885,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "dsrecord",
                         "include": null,
                         "label": "DS Digest",
                         "length": null,
@@ -3682,7 +4026,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "keyrecord",
                         "include": null,
                         "label": "KEY Flags",
                         "maxvalue": 65535,
@@ -3713,7 +4057,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "keyrecord",
                         "include": null,
                         "label": "KEY Protocol",
                         "maxvalue": 255,
@@ -3744,7 +4088,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "keyrecord",
                         "include": null,
                         "label": "KEY Algorithm",
                         "maxvalue": 255,
@@ -3775,7 +4119,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "keyrecord",
                         "include": null,
                         "label": "KEY Public Key",
                         "length": null,
@@ -3844,7 +4188,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "kxrecord",
                         "include": null,
                         "label": "KX Preference",
                         "maxvalue": 65535,
@@ -3875,7 +4219,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "kxrecord",
                         "include": null,
                         "label": "KX Exchanger",
                         "length": null,
@@ -3944,7 +4288,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "locrecord",
                         "include": null,
                         "label": "LOC Degrees Latitude",
                         "maxvalue": 90,
@@ -3976,7 +4320,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "locrecord",
                         "include": null,
                         "label": "LOC Minutes Latitude",
                         "maxvalue": 59,
@@ -3994,7 +4338,7 @@
                         "alwaysask": false,
                         "attribute": false,
                         "autofill": false,
-                        "class": "Float",
+                        "class": "Decimal",
                         "cli_name": "loc_lat_sec",
                         "cli_short_name": null,
                         "csv": false,
@@ -4008,19 +4352,24 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "locrecord",
                         "include": null,
                         "label": "LOC Seconds Latitude",
-                        "maxvalue": 59.999,
-                        "minvalue": 0.0,
+                        "maxvalue": {
+                            "__base64__": ""
+                        },
+                        "minvalue": {
+                            "__base64__": ""
+                        },
                         "multivalue": false,
                         "name": "loc_part_lat_sec",
                         "option_group": "LOC Record",
+                        "precision": 3,
                         "primary_key": false,
                         "query": false,
                         "required": false,
                         "sortorder": 2,
-                        "type": "float"
+                        "type": "Decimal"
                     },
                     {
                         "alwaysask": false,
@@ -4039,7 +4388,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "locrecord",
                         "include": null,
                         "label": "LOC Direction Latitude",
                         "multivalue": false,
@@ -4072,7 +4421,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "locrecord",
                         "include": null,
                         "label": "LOC Degrees Longtitude",
                         "maxvalue": 180,
@@ -4104,7 +4453,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "locrecord",
                         "include": null,
                         "label": "LOC Minutes Longtitude",
                         "maxvalue": 59,
@@ -4122,7 +4471,7 @@
                         "alwaysask": false,
                         "attribute": false,
                         "autofill": false,
-                        "class": "Float",
+                        "class": "Decimal",
                         "cli_name": "loc_lon_sec",
                         "cli_short_name": null,
                         "csv": false,
@@ -4136,19 +4485,24 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "locrecord",
                         "include": null,
                         "label": "LOC Seconds Longtitude",
-                        "maxvalue": 59.999,
-                        "minvalue": 0.0,
+                        "maxvalue": {
+                            "__base64__": ""
+                        },
+                        "minvalue": {
+                            "__base64__": ""
+                        },
                         "multivalue": false,
                         "name": "loc_part_lon_sec",
                         "option_group": "LOC Record",
+                        "precision": 3,
                         "primary_key": false,
                         "query": false,
                         "required": false,
                         "sortorder": 2,
-                        "type": "float"
+                        "type": "Decimal"
                     },
                     {
                         "alwaysask": false,
@@ -4167,7 +4521,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "locrecord",
                         "include": null,
                         "label": "LOC Direction Longtitude",
                         "multivalue": false,
@@ -4187,7 +4541,7 @@
                         "alwaysask": false,
                         "attribute": false,
                         "autofill": false,
-                        "class": "Float",
+                        "class": "Decimal",
                         "cli_name": "loc_altitude",
                         "cli_short_name": null,
                         "csv": false,
@@ -4200,25 +4554,30 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "locrecord",
                         "include": null,
                         "label": "LOC Altitude",
-                        "maxvalue": 42849672.95,
-                        "minvalue": -100000.0,
+                        "maxvalue": {
+                            "__base64__": ""
+                        },
+                        "minvalue": {
+                            "__base64__": ""
+                        },
                         "multivalue": false,
                         "name": "loc_part_altitude",
                         "option_group": "LOC Record",
+                        "precision": 2,
                         "primary_key": false,
                         "query": false,
                         "required": false,
                         "sortorder": 2,
-                        "type": "float"
+                        "type": "Decimal"
                     },
                     {
                         "alwaysask": false,
                         "attribute": false,
                         "autofill": false,
-                        "class": "Float",
+                        "class": "Decimal",
                         "cli_name": "loc_size",
                         "cli_short_name": null,
                         "csv": false,
@@ -4232,25 +4591,30 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "locrecord",
                         "include": null,
                         "label": "LOC Size",
-                        "maxvalue": 90000000.0,
-                        "minvalue": 0.0,
+                        "maxvalue": {
+                            "__base64__": ""
+                        },
+                        "minvalue": {
+                            "__base64__": ""
+                        },
                         "multivalue": false,
                         "name": "loc_part_size",
                         "option_group": "LOC Record",
+                        "precision": 2,
                         "primary_key": false,
                         "query": false,
                         "required": false,
                         "sortorder": 2,
-                        "type": "float"
+                        "type": "Decimal"
                     },
                     {
                         "alwaysask": false,
                         "attribute": false,
                         "autofill": false,
-                        "class": "Float",
+                        "class": "Decimal",
                         "cli_name": "loc_h_precision",
                         "cli_short_name": null,
                         "csv": false,
@@ -4264,25 +4628,30 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "locrecord",
                         "include": null,
                         "label": "LOC Horizontal Precision",
-                        "maxvalue": 90000000.0,
-                        "minvalue": 0.0,
+                        "maxvalue": {
+                            "__base64__": ""
+                        },
+                        "minvalue": {
+                            "__base64__": ""
+                        },
                         "multivalue": false,
                         "name": "loc_part_h_precision",
                         "option_group": "LOC Record",
+                        "precision": 2,
                         "primary_key": false,
                         "query": false,
                         "required": false,
                         "sortorder": 2,
-                        "type": "float"
+                        "type": "Decimal"
                     },
                     {
                         "alwaysask": false,
                         "attribute": false,
                         "autofill": false,
-                        "class": "Float",
+                        "class": "Decimal",
                         "cli_name": "loc_v_precision",
                         "cli_short_name": null,
                         "csv": false,
@@ -4296,19 +4665,24 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "locrecord",
                         "include": null,
                         "label": "LOC Vertical Precision",
-                        "maxvalue": 90000000.0,
-                        "minvalue": 0.0,
+                        "maxvalue": {
+                            "__base64__": ""
+                        },
+                        "minvalue": {
+                            "__base64__": ""
+                        },
                         "multivalue": false,
                         "name": "loc_part_v_precision",
                         "option_group": "LOC Record",
+                        "precision": 2,
                         "primary_key": false,
                         "query": false,
                         "required": false,
                         "sortorder": 2,
-                        "type": "float"
+                        "type": "Decimal"
                     },
                     {
                         "alwaysask": false,
@@ -4361,7 +4735,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "mxrecord",
                         "include": null,
                         "label": "MX Preference",
                         "maxvalue": 65535,
@@ -4392,7 +4766,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "mxrecord",
                         "include": null,
                         "label": "MX Exchanger",
                         "length": null,
@@ -4461,7 +4835,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "naptrrecord",
                         "include": null,
                         "label": "NAPTR Order",
                         "maxvalue": 65535,
@@ -4492,7 +4866,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "naptrrecord",
                         "include": null,
                         "label": "NAPTR Preference",
                         "maxvalue": 65535,
@@ -4523,7 +4897,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "naptrrecord",
                         "include": null,
                         "label": "NAPTR Flags",
                         "length": null,
@@ -4558,7 +4932,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "naptrrecord",
                         "include": null,
                         "label": "NAPTR Service",
                         "length": null,
@@ -4593,7 +4967,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "naptrrecord",
                         "include": null,
                         "label": "NAPTR Regular Expression",
                         "length": null,
@@ -4628,7 +5002,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "naptrrecord",
                         "include": null,
                         "label": "NAPTR Replacement",
                         "length": null,
@@ -4697,7 +5071,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "nsrecord",
                         "include": null,
                         "label": "NS Hostname",
                         "length": null,
@@ -4766,7 +5140,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "nsecrecord",
                         "include": null,
                         "label": "NSEC Next Domain Name",
                         "length": null,
@@ -4791,7 +5165,7 @@
                         "class": "StrEnum",
                         "cli_name": "nsec_types",
                         "cli_short_name": null,
-                        "csv": false,
+                        "csv": true,
                         "csv_separator": ",",
                         "csv_skipspace": true,
                         "default": null,
@@ -4801,7 +5175,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "nsecrecord",
                         "include": null,
                         "label": "NSEC Type Map",
                         "multivalue": true,
@@ -4973,7 +5347,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "ptrrecord",
                         "include": null,
                         "label": "PTR Hostname",
                         "length": null,
@@ -5042,7 +5416,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "rrsigrecord",
                         "include": null,
                         "label": "RRSIG Type Covered",
                         "multivalue": false,
@@ -5107,7 +5481,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "rrsigrecord",
                         "include": null,
                         "label": "RRSIG Algorithm",
                         "maxvalue": 255,
@@ -5138,7 +5512,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "rrsigrecord",
                         "include": null,
                         "label": "RRSIG Labels",
                         "maxvalue": 255,
@@ -5169,7 +5543,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "rrsigrecord",
                         "include": null,
                         "label": "RRSIG Original TTL",
                         "maxvalue": 2147483647,
@@ -5200,7 +5574,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "rrsigrecord",
                         "include": null,
                         "label": "RRSIG Signature Expiration",
                         "length": null,
@@ -5235,7 +5609,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "rrsigrecord",
                         "include": null,
                         "label": "RRSIG Signature Inception",
                         "length": null,
@@ -5270,7 +5644,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "rrsigrecord",
                         "include": null,
                         "label": "RRSIG Key Tag",
                         "maxvalue": 65535,
@@ -5301,7 +5675,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "rrsigrecord",
                         "include": null,
                         "label": "RRSIG Signer's Name",
                         "length": null,
@@ -5336,7 +5710,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "rrsigrecord",
                         "include": null,
                         "label": "RRSIG Signature",
                         "length": null,
@@ -5441,7 +5815,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "sigrecord",
                         "include": null,
                         "label": "SIG Type Covered",
                         "multivalue": false,
@@ -5506,7 +5880,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "sigrecord",
                         "include": null,
                         "label": "SIG Algorithm",
                         "maxvalue": 255,
@@ -5537,7 +5911,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "sigrecord",
                         "include": null,
                         "label": "SIG Labels",
                         "maxvalue": 255,
@@ -5568,7 +5942,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "sigrecord",
                         "include": null,
                         "label": "SIG Original TTL",
                         "maxvalue": 2147483647,
@@ -5599,7 +5973,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "sigrecord",
                         "include": null,
                         "label": "SIG Signature Expiration",
                         "length": null,
@@ -5634,7 +6008,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "sigrecord",
                         "include": null,
                         "label": "SIG Signature Inception",
                         "length": null,
@@ -5669,7 +6043,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "sigrecord",
                         "include": null,
                         "label": "SIG Key Tag",
                         "maxvalue": 65535,
@@ -5700,7 +6074,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "sigrecord",
                         "include": null,
                         "label": "SIG Signer's Name",
                         "length": null,
@@ -5735,7 +6109,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "sigrecord",
                         "include": null,
                         "label": "SIG Signature",
                         "length": null,
@@ -5840,7 +6214,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "srvrecord",
                         "include": null,
                         "label": "SRV Priority",
                         "maxvalue": 65535,
@@ -5871,7 +6245,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "srvrecord",
                         "include": null,
                         "label": "SRV Weight",
                         "maxvalue": 65535,
@@ -5902,7 +6276,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "srvrecord",
                         "include": null,
                         "label": "SRV Port",
                         "maxvalue": 65535,
@@ -5933,7 +6307,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "srvrecord",
                         "include": null,
                         "label": "SRV Target",
                         "length": null,
@@ -6002,7 +6376,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "sshfprecord",
                         "include": null,
                         "label": "SSHFP Algorithm",
                         "maxvalue": 255,
@@ -6033,7 +6407,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "sshfprecord",
                         "include": null,
                         "label": "SSHFP Fingerprint Type",
                         "maxvalue": 255,
@@ -6064,7 +6438,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "sshfprecord",
                         "include": null,
                         "label": "SSHFP Fingerprint",
                         "length": null,
@@ -6241,7 +6615,7 @@
                             "dnsrecord_part",
                             "virtual_attribute"
                         ],
-                        "hint": null,
+                        "hint": "txtrecord",
                         "include": null,
                         "label": "TXT Text Data",
                         "length": null,
@@ -6277,6 +6651,11 @@
                     "dsrecord",
                     "hinforecord",
                     "idnsallowdynupdate",
+                    "idnsallowquery",
+                    "idnsallowsyncptr",
+                    "idnsallowtransfer",
+                    "idnsforwarders",
+                    "idnsforwardpolicy",
                     "idnsname",
                     "idnssoaexpire",
                     "idnssoaminimum",
@@ -6318,6 +6697,10 @@
                     "idnssoaretry",
                     "idnssoaexpire",
                     "idnssoaminimum",
+                    "idnsallowquery",
+                    "idnsallowtransfer",
+                    "idnsforwarders",
+                    "idnsforwardpolicy",
                     "arecord",
                     "aaaarecord",
                     "a6record",
@@ -6843,6 +7226,170 @@
                             "TRUE"
                         ],
                         "type": "bool"
+                    },
+                    {
+                        "alwaysask": false,
+                        "attribute": false,
+                        "autofill": true,
+                        "class": "Str",
+                        "cli_name": "allow_query",
+                        "cli_short_name": null,
+                        "csv": false,
+                        "csv_separator": ",",
+                        "csv_skipspace": true,
+                        "default": "any",
+                        "doc": "Semicolon separated list of IP addresses or networks which are allowed to issue queries",
+                        "exclude": null,
+                        "flags": [],
+                        "hint": null,
+                        "include": null,
+                        "label": "Allow query",
+                        "length": null,
+                        "maxlength": null,
+                        "minlength": null,
+                        "multivalue": false,
+                        "name": "idnsallowquery",
+                        "noextrawhitespace": true,
+                        "option_group": null,
+                        "pattern": null,
+                        "pattern_errmsg": null,
+                        "primary_key": false,
+                        "query": false,
+                        "required": false,
+                        "sortorder": 2,
+                        "type": "unicode"
+                    },
+                    {
+                        "alwaysask": false,
+                        "attribute": false,
+                        "autofill": true,
+                        "class": "Str",
+                        "cli_name": "allow_transfer",
+                        "cli_short_name": null,
+                        "csv": false,
+                        "csv_separator": ",",
+                        "csv_skipspace": true,
+                        "default": "none",
+                        "doc": "Semicolon separated list of IP addresses or networks which are allowed to transfer the zone",
+                        "exclude": null,
+                        "flags": [],
+                        "hint": null,
+                        "include": null,
+                        "label": "Allow transfer",
+                        "length": null,
+                        "maxlength": null,
+                        "minlength": null,
+                        "multivalue": false,
+                        "name": "idnsallowtransfer",
+                        "noextrawhitespace": true,
+                        "option_group": null,
+                        "pattern": null,
+                        "pattern_errmsg": null,
+                        "primary_key": false,
+                        "query": false,
+                        "required": false,
+                        "sortorder": 2,
+                        "type": "unicode"
+                    },
+                    {
+                        "alwaysask": false,
+                        "attribute": false,
+                        "autofill": false,
+                        "class": "Str",
+                        "cli_name": "forwarder",
+                        "cli_short_name": null,
+                        "csv": true,
+                        "csv_separator": ",",
+                        "csv_skipspace": true,
+                        "default": null,
+                        "doc": "A list of zone forwarders",
+                        "exclude": null,
+                        "flags": [],
+                        "hint": null,
+                        "include": null,
+                        "label": "Zone forwarders",
+                        "length": null,
+                        "maxlength": null,
+                        "minlength": null,
+                        "multivalue": true,
+                        "name": "idnsforwarders",
+                        "noextrawhitespace": true,
+                        "option_group": null,
+                        "pattern": null,
+                        "pattern_errmsg": null,
+                        "primary_key": false,
+                        "query": false,
+                        "required": false,
+                        "sortorder": 2,
+                        "type": "unicode"
+                    },
+                    {
+                        "alwaysask": false,
+                        "attribute": false,
+                        "autofill": false,
+                        "class": "StrEnum",
+                        "cli_name": "forward_policy",
+                        "cli_short_name": null,
+                        "csv": false,
+                        "csv_separator": ",",
+                        "csv_skipspace": true,
+                        "default": null,
+                        "doc": "Forward policy",
+                        "exclude": null,
+                        "flags": [],
+                        "hint": null,
+                        "include": null,
+                        "label": "Forward policy",
+                        "multivalue": false,
+                        "name": "idnsforwardpolicy",
+                        "option_group": null,
+                        "primary_key": false,
+                        "query": false,
+                        "required": false,
+                        "sortorder": 2,
+                        "type": "unicode",
+                        "values": [
+                            "only",
+                            "first"
+                        ]
+                    },
+                    {
+                        "alwaysask": false,
+                        "attribute": false,
+                        "autofill": false,
+                        "class": "Bool",
+                        "cli_name": "allow_sync_ptr",
+                        "cli_short_name": null,
+                        "csv": false,
+                        "csv_separator": ",",
+                        "csv_skipspace": true,
+                        "default": null,
+                        "doc": "Allow synchronization of forward (A, AAAA) and reverse (PTR) records in the zone",
+                        "exclude": null,
+                        "falsehoods": [
+                            0,
+                            "0",
+                            "false",
+                            "FALSE"
+                        ],
+                        "flags": [],
+                        "hint": null,
+                        "include": null,
+                        "label": "Allow PTR sync",
+                        "multivalue": false,
+                        "name": "idnsallowsyncptr",
+                        "option_group": null,
+                        "primary_key": false,
+                        "query": false,
+                        "required": false,
+                        "sortorder": 2,
+                        "truths": [
+                            "1",
+                            1,
+                            "true",
+                            "TRUE"
+                        ],
+                        "type": "bool"
                     }
                 ],
                 "uuid_attribute": ""
@@ -8097,7 +8644,8 @@
                     "memberof",
                     "managedby",
                     "memberindirect",
-                    "memberofindirect"
+                    "memberofindirect",
+                    "macaddress"
                 ],
                 "hidden_attributes": [
                     "objectclass",
@@ -8520,6 +9068,38 @@
                         "required": false,
                         "sortorder": 2,
                         "type": "unicode"
+                    },
+                    {
+                        "alwaysask": false,
+                        "attribute": false,
+                        "autofill": false,
+                        "class": "Str",
+                        "cli_name": "macaddress",
+                        "cli_short_name": null,
+                        "csv": true,
+                        "csv_separator": ",",
+                        "csv_skipspace": true,
+                        "default": null,
+                        "doc": "Hardware MAC address(es) on this host",
+                        "exclude": null,
+                        "flags": [],
+                        "hint": null,
+                        "include": null,
+                        "label": "MAC address",
+                        "length": null,
+                        "maxlength": null,
+                        "minlength": null,
+                        "multivalue": true,
+                        "name": "macaddress",
+                        "noextrawhitespace": true,
+                        "option_group": null,
+                        "pattern": "^([a-fA-F0-9]{2}[:|\\-]?){5}[a-fA-F0-9]{2}$",
+                        "pattern_errmsg": "Must be of the form HH:HH:HH:HH:HH:HH, where each H is a hexadecimal character.",
+                        "primary_key": false,
+                        "query": false,
+                        "required": false,
+                        "sortorder": 2,
+                        "type": "unicode"
                     }
                 ],
                 "uuid_attribute": "ipauniqueid"
@@ -11281,6 +11861,7 @@
                 "default_attributes": [
                     "cn",
                     "ipaenabledflag",
+                    "externaluser",
                     "description",
                     "usercategory",
                     "hostcategory",
@@ -12502,7 +13083,7 @@
                     {
                         "alwaysask": false,
                         "attribute": false,
-                        "autofill": true,
+                        "autofill": false,
                         "class": "Str",
                         "cli_name": "homedir",
                         "cli_short_name": null,
@@ -12527,7 +13108,7 @@
                         "pattern_errmsg": null,
                         "primary_key": false,
                         "query": false,
-                        "required": true,
+                        "required": false,
                         "sortorder": 2,
                         "type": "unicode"
                     },
@@ -12573,7 +13154,7 @@
                         "csv": false,
                         "csv_separator": ",",
                         "csv_skipspace": true,
-                        "default": "/bin/sh",
+                        "default": null,
                         "doc": "Login shell",
                         "exclude": null,
                         "flags": [],
-- 
1.7.7.5

From bb41689aaf39afccbc8b1d58907cf081b7260456 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Voborn=C3=ADk?= <pvoborni redhat com>
Date: Fri, 10 Feb 2012 11:25:41 +0100
Subject: [PATCH] New checkboxes option: Mutual exclusive

Problem:
UI doesn't have a control for selecting one or none value from given set of values.

Solution:
Attribute mutex was added to checkboxes_widget. When it is set, checking some value causes that all other values are unchecked.

https://fedorahosted.org/freeipa/ticket/2351
---
 install/ui/widget.js |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/install/ui/widget.js b/install/ui/widget.js
index 3201dad7a4e78bf2afd38112d80b70602661a9f4..cc5f4f78eee3370dfa1f16ae3c56d7efa7d74646 100644
--- a/install/ui/widget.js
+++ b/install/ui/widget.js
@@ -665,6 +665,7 @@ IPA.checkboxes_widget = function (spec) {
 
     that.options = spec.options || [];
     that.direction = spec.direction || 'vertical';
+    that.mutex = spec.mutex;
 
     that.create = function(container) {
 
@@ -699,6 +700,15 @@ IPA.checkboxes_widget = function (spec) {
 
         var input = $('input[name="'+that.name+'"]', that.container);
         input.change(function() {
+
+            var checkbox = $(this);
+            var checked = checkbox.is(':checked');
+
+            if (that.mutex && checked) {
+                that.clear();
+                checkbox.attr('checked', true);
+            }
+
             that.value_changed.notify([that.save()], that);
         });
 
-- 
1.7.7.5

From cc9341a081b40e2711378941961e57ebc84f80d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Voborn=C3=ADk?= <pvoborni redhat com>
Date: Thu, 9 Feb 2012 17:21:09 +0100
Subject: [PATCH] DNS Zone UI: added new attributes

New attributes were added to DNS zone details facet.

Attributes:
    idnsallowquery
    idnsallowtransfer
    idnsforwarders
    idnsforwardpolicy
    idnsallowsyncptr

https://fedorahosted.org/freeipa/ticket/2351
---
 install/ui/dns.js                      |  168 ++++++++++++++++++++++++++++++++
 install/ui/field.js                    |    9 ++-
 install/ui/test/data/dnszone_show.json |   20 ++++
 install/ui/test/data/ipa_init.json     |    1 +
 install/ui/widget.js                   |    4 +-
 ipalib/plugins/internal.py             |    1 +
 6 files changed, 200 insertions(+), 3 deletions(-)

diff --git a/install/ui/dns.js b/install/ui/dns.js
index 5c6fc6c03e7287a3b8640525075fcb7eec838208..df2aacc93937a80edc2fc3945e084b917d11f634 100644
--- a/install/ui/dns.js
+++ b/install/ui/dns.js
@@ -96,6 +96,41 @@ IPA.dns.zone_entity = function(spec) {
                     {
                         type: 'textarea',
                         name: 'idnsupdatepolicy'
+                    },
+                    {
+                        type: 'netaddr',
+                        name: 'idnsallowquery',
+                        validators: [
+                            IPA.network_validator({
+                                specials: ['any', 'none',
+                                               'localhost', 'localnets'],
+                                allow_negation: true
+                        })]
+                    },
+                    {
+                        type: 'netaddr',
+                        name: 'idnsallowtransfer',
+                        validators: [
+                            IPA.network_validator({
+                                specials: ['any', 'none',
+                                               'localhost', 'localnets'],
+                                allow_negation: true
+                        })]
+                    },
+                    {
+                        type: 'multivalued',
+                        name: 'idnsforwarders',
+                        validators: [IPA.ip_address_validator()]
+                    },
+                    {
+                        type: 'checkboxes',
+                        name: 'idnsforwardpolicy',
+                        mutex: true,
+                        options: IPA.create_options(['only', 'first'])
+                    },
+                    {
+                        type: 'checkbox',
+                        name: 'idnsallowsyncptr'
                     }
                 ]
             }]
@@ -1816,6 +1851,78 @@ IPA.dns.record_type_table_widget = function(spec) {
 
 IPA.widget_factories['dnsrecord_type_table'] = IPA.dns.record_type_table_widget;
 
+IPA.dns.netaddr_field = function(spec) {
+
+    spec = spec || {};
+
+    var that = IPA.multivalued_field(spec);
+
+    that.load = function(record) {
+
+        that.record = record;
+
+        that.values = that.get_value(record, that.name);
+        that.values = that.values[0].split(';');
+
+        that.load_writable(record);
+
+        that.reset();
+    };
+
+    that.test_dirty = function() {
+
+        if (that.read_only) return false;
+
+        var values = that.field_save();
+
+        //check for empty value: null, [''], '', []
+        var orig_empty = that.is_empty(that.values);
+        var new_empty= that.is_empty(values);
+        if (orig_empty && new_empty) return false;
+        if (orig_empty != new_empty) return true;
+
+        //strict equality - checks object's ref equality, numbers, strings
+        if (values === that.values) return false;
+
+        //compare values in array
+        if (values.length !== that.values.length) return true;
+
+        for (var i=0; i<values.length; i++) {
+            if (values[i] != that.values[i]) {
+                return true;
+            }
+        }
+
+        return that.widget.test_dirty();
+    };
+
+    that.save = function(record) {
+
+        var values = that.field_save();
+        var new_val = values.join(';');
+
+        if (record) {
+            record[that.name] = new_val;
+        }
+
+        return [new_val];
+    };
+
+    that.validate = function() {
+
+        var values = that.field_save();
+
+        return that.validate_core(values);
+    };
+
+    return that;
+};
+
+IPA.field_factories['netaddr'] = IPA.dns.netaddr_field;
+IPA.widget_factories['netaddr'] = IPA.multivalued_widget;
+
+
+
 IPA.dns.record_modify_column = function(spec) {
 
     spec = spec || {};
@@ -2116,6 +2223,67 @@ IPA.ip_v6_address_validator = function(spec) {
     return IPA.ip_address_validator(spec);
 };
 
+IPA.network_validator = function(spec) {
+
+    spec = spec || {};
+
+    var that = IPA.validator(spec);
+
+    that.allow_negation = spec.allow_negation;
+    that.specials = spec.specials || [];
+    that.message = spec.message || IPA.messages.widget.validation.net_address;
+
+    that.false_result = function() {
+        return {
+            valid: false,
+            message: that.message
+        };
+    };
+
+    that.true_result = function() {
+        return {
+            valid: true
+        };
+    };
+
+    that.validate = function(value) {
+
+        if (typeof value !== 'string') return that.false_result();
+
+        if (that.specials.indexOf(value) > -1) {
+            return that.true_result();
+        }
+
+        if (value.indexOf('/') < 0) {
+            return that.false_result();
+        } else {
+            var parts = value.split('/');
+
+            if (parts.length != 2) return that.false_result();
+
+            var address_str = parts[0];
+            if (that.allow_negation && address_str.indexOf('!') === 0) {
+                address_str = address_str.substring(1);
+            }
+
+            var address = NET.ip_address(address_str);
+            if (!address.valid) return that.false_result();
+
+            var mask_length = 32;
+            if (address.type === 'v6') mask_length = 128;
+
+            var mask = parseInt(parts[1], 10);
+
+            if (isNaN(mask) || mask < 8 || mask > mask_length) {
+                return that.false_result();
+            }
+
+            return that.true_result();
+        }
+    };
+
+    return that;
+};
 
 IPA.register('dnszone', IPA.dns.zone_entity);
 IPA.register('dnsrecord', IPA.dns.record_entity);
diff --git a/install/ui/field.js b/install/ui/field.js
index 46802be6cf9089a9eb75c338512fc7a775dea4b1..2922ce0fb0b76f5a4f30fee9e498d8275eeed819 100644
--- a/install/ui/field.js
+++ b/install/ui/field.js
@@ -550,11 +550,16 @@ IPA.multivalued_field = function(spec) {
 
     that.validate = function() {
 
+        var values = that.save();
+
+        return that.validate_core(values);
+    };
+
+    that.validate_core = function(values) {
+
         that.hide_error();
         that.valid = true;
 
-        var values = that.save();
-
         if (that.is_empty(values)) {
             return that.valid;
         }
diff --git a/install/ui/test/data/dnszone_show.json b/install/ui/test/data/dnszone_show.json
index b7d5b87b27b0a6612ff4c598b5cacaabe2ef7f92..b113f7d4eebe6f9d74b959a7706c7c78123fdd68 100644
--- a/install/ui/test/data/dnszone_show.json
+++ b/install/ui/test/data/dnszone_show.json
@@ -18,6 +18,11 @@
                 "dsrecord": "rscwo",
                 "hinforecord": "rscwo",
                 "idnsallowdynupdate": "rscwo",
+                "idnsallowquery": "rscwo",
+                "idnsallowsyncptr": "rscwo",
+                "idnsallowtransfer": "rscwo",
+                "idnsforwarders": "rscwo",
+                "idnsforwardpolicy": "rscwo",
                 "idnsname": "rscwo",
                 "idnssoaexpire": "rscwo",
                 "idnssoaminimum": "rscwo",
@@ -51,6 +56,21 @@
             "idnsallowdynupdate": [
                 "FALSE"
             ],
+            "idnsallowquery": [
+                "any"
+            ],
+            "idnsallowsyncptr": [
+                "TRUE"
+            ],
+            "idnsallowtransfer": [
+                "none"
+            ],
+            "idnsforwarders": [
+                "2003:beef::24"
+            ],
+            "idnsforwardpolicy": [
+                "only"
+            ],
             "idnsname": [
                 "example.com"
             ],
diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json
index 740307f7afbfc72b2eef8400d72bafbcef4ff1c9..4afa891b951d2a4aec17ddd38714533eaa78ebe4 100644
--- a/install/ui/test/data/ipa_init.json
+++ b/install/ui/test/data/ipa_init.json
@@ -429,6 +429,7 @@
                             "ip_v6_address": "Not a valid IPv6 address",
                             "max_value": "Maximum value is ${value}",
                             "min_value": "Minimum value is ${value}",
+                            "net_address": "Not a valid network address",
                             "required": "Required field"
                         }
                     }
diff --git a/install/ui/widget.js b/install/ui/widget.js
index cc5f4f78eee3370dfa1f16ae3c56d7efa7d74646..5ce7261e821f96a3ed8938c3b13968851e74a72e 100644
--- a/install/ui/widget.js
+++ b/install/ui/widget.js
@@ -533,10 +533,12 @@ IPA.multivalued_widget = function(spec) {
 
     that.test_dirty_row = function(row) {
 
-        if(row.deleted || row.is_new) return true;
+        if (row.deleted || row.is_new) return true;
 
         var values = row.widget.save();
 
+        if (row.original_values.length !== values.length) return true;
+
         for (var i=0; i<values.length; i++) {
             if (values[i] !== row.original_values[i]) {
                 return true;
diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py
index 8623e61a836a5e6310e560ffc5277c101beb636e..cdafc1de4b08d64ca24d96c0affe36d59efbc2eb 100644
--- a/ipalib/plugins/internal.py
+++ b/ipalib/plugins/internal.py
@@ -568,6 +568,7 @@ class i18n_messages(Command):
                 "ip_v6_address": _('Not a valid IPv6 address'),
                 "max_value": _("Maximum value is ${value}"),
                 "min_value": _("Minimum value is ${value}"),
+                "net_address": _("Not a valid network address"),
                 "required": _("Required field"),
             },
         },
-- 
1.7.7.5

From c7c5b78b20ff7db78c384b9355835c40844761a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Voborn=C3=ADk?= <pvoborni redhat com>
Date: Fri, 10 Feb 2012 15:38:13 +0100
Subject: [PATCH] DNS UI: added A,AAAA create reverse options to adder dialog

To DNS record adder dialog were added a_extra_create_reverse and aaaa_extra_create_reverse options.

It's UI part of #2009.

https://fedorahosted.org/freeipa/ticket/2349
---
 install/ui/dns.js |   61 +++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 41 insertions(+), 20 deletions(-)

diff --git a/install/ui/dns.js b/install/ui/dns.js
index df2aacc93937a80edc2fc3945e084b917d11f634..60254971eb293f5b6dfe4b55148bde054f4db25e 100644
--- a/install/ui/dns.js
+++ b/install/ui/dns.js
@@ -615,6 +615,10 @@ IPA.dns.get_record_metadata = function() {
                 {
                     name: 'a_part_ip_address',
                     validators: [IPA.ip_v4_address_validator()]
+                },
+                {
+                    type: 'checkbox',
+                    name: 'a_extra_create_reverse'
                 }
             ],
             columns: [
@@ -630,6 +634,10 @@ IPA.dns.get_record_metadata = function() {
                 {
                     name:'aaaa_part_ip_address',
                     validators: [IPA.ip_v6_address_validator()]
+                },
+                {
+                    type: 'checkbox',
+                    name: 'aaaa_extra_create_reverse'
                 }
             ],
             columns: [
@@ -1126,7 +1134,7 @@ IPA.dns.extend_spec = function(spec, fields, widgets) {
     }
 };
 
-IPA.dns.record_prepare_editor_for_type = function(type, fields, widgets) {
+IPA.dns.record_prepare_editor_for_type = function(type, fields, widgets, update) {
 
     var set_defined = function(property, object, name) {
         if (property !== undefined) {
@@ -1150,19 +1158,27 @@ IPA.dns.record_prepare_editor_for_type = function(type, fields, widgets) {
     for (var i=0; i<type.attributes.length;i++) {
         var attribute = type.attributes[i];
 
+        if (typeof attribute === 'string') {
+            attribute = {
+                name: attribute
+            };
+        }
+
+        var metadata = IPA.get_entity_param('dnsrecord', attribute.name);
+        if (metadata && update && metadata.flags &&
+            metadata.flags.indexOf('no_update') > -1) continue;
+
         //create field
         var field = {};
-        if (typeof attribute === 'string') {
-            field.name = attribute;
-        } else {
-            field.name = attribute.name;
-            field.label = attribute.label ||
-                            IPA.dns.record_get_attr_label(attribute.name);
-            set_defined(attribute.type, field, 'type');
-            set_defined(attribute.validators, field, 'validators');
-            set_defined(attribute.required, field, 'required');
-            copy_obj(widget, attribute.field_opt);
-        }
+
+        field.name = attribute.name;
+        field.label = attribute.label ||
+                        IPA.dns.record_get_attr_label(attribute.name);
+        set_defined(attribute.type, field, 'type');
+        set_defined(attribute.validators, field, 'validators');
+        set_defined(attribute.required, field, 'required');
+        copy_obj(widget, attribute.field_opt);
+
         field.widget = type.name+'.'+field.name;
         fields.push(field);
 
@@ -1295,6 +1311,9 @@ IPA.dns.record_get_attr_label = function(part_name) {
     if (part_name.indexOf('_part_') > -1) {
 
         label = label.substring(label.indexOf(' '));
+    } else if (part_name.indexOf('_extra_') > -1) {
+
+        label = label.substring(label.indexOf(' '));
     }
 
     return label;
@@ -1374,16 +1393,18 @@ IPA.dnsrecord_adder_dialog_type_policy = function(spec) {
         var fields = that.container.fields.get_fields();
 
         for (var i=0; i<fields.length; i++) {
-            var field = fields[i];
 
+            var field = fields[i];
             var fieldtype;
-            var index = field.name.indexOf('_part_');
-            if (index > -1) {
-                fieldtype = field.name.substring(0, index);
-            } else {
-                fieldtype = field.name.substring(0, field.name.indexOf('record'));
-            }
+            var attr_types = ['_part_', '_extra_', 'record'];
 
+            for (var j=0; j<attr_types.length; j++) {
+                var index = field.name.indexOf(attr_types[j]);
+                if (index > -1) {
+                    fieldtype = field.name.substring(0, index);
+                    break;
+                }
+            }
 
             field.enabled = (field.name === 'idnsname' ||
                 field.name === that.type_field_name ||
@@ -1738,7 +1759,7 @@ IPA.dns.record_type_table_widget = function(spec) {
         var type = IPA.dns.get_record_type(dnstype+'record');
 
         IPA.dns.record_prepare_editor_for_type(type, dialog_spec.fields,
-                                               dialog_spec.widgets);
+                                               dialog_spec.widgets, true);
 
         var dialog = IPA.entity_adder_dialog(dialog_spec);
 
-- 
1.7.7.5

From 252711dc5dad65a2e5b3691d0eb00ce9ea34c467 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Voborn=C3=ADk?= <pvoborni redhat com>
Date: Fri, 10 Feb 2012 16:32:43 +0100
Subject: [PATCH] Fixed displaying of A6 Record

UI was modified to reflect changes in #2309.

Now it uses a6_part_data attribute instead of a6record. This fixes displaying of values in a table and modification of existing A6 record.

https://fedorahosted.org/freeipa/ticket/2367
---
 install/ui/dns.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/install/ui/dns.js b/install/ui/dns.js
index 60254971eb293f5b6dfe4b55148bde054f4db25e..f2ccdaa155309d84c94976acffe818855a410bca 100644
--- a/install/ui/dns.js
+++ b/install/ui/dns.js
@@ -650,9 +650,9 @@ IPA.dns.get_record_metadata = function() {
         {
             name: 'a6record',
             attributes: [
-                'a6record'
+                'a6_part_data'
             ],
-            columns: ['a6record']
+            columns: ['a6_part_data']
         },
         {
             name: 'afsdbrecord',
-- 
1.7.7.5

From cae4a272ad229fe46880032a140926eebf9fdd03 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Voborn=C3=ADk?= <pvoborni redhat com>
Date: Wed, 15 Feb 2012 15:00:16 +0100
Subject: [PATCH] New UI for DNS global configuration

UI for DNS global configuration was implemented.

https://fedorahosted.org/freeipa/ticket/2350
---
 install/ui/dns.js                        |   30 +++++++++++++++++++++++++++
 install/ui/navigation.js                 |    4 +-
 install/ui/test/data/dnsconfig_mod.json  |   32 +++++++++++++++++++++++++++++
 install/ui/test/data/dnsconfig_show.json |   33 ++++++++++++++++++++++++++++++
 install/ui/test/data/ipa_init.json       |    3 ++
 install/ui/webui.js                      |   13 +++++------
 ipalib/plugins/internal.py               |    3 ++
 7 files changed, 109 insertions(+), 9 deletions(-)
 create mode 100644 install/ui/test/data/dnsconfig_mod.json
 create mode 100644 install/ui/test/data/dnsconfig_show.json

diff --git a/install/ui/dns.js b/install/ui/dns.js
index f2ccdaa155309d84c94976acffe818855a410bca..21dfc84f86cbdfab49ab1dea0777366d7d58d4e9 100644
--- a/install/ui/dns.js
+++ b/install/ui/dns.js
@@ -28,6 +28,35 @@
 
 IPA.dns = {};
 
+IPA.dns.config_entity = function(spec) {
+
+    var that = IPA.entity(spec);
+
+    that.init = function() {
+        that.entity_init();
+
+        that.builder.details_facet({
+            title: IPA.metadata.objects.config.label,
+            sections: [
+                {
+                    name: 'options',
+                    label: IPA.messages.objects.dnsconfig.options,
+                    fields: [
+                        {
+                            type: 'multivalued',
+                            name: 'idnsforwarders',
+                            validators: [IPA.ip_address_validator()]
+                        }
+                    ]
+                }
+            ],
+            needs_update: true
+        });
+    };
+
+    return that;
+};
+
 IPA.dns.zone_entity = function(spec) {
 
     var that = IPA.entity(spec);
@@ -2306,5 +2335,6 @@ IPA.network_validator = function(spec) {
     return that;
 };
 
+IPA.register('dnsconfig', IPA.dns.config_entity);
 IPA.register('dnszone', IPA.dns.zone_entity);
 IPA.register('dnsrecord', IPA.dns.record_entity);
diff --git a/install/ui/navigation.js b/install/ui/navigation.js
index 72c91426803661ee26ee794f1f16ffcde6393459..a4ad289809d984be470a8d7874a9774965539bd2 100644
--- a/install/ui/navigation.js
+++ b/install/ui/navigation.js
@@ -408,8 +408,8 @@ IPA.navigation = function(spec) {
         container.tabs('select', index);
 
         var tab = tabs[index];
-        if (tab.hidden) {
-            depth--;
+        if (tab.depth !== undefined) {
+            depth += tab.depth;
         }
 
         if (tab.children && tab.children.length) {
diff --git a/install/ui/test/data/dnsconfig_mod.json b/install/ui/test/data/dnsconfig_mod.json
new file mode 100644
index 0000000000000000000000000000000000000000..e82e0735ed89439e29fed19c188f088e22cc0bc9
--- /dev/null
+++ b/install/ui/test/data/dnsconfig_mod.json
@@ -0,0 +1,32 @@
+{
+    "error": null,
+    "id": null,
+    "result": {
+        "result": {
+            "attributelevelrights": {
+                "aci": "rscwo",
+                "cn": "rscwo",
+                "idnsallowsyncptr": "rscwo",
+                "idnsforwarders": "rscwo",
+                "idnsforwardpolicy": "rscwo",
+                "idnspersistentsearch": "rscwo",
+                "idnszonerefresh": "rscwo",
+                "nsaccountlock": "rscwo",
+                "objectclass": "rscwo"
+            },
+            "cn": [
+                "dns"
+            ],
+            "idnsforwarders": [
+                "2001:beef::1"
+            ],
+            "objectclass": [
+                "idnsConfigObject",
+                "nsContainer",
+                "top"
+            ]
+        },
+        "summary": null,
+        "value": ""
+    }
+}
\ No newline at end of file
diff --git a/install/ui/test/data/dnsconfig_show.json b/install/ui/test/data/dnsconfig_show.json
new file mode 100644
index 0000000000000000000000000000000000000000..e663abcc8b4c63d3a99e6de6f4e40a93e127ab1b
--- /dev/null
+++ b/install/ui/test/data/dnsconfig_show.json
@@ -0,0 +1,33 @@
+{
+    "error": null,
+    "id": null,
+    "result": {
+        "result": {
+            "attributelevelrights": {
+                "aci": "rscwo",
+                "cn": "rscwo",
+                "idnsallowsyncptr": "rscwo",
+                "idnsforwarders": "rscwo",
+                "idnsforwardpolicy": "rscwo",
+                "idnspersistentsearch": "rscwo",
+                "idnszonerefresh": "rscwo",
+                "nsaccountlock": "rscwo",
+                "objectclass": "rscwo"
+            },
+            "cn": [
+                "dns"
+            ],
+            "dn": "cn=dns,dc=dev,dc=example,dc=com",
+            "idnsforwarders": [
+                "2001:beef::1"
+            ],
+            "objectclass": [
+                "idnsConfigObject",
+                "nsContainer",
+                "top"
+            ]
+        },
+        "summary": null,
+        "value": ""
+    }
+}
\ No newline at end of file
diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json
index 4afa891b951d2a4aec17ddd38714533eaa78ebe4..8bed77e124a4fdd97c5f0ab911a0a08d36ae5047 100644
--- a/install/ui/test/data/ipa_init.json
+++ b/install/ui/test/data/ipa_init.json
@@ -182,6 +182,9 @@
                             "user": "User Options"
                         },
                         "delegation": {},
+                        "dnsconfig": {
+                            "options": "Options"
+                        },
                         "dnsrecord": {
                             "data": "Data",
                             "deleted_no_data": "DNS record was deleted because it contained no data.",
diff --git a/install/ui/webui.js b/install/ui/webui.js
index 6850ff5aa46179fd4cd4a40eb72e3a2e48cbb8f5..b8394d289dfbb7b35c09f1589a0fc59690ddeb5c 100644
--- a/install/ui/webui.js
+++ b/install/ui/webui.js
@@ -40,10 +40,9 @@ IPA.admin_navigation = function(spec) {
             {entity: 'hostgroup'},
             {entity: 'netgroup'},
             {entity: 'service'},
-            {name:'dns',
-             label: IPA.messages.tabs.dns,
-             children:[
-                 {entity: 'dnszone', hidden:true},
+            {name:'dns', label: IPA.messages.tabs.dns, children:[
+                 {entity: 'dnszone'},
+                 {entity: 'dnsconfig'},
                  {entity: 'dnsrecord', hidden:true}
              ]
             }
@@ -63,9 +62,9 @@ IPA.admin_navigation = function(spec) {
             {name:'automount',
              label: IPA.messages.tabs.automount,
              children:[
-                {entity: 'automountlocation', hidden:true},
-                {entity: 'automountmap', hidden: true},
-                {entity: 'automountkey', hidden: true}]},
+                {entity: 'automountlocation', hidden:true, depth: -1},
+                {entity: 'automountmap', hidden: true, depth: -1},
+                {entity: 'automountkey', hidden: true, depth: -1}]},
             {entity: 'pwpolicy'},
             {entity: 'krbtpolicy'},
             {entity: 'selinuxusermap'},
diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py
index cdafc1de4b08d64ca24d96c0affe36d59efbc2eb..b8d702ce15f7059eb87291e725e077b525dbd259 100644
--- a/ipalib/plugins/internal.py
+++ b/ipalib/plugins/internal.py
@@ -319,6 +319,9 @@ class i18n_messages(Command):
             },
             "delegation": {
             },
+            "dnsconfig": {
+                "options": _("Options"),
+            },
             "dnsrecord": {
                 "data": _("Data"),
                 "deleted_no_data": _("DNS record was deleted because it contained no data."),
-- 
1.7.7.5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]