[Freeipa-devel] [PATCH] Fix attribute callbacks on details pages in the webUI.

2010-10-06 Thread Pavel Zuna

Fixes bug reported by Adam in internal discussion.

Ticket #326

Pavel
From 4ca5f618913d780e018e37e03b159201bffb9996 Mon Sep 17 00:00:00 2001
From: Pavel Zuna pz...@redhat.com
Date: Wed, 6 Oct 2010 12:01:02 -0400
Subject: [PATCH] Fix attribute callbacks on details pages in the webUI.

Ticket #326
---
 install/static/details.js |   20 
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/install/static/details.js b/install/static/details.js
index f16dc36..99666b1 100644
--- a/install/static/details.js
+++ b/install/static/details.js
@@ -79,19 +79,23 @@ function ipa_generate_dl(jobj, id, name, dts)
 
 for (var i = 0; i  dts.length; ++i) {
 var label = '';
-if (dts[i][0].indexOf('call_') != 0) {
-var param_info = ipa_get_param_info(obj_name, dts[i][0]);
-if (param_info)
-label = param_info['label'];
-}
+var param_info = ipa_get_param_info(obj_name, dts[i][0]);
+if (param_info)
+label = param_info['label'];
 if ((!label)  (dts[i].length  1))
 label = dts[i][1];
+
+var title = dts[i][0];
+if (typeof dts[i][2] == 'function')
+title = 'call_' + dts[i][2].name;
 dl.append(
-$('dt/',{
-title:dts[i][0],
-html:label+:})
+$('dt/dt', {
+title: title,
+html: label + ':',
+})
 );
 }
+
 parent.append(dl);
 parent.append('hr/');
 }
-- 
1.7.1.1

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

Re: [Freeipa-devel] [PATCH] Rename user-lock and user-unlock to user-enable user-disable.

2010-10-06 Thread Rob Crittenden

Pavel Zuna wrote:

On 10/05/2010 06:07 PM, Rob Crittenden wrote:

Pavel Zuna wrote:

Also fixes related unit tests and therefore depends on my patch number
28.

Ticket #165

Pavel


This looks ok but you need to update the examples in the top help block
too:

Lock a user account:
ipa user-lock tuser1

Unlock a user account:
ipa user-unlock tuser1

Fix those and you have an ack.

rob


Fixed version attached.

Pavel


ack, pushed to master

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


Re: [Freeipa-devel] [PATCH] Generate additional positional arguments for baseldap commands from takes_args.

2010-10-06 Thread Rob Crittenden

Pavel Zuna wrote:

On 10/06/2010 03:35 AM, Rob Crittenden wrote:

Pavel Zuna wrote:

takes_args defined in a baseldap subclass is now transformed into
positional arguments that go after primary keys. Before this patch,
takes_args in crud subclasses were ignored.

example:

--- snip ---

class user_something(LDAPRetrieve):
takes_args = (
Str('randomarg'),
)

--- snip ---

# ipa help something
Usage: ipa [global-options] user-something LOGIN RANDOMARG


Pavel


Nack, this breaks the pwpolicy plugin tests (though I'm not 100% sure
why). pwpolicy-del defines its own get_args(). I'm guessing it is
failing because the local get_args returns a string and the multivalue
stuff is expecting a list so pulling the string apart one character at a
time. If you run pwpolicy-del testpolicy it will fail with a not found
on 't' policy.

I think simply removing the get_args() from pwpolicy will fix it:

rob


Fixed version attached.

Pavel


ack, pushed to master

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


[Freeipa-devel] [PATCH] Fix inconsistent error message when deleting groups that don't exist.

2010-10-06 Thread Pavel Zuna
The pre_callback in group_del was using a direct ldap2 call with no exception 
handling.


Ticket #292

Pavel
From 60eb789c84f91c5911dec397c528fd8a2e21ef99 Mon Sep 17 00:00:00 2001
From: Pavel Zuna pz...@redhat.com
Date: Wed, 6 Oct 2010 13:45:20 -0400
Subject: [PATCH] Fix inconsistent error message when deleting groups that don't exist.

Ticket #292
---
 ipalib/plugins/group.py |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/ipalib/plugins/group.py b/ipalib/plugins/group.py
index fae6a28..9beef00 100644
--- a/ipalib/plugins/group.py
+++ b/ipalib/plugins/group.py
@@ -165,7 +165,9 @@ class group_del(LDAPDelete):
 def_primary_group_dn = group_dn = self.obj.get_dn(def_primary_group)
 if dn == def_primary_group_dn:
 raise errors.DefaultGroup()
-(group_dn, group_attrs) = ldap.get_entry(dn)
+(group_dn, group_attrs) = self.obj.methods.show(
+self.obj.get_primary_key_from_dn(dn)
+)
 if 'mepmanagedby' in group_attrs:
 raise errors.ManagedGroupError()
 return dn
-- 
1.7.1.1

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

Re: [Freeipa-devel] [PATCH] Fix inconsistent error message when deleting groups that don't exist.

2010-10-06 Thread Rob Crittenden

Pavel Zuna wrote:

The pre_callback in group_del was using a direct ldap2 call with no
exception handling.

Ticket #292

Pavel


ack, pushed to master

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


Re: [Freeipa-devel] [PATCH] Fix attribute callbacks on details pages in the webUI.

2010-10-06 Thread Endi Sukma Dewata
- Pavel Zuna pz...@redhat.com wrote:

 Fixes bug reported by Adam in internal discussion.
 
 Ticket #326
 
 Pavel

ACK'd and pushed to master.

--
Endi S. Dewata

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


[Freeipa-devel] [PATCH] 561 set default python encoding to utf-8

2010-10-06 Thread Rob Crittenden
Add a module that we will load that will set the default encoding to 
utf-8 instead of ascii.


$ python
 import sys
 sys.getdefaultencoding()
'ascii'
 import default_encoding_utf8
 sys.getdefaultencoding()
'utf-8'

This will be linked into IPA in a future patch. The code was written by 
John, I'm just packaging it, so he gets all the credit :-)


Since I was messing with the spec file I also removed glob that was 
pulling in a slew of duplicate files for the UI.


rob


freeipa-561-encoding.patch
Description: application/mbox
___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Re: [Freeipa-devel] [PATCH] fix uninstall with bind

2010-10-06 Thread Rob Crittenden

Simo Sorce wrote:


During uninstall we were asking useless questions about removing SRV
and NS records from LDAP.
An uninstall implies the LDAP repository will be wiped out anyway.
Avoid asking these questions and just let the dirsrv uninstall code
remove all contents.

Simo.


The addition of 'pass' is unnecessary, otherwise ack.

rob

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


[Freeipa-devel] [PATCH] 562 set default encoding, print as unicode

2010-10-06 Thread Rob Crittenden

Set default encoding to utf-8, use unicode when printing output.

The Gettext() object only does the lookup when you print it as a unicode.

ticket 308

This patch indirectly relies on patch 561 which provides the encoding 
plugin that this loads.


rob


freeipa-562-encoding.patch
Description: application/mbox
___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

[Freeipa-devel] [PATCH] 563 use unique names for acis

2010-10-06 Thread Rob Crittenden

Copy/paste error where I didn't replace Hosts with Hostgroups in aci name.

rob


freeipa-563-unique.patch
Description: application/mbox
___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Re: [Freeipa-devel] [PATCH] set attribute when changing passwords

2010-10-06 Thread Rob Crittenden

Simo Sorce wrote:


Set the sambaPwdLastSet when changing password for a user that has the
sambaSamAccount objectclass, so that samba is kept in sync with the
status of the user account wrt whether the user need sto change the
password or not.

fixes trac#313

Simo.


ack

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


[Freeipa-devel] [PATCH] Displaying AJAX URL in error message.

2010-10-06 Thread Endi Sukma Dewata
Hi,

Please review the attached patch. Thanks!

The ipa_error_handler() has been modified to display the AJAX URL
that is having a problem. The ipa_cmd() error handler is now invoked
using call() to pass 'this' object which contains the URL.

--
Endi S. Dewata
From febd03de235e5a2a458944c77fe2b2148bebf5b8 Mon Sep 17 00:00:00 2001
From: Endi S. Dewata edew...@redhat.com
Date: Wed, 6 Oct 2010 15:09:14 -0500
Subject: [PATCH] Displaying AJAX URL in error message.

The ipa_error_handler() has been modified to display the AJAX URL
that is having a problem. The ipa_cmd() error handler is now invoked
using call() to pass 'this' object which contains the URL.
---
 install/static/associate.js |1 +
 install/static/details.js   |1 +
 install/static/ipa.js   |   19 +++
 install/static/search.js|1 +
 install/static/webui.js |1 +
 5 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/install/static/associate.js b/install/static/associate.js
index 826641a..49f2fd5 100644
--- a/install/static/associate.js
+++ b/install/static/associate.js
@@ -244,6 +244,7 @@ function AssociationList(obj, pkey, manyObj, associationColumns, jobj, associati
 function refresh_on_error(xhr, text_status, error_thrown) {
 var search_results = $('.search-results', jobj).empty();
 search_results.append('pError: '+error_thrown.name+'/p');
+search_results.append('pURL: '+this.url+'/p');
 search_results.append('p'+error_thrown.message+'/p');
 }
 
diff --git a/install/static/details.js b/install/static/details.js
index 99666b1..62c5c5e 100644
--- a/install/static/details.js
+++ b/install/static/details.js
@@ -121,6 +121,7 @@ function ipa_details_load(jobj, pkey, on_win, on_fail)
 
 var details = $('.details', jobj).empty();
 details.append('pError: '+error_thrown.name+'/p');
+details.append('pURL: '+this.url+'/p');
 details.append('p'+error_thrown.message+'/p');
 };
 
diff --git a/install/static/ipa.js b/install/static/ipa.js
index 31c9120..74fde92 100644
--- a/install/static/ipa.js
+++ b/install/static/ipa.js
@@ -80,18 +80,18 @@ function ipa_cmd(name, args, options, win_callback, fail_callback, objname)
 var error_thrown = {
 name: 'HTTP Error '+xhr.status,
 message: data ? xhr.statusText : No response
-}
-ipa_error_handler(xhr, text_status, error_thrown);
+};
+ipa_error_handler.call(this, xhr, text_status, error_thrown);
 
 } else if (data.error) {
 var error_thrown = {
 name: 'IPA Error '+data.error.code,
 message: data.error.message
-}
-ipa_error_handler(xhr, text_status, error_thrown);
+};
+ipa_error_handler.call(this, xhr, text_status, error_thrown);
 
 } else if (win_callback) {
-win_callback(data, text_status, xhr);
+win_callback.call(this, data, text_status, xhr);
 }
 }
 
@@ -99,10 +99,13 @@ function ipa_cmd(name, args, options, win_callback, fail_callback, objname)
 ipa_dialog.empty();
 ipa_dialog.attr('title', 'Error: '+error_thrown.name);
 
+ipa_dialog.append('pURL: '+this.url+'/p');
 if (error_thrown.message) {
 ipa_dialog.append('p'+error_thrown.message+'/p');
 }
 
+var that = this;
+
 ipa_dialog.dialog({
 modal: true,
 width: 400,
@@ -113,13 +116,13 @@ function ipa_cmd(name, args, options, win_callback, fail_callback, objname)
 },
 'Cancel': function() {
 ipa_dialog.dialog('close');
-fail_callback(xhr, text_status, error_thrown);
+fail_callback.call(that, xhr, text_status, error_thrown);
 }
 }
 });
-};
+}
 
-id = ipa_jsonrpc_id++;
+var id = ipa_jsonrpc_id++;
 
 var method_name = name;
 
diff --git a/install/static/search.js b/install/static/search.js
index e97632b..4b9dfad 100644
--- a/install/static/search.js
+++ b/install/static/search.js
@@ -190,6 +190,7 @@ function search_load(jobj, criteria, on_win, on_fail)
 
 var search_results = $('.search-results', jobj);
 search_results.append('pError: '+error_thrown.name+'/p');
+search_results.append('pURL: '+this.url+'/p');
 search_results.append('p'+error_thrown.message+'/p');
 }
 
diff --git a/install/static/webui.js b/install/static/webui.js
index fa37bcd..9580955 100644
--- a/install/static/webui.js
+++ b/install/static/webui.js
@@ -86,6 +86,7 @@ $(function() {
 function init_on_error(xhr, text_status, error_thrown) {
 var navigation = $('#navigation').empty();
 navigation.append('pError: '+error_thrown.name+'/p');
+navigation.append('pURL: '+this.url+'/p');
 

[Freeipa-devel] [PATCH] 560 server generates random password for host

2010-10-06 Thread Rob Crittenden
For bulk host enrollment let the server generate a random password when 
creating a host.


rob


freeipa-560-host.patch
Description: application/mbox
___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

[Freeipa-devel] [PATCH] admiyo-freeipa-0052-policy-and-config.patch

2010-10-06 Thread Adam Young

Population of the policy and entities tabs.
DNS and ACI are broken due to Plugin issues
Fix for entities without search
Added new files to Makefile.am
used rolegroup.js file as the start point, renamed to 
serverconfig.js


From eba05bc6c866df78baf84e5285cbd9c1526fd729 Mon Sep 17 00:00:00 2001
From: Adam Young ayo...@redhat.com
Date: Wed, 6 Oct 2010 17:24:58 -0400
Subject: [PATCH 52/53] policy and config

Population of the policy and entites tabs.
DNS and ACI are broken due to PLugin issues
Fix for entities without search
Added new files to Makefile.am
used rolegroup.js file as the start point, renamed to serverconfig.js
---
 install/static/entity.js   |   23 --
 install/static/index.xhtml |6 +-
 install/static/policy.js   |  156 
 install/static/rolegroup.js|   45 
 install/static/serverconfig.js |  118 ++
 install/static/webui.js|   17 -
 ipalib/plugins/automount.py|2 +
 ipalib/plugins/krbtpolicy.py   |2 +
 ipalib/plugins/pwpolicy.py |2 +
 9 files changed, 312 insertions(+), 59 deletions(-)
 create mode 100644 install/static/policy.js
 delete mode 100644 install/static/rolegroup.js
 create mode 100644 install/static/serverconfig.js

diff --git a/install/static/entity.js b/install/static/entity.js
index c628edd..804f8e2 100644
--- a/install/static/entity.js
+++ b/install/static/entity.js
@@ -49,16 +49,21 @@ function ipa_entity_set_association_definition(obj_name, data)
 ipa_entity_association_list[obj_name] = data;
 }
 
-function ipa_entity_setup(container)
+
+function ipa_details_only_setup(container){
+ipa_entity_setup(container, 'details');
+}
+
+function ipa_entity_setup(container, unspecified)
 {
 var id = container.attr('id');
 
 var state = id + '-facet';
-var facet = $.bbq.getState(state, true) || 'search';
+var facet = $.bbq.getState(state, true) || unspecified || 'search';
 var last_facet = window_hash_cache[state];
 
 if (facet != last_facet) {
-_ipa_entity_setup(container);
+_ipa_entity_setup(container,unspecified);
 window_hash_cache[state] = facet;
 
 } else if (facet == 'search') {
@@ -90,7 +95,7 @@ function ipa_entity_setup(container)
 }
 }
 
-function _ipa_entity_setup(jobj) {
+function _ipa_entity_setup(jobj,unspecified) {
 
 var obj_name = jobj.attr('id');
 
@@ -137,15 +142,16 @@ function _ipa_entity_setup(jobj) {
 search_load(jobj, filter, null, null);
 };
 
-function setup_details_facet() {
+function setup_details_facet(unspecified) {
 var pkey = $.bbq.getState(obj_name + '-pkey', true);
 ipa_entity_generate_views(obj_name, jobj, switch_view);
 ipa_details_create(obj_name, ipa_entity_details_list[obj_name], jobj);
 jobj.find('.details-reset').click(reset_on_click);
 jobj.find('.details-update').click(update_on_click);
 
-if (pkey)
+if (pkey||unspecified){
 ipa_details_load(jobj, pkey, null, null);
+}
 };
 
 function setup_associate_facet() {
@@ -175,11 +181,12 @@ function _ipa_entity_setup(jobj) {
 
 jobj.empty();
 
-var facet = $.bbq.getState(obj_name + '-facet', true) || 'search';
+var facet = $.bbq.getState(obj_name + '-facet', true) || 
+unspecified || 'search';
 if (facet == 'search') {
 setup_search_facet();
 } else if (facet == 'details') {
-setup_details_facet();
+setup_details_facet(unspecified);
 } else if (facet == 'associate') {
 setup_associate_facet();
 }
diff --git a/install/static/index.xhtml b/install/static/index.xhtml
index 2e2ac4e..338ddbb 100644
--- a/install/static/index.xhtml
+++ b/install/static/index.xhtml
@@ -25,7 +25,9 @@
 script type=text/javascript src=hostgroup.js/script
 script type=text/javascript src=netgroup.js/script
 script type=text/javascript src=service.js/script
-script type=text/javascript src=rolegroup.js/script
+script type=text/javascript src=serverconfig.js/script
+script type=text/javascript src=policy.js/script
+
 
 script type=text/javascript src=develop.js/script
 script type=text/javascript src=webui.js/script
@@ -37,7 +39,7 @@
 body
 div class=header 
 span class=header-logo
-img src=ipalogo.png /
+a href=#img src=ipalogo.png //a
 /span
 span id=loggedinas class=header-loggedinas
 a href=#span id=login_headerLogged in as/span: strongu...@freeip.org/strong/a
diff --git a/install/static/policy.js b/install/static/policy.js
new file mode 100644
index 000..b1e7d45
--- /dev/null
+++ b/install/static/policy.js
@@ -0,0 +1,156 @@
+/*  Authors:
+ *Adam Young ayo...@redhat.com
+ *
+ * Copyright (C) 2010 Red Hat
+ * see file 'COPYING' for use and warranty information
+ *
+ * This program is free software; you 

Re: [Freeipa-devel] [PATCH] Displaying AJAX URL in error message.

2010-10-06 Thread Endi Sukma Dewata

- Adam Young ayo...@redhat.com wrote:

 On 10/06/2010 05:00 PM, Endi Sukma Dewata wrote:
 
 The ipa_error_handler() has been modified to display the AJAX URL
 that is having a problem. The ipa_cmd() error handler is now invoked
 using call() to pass 'this' object which contains the URL.
 
 --
 Endi S. Dewata

 ACK

Thanks. Pushed to master.

--
Endi S. Dewata

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


Re: [Freeipa-devel] [PATCH] 564 fix some aci typos

2010-10-06 Thread Endi Sukma Dewata
- Rob Crittenden rcrit...@redhat.com wrote:

  I mis-spelled the admins group with an extra s which was causing some
  things to not work as admin.
 
  I also noticed a couple of spurious 'aci' in some descriptions, remove
  those as well.
 
  NACK. The spurious 'aci' should have been 'acl' according to DS docs.
 
 Updated patch attached.

ACK and pushed to master.

--
Endi S. Dewata

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


Re: [Freeipa-devel] [PATCH] 563 use unique names for acis

2010-10-06 Thread Endi Sukma Dewata
- Adam Young ayo...@redhat.com wrote:

 Copy/paste error where I didn't replace Hosts with Hostgroups in aci
 name.

 ACK

Pushed to master.

--
Endi S. Dewata

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


Re: [Freeipa-devel] [PATCH] admiyo-freeipa-0053-policy-and-config-sample-data.patch

2010-10-06 Thread Endi Sukma Dewata
- Adam Young ayo...@redhat.com wrote:
 Sample data for config and policy entities.

ACK with note: Rob fixed ACI duplicates in his patch #564 so the
aci_find.json will need to be fixed later.

--
Endi S. Dewata

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


[Freeipa-devel] [PATCH] admiyo-freeipa-0054-dns-metadata.patch

2010-10-06 Thread Adam Young
In order to generate the metadate, the dns plugin needs to have a 
__json__ method.


Long term, this should be rewritten as a baseldap extension.
From 30fac7c276cdcb4fc9ff911a2c0f27058cbb69fa Mon Sep 17 00:00:00 2001
From: Adam Young ayo...@redhat.com
Date: Wed, 6 Oct 2010 19:03:26 -0400
Subject: [PATCH] dns metadata

This is a little bit of a copy and paste approach, as the code for__json__
 was copied from baseldap.  Long term, we want to rewrite this plugin as
an extension of baseldap anyway.
---
 ipalib/plugins/dns.py  |   15 +++
 ipalib/plugins/internal.py |   18 +-
 2 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py
index 85a0d82..77bec45 100644
--- a/ipalib/plugins/dns.py
+++ b/ipalib/plugins/dns.py
@@ -187,6 +187,21 @@ class dns(Object):
 ),
 )
 
+default_attributes = _zone_default_attributes
+
+json_friendly_attributes = (
+'default_attributes', 'label', 'name', 'takes_params' )
+
+def __json__(self):
+json_dict = dict(
+(a, getattr(self, a)) for a in self.json_friendly_attributes
+)
+if self.primary_key:
+json_dict['primary_key'] = self.primary_key.name
+json_dict['methods'] = [m for m in self.methods]
+return json_dict
+
+
 api.register(dns)
 
 
diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py
index 096da18..1550dfe 100644
--- a/ipalib/plugins/internal.py
+++ b/ipalib/plugins/internal.py
@@ -73,20 +73,28 @@ class json_metadata(Command):
 )
 
 def execute(self, objname):
+
 if objname and objname in self.api.Object:
-return dict(
+
+meta = dict(
 result=dict(
 ((objname, json_serialize(self.api.Object[objname])), )
 )
 )
-result=dict(
-(o.name, json_serialize(o)) for o in self.api.Object()
-)
-retval= dict([(metadata,result),(messages,json_serialize(self.messages))])
+retval= dict([(metadata,meta), (messages,dict())])
+
+else:
+meta=dict(
+(o.name, json_serialize(o)) for o in self.api.Object()
+)
+
+retval= dict([(metadata,meta),
+  (messages,json_serialize(self.messages))])
 
 return retval
 
 def output_for_cli(self, textui, result, *args, **options):
+import pdb; pdb.set_trace()
 print json.dumps(result, default=json_serialize)
 
 api.register(json_metadata)
-- 
1.7.1

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

Re: [Freeipa-devel] [PATCH] admiyo-freeipa-0052-policy-and-config.patch

2010-10-06 Thread Adam Young

On 10/06/2010 05:30 PM, Adam Young wrote:

Population of the policy and entities tabs.
DNS and ACI are broken due to Plugin issues
Fix for entities without search
Added new files to Makefile.am
used rolegroup.js file as the start point, renamed to 
serverconfig.js



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

Missed the Makefile.am additions necessary to pick up the .js files

From 5a13f4b974d07b5a5c58066a9342e5ccb104b212 Mon Sep 17 00:00:00 2001
From: Adam Young ayo...@redhat.com
Date: Wed, 6 Oct 2010 17:24:58 -0400
Subject: [PATCH] policy and config

Population of the policy and entites tabs.
DNS and ACI are broken due to PLugin issues
Fix for entities without search
Added new files to Makefile.am
used rolegroup.js file as the start point, renamed to serverconfig.js
---
 install/static/Makefile.am |3 +-
 install/static/entity.js   |   23 --
 install/static/index.xhtml |6 +-
 install/static/policy.js   |  156 
 install/static/rolegroup.js|   45 
 install/static/serverconfig.js |  118 ++
 install/static/webui.js|   17 -
 ipalib/plugins/automount.py|2 +
 ipalib/plugins/krbtpolicy.py   |2 +
 ipalib/plugins/pwpolicy.py |2 +
 10 files changed, 314 insertions(+), 60 deletions(-)
 create mode 100644 install/static/policy.js
 delete mode 100644 install/static/rolegroup.js
 create mode 100644 install/static/serverconfig.js

diff --git a/install/static/Makefile.am b/install/static/Makefile.am
index 7d7c27d..8071d25 100644
--- a/install/static/Makefile.am
+++ b/install/static/Makefile.am
@@ -28,7 +28,8 @@ app_DATA =  \
 	navigation.js			\
 	netgroup.js 			\
 	service.js 			\
-	rolegroup.js 			\
+	serverconfig.js			\
+	policy.js			\
 	search.js 			\
 	details.js 			\
 	entity.js 			\
diff --git a/install/static/entity.js b/install/static/entity.js
index c628edd..804f8e2 100644
--- a/install/static/entity.js
+++ b/install/static/entity.js
@@ -49,16 +49,21 @@ function ipa_entity_set_association_definition(obj_name, data)
 ipa_entity_association_list[obj_name] = data;
 }
 
-function ipa_entity_setup(container)
+
+function ipa_details_only_setup(container){
+ipa_entity_setup(container, 'details');
+}
+
+function ipa_entity_setup(container, unspecified)
 {
 var id = container.attr('id');
 
 var state = id + '-facet';
-var facet = $.bbq.getState(state, true) || 'search';
+var facet = $.bbq.getState(state, true) || unspecified || 'search';
 var last_facet = window_hash_cache[state];
 
 if (facet != last_facet) {
-_ipa_entity_setup(container);
+_ipa_entity_setup(container,unspecified);
 window_hash_cache[state] = facet;
 
 } else if (facet == 'search') {
@@ -90,7 +95,7 @@ function ipa_entity_setup(container)
 }
 }
 
-function _ipa_entity_setup(jobj) {
+function _ipa_entity_setup(jobj,unspecified) {
 
 var obj_name = jobj.attr('id');
 
@@ -137,15 +142,16 @@ function _ipa_entity_setup(jobj) {
 search_load(jobj, filter, null, null);
 };
 
-function setup_details_facet() {
+function setup_details_facet(unspecified) {
 var pkey = $.bbq.getState(obj_name + '-pkey', true);
 ipa_entity_generate_views(obj_name, jobj, switch_view);
 ipa_details_create(obj_name, ipa_entity_details_list[obj_name], jobj);
 jobj.find('.details-reset').click(reset_on_click);
 jobj.find('.details-update').click(update_on_click);
 
-if (pkey)
+if (pkey||unspecified){
 ipa_details_load(jobj, pkey, null, null);
+}
 };
 
 function setup_associate_facet() {
@@ -175,11 +181,12 @@ function _ipa_entity_setup(jobj) {
 
 jobj.empty();
 
-var facet = $.bbq.getState(obj_name + '-facet', true) || 'search';
+var facet = $.bbq.getState(obj_name + '-facet', true) || 
+unspecified || 'search';
 if (facet == 'search') {
 setup_search_facet();
 } else if (facet == 'details') {
-setup_details_facet();
+setup_details_facet(unspecified);
 } else if (facet == 'associate') {
 setup_associate_facet();
 }
diff --git a/install/static/index.xhtml b/install/static/index.xhtml
index 2e2ac4e..338ddbb 100644
--- a/install/static/index.xhtml
+++ b/install/static/index.xhtml
@@ -25,7 +25,9 @@
 script type=text/javascript src=hostgroup.js/script
 script type=text/javascript src=netgroup.js/script
 script type=text/javascript src=service.js/script
-script type=text/javascript src=rolegroup.js/script
+script type=text/javascript src=serverconfig.js/script
+script type=text/javascript src=policy.js/script
+
 
 script type=text/javascript src=develop.js/script
 script 

[Freeipa-devel] netgroup help

2010-10-06 Thread Michael Gregg
I'm trying to add groups and users to a netgroup, I'm foing thinks like 
the following:


[r...@ipaqa64vmb ~]# ipa netgroup-add-member --groups=group1 n1
 Netgroup name: n1
 Description: aa
 NIS domain name: testdomain
-
Number of members added 0
-


Number of members added 0?
group1 exists, and netgroup n1 exists.
Am I doing this right? Is this a bug?

Michael-

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


Re: [Freeipa-devel] [PATCH] admiyo-freeipa-0052-policy-and-config.patch

2010-10-06 Thread Adam Young

On 10/06/2010 07:30 PM, Adam Young wrote:

On 10/06/2010 05:30 PM, Adam Young wrote:

Population of the policy and entities tabs.
DNS and ACI are broken due to Plugin issues
Fix for entities without search
Added new files to Makefile.am
used rolegroup.js file as the start point, renamed to 
serverconfig.js



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

Missed the Makefile.am additions necessary to pick up the .js files


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

Fixes an issued with missing pkey for the config page.
From a08e87015f06ab3e17bef4a43acee9aece4bf865 Mon Sep 17 00:00:00 2001
From: Adam Young ayo...@redhat.com
Date: Wed, 6 Oct 2010 17:24:58 -0400
Subject: [PATCH] policy and config

Population of the policy and entites tabs.
DNS and ACI are broken due to PLugin issues
Fix for entities without search
Added new files to Makefile.am
used rolegroup.js file as the start point, renamed to serverconfig.js
---
 install/static/Makefile.am |3 +-
 install/static/details.js  |   10 ++--
 install/static/entity.js   |   23 --
 install/static/index.xhtml |6 +-
 install/static/policy.js   |  156 
 install/static/rolegroup.js|   45 
 install/static/serverconfig.js |  118 ++
 install/static/webui.js|   17 -
 ipalib/plugins/automount.py|2 +
 ipalib/plugins/krbtpolicy.py   |2 +
 ipalib/plugins/pwpolicy.py |2 +
 11 files changed, 319 insertions(+), 65 deletions(-)
 create mode 100644 install/static/policy.js
 delete mode 100644 install/static/rolegroup.js
 create mode 100644 install/static/serverconfig.js

diff --git a/install/static/Makefile.am b/install/static/Makefile.am
index 7d7c27d..8071d25 100644
--- a/install/static/Makefile.am
+++ b/install/static/Makefile.am
@@ -28,7 +28,8 @@ app_DATA =  \
 	navigation.js			\
 	netgroup.js 			\
 	service.js 			\
-	rolegroup.js 			\
+	serverconfig.js			\
+	policy.js			\
 	search.js 			\
 	details.js 			\
 	entity.js 			\
diff --git a/install/static/details.js b/install/static/details.js
index 62c5c5e..41f3a51 100644
--- a/install/static/details.js
+++ b/install/static/details.js
@@ -125,14 +125,14 @@ function ipa_details_load(jobj, pkey, on_win, on_fail)
 details.append('p'+error_thrown.message+'/p');
 };
 
-if (!pkey)
-return;
-
+var params = [pkey];
+if (!pkey){
+params = [];
+}
 ipa_cmd(
-'show', [pkey], {all: true}, load_on_win, load_on_fail, obj_name
+'show', params, {all: true}, load_on_win, load_on_fail, obj_name
 );
 }
-
 function ipa_details_update(obj_name, pkey, on_win, on_fail)
 {
 function update_on_win(data, text_status, xhr) {
diff --git a/install/static/entity.js b/install/static/entity.js
index c628edd..804f8e2 100644
--- a/install/static/entity.js
+++ b/install/static/entity.js
@@ -49,16 +49,21 @@ function ipa_entity_set_association_definition(obj_name, data)
 ipa_entity_association_list[obj_name] = data;
 }
 
-function ipa_entity_setup(container)
+
+function ipa_details_only_setup(container){
+ipa_entity_setup(container, 'details');
+}
+
+function ipa_entity_setup(container, unspecified)
 {
 var id = container.attr('id');
 
 var state = id + '-facet';
-var facet = $.bbq.getState(state, true) || 'search';
+var facet = $.bbq.getState(state, true) || unspecified || 'search';
 var last_facet = window_hash_cache[state];
 
 if (facet != last_facet) {
-_ipa_entity_setup(container);
+_ipa_entity_setup(container,unspecified);
 window_hash_cache[state] = facet;
 
 } else if (facet == 'search') {
@@ -90,7 +95,7 @@ function ipa_entity_setup(container)
 }
 }
 
-function _ipa_entity_setup(jobj) {
+function _ipa_entity_setup(jobj,unspecified) {
 
 var obj_name = jobj.attr('id');
 
@@ -137,15 +142,16 @@ function _ipa_entity_setup(jobj) {
 search_load(jobj, filter, null, null);
 };
 
-function setup_details_facet() {
+function setup_details_facet(unspecified) {
 var pkey = $.bbq.getState(obj_name + '-pkey', true);
 ipa_entity_generate_views(obj_name, jobj, switch_view);
 ipa_details_create(obj_name, ipa_entity_details_list[obj_name], jobj);
 jobj.find('.details-reset').click(reset_on_click);
 jobj.find('.details-update').click(update_on_click);
 
-if (pkey)
+if (pkey||unspecified){
 ipa_details_load(jobj, pkey, null, null);
+}
 };
 
 function setup_associate_facet() {
@@ -175,11 +181,12 @@ function _ipa_entity_setup(jobj) {
 
 jobj.empty();
 
-var facet = 

Re: [Freeipa-devel] netgroup help

2010-10-06 Thread Adam Young

On 10/06/2010 07:56 PM, Michael Gregg wrote:
I'm trying to add groups and users to a netgroup, I'm foing thinks 
like the following:


[r...@ipaqa64vmb ~]# ipa netgroup-add-member --groups=group1 n1
 Netgroup name: n1
 Description: aa
 NIS domain name: testdomain
-
Number of members added 0
-



It looks right to me.  Here's my output:

ipa netgroup-add-member  --groups=muppets --hostgroups=host-live net-live
  Netgroup name: net-live
  Description: live servers
  NIS domain name: ayoung.boston.devel.redhat.com
  Member Group: muppets
  Member Hostgroup: host-live
-
Number of members added 2
-
[ayo...@ipa freeipa]$ ipa netgroup-show net-live
  Netgroup name: net-live
  Description: live servers
  NIS domain name: ayoung.boston.devel.redhat.com
  Member Group: muppets
  Member Hostgroup: host-live


So something else must be going wrong.  I assume that both group1 and 
netgroup n1 already exist in your system?  Or maybe they have already 
been added to the netgroup?  If you try to add the same entities more 
than once, the call succeeds, but the container remains unchanged.





Number of members added 0?
group1 exists, and netgroup n1 exists.
Am I doing this right? Is this a bug?

Michael-

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


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


Re: [Freeipa-devel] [PATCH] 559 update ipa-getkeytab man page

2010-10-06 Thread David O'Brien

Rob Crittenden wrote:

David O'Brien wrote:

Rob Crittenden wrote:

Add some missing options to the ipa-getkeytab man page.

rob



Can you be consistent with Kerberos instead of adding kerberos to
the mix as well (unless necessary, of course)?

If my understanding is correct, I'd update the following:
The LDAP password when not binding with Kerberos. to include
...password to use when not...

cheers


Updated patch attached.

rob

No more complaints from me.
(I'm purposely not using nack or ack because I don't write man 
pages, and haven't tried to apply this patch. I'm just checking a bit of 
English.)


--

David O'Brien
Red Hat APAC Pty Ltd

We couldn't care less about comfort. We make you feel good.
Federico Minoli CEO Ducati Motor S.p.A.

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