From 80b651cdf18270d778c141af1fdcb1d86dccd250 Mon Sep 17 00:00:00 2001
From: Adam Young <ayo...@redhat.com>
Date: Thu, 18 Nov 2010 16:48:23 -0500
Subject: [PATCH] env init
 call the json rpc 'env' during ipa init and cache the result

---
 install/static/ipa.js               |    6 ++-
 install/static/test/data/batch.json |   90 ++++++++++++++++++++++++++++++++--
 2 files changed, 88 insertions(+), 8 deletions(-)

diff --git a/install/static/ipa.js b/install/static/ipa.js
index 9b0106b9225014f75013a98106b5ac52a13ed8e3..014ffbd0bc708b225fb309571b1d120cd7e09c38 100644
--- a/install/static/ipa.js
+++ b/install/static/ipa.js
@@ -76,12 +76,13 @@ var IPA = ( function () {
         $.ajaxSetup(that.ajax_options);
 
 
-        var startup_batch = 
+        var startup_batch =
             [
                 {"method":"json_metadata","params":[[],{}]},
                 {"method":"i18n_messages","params":[[],{}]},
                 {"method":"user_find","params":[[],{
-                    "whoami":"true","all":"true"}]}
+                    "whoami":"true","all":"true"}]},
+                {"method":"env","params":[[],{}]}
             ];
 
 
@@ -90,6 +91,7 @@ var IPA = ( function () {
                 that.metadata = data.result.results[0].metadata;
                 that.messages = data.result.results[1].messages;
                 that.whoami  = data.result.results[2].result[0];
+                that.env = data.result.results[2].result;
                 if (on_success) {
                     on_success(data, text_status, xhr);
                 }
diff --git a/install/static/test/data/batch.json b/install/static/test/data/batch.json
index 15a59e3c9488d122e5c07e2a0b18acc1c7f550f9..e32898cea8cf3348bd167934ab2af50efd6a503d 100644
--- a/install/static/test/data/batch.json
+++ b/install/static/test/data/batch.json
@@ -2,7 +2,7 @@
     "error": null,
     "id": 1,
     "result": {
-        "count": 3,
+        "count": 4,
         "results": [
             {
                 "error": null,
@@ -2528,6 +2528,9 @@
                         ],
                         "uuid_attribute": "ipauniqueid"
                     },
+                    "pkinit": {
+                        "__base64__": ""
+                    },
                     "pwpolicy": {
                         "attribute_members": {},
                         "container_dn": "cn=AYOUNG.BOSTON.DEVEL.REDHAT.COM,cn=kerberos",
@@ -4114,19 +4117,19 @@
                             "Administrator"
                         ],
                         "gidnumber": [
-                            "2002517652"
+                            "1010626268"
                         ],
                         "homedirectory": [
                             "/home/admin"
                         ],
                         "ipauniqueid": [
-                            "30e47399-ee4011df-92b88382-0dfb6bc8"
+                            "73321718-f35011df-8e89dc8d-0b6df103"
                         ],
                         "krblastpwdchange": [
-                            "20101112093732Z"
+                            "20101118201738Z"
                         ],
                         "krbpasswordexpiration": [
-                            "20110210093732Z"
+                            "20110216201738Z"
                         ],
                         "krbprincipalname": [
                             "ad...@ayoung.boston.devel.redhat.com"
@@ -4167,12 +4170,87 @@
                             "admin"
                         ],
                         "uidnumber": [
-                            "2002517652"
+                            "1010626268"
                         ]
                     }
                 ],
                 "summary": "1 user matched",
                 "truncated": false
+            },
+            {
+                "count": 67,
+                "error": null,
+                "result": {
+                    "basedn": "dc=ayoung,dc=boston,dc=devel,dc=redhat,dc=com",
+                    "bin": "/home/ayoung/devel/freeipa",
+                    "ca_agent_port": 9443,
+                    "ca_ee_port": 9444,
+                    "ca_host": "ipa.ayoung.boston.devel.redhat.com",
+                    "ca_port": 9180,
+                    "conf": "/root/.ipa/lite.conf",
+                    "conf_default": "/root/.ipa/default.conf",
+                    "confdir": "/root/.ipa",
+                    "config_loaded": true,
+                    "container_accounts": "cn=accounts",
+                    "container_applications": "cn=applications,cn=configs,cn=policies",
+                    "container_automount": "cn=automount",
+                    "container_configs": "cn=configs,cn=policies",
+                    "container_dns": "cn=dns",
+                    "container_group": "cn=groups,cn=accounts",
+                    "container_hbac": "cn=hbac",
+                    "container_hbacservice": "cn=hbacservices,cn=accounts",
+                    "container_hbacservicegroup": "cn=hbacservicegroups,cn=accounts",
+                    "container_host": "cn=computers,cn=accounts",
+                    "container_hostgroup": "cn=hostgroups,cn=accounts",
+                    "container_netgroup": "cn=ng,cn=alt",
+                    "container_policies": "cn=policies",
+                    "container_policygroups": "cn=policygroups,cn=configs,cn=policies",
+                    "container_policylinks": "cn=policylinks,cn=configs,cn=policies",
+                    "container_rolegroup": "cn=rolegroups,cn=accounts",
+                    "container_roles": "cn=roles,cn=policies",
+                    "container_service": "cn=services,cn=accounts",
+                    "container_sudocmd": "cn=sudocmds,cn=accounts",
+                    "container_sudocmdgroup": "cn=sudocmdgroups,cn=accounts",
+                    "container_sudorule": "cn=sudorules",
+                    "container_taskgroup": "cn=taskgroups,cn=accounts",
+                    "container_user": "cn=users,cn=accounts",
+                    "container_virtual": "cn=virtual operations",
+                    "context": "lite",
+                    "debug": false,
+                    "domain": "ayoung.boston.devel.redhat.com",
+                    "dot_ipa": "/root/.ipa",
+                    "enable_ra": true,
+                    "fallback": true,
+                    "home": "/root",
+                    "host": "ipa.ayoung.boston.devel.redhat.com",
+                    "in_server": true,
+                    "in_tree": true,
+                    "interactive": true,
+                    "ipalib": "/home/ayoung/devel/freeipa/ipalib",
+                    "ldap_uri": "ldapi://%2fvar%2frun%2fslapd-AYOUNG-BOSTON-DEVEL-REDHAT-COM.socket",
+                    "lite_host": "127.0.0.1",
+                    "lite_pem": "/root/.ipa/lite.pem",
+                    "lite_port": 8888,
+                    "log": "/root/.ipa/log/lite.log",
+                    "logdir": "/root/.ipa/log",
+                    "mode": "production",
+                    "mount_ipa": "/ipa/",
+                    "mount_jsonserver": "json",
+                    "mount_xmlserver": "xml",
+                    "prompt_all": false,
+                    "ra_plugin": "selfsign",
+                    "realm": "AYOUNG.BOSTON.DEVEL.REDHAT.COM",
+                    "rpc_json_uri": "http://localhost:8888/ipa/json";,
+                    "script": "/home/ayoung/devel/freeipa/lite-server.py",
+                    "site_packages": "/home/ayoung/devel/freeipa",
+                    "startup_traceback": true,
+                    "verbose": 0,
+                    "webui_assets_dir": null,
+                    "webui_prod": true,
+                    "xmlrpc_uri": "http://localhost:8888/ipa/xml";
+                },
+                "summary": "67 variables",
+                "total": 67
             }
         ]
     }
-- 
1.7.2.3

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

Reply via email to