From 1d2c9745fdeda9817022fe9386750197500ae9ec Mon Sep 17 00:00:00 2001
From: Adam Young <ayo...@redhat.com>
Date: Mon, 20 Jun 2011 12:04:02 -0400
Subject: [PATCH] ipaddress for host add

updated label triggered an API change
---
 API.txt                            |    2 +-
 install/ui/host.js                 |   10 ++++-
 install/ui/test/data/ipa_init.json |   68 +++++++++++++++++++++++++----------
 ipalib/plugins/host.py             |    1 +
 4 files changed, 58 insertions(+), 23 deletions(-)

diff --git a/API.txt b/API.txt
index 87a6e79ceb4b662ed07c614acc2eac3f645e9272..17a470bf421a94211ec9f316ae9eceb042c088a2 100644
--- a/API.txt
+++ b/API.txt
@@ -1286,7 +1286,7 @@ option: Flag('random', attribute=True, autofill=True, cli_name='random', default
 option: Bytes('usercertificate', validate_certificate, attribute=True, cli_name='certificate', label=Gettext('Certificate', domain='ipa', localedir=None), multivalue=False, required=False)
 option: Flag('force', autofill=True, default=False, label=Gettext('Force', domain='ipa', localedir=None))
 option: Flag('no_reverse', autofill=True, default=False)
-option: Str('ip_address?', validate_ipaddr)
+option: Str('ip_address?', validate_ipaddr, label=Gettext('IP Address', domain='ipa', localedir=None))
 option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui', flags=['no_output'])
 option: Flag('raw', autofill=True, cli_name='raw', default=False, exclude='webui', flags=['no_output'])
 option: Str('version?', exclude='webui', flags=['no_option', 'no_output'])
diff --git a/install/ui/host.js b/install/ui/host.js
index bd149178e452bf8c77eecedec7f0d899154b3a67..702d0cb833908083feeb5334fef3d3aaab53552b 100644
--- a/install/ui/host.js
+++ b/install/ui/host.js
@@ -98,8 +98,14 @@ IPA.entity_factories.host = function () {
                     editable: true,
                     undo: false
                 },
-                {factory:IPA.force_host_add_checkbox_widget}
-            ] 
+                {factory:IPA.force_host_add_checkbox_widget},
+                {
+                    factory:IPA.text_widget,
+                    name:"ip_address",
+                    undo:false,
+                    label:  IPA.get_method_option('host_add','ip_address')['label']
+                }
+            ]
         }).
         build();
 };
diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json
index b7df777976d5f57b5009e3f22d7ea87f92776917..b74e1b41a4d35dd68b83b6239f772649e2c79e0a 100644
--- a/install/ui/test/data/ipa_init.json
+++ b/install/ui/test/data/ipa_init.json
@@ -169,7 +169,7 @@
                                 "pattern_errmsg": null,
                                 "primary_key": false,
                                 "query": false,
-                                "required": true,
+                                "required": false,
                                 "type": "unicode"
                             }
                         ]
@@ -429,7 +429,7 @@
                                 "pattern_errmsg": null,
                                 "primary_key": false,
                                 "query": false,
-                                "required": true,
+                                "required": false,
                                 "type": "unicode"
                             }
                         ]
@@ -3855,7 +3855,7 @@
                                 "flags": [],
                                 "hint": null,
                                 "include": null,
-                                "label": "<ip_address>",
+                                "label": "IP Address",
                                 "length": null,
                                 "maxlength": null,
                                 "minlength": null,
@@ -7288,7 +7288,7 @@
                                 "pattern_errmsg": null,
                                 "primary_key": false,
                                 "query": false,
-                                "required": false,
+                                "required": true,
                                 "type": "unicode"
                             }
                         ]
@@ -10371,12 +10371,16 @@
                             "memberof": [
                                 "group",
                                 "netgroup",
-                                "role"
+                                "role",
+                                "hbacrule",
+                                "sudorule"
                             ],
                             "memberofindirect": [
                                 "group",
                                 "netgroup",
-                                "role"
+                                "role",
+                                "hbacrule",
+                                "sudorule"
                             ]
                         },
                         "bindable": false,
@@ -11348,15 +11352,22 @@
                             "managedby": [
                                 "host"
                             ],
+                            "managing": [
+                                "host"
+                            ],
                             "memberof": [
                                 "hostgroup",
                                 "netgroup",
-                                "role"
+                                "role",
+                                "hbacrule",
+                                "sudorule"
                             ],
                             "memberofindirect": [
                                 "hostgroup",
                                 "netgroup",
-                                "role"
+                                "role",
+                                "hbacrule",
+                                "sudorule"
                             ]
                         },
                         "bindable": true,
@@ -11416,6 +11427,11 @@
                                 "man_by_",
                                 "not_man_by_"
                             ],
+                            "managing": [
+                                "Managing",
+                                "man_",
+                                "not_man_"
+                            ],
                             "memberof": [
                                 "Member Of",
                                 "in_",
@@ -11751,11 +11767,15 @@
                                 "hostgroup"
                             ],
                             "memberof": [
-                                "hostgroup"
+                                "hostgroup",
+                                "hbacrule",
+                                "sudorule"
                             ],
                             "memberofindirect": [
                                 "host",
-                                "hostgroup"
+                                "hostgroup",
+                                "hbacrule",
+                                "sudorule"
                             ]
                         },
                         "bindable": false,
@@ -13751,7 +13771,8 @@
                             "memberuser",
                             "memberhost",
                             "memberallowcmd",
-                            "memberdenycmd"
+                            "memberdenycmd",
+                            "ipasudoopt"
                         ],
                         "hidden_attributes": [
                             "objectclass",
@@ -14491,12 +14512,16 @@
                             "memberof": [
                                 "group",
                                 "netgroup",
-                                "role"
+                                "role",
+                                "hbacrule",
+                                "sudorule"
                             ],
                             "memberofindirect": [
                                 "group",
                                 "netgroup",
-                                "role"
+                                "role",
+                                "hbacrule",
+                                "sudorule"
                             ]
                         },
                         "bindable": true,
@@ -14507,6 +14532,9 @@
                             "sn",
                             "homedirectory",
                             "loginshell",
+                            "uidnumber",
+                            "gidnumber",
+                            "mail",
                             "ou",
                             "telephonenumber",
                             "title",
@@ -15594,30 +15622,30 @@
                             "Administrator"
                         ],
                         "gidnumber": [
-                            "469800000"
+                            "1488000000"
                         ],
                         "homedirectory": [
                             "/home/admin"
                         ],
                         "ipauniqueid": [
-                            "31758798-8707-11e0-9000-525400b55a47"
+                            "8c37adc4-9949-11e0-a3ce-525400b55a47"
                         ],
                         "krbextradata": [
                             {
-                                "__base64__": "AAIiXN1Ncm9vdC9hZG1pbkBTRVJWRVIxNS5BWU9VTkcuQk9TVE9OLkRFVkVMLlJFREhBVC5DT00A"
+                                "__base64__": "AAJl/vtNcm9vdC9hZG1pbkBTRVJWRVIxNS5BWU9VTkcuQk9TVE9OLkRFVkVMLlJFREhBVC5DT00A"
                             },
                             {
                                 "__base64__": "AAgBAA=="
                             }
                         ],
                         "krblastpwdchange": [
-                            "20110525194434Z"
+                            "20110618012453Z"
                         ],
                         "krblastsuccessfulauth": [
-                            "20110525211013Z"
+                            "20110620185940Z"
                         ],
                         "krbpasswordexpiration": [
-                            "20110823194434Z"
+                            "20110916012453Z"
                         ],
                         "krbprincipalname": [
                             "ad...@server15.ayoung.boston.devel.redhat.com"
@@ -15647,7 +15675,7 @@
                             "admin"
                         ],
                         "uidnumber": [
-                            "469800000"
+                            "1488000000"
                         ]
                     }
                 ],
diff --git a/ipalib/plugins/host.py b/ipalib/plugins/host.py
index 5d6a23f4221c405ecf8d59e6ba3afcf6daeda6a3..7a710528a7c3f35ffe2fe188006e7b3bc3a7152a 100644
--- a/ipalib/plugins/host.py
+++ b/ipalib/plugins/host.py
@@ -346,6 +346,7 @@ class host_add(LDAPCreate):
         ),
         Str('ip_address?', validate_ipaddr,
             doc=_('Add the host to DNS with this IP address'),
+            label=_('IP Address'),
         ),
     )
 
-- 
1.7.5.2

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to