rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
action="store", type="string", dest="newskel", default = None,
action="store", type="string", dest="newskel", default=None,
def mod_group_parse_arguments(app, configuration): usage_text = "\n\t%s group --name=<nom_actuel> [--rename=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--add-users=<user1[[,user2][,…]]>] [--del-users=<user1[[,user2][,…]]>]\n" \ + "\t\t[--add-resps=<user1[[,user2][,…]]>] [--delete-resps=<user1[[,user2][,…]]>]\n" \ + "\t\t[--add-guests=<user1[[,user2][,…]]>] [--delete-guests=<user1[[,user2][,…]]>]\n" \ + "\t\t[--permissive|--not-permissive] [--skel=<new skel>] [--description=<new description>]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group(common_behaviour_group(app, parser, 'mod_group')) parser.add_option_group(common_filter_group(app, parser, 'mod', 'groups')) group = OptionGroup(parser, stylize(ST_OPTION, "Modify group options")) group.add_option("--rename", action="store", type="string", dest="newname", default = None, help="specify group's new name (not yet implemented).") group.add_option("--skel", action="store", type="string", dest="newskel", default = None, help="specify group's new skel dir.") group.add_option("--description", action="store", type="string", dest="newdescription", default = None, help="specify new group's description") group.add_option("-p", "--permissive", "--set-permissive", action="store_true", dest="permissive", default = None, help="set the shared directory of the group permissive.") group.add_option("-P", "--not-permissive", "--set-not-permissive", action="store_false", dest="permissive", default = None, help="set the shared directory of the group not permissive.") group.add_option("--add-users", action="store", type="string", dest="users_to_add", default = [], help="Add users to the group. The users are separated by commas without spaces.") group.add_option("--del-users", action="store", type="string", dest="users_to_del", default = [], help="Delete users from the group. The users are separated by commas without spaces.") group.add_option("--add-resps", action="store", type="string", dest="resps_to_add", default = [], help="Add responsibles to the group. The responsibles are separated by commas without spaces.") group.add_option("--del-resps", action="store", type="string", dest="resps_to_del", default = [], help="Delete responsibles from the group. The responsibles are separated by commas without spaces.") group.add_option("--add-guests", action="store", type="string", dest="guests_to_add", default = [], help="Add guests to the group. The guests are separated by commas without spaces.") group.add_option("--del-guests", action="store", type="string", dest="guests_to_del", default = [], help="Delete guests from the group. The guests are separated by commas without spaces.") group.add_option("--add-granted-profiles", action="store", type="string", dest="granted_profiles_to_add", default = None, help="Add the profiles which the users can access to the group's shared directory. The profiles are separated by commas without spaces.") group.add_option("--del-granted-profiles", action="store", type="string", dest="granted_profiles_to_del", default = None, help="Delete the profiles which the users can access to the group's shared directory. The profiles are separated by commas without spaces.") parser.add_option_group(group) return check_opts_and_args(parser.parse_args())
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store", type="string", dest="newdescription", default = None,
action="store", type="string", dest="newdescription", default=None,
def mod_group_parse_arguments(app, configuration): usage_text = "\n\t%s group --name=<nom_actuel> [--rename=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--add-users=<user1[[,user2][,…]]>] [--del-users=<user1[[,user2][,…]]>]\n" \ + "\t\t[--add-resps=<user1[[,user2][,…]]>] [--delete-resps=<user1[[,user2][,…]]>]\n" \ + "\t\t[--add-guests=<user1[[,user2][,…]]>] [--delete-guests=<user1[[,user2][,…]]>]\n" \ + "\t\t[--permissive|--not-permissive] [--skel=<new skel>] [--description=<new description>]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group(common_behaviour_group(app, parser, 'mod_group')) parser.add_option_group(common_filter_group(app, parser, 'mod', 'groups')) group = OptionGroup(parser, stylize(ST_OPTION, "Modify group options")) group.add_option("--rename", action="store", type="string", dest="newname", default = None, help="specify group's new name (not yet implemented).") group.add_option("--skel", action="store", type="string", dest="newskel", default = None, help="specify group's new skel dir.") group.add_option("--description", action="store", type="string", dest="newdescription", default = None, help="specify new group's description") group.add_option("-p", "--permissive", "--set-permissive", action="store_true", dest="permissive", default = None, help="set the shared directory of the group permissive.") group.add_option("-P", "--not-permissive", "--set-not-permissive", action="store_false", dest="permissive", default = None, help="set the shared directory of the group not permissive.") group.add_option("--add-users", action="store", type="string", dest="users_to_add", default = [], help="Add users to the group. The users are separated by commas without spaces.") group.add_option("--del-users", action="store", type="string", dest="users_to_del", default = [], help="Delete users from the group. The users are separated by commas without spaces.") group.add_option("--add-resps", action="store", type="string", dest="resps_to_add", default = [], help="Add responsibles to the group. The responsibles are separated by commas without spaces.") group.add_option("--del-resps", action="store", type="string", dest="resps_to_del", default = [], help="Delete responsibles from the group. The responsibles are separated by commas without spaces.") group.add_option("--add-guests", action="store", type="string", dest="guests_to_add", default = [], help="Add guests to the group. The guests are separated by commas without spaces.") group.add_option("--del-guests", action="store", type="string", dest="guests_to_del", default = [], help="Delete guests from the group. The guests are separated by commas without spaces.") group.add_option("--add-granted-profiles", action="store", type="string", dest="granted_profiles_to_add", default = None, help="Add the profiles which the users can access to the group's shared directory. The profiles are separated by commas without spaces.") group.add_option("--del-granted-profiles", action="store", type="string", dest="granted_profiles_to_del", default = None, help="Delete the profiles which the users can access to the group's shared directory. The profiles are separated by commas without spaces.") parser.add_option_group(group) return check_opts_and_args(parser.parse_args())
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store_true", dest="permissive", default = None,
action="store_true", dest="permissive", default=None,
def mod_group_parse_arguments(app, configuration): usage_text = "\n\t%s group --name=<nom_actuel> [--rename=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--add-users=<user1[[,user2][,…]]>] [--del-users=<user1[[,user2][,…]]>]\n" \ + "\t\t[--add-resps=<user1[[,user2][,…]]>] [--delete-resps=<user1[[,user2][,…]]>]\n" \ + "\t\t[--add-guests=<user1[[,user2][,…]]>] [--delete-guests=<user1[[,user2][,…]]>]\n" \ + "\t\t[--permissive|--not-permissive] [--skel=<new skel>] [--description=<new description>]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group(common_behaviour_group(app, parser, 'mod_group')) parser.add_option_group(common_filter_group(app, parser, 'mod', 'groups')) group = OptionGroup(parser, stylize(ST_OPTION, "Modify group options")) group.add_option("--rename", action="store", type="string", dest="newname", default = None, help="specify group's new name (not yet implemented).") group.add_option("--skel", action="store", type="string", dest="newskel", default = None, help="specify group's new skel dir.") group.add_option("--description", action="store", type="string", dest="newdescription", default = None, help="specify new group's description") group.add_option("-p", "--permissive", "--set-permissive", action="store_true", dest="permissive", default = None, help="set the shared directory of the group permissive.") group.add_option("-P", "--not-permissive", "--set-not-permissive", action="store_false", dest="permissive", default = None, help="set the shared directory of the group not permissive.") group.add_option("--add-users", action="store", type="string", dest="users_to_add", default = [], help="Add users to the group. The users are separated by commas without spaces.") group.add_option("--del-users", action="store", type="string", dest="users_to_del", default = [], help="Delete users from the group. The users are separated by commas without spaces.") group.add_option("--add-resps", action="store", type="string", dest="resps_to_add", default = [], help="Add responsibles to the group. The responsibles are separated by commas without spaces.") group.add_option("--del-resps", action="store", type="string", dest="resps_to_del", default = [], help="Delete responsibles from the group. The responsibles are separated by commas without spaces.") group.add_option("--add-guests", action="store", type="string", dest="guests_to_add", default = [], help="Add guests to the group. The guests are separated by commas without spaces.") group.add_option("--del-guests", action="store", type="string", dest="guests_to_del", default = [], help="Delete guests from the group. The guests are separated by commas without spaces.") group.add_option("--add-granted-profiles", action="store", type="string", dest="granted_profiles_to_add", default = None, help="Add the profiles which the users can access to the group's shared directory. The profiles are separated by commas without spaces.") group.add_option("--del-granted-profiles", action="store", type="string", dest="granted_profiles_to_del", default = None, help="Delete the profiles which the users can access to the group's shared directory. The profiles are separated by commas without spaces.") parser.add_option_group(group) return check_opts_and_args(parser.parse_args())
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store_false", dest="permissive", default = None,
action="store_false", dest="permissive", default=None,
def mod_group_parse_arguments(app, configuration): usage_text = "\n\t%s group --name=<nom_actuel> [--rename=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--add-users=<user1[[,user2][,…]]>] [--del-users=<user1[[,user2][,…]]>]\n" \ + "\t\t[--add-resps=<user1[[,user2][,…]]>] [--delete-resps=<user1[[,user2][,…]]>]\n" \ + "\t\t[--add-guests=<user1[[,user2][,…]]>] [--delete-guests=<user1[[,user2][,…]]>]\n" \ + "\t\t[--permissive|--not-permissive] [--skel=<new skel>] [--description=<new description>]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group(common_behaviour_group(app, parser, 'mod_group')) parser.add_option_group(common_filter_group(app, parser, 'mod', 'groups')) group = OptionGroup(parser, stylize(ST_OPTION, "Modify group options")) group.add_option("--rename", action="store", type="string", dest="newname", default = None, help="specify group's new name (not yet implemented).") group.add_option("--skel", action="store", type="string", dest="newskel", default = None, help="specify group's new skel dir.") group.add_option("--description", action="store", type="string", dest="newdescription", default = None, help="specify new group's description") group.add_option("-p", "--permissive", "--set-permissive", action="store_true", dest="permissive", default = None, help="set the shared directory of the group permissive.") group.add_option("-P", "--not-permissive", "--set-not-permissive", action="store_false", dest="permissive", default = None, help="set the shared directory of the group not permissive.") group.add_option("--add-users", action="store", type="string", dest="users_to_add", default = [], help="Add users to the group. The users are separated by commas without spaces.") group.add_option("--del-users", action="store", type="string", dest="users_to_del", default = [], help="Delete users from the group. The users are separated by commas without spaces.") group.add_option("--add-resps", action="store", type="string", dest="resps_to_add", default = [], help="Add responsibles to the group. The responsibles are separated by commas without spaces.") group.add_option("--del-resps", action="store", type="string", dest="resps_to_del", default = [], help="Delete responsibles from the group. The responsibles are separated by commas without spaces.") group.add_option("--add-guests", action="store", type="string", dest="guests_to_add", default = [], help="Add guests to the group. The guests are separated by commas without spaces.") group.add_option("--del-guests", action="store", type="string", dest="guests_to_del", default = [], help="Delete guests from the group. The guests are separated by commas without spaces.") group.add_option("--add-granted-profiles", action="store", type="string", dest="granted_profiles_to_add", default = None, help="Add the profiles which the users can access to the group's shared directory. The profiles are separated by commas without spaces.") group.add_option("--del-granted-profiles", action="store", type="string", dest="granted_profiles_to_del", default = None, help="Delete the profiles which the users can access to the group's shared directory. The profiles are separated by commas without spaces.") parser.add_option_group(group) return check_opts_and_args(parser.parse_args())
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store", type="string", dest="granted_profiles_to_add", default = None,
action="store", type="string", dest="granted_profiles_to_add", default=None,
def mod_group_parse_arguments(app, configuration): usage_text = "\n\t%s group --name=<nom_actuel> [--rename=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--add-users=<user1[[,user2][,…]]>] [--del-users=<user1[[,user2][,…]]>]\n" \ + "\t\t[--add-resps=<user1[[,user2][,…]]>] [--delete-resps=<user1[[,user2][,…]]>]\n" \ + "\t\t[--add-guests=<user1[[,user2][,…]]>] [--delete-guests=<user1[[,user2][,…]]>]\n" \ + "\t\t[--permissive|--not-permissive] [--skel=<new skel>] [--description=<new description>]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group(common_behaviour_group(app, parser, 'mod_group')) parser.add_option_group(common_filter_group(app, parser, 'mod', 'groups')) group = OptionGroup(parser, stylize(ST_OPTION, "Modify group options")) group.add_option("--rename", action="store", type="string", dest="newname", default = None, help="specify group's new name (not yet implemented).") group.add_option("--skel", action="store", type="string", dest="newskel", default = None, help="specify group's new skel dir.") group.add_option("--description", action="store", type="string", dest="newdescription", default = None, help="specify new group's description") group.add_option("-p", "--permissive", "--set-permissive", action="store_true", dest="permissive", default = None, help="set the shared directory of the group permissive.") group.add_option("-P", "--not-permissive", "--set-not-permissive", action="store_false", dest="permissive", default = None, help="set the shared directory of the group not permissive.") group.add_option("--add-users", action="store", type="string", dest="users_to_add", default = [], help="Add users to the group. The users are separated by commas without spaces.") group.add_option("--del-users", action="store", type="string", dest="users_to_del", default = [], help="Delete users from the group. The users are separated by commas without spaces.") group.add_option("--add-resps", action="store", type="string", dest="resps_to_add", default = [], help="Add responsibles to the group. The responsibles are separated by commas without spaces.") group.add_option("--del-resps", action="store", type="string", dest="resps_to_del", default = [], help="Delete responsibles from the group. The responsibles are separated by commas without spaces.") group.add_option("--add-guests", action="store", type="string", dest="guests_to_add", default = [], help="Add guests to the group. The guests are separated by commas without spaces.") group.add_option("--del-guests", action="store", type="string", dest="guests_to_del", default = [], help="Delete guests from the group. The guests are separated by commas without spaces.") group.add_option("--add-granted-profiles", action="store", type="string", dest="granted_profiles_to_add", default = None, help="Add the profiles which the users can access to the group's shared directory. The profiles are separated by commas without spaces.") group.add_option("--del-granted-profiles", action="store", type="string", dest="granted_profiles_to_del", default = None, help="Delete the profiles which the users can access to the group's shared directory. The profiles are separated by commas without spaces.") parser.add_option_group(group) return check_opts_and_args(parser.parse_args())
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store", type="string", dest="granted_profiles_to_del", default = None,
action="store", type="string", dest="granted_profiles_to_del", default=None,
def mod_group_parse_arguments(app, configuration): usage_text = "\n\t%s group --name=<nom_actuel> [--rename=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--add-users=<user1[[,user2][,…]]>] [--del-users=<user1[[,user2][,…]]>]\n" \ + "\t\t[--add-resps=<user1[[,user2][,…]]>] [--delete-resps=<user1[[,user2][,…]]>]\n" \ + "\t\t[--add-guests=<user1[[,user2][,…]]>] [--delete-guests=<user1[[,user2][,…]]>]\n" \ + "\t\t[--permissive|--not-permissive] [--skel=<new skel>] [--description=<new description>]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group(common_behaviour_group(app, parser, 'mod_group')) parser.add_option_group(common_filter_group(app, parser, 'mod', 'groups')) group = OptionGroup(parser, stylize(ST_OPTION, "Modify group options")) group.add_option("--rename", action="store", type="string", dest="newname", default = None, help="specify group's new name (not yet implemented).") group.add_option("--skel", action="store", type="string", dest="newskel", default = None, help="specify group's new skel dir.") group.add_option("--description", action="store", type="string", dest="newdescription", default = None, help="specify new group's description") group.add_option("-p", "--permissive", "--set-permissive", action="store_true", dest="permissive", default = None, help="set the shared directory of the group permissive.") group.add_option("-P", "--not-permissive", "--set-not-permissive", action="store_false", dest="permissive", default = None, help="set the shared directory of the group not permissive.") group.add_option("--add-users", action="store", type="string", dest="users_to_add", default = [], help="Add users to the group. The users are separated by commas without spaces.") group.add_option("--del-users", action="store", type="string", dest="users_to_del", default = [], help="Delete users from the group. The users are separated by commas without spaces.") group.add_option("--add-resps", action="store", type="string", dest="resps_to_add", default = [], help="Add responsibles to the group. The responsibles are separated by commas without spaces.") group.add_option("--del-resps", action="store", type="string", dest="resps_to_del", default = [], help="Delete responsibles from the group. The responsibles are separated by commas without spaces.") group.add_option("--add-guests", action="store", type="string", dest="guests_to_add", default = [], help="Add guests to the group. The guests are separated by commas without spaces.") group.add_option("--del-guests", action="store", type="string", dest="guests_to_del", default = [], help="Delete guests from the group. The guests are separated by commas without spaces.") group.add_option("--add-granted-profiles", action="store", type="string", dest="granted_profiles_to_add", default = None, help="Add the profiles which the users can access to the group's shared directory. The profiles are separated by commas without spaces.") group.add_option("--del-granted-profiles", action="store", type="string", dest="granted_profiles_to_del", default = None, help="Delete the profiles which the users can access to the group's shared directory. The profiles are separated by commas without spaces.") parser.add_option_group(group) return check_opts_and_args(parser.parse_args())
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store", type="string", dest="newname", default = None,
action="store", type="string", dest="newname", default=None,
def mod_profile_parse_arguments(app, configuration): usage_text = "\n\t%s profile --group=<nom> [--name=<nouveau_nom>] [--rename-group=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--comment=<nouveau_commentaire>] [--shell=<nouveau_shell>] [--skel=<nouveau_skel>]\n" \ + "\t\t[--quota=<nouveau_quota>] [--add-groups=<groupes>] [--del-groups=<groupes>]\n" \ + "\t%s profile <--apply-groups|--apply-skel|--apply-all> [--force]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--to-users=<user1[[,user2][,…]]>] [--to-groups=<group1[[,group2][,…]]>]\n" \ + "\t\t[--to-all] [--to-members] [--no-instant-apply] [--no-sync]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group( common_behaviour_group(app, parser, 'mod_profile')) parser.add_option_group(common_filter_group(app, parser, 'mod', 'profiles')) profile = OptionGroup(parser, stylize(ST_OPTION, "Modify profile options ")) profile.add_option("--rename", '--new-name', action="store", type="string", dest="newname", default = None, help="specify profile's name") profile.add_option("--rename-group", '--new-group-name', action="store", type="string", dest="newgroup", default = None, help="Rename primary group.") profile.add_option("--description", action="store", type="string", dest="description", default = None, help="Change profile's description.") profile.add_option("--shell", action="store", type="string", dest="newshell", default = None, help="Change profile shell (defaults to %s if you specify --shell without argument)" % stylize(ST_DEFAULT, configuration.users.default_shell)) profile.add_option("--quota", action="store", type="int", dest="newquota", default = None, help="Change profile's user quota (in Mb, defaults to %s if you specify --quota without argument)." % stylize(ST_DEFAULT, "1024")) profile.add_option("--skel", action="store", type="string", dest="newskel", default = None, help="Change profile skel (specify a skel dir as an absolute pathname, defaults to %s if you give --skel without argument)." % stylize(ST_DEFAULT, configuration.users.default_skel)) profile.add_option("--add-groups", action="store", type="string", dest="groups_to_add", default = None, help="Add one or more group(s) to default memberships of profile (separate groups with commas without spaces).") profile.add_option("--del-groups", action="store", type="string", dest="groups_to_del", default = None, help="Delete one or more group(s) from default memberships of profile (separate groups with commas without spaces).") profile.add_option("--apply-groups", action="store_true", dest="apply_groups", default = False, help="Re-apply only the default group memberships of the profile.") profile.add_option("--apply-skel", action="store_true", dest="apply_skel", default = False, help="Re-apply only the skel of the profile.") profile.add_option("--apply-all", action="store_true", dest="apply_all_attributes", default=False, help="Re-apply all the profile's attributes (groups and skel).") profile.add_option("--to-users", action="store", type="string", dest="apply_to_users", default=None, help="Re-apply to specific users accounts (separate them with commas without spaces).") profile.add_option("--to-groups", action="store", type="string", dest="apply_to_groups", default = None, help="Re-apply to all members of one or more groups (separate groups with commas without spaces). You can mix --to-users and --to-groups.") profile.add_option("--to-members", action="store_true", dest="apply_to_members", default = False, help="Re-apply to all users members of the profile.") profile.add_option("--to-all", action="store_true", dest="apply_to_all_accounts", default = None, help="Re-apply to all user accounts on the system (LENGHTY operation !).") profile.add_option("--no-instant-apply", action="store_false", dest="instant_apply", default = True, help="Don't apply group addition/deletion instantly to all members of the modified profile (%s; use this only if you know what you're doing)." % stylize(ST_IMPORTANT, "this is not recommended")) profile.add_option("--no-sync", action="store_true", dest="no_sync", default = False, help="Commit changes only after all modifications.") parser.add_option_group(profile) (opts, args) = check_opts_and_args(parser.parse_args()) if opts.apply_all_attributes: opts.apply_skel = True opts.apply_groups = True return opts, args
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store", type="string", dest="newgroup", default = None,
action="store", type="string", dest="newgroup", default=None,
def mod_profile_parse_arguments(app, configuration): usage_text = "\n\t%s profile --group=<nom> [--name=<nouveau_nom>] [--rename-group=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--comment=<nouveau_commentaire>] [--shell=<nouveau_shell>] [--skel=<nouveau_skel>]\n" \ + "\t\t[--quota=<nouveau_quota>] [--add-groups=<groupes>] [--del-groups=<groupes>]\n" \ + "\t%s profile <--apply-groups|--apply-skel|--apply-all> [--force]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--to-users=<user1[[,user2][,…]]>] [--to-groups=<group1[[,group2][,…]]>]\n" \ + "\t\t[--to-all] [--to-members] [--no-instant-apply] [--no-sync]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group( common_behaviour_group(app, parser, 'mod_profile')) parser.add_option_group(common_filter_group(app, parser, 'mod', 'profiles')) profile = OptionGroup(parser, stylize(ST_OPTION, "Modify profile options ")) profile.add_option("--rename", '--new-name', action="store", type="string", dest="newname", default = None, help="specify profile's name") profile.add_option("--rename-group", '--new-group-name', action="store", type="string", dest="newgroup", default = None, help="Rename primary group.") profile.add_option("--description", action="store", type="string", dest="description", default = None, help="Change profile's description.") profile.add_option("--shell", action="store", type="string", dest="newshell", default = None, help="Change profile shell (defaults to %s if you specify --shell without argument)" % stylize(ST_DEFAULT, configuration.users.default_shell)) profile.add_option("--quota", action="store", type="int", dest="newquota", default = None, help="Change profile's user quota (in Mb, defaults to %s if you specify --quota without argument)." % stylize(ST_DEFAULT, "1024")) profile.add_option("--skel", action="store", type="string", dest="newskel", default = None, help="Change profile skel (specify a skel dir as an absolute pathname, defaults to %s if you give --skel without argument)." % stylize(ST_DEFAULT, configuration.users.default_skel)) profile.add_option("--add-groups", action="store", type="string", dest="groups_to_add", default = None, help="Add one or more group(s) to default memberships of profile (separate groups with commas without spaces).") profile.add_option("--del-groups", action="store", type="string", dest="groups_to_del", default = None, help="Delete one or more group(s) from default memberships of profile (separate groups with commas without spaces).") profile.add_option("--apply-groups", action="store_true", dest="apply_groups", default = False, help="Re-apply only the default group memberships of the profile.") profile.add_option("--apply-skel", action="store_true", dest="apply_skel", default = False, help="Re-apply only the skel of the profile.") profile.add_option("--apply-all", action="store_true", dest="apply_all_attributes", default=False, help="Re-apply all the profile's attributes (groups and skel).") profile.add_option("--to-users", action="store", type="string", dest="apply_to_users", default=None, help="Re-apply to specific users accounts (separate them with commas without spaces).") profile.add_option("--to-groups", action="store", type="string", dest="apply_to_groups", default = None, help="Re-apply to all members of one or more groups (separate groups with commas without spaces). You can mix --to-users and --to-groups.") profile.add_option("--to-members", action="store_true", dest="apply_to_members", default = False, help="Re-apply to all users members of the profile.") profile.add_option("--to-all", action="store_true", dest="apply_to_all_accounts", default = None, help="Re-apply to all user accounts on the system (LENGHTY operation !).") profile.add_option("--no-instant-apply", action="store_false", dest="instant_apply", default = True, help="Don't apply group addition/deletion instantly to all members of the modified profile (%s; use this only if you know what you're doing)." % stylize(ST_IMPORTANT, "this is not recommended")) profile.add_option("--no-sync", action="store_true", dest="no_sync", default = False, help="Commit changes only after all modifications.") parser.add_option_group(profile) (opts, args) = check_opts_and_args(parser.parse_args()) if opts.apply_all_attributes: opts.apply_skel = True opts.apply_groups = True return opts, args
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store", type="string", dest="description", default = None,
action="store", type="string", dest="description", default=None,
def mod_profile_parse_arguments(app, configuration): usage_text = "\n\t%s profile --group=<nom> [--name=<nouveau_nom>] [--rename-group=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--comment=<nouveau_commentaire>] [--shell=<nouveau_shell>] [--skel=<nouveau_skel>]\n" \ + "\t\t[--quota=<nouveau_quota>] [--add-groups=<groupes>] [--del-groups=<groupes>]\n" \ + "\t%s profile <--apply-groups|--apply-skel|--apply-all> [--force]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--to-users=<user1[[,user2][,…]]>] [--to-groups=<group1[[,group2][,…]]>]\n" \ + "\t\t[--to-all] [--to-members] [--no-instant-apply] [--no-sync]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group( common_behaviour_group(app, parser, 'mod_profile')) parser.add_option_group(common_filter_group(app, parser, 'mod', 'profiles')) profile = OptionGroup(parser, stylize(ST_OPTION, "Modify profile options ")) profile.add_option("--rename", '--new-name', action="store", type="string", dest="newname", default = None, help="specify profile's name") profile.add_option("--rename-group", '--new-group-name', action="store", type="string", dest="newgroup", default = None, help="Rename primary group.") profile.add_option("--description", action="store", type="string", dest="description", default = None, help="Change profile's description.") profile.add_option("--shell", action="store", type="string", dest="newshell", default = None, help="Change profile shell (defaults to %s if you specify --shell without argument)" % stylize(ST_DEFAULT, configuration.users.default_shell)) profile.add_option("--quota", action="store", type="int", dest="newquota", default = None, help="Change profile's user quota (in Mb, defaults to %s if you specify --quota without argument)." % stylize(ST_DEFAULT, "1024")) profile.add_option("--skel", action="store", type="string", dest="newskel", default = None, help="Change profile skel (specify a skel dir as an absolute pathname, defaults to %s if you give --skel without argument)." % stylize(ST_DEFAULT, configuration.users.default_skel)) profile.add_option("--add-groups", action="store", type="string", dest="groups_to_add", default = None, help="Add one or more group(s) to default memberships of profile (separate groups with commas without spaces).") profile.add_option("--del-groups", action="store", type="string", dest="groups_to_del", default = None, help="Delete one or more group(s) from default memberships of profile (separate groups with commas without spaces).") profile.add_option("--apply-groups", action="store_true", dest="apply_groups", default = False, help="Re-apply only the default group memberships of the profile.") profile.add_option("--apply-skel", action="store_true", dest="apply_skel", default = False, help="Re-apply only the skel of the profile.") profile.add_option("--apply-all", action="store_true", dest="apply_all_attributes", default=False, help="Re-apply all the profile's attributes (groups and skel).") profile.add_option("--to-users", action="store", type="string", dest="apply_to_users", default=None, help="Re-apply to specific users accounts (separate them with commas without spaces).") profile.add_option("--to-groups", action="store", type="string", dest="apply_to_groups", default = None, help="Re-apply to all members of one or more groups (separate groups with commas without spaces). You can mix --to-users and --to-groups.") profile.add_option("--to-members", action="store_true", dest="apply_to_members", default = False, help="Re-apply to all users members of the profile.") profile.add_option("--to-all", action="store_true", dest="apply_to_all_accounts", default = None, help="Re-apply to all user accounts on the system (LENGHTY operation !).") profile.add_option("--no-instant-apply", action="store_false", dest="instant_apply", default = True, help="Don't apply group addition/deletion instantly to all members of the modified profile (%s; use this only if you know what you're doing)." % stylize(ST_IMPORTANT, "this is not recommended")) profile.add_option("--no-sync", action="store_true", dest="no_sync", default = False, help="Commit changes only after all modifications.") parser.add_option_group(profile) (opts, args) = check_opts_and_args(parser.parse_args()) if opts.apply_all_attributes: opts.apply_skel = True opts.apply_groups = True return opts, args
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store", type="string", dest="newshell", default = None,
action="store", type="string", dest="newshell", default=None,
def mod_profile_parse_arguments(app, configuration): usage_text = "\n\t%s profile --group=<nom> [--name=<nouveau_nom>] [--rename-group=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--comment=<nouveau_commentaire>] [--shell=<nouveau_shell>] [--skel=<nouveau_skel>]\n" \ + "\t\t[--quota=<nouveau_quota>] [--add-groups=<groupes>] [--del-groups=<groupes>]\n" \ + "\t%s profile <--apply-groups|--apply-skel|--apply-all> [--force]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--to-users=<user1[[,user2][,…]]>] [--to-groups=<group1[[,group2][,…]]>]\n" \ + "\t\t[--to-all] [--to-members] [--no-instant-apply] [--no-sync]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group( common_behaviour_group(app, parser, 'mod_profile')) parser.add_option_group(common_filter_group(app, parser, 'mod', 'profiles')) profile = OptionGroup(parser, stylize(ST_OPTION, "Modify profile options ")) profile.add_option("--rename", '--new-name', action="store", type="string", dest="newname", default = None, help="specify profile's name") profile.add_option("--rename-group", '--new-group-name', action="store", type="string", dest="newgroup", default = None, help="Rename primary group.") profile.add_option("--description", action="store", type="string", dest="description", default = None, help="Change profile's description.") profile.add_option("--shell", action="store", type="string", dest="newshell", default = None, help="Change profile shell (defaults to %s if you specify --shell without argument)" % stylize(ST_DEFAULT, configuration.users.default_shell)) profile.add_option("--quota", action="store", type="int", dest="newquota", default = None, help="Change profile's user quota (in Mb, defaults to %s if you specify --quota without argument)." % stylize(ST_DEFAULT, "1024")) profile.add_option("--skel", action="store", type="string", dest="newskel", default = None, help="Change profile skel (specify a skel dir as an absolute pathname, defaults to %s if you give --skel without argument)." % stylize(ST_DEFAULT, configuration.users.default_skel)) profile.add_option("--add-groups", action="store", type="string", dest="groups_to_add", default = None, help="Add one or more group(s) to default memberships of profile (separate groups with commas without spaces).") profile.add_option("--del-groups", action="store", type="string", dest="groups_to_del", default = None, help="Delete one or more group(s) from default memberships of profile (separate groups with commas without spaces).") profile.add_option("--apply-groups", action="store_true", dest="apply_groups", default = False, help="Re-apply only the default group memberships of the profile.") profile.add_option("--apply-skel", action="store_true", dest="apply_skel", default = False, help="Re-apply only the skel of the profile.") profile.add_option("--apply-all", action="store_true", dest="apply_all_attributes", default=False, help="Re-apply all the profile's attributes (groups and skel).") profile.add_option("--to-users", action="store", type="string", dest="apply_to_users", default=None, help="Re-apply to specific users accounts (separate them with commas without spaces).") profile.add_option("--to-groups", action="store", type="string", dest="apply_to_groups", default = None, help="Re-apply to all members of one or more groups (separate groups with commas without spaces). You can mix --to-users and --to-groups.") profile.add_option("--to-members", action="store_true", dest="apply_to_members", default = False, help="Re-apply to all users members of the profile.") profile.add_option("--to-all", action="store_true", dest="apply_to_all_accounts", default = None, help="Re-apply to all user accounts on the system (LENGHTY operation !).") profile.add_option("--no-instant-apply", action="store_false", dest="instant_apply", default = True, help="Don't apply group addition/deletion instantly to all members of the modified profile (%s; use this only if you know what you're doing)." % stylize(ST_IMPORTANT, "this is not recommended")) profile.add_option("--no-sync", action="store_true", dest="no_sync", default = False, help="Commit changes only after all modifications.") parser.add_option_group(profile) (opts, args) = check_opts_and_args(parser.parse_args()) if opts.apply_all_attributes: opts.apply_skel = True opts.apply_groups = True return opts, args
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store", type="int", dest="newquota", default = None,
action="store", type="int", dest="newquota", default=None,
def mod_profile_parse_arguments(app, configuration): usage_text = "\n\t%s profile --group=<nom> [--name=<nouveau_nom>] [--rename-group=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--comment=<nouveau_commentaire>] [--shell=<nouveau_shell>] [--skel=<nouveau_skel>]\n" \ + "\t\t[--quota=<nouveau_quota>] [--add-groups=<groupes>] [--del-groups=<groupes>]\n" \ + "\t%s profile <--apply-groups|--apply-skel|--apply-all> [--force]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--to-users=<user1[[,user2][,…]]>] [--to-groups=<group1[[,group2][,…]]>]\n" \ + "\t\t[--to-all] [--to-members] [--no-instant-apply] [--no-sync]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group( common_behaviour_group(app, parser, 'mod_profile')) parser.add_option_group(common_filter_group(app, parser, 'mod', 'profiles')) profile = OptionGroup(parser, stylize(ST_OPTION, "Modify profile options ")) profile.add_option("--rename", '--new-name', action="store", type="string", dest="newname", default = None, help="specify profile's name") profile.add_option("--rename-group", '--new-group-name', action="store", type="string", dest="newgroup", default = None, help="Rename primary group.") profile.add_option("--description", action="store", type="string", dest="description", default = None, help="Change profile's description.") profile.add_option("--shell", action="store", type="string", dest="newshell", default = None, help="Change profile shell (defaults to %s if you specify --shell without argument)" % stylize(ST_DEFAULT, configuration.users.default_shell)) profile.add_option("--quota", action="store", type="int", dest="newquota", default = None, help="Change profile's user quota (in Mb, defaults to %s if you specify --quota without argument)." % stylize(ST_DEFAULT, "1024")) profile.add_option("--skel", action="store", type="string", dest="newskel", default = None, help="Change profile skel (specify a skel dir as an absolute pathname, defaults to %s if you give --skel without argument)." % stylize(ST_DEFAULT, configuration.users.default_skel)) profile.add_option("--add-groups", action="store", type="string", dest="groups_to_add", default = None, help="Add one or more group(s) to default memberships of profile (separate groups with commas without spaces).") profile.add_option("--del-groups", action="store", type="string", dest="groups_to_del", default = None, help="Delete one or more group(s) from default memberships of profile (separate groups with commas without spaces).") profile.add_option("--apply-groups", action="store_true", dest="apply_groups", default = False, help="Re-apply only the default group memberships of the profile.") profile.add_option("--apply-skel", action="store_true", dest="apply_skel", default = False, help="Re-apply only the skel of the profile.") profile.add_option("--apply-all", action="store_true", dest="apply_all_attributes", default=False, help="Re-apply all the profile's attributes (groups and skel).") profile.add_option("--to-users", action="store", type="string", dest="apply_to_users", default=None, help="Re-apply to specific users accounts (separate them with commas without spaces).") profile.add_option("--to-groups", action="store", type="string", dest="apply_to_groups", default = None, help="Re-apply to all members of one or more groups (separate groups with commas without spaces). You can mix --to-users and --to-groups.") profile.add_option("--to-members", action="store_true", dest="apply_to_members", default = False, help="Re-apply to all users members of the profile.") profile.add_option("--to-all", action="store_true", dest="apply_to_all_accounts", default = None, help="Re-apply to all user accounts on the system (LENGHTY operation !).") profile.add_option("--no-instant-apply", action="store_false", dest="instant_apply", default = True, help="Don't apply group addition/deletion instantly to all members of the modified profile (%s; use this only if you know what you're doing)." % stylize(ST_IMPORTANT, "this is not recommended")) profile.add_option("--no-sync", action="store_true", dest="no_sync", default = False, help="Commit changes only after all modifications.") parser.add_option_group(profile) (opts, args) = check_opts_and_args(parser.parse_args()) if opts.apply_all_attributes: opts.apply_skel = True opts.apply_groups = True return opts, args
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store", type="string", dest="newskel", default = None,
action="store", type="string", dest="newskel", default=None,
def mod_profile_parse_arguments(app, configuration): usage_text = "\n\t%s profile --group=<nom> [--name=<nouveau_nom>] [--rename-group=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--comment=<nouveau_commentaire>] [--shell=<nouveau_shell>] [--skel=<nouveau_skel>]\n" \ + "\t\t[--quota=<nouveau_quota>] [--add-groups=<groupes>] [--del-groups=<groupes>]\n" \ + "\t%s profile <--apply-groups|--apply-skel|--apply-all> [--force]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--to-users=<user1[[,user2][,…]]>] [--to-groups=<group1[[,group2][,…]]>]\n" \ + "\t\t[--to-all] [--to-members] [--no-instant-apply] [--no-sync]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group( common_behaviour_group(app, parser, 'mod_profile')) parser.add_option_group(common_filter_group(app, parser, 'mod', 'profiles')) profile = OptionGroup(parser, stylize(ST_OPTION, "Modify profile options ")) profile.add_option("--rename", '--new-name', action="store", type="string", dest="newname", default = None, help="specify profile's name") profile.add_option("--rename-group", '--new-group-name', action="store", type="string", dest="newgroup", default = None, help="Rename primary group.") profile.add_option("--description", action="store", type="string", dest="description", default = None, help="Change profile's description.") profile.add_option("--shell", action="store", type="string", dest="newshell", default = None, help="Change profile shell (defaults to %s if you specify --shell without argument)" % stylize(ST_DEFAULT, configuration.users.default_shell)) profile.add_option("--quota", action="store", type="int", dest="newquota", default = None, help="Change profile's user quota (in Mb, defaults to %s if you specify --quota without argument)." % stylize(ST_DEFAULT, "1024")) profile.add_option("--skel", action="store", type="string", dest="newskel", default = None, help="Change profile skel (specify a skel dir as an absolute pathname, defaults to %s if you give --skel without argument)." % stylize(ST_DEFAULT, configuration.users.default_skel)) profile.add_option("--add-groups", action="store", type="string", dest="groups_to_add", default = None, help="Add one or more group(s) to default memberships of profile (separate groups with commas without spaces).") profile.add_option("--del-groups", action="store", type="string", dest="groups_to_del", default = None, help="Delete one or more group(s) from default memberships of profile (separate groups with commas without spaces).") profile.add_option("--apply-groups", action="store_true", dest="apply_groups", default = False, help="Re-apply only the default group memberships of the profile.") profile.add_option("--apply-skel", action="store_true", dest="apply_skel", default = False, help="Re-apply only the skel of the profile.") profile.add_option("--apply-all", action="store_true", dest="apply_all_attributes", default=False, help="Re-apply all the profile's attributes (groups and skel).") profile.add_option("--to-users", action="store", type="string", dest="apply_to_users", default=None, help="Re-apply to specific users accounts (separate them with commas without spaces).") profile.add_option("--to-groups", action="store", type="string", dest="apply_to_groups", default = None, help="Re-apply to all members of one or more groups (separate groups with commas without spaces). You can mix --to-users and --to-groups.") profile.add_option("--to-members", action="store_true", dest="apply_to_members", default = False, help="Re-apply to all users members of the profile.") profile.add_option("--to-all", action="store_true", dest="apply_to_all_accounts", default = None, help="Re-apply to all user accounts on the system (LENGHTY operation !).") profile.add_option("--no-instant-apply", action="store_false", dest="instant_apply", default = True, help="Don't apply group addition/deletion instantly to all members of the modified profile (%s; use this only if you know what you're doing)." % stylize(ST_IMPORTANT, "this is not recommended")) profile.add_option("--no-sync", action="store_true", dest="no_sync", default = False, help="Commit changes only after all modifications.") parser.add_option_group(profile) (opts, args) = check_opts_and_args(parser.parse_args()) if opts.apply_all_attributes: opts.apply_skel = True opts.apply_groups = True return opts, args
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store", type="string", dest="groups_to_add", default = None,
action="store", type="string", dest="groups_to_add", default=None,
def mod_profile_parse_arguments(app, configuration): usage_text = "\n\t%s profile --group=<nom> [--name=<nouveau_nom>] [--rename-group=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--comment=<nouveau_commentaire>] [--shell=<nouveau_shell>] [--skel=<nouveau_skel>]\n" \ + "\t\t[--quota=<nouveau_quota>] [--add-groups=<groupes>] [--del-groups=<groupes>]\n" \ + "\t%s profile <--apply-groups|--apply-skel|--apply-all> [--force]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--to-users=<user1[[,user2][,…]]>] [--to-groups=<group1[[,group2][,…]]>]\n" \ + "\t\t[--to-all] [--to-members] [--no-instant-apply] [--no-sync]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group( common_behaviour_group(app, parser, 'mod_profile')) parser.add_option_group(common_filter_group(app, parser, 'mod', 'profiles')) profile = OptionGroup(parser, stylize(ST_OPTION, "Modify profile options ")) profile.add_option("--rename", '--new-name', action="store", type="string", dest="newname", default = None, help="specify profile's name") profile.add_option("--rename-group", '--new-group-name', action="store", type="string", dest="newgroup", default = None, help="Rename primary group.") profile.add_option("--description", action="store", type="string", dest="description", default = None, help="Change profile's description.") profile.add_option("--shell", action="store", type="string", dest="newshell", default = None, help="Change profile shell (defaults to %s if you specify --shell without argument)" % stylize(ST_DEFAULT, configuration.users.default_shell)) profile.add_option("--quota", action="store", type="int", dest="newquota", default = None, help="Change profile's user quota (in Mb, defaults to %s if you specify --quota without argument)." % stylize(ST_DEFAULT, "1024")) profile.add_option("--skel", action="store", type="string", dest="newskel", default = None, help="Change profile skel (specify a skel dir as an absolute pathname, defaults to %s if you give --skel without argument)." % stylize(ST_DEFAULT, configuration.users.default_skel)) profile.add_option("--add-groups", action="store", type="string", dest="groups_to_add", default = None, help="Add one or more group(s) to default memberships of profile (separate groups with commas without spaces).") profile.add_option("--del-groups", action="store", type="string", dest="groups_to_del", default = None, help="Delete one or more group(s) from default memberships of profile (separate groups with commas without spaces).") profile.add_option("--apply-groups", action="store_true", dest="apply_groups", default = False, help="Re-apply only the default group memberships of the profile.") profile.add_option("--apply-skel", action="store_true", dest="apply_skel", default = False, help="Re-apply only the skel of the profile.") profile.add_option("--apply-all", action="store_true", dest="apply_all_attributes", default=False, help="Re-apply all the profile's attributes (groups and skel).") profile.add_option("--to-users", action="store", type="string", dest="apply_to_users", default=None, help="Re-apply to specific users accounts (separate them with commas without spaces).") profile.add_option("--to-groups", action="store", type="string", dest="apply_to_groups", default = None, help="Re-apply to all members of one or more groups (separate groups with commas without spaces). You can mix --to-users and --to-groups.") profile.add_option("--to-members", action="store_true", dest="apply_to_members", default = False, help="Re-apply to all users members of the profile.") profile.add_option("--to-all", action="store_true", dest="apply_to_all_accounts", default = None, help="Re-apply to all user accounts on the system (LENGHTY operation !).") profile.add_option("--no-instant-apply", action="store_false", dest="instant_apply", default = True, help="Don't apply group addition/deletion instantly to all members of the modified profile (%s; use this only if you know what you're doing)." % stylize(ST_IMPORTANT, "this is not recommended")) profile.add_option("--no-sync", action="store_true", dest="no_sync", default = False, help="Commit changes only after all modifications.") parser.add_option_group(profile) (opts, args) = check_opts_and_args(parser.parse_args()) if opts.apply_all_attributes: opts.apply_skel = True opts.apply_groups = True return opts, args
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store", type="string", dest="groups_to_del", default = None,
action="store", type="string", dest="groups_to_del", default=None,
def mod_profile_parse_arguments(app, configuration): usage_text = "\n\t%s profile --group=<nom> [--name=<nouveau_nom>] [--rename-group=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--comment=<nouveau_commentaire>] [--shell=<nouveau_shell>] [--skel=<nouveau_skel>]\n" \ + "\t\t[--quota=<nouveau_quota>] [--add-groups=<groupes>] [--del-groups=<groupes>]\n" \ + "\t%s profile <--apply-groups|--apply-skel|--apply-all> [--force]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--to-users=<user1[[,user2][,…]]>] [--to-groups=<group1[[,group2][,…]]>]\n" \ + "\t\t[--to-all] [--to-members] [--no-instant-apply] [--no-sync]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group( common_behaviour_group(app, parser, 'mod_profile')) parser.add_option_group(common_filter_group(app, parser, 'mod', 'profiles')) profile = OptionGroup(parser, stylize(ST_OPTION, "Modify profile options ")) profile.add_option("--rename", '--new-name', action="store", type="string", dest="newname", default = None, help="specify profile's name") profile.add_option("--rename-group", '--new-group-name', action="store", type="string", dest="newgroup", default = None, help="Rename primary group.") profile.add_option("--description", action="store", type="string", dest="description", default = None, help="Change profile's description.") profile.add_option("--shell", action="store", type="string", dest="newshell", default = None, help="Change profile shell (defaults to %s if you specify --shell without argument)" % stylize(ST_DEFAULT, configuration.users.default_shell)) profile.add_option("--quota", action="store", type="int", dest="newquota", default = None, help="Change profile's user quota (in Mb, defaults to %s if you specify --quota without argument)." % stylize(ST_DEFAULT, "1024")) profile.add_option("--skel", action="store", type="string", dest="newskel", default = None, help="Change profile skel (specify a skel dir as an absolute pathname, defaults to %s if you give --skel without argument)." % stylize(ST_DEFAULT, configuration.users.default_skel)) profile.add_option("--add-groups", action="store", type="string", dest="groups_to_add", default = None, help="Add one or more group(s) to default memberships of profile (separate groups with commas without spaces).") profile.add_option("--del-groups", action="store", type="string", dest="groups_to_del", default = None, help="Delete one or more group(s) from default memberships of profile (separate groups with commas without spaces).") profile.add_option("--apply-groups", action="store_true", dest="apply_groups", default = False, help="Re-apply only the default group memberships of the profile.") profile.add_option("--apply-skel", action="store_true", dest="apply_skel", default = False, help="Re-apply only the skel of the profile.") profile.add_option("--apply-all", action="store_true", dest="apply_all_attributes", default=False, help="Re-apply all the profile's attributes (groups and skel).") profile.add_option("--to-users", action="store", type="string", dest="apply_to_users", default=None, help="Re-apply to specific users accounts (separate them with commas without spaces).") profile.add_option("--to-groups", action="store", type="string", dest="apply_to_groups", default = None, help="Re-apply to all members of one or more groups (separate groups with commas without spaces). You can mix --to-users and --to-groups.") profile.add_option("--to-members", action="store_true", dest="apply_to_members", default = False, help="Re-apply to all users members of the profile.") profile.add_option("--to-all", action="store_true", dest="apply_to_all_accounts", default = None, help="Re-apply to all user accounts on the system (LENGHTY operation !).") profile.add_option("--no-instant-apply", action="store_false", dest="instant_apply", default = True, help="Don't apply group addition/deletion instantly to all members of the modified profile (%s; use this only if you know what you're doing)." % stylize(ST_IMPORTANT, "this is not recommended")) profile.add_option("--no-sync", action="store_true", dest="no_sync", default = False, help="Commit changes only after all modifications.") parser.add_option_group(profile) (opts, args) = check_opts_and_args(parser.parse_args()) if opts.apply_all_attributes: opts.apply_skel = True opts.apply_groups = True return opts, args
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store", type="string", dest="apply_to_groups", default = None,
action="store", type="string", dest="apply_to_groups", default=None,
def mod_profile_parse_arguments(app, configuration): usage_text = "\n\t%s profile --group=<nom> [--name=<nouveau_nom>] [--rename-group=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--comment=<nouveau_commentaire>] [--shell=<nouveau_shell>] [--skel=<nouveau_skel>]\n" \ + "\t\t[--quota=<nouveau_quota>] [--add-groups=<groupes>] [--del-groups=<groupes>]\n" \ + "\t%s profile <--apply-groups|--apply-skel|--apply-all> [--force]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--to-users=<user1[[,user2][,…]]>] [--to-groups=<group1[[,group2][,…]]>]\n" \ + "\t\t[--to-all] [--to-members] [--no-instant-apply] [--no-sync]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group( common_behaviour_group(app, parser, 'mod_profile')) parser.add_option_group(common_filter_group(app, parser, 'mod', 'profiles')) profile = OptionGroup(parser, stylize(ST_OPTION, "Modify profile options ")) profile.add_option("--rename", '--new-name', action="store", type="string", dest="newname", default = None, help="specify profile's name") profile.add_option("--rename-group", '--new-group-name', action="store", type="string", dest="newgroup", default = None, help="Rename primary group.") profile.add_option("--description", action="store", type="string", dest="description", default = None, help="Change profile's description.") profile.add_option("--shell", action="store", type="string", dest="newshell", default = None, help="Change profile shell (defaults to %s if you specify --shell without argument)" % stylize(ST_DEFAULT, configuration.users.default_shell)) profile.add_option("--quota", action="store", type="int", dest="newquota", default = None, help="Change profile's user quota (in Mb, defaults to %s if you specify --quota without argument)." % stylize(ST_DEFAULT, "1024")) profile.add_option("--skel", action="store", type="string", dest="newskel", default = None, help="Change profile skel (specify a skel dir as an absolute pathname, defaults to %s if you give --skel without argument)." % stylize(ST_DEFAULT, configuration.users.default_skel)) profile.add_option("--add-groups", action="store", type="string", dest="groups_to_add", default = None, help="Add one or more group(s) to default memberships of profile (separate groups with commas without spaces).") profile.add_option("--del-groups", action="store", type="string", dest="groups_to_del", default = None, help="Delete one or more group(s) from default memberships of profile (separate groups with commas without spaces).") profile.add_option("--apply-groups", action="store_true", dest="apply_groups", default = False, help="Re-apply only the default group memberships of the profile.") profile.add_option("--apply-skel", action="store_true", dest="apply_skel", default = False, help="Re-apply only the skel of the profile.") profile.add_option("--apply-all", action="store_true", dest="apply_all_attributes", default=False, help="Re-apply all the profile's attributes (groups and skel).") profile.add_option("--to-users", action="store", type="string", dest="apply_to_users", default=None, help="Re-apply to specific users accounts (separate them with commas without spaces).") profile.add_option("--to-groups", action="store", type="string", dest="apply_to_groups", default = None, help="Re-apply to all members of one or more groups (separate groups with commas without spaces). You can mix --to-users and --to-groups.") profile.add_option("--to-members", action="store_true", dest="apply_to_members", default = False, help="Re-apply to all users members of the profile.") profile.add_option("--to-all", action="store_true", dest="apply_to_all_accounts", default = None, help="Re-apply to all user accounts on the system (LENGHTY operation !).") profile.add_option("--no-instant-apply", action="store_false", dest="instant_apply", default = True, help="Don't apply group addition/deletion instantly to all members of the modified profile (%s; use this only if you know what you're doing)." % stylize(ST_IMPORTANT, "this is not recommended")) profile.add_option("--no-sync", action="store_true", dest="no_sync", default = False, help="Commit changes only after all modifications.") parser.add_option_group(profile) (opts, args) = check_opts_and_args(parser.parse_args()) if opts.apply_all_attributes: opts.apply_skel = True opts.apply_groups = True return opts, args
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store_true", dest="apply_to_all_accounts", default = None,
action="store_true", dest="apply_to_all_accounts", default=None,
def mod_profile_parse_arguments(app, configuration): usage_text = "\n\t%s profile --group=<nom> [--name=<nouveau_nom>] [--rename-group=<nouveau_nom>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--comment=<nouveau_commentaire>] [--shell=<nouveau_shell>] [--skel=<nouveau_skel>]\n" \ + "\t\t[--quota=<nouveau_quota>] [--add-groups=<groupes>] [--del-groups=<groupes>]\n" \ + "\t%s profile <--apply-groups|--apply-skel|--apply-all> [--force]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--to-users=<user1[[,user2][,…]]>] [--to-groups=<group1[[,group2][,…]]>]\n" \ + "\t\t[--to-all] [--to-members] [--no-instant-apply] [--no-sync]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group( common_behaviour_group(app, parser, 'mod_profile')) parser.add_option_group(common_filter_group(app, parser, 'mod', 'profiles')) profile = OptionGroup(parser, stylize(ST_OPTION, "Modify profile options ")) profile.add_option("--rename", '--new-name', action="store", type="string", dest="newname", default = None, help="specify profile's name") profile.add_option("--rename-group", '--new-group-name', action="store", type="string", dest="newgroup", default = None, help="Rename primary group.") profile.add_option("--description", action="store", type="string", dest="description", default = None, help="Change profile's description.") profile.add_option("--shell", action="store", type="string", dest="newshell", default = None, help="Change profile shell (defaults to %s if you specify --shell without argument)" % stylize(ST_DEFAULT, configuration.users.default_shell)) profile.add_option("--quota", action="store", type="int", dest="newquota", default = None, help="Change profile's user quota (in Mb, defaults to %s if you specify --quota without argument)." % stylize(ST_DEFAULT, "1024")) profile.add_option("--skel", action="store", type="string", dest="newskel", default = None, help="Change profile skel (specify a skel dir as an absolute pathname, defaults to %s if you give --skel without argument)." % stylize(ST_DEFAULT, configuration.users.default_skel)) profile.add_option("--add-groups", action="store", type="string", dest="groups_to_add", default = None, help="Add one or more group(s) to default memberships of profile (separate groups with commas without spaces).") profile.add_option("--del-groups", action="store", type="string", dest="groups_to_del", default = None, help="Delete one or more group(s) from default memberships of profile (separate groups with commas without spaces).") profile.add_option("--apply-groups", action="store_true", dest="apply_groups", default = False, help="Re-apply only the default group memberships of the profile.") profile.add_option("--apply-skel", action="store_true", dest="apply_skel", default = False, help="Re-apply only the skel of the profile.") profile.add_option("--apply-all", action="store_true", dest="apply_all_attributes", default=False, help="Re-apply all the profile's attributes (groups and skel).") profile.add_option("--to-users", action="store", type="string", dest="apply_to_users", default=None, help="Re-apply to specific users accounts (separate them with commas without spaces).") profile.add_option("--to-groups", action="store", type="string", dest="apply_to_groups", default = None, help="Re-apply to all members of one or more groups (separate groups with commas without spaces). You can mix --to-users and --to-groups.") profile.add_option("--to-members", action="store_true", dest="apply_to_members", default = False, help="Re-apply to all users members of the profile.") profile.add_option("--to-all", action="store_true", dest="apply_to_all_accounts", default = None, help="Re-apply to all user accounts on the system (LENGHTY operation !).") profile.add_option("--no-instant-apply", action="store_false", dest="instant_apply", default = True, help="Don't apply group addition/deletion instantly to all members of the modified profile (%s; use this only if you know what you're doing)." % stylize(ST_IMPORTANT, "this is not recommended")) profile.add_option("--no-sync", action="store_true", dest="no_sync", default = False, help="Commit changes only after all modifications.") parser.add_option_group(profile) (opts, args) = check_opts_and_args(parser.parse_args()) if opts.apply_all_attributes: opts.apply_skel = True opts.apply_groups = True return opts, args
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store", type="string", dest="name", default = None,
action="store", type="string", dest="name", default=None,
def mod_keyword_parse_arguments(app, configuration): usage_text = "\n\t%s keyword --name=<nom> [--rename=<nouveau_nom>] [--parent=<nouveau_parent>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--remove-parent] [--recursive]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group(common_behaviour_group(app, parser, 'mod_profile')) keyword = OptionGroup(parser, stylize(ST_OPTION, "Modify keyword options ")) keyword.add_option("--name", action="store", type="string", dest="name", default = None, help="specify keyword to modify (%s)." % stylize(ST_IMPORTANT, "required")) keyword.add_option("--rename", action="store", type="string", dest="newname", default = None, help="Rename keyword") keyword.add_option("--parent", action="store", type="string", dest="parent", default = None, help="Change keyword's parent.") keyword.add_option("--remove-parent", action="store_true", dest="remove_parent", default = False, help="Remove parent.") keyword.add_option("--recursive", action="store_true", dest="recursive", default = False, help="Modify all file in all subdirs.") keyword.add_option("--description", action="store", type="string", dest="description", default = None, help="Remove parent.") parser.add_option_group(keyword) return parser.parse_args()
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store", type="string", dest="newname", default = None,
action="store", type="string", dest="newname", default=None,
def mod_keyword_parse_arguments(app, configuration): usage_text = "\n\t%s keyword --name=<nom> [--rename=<nouveau_nom>] [--parent=<nouveau_parent>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--remove-parent] [--recursive]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group(common_behaviour_group(app, parser, 'mod_profile')) keyword = OptionGroup(parser, stylize(ST_OPTION, "Modify keyword options ")) keyword.add_option("--name", action="store", type="string", dest="name", default = None, help="specify keyword to modify (%s)." % stylize(ST_IMPORTANT, "required")) keyword.add_option("--rename", action="store", type="string", dest="newname", default = None, help="Rename keyword") keyword.add_option("--parent", action="store", type="string", dest="parent", default = None, help="Change keyword's parent.") keyword.add_option("--remove-parent", action="store_true", dest="remove_parent", default = False, help="Remove parent.") keyword.add_option("--recursive", action="store_true", dest="recursive", default = False, help="Modify all file in all subdirs.") keyword.add_option("--description", action="store", type="string", dest="description", default = None, help="Remove parent.") parser.add_option_group(keyword) return parser.parse_args()
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store", type="string", dest="parent", default = None,
action="store", type="string", dest="parent", default=None,
def mod_keyword_parse_arguments(app, configuration): usage_text = "\n\t%s keyword --name=<nom> [--rename=<nouveau_nom>] [--parent=<nouveau_parent>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--remove-parent] [--recursive]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group(common_behaviour_group(app, parser, 'mod_profile')) keyword = OptionGroup(parser, stylize(ST_OPTION, "Modify keyword options ")) keyword.add_option("--name", action="store", type="string", dest="name", default = None, help="specify keyword to modify (%s)." % stylize(ST_IMPORTANT, "required")) keyword.add_option("--rename", action="store", type="string", dest="newname", default = None, help="Rename keyword") keyword.add_option("--parent", action="store", type="string", dest="parent", default = None, help="Change keyword's parent.") keyword.add_option("--remove-parent", action="store_true", dest="remove_parent", default = False, help="Remove parent.") keyword.add_option("--recursive", action="store_true", dest="recursive", default = False, help="Modify all file in all subdirs.") keyword.add_option("--description", action="store", type="string", dest="description", default = None, help="Remove parent.") parser.add_option_group(keyword) return parser.parse_args()
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store", type="string", dest="description", default = None,
action="store", type="string", dest="description", default=None,
def mod_keyword_parse_arguments(app, configuration): usage_text = "\n\t%s keyword --name=<nom> [--rename=<nouveau_nom>] [--parent=<nouveau_parent>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--remove-parent] [--recursive]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group(common_behaviour_group(app, parser, 'mod_profile')) keyword = OptionGroup(parser, stylize(ST_OPTION, "Modify keyword options ")) keyword.add_option("--name", action="store", type="string", dest="name", default = None, help="specify keyword to modify (%s)." % stylize(ST_IMPORTANT, "required")) keyword.add_option("--rename", action="store", type="string", dest="newname", default = None, help="Rename keyword") keyword.add_option("--parent", action="store", type="string", dest="parent", default = None, help="Change keyword's parent.") keyword.add_option("--remove-parent", action="store_true", dest="remove_parent", default = False, help="Remove parent.") keyword.add_option("--recursive", action="store_true", dest="recursive", default = False, help="Modify all file in all subdirs.") keyword.add_option("--description", action="store", type="string", dest="description", default = None, help="Remove parent.") parser.add_option_group(keyword) return parser.parse_args()
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store", type="string", dest="path", default = None,
action="store", type="string", dest="path", default=None,
def mod_path_parse_arguments(app, configuration): usage_text = "\n\t%s path [--path=]<fichier_ou_repertoire> [--add-keywords=<kw1[,kw1,…]>] [--del-keywords=<kw1[,kw1,…]>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--clear-keywords] [--recursive]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group(common_behaviour_group(app, parser, 'mod_path')) path = OptionGroup(parser, stylize(ST_OPTION, "Modify keyword options ")) path.add_option("--path", action="store", type="string", dest="path", default = None, help="specify path of the file/directory to tag (%s)." % stylize(ST_IMPORTANT, "required")) path.add_option("--add-keywords", action="store", type="string", dest="keywords_to_add", default = None, help="Add keywords.") path.add_option("--del-keywords", action="store", type="string", dest="keywords_to_del", default = None, help="Remove keywords.") path.add_option("--clear-keywords", action="store_true", dest="clear_keywords", default = False, help="Remove all keywords.") path.add_option("--recursive", action="store_true", dest="recursive", default = False, help="Set modifications to all subdirs.") path.add_option("--description", action="store", type="string", dest="description", default = False, help="Remove parent.") parser.add_option_group(path) return parser.parse_args()
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store", type="string", dest="keywords_to_add", default = None,
action="store", type="string", dest="keywords_to_add", default=None,
def mod_path_parse_arguments(app, configuration): usage_text = "\n\t%s path [--path=]<fichier_ou_repertoire> [--add-keywords=<kw1[,kw1,…]>] [--del-keywords=<kw1[,kw1,…]>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--clear-keywords] [--recursive]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group(common_behaviour_group(app, parser, 'mod_path')) path = OptionGroup(parser, stylize(ST_OPTION, "Modify keyword options ")) path.add_option("--path", action="store", type="string", dest="path", default = None, help="specify path of the file/directory to tag (%s)." % stylize(ST_IMPORTANT, "required")) path.add_option("--add-keywords", action="store", type="string", dest="keywords_to_add", default = None, help="Add keywords.") path.add_option("--del-keywords", action="store", type="string", dest="keywords_to_del", default = None, help="Remove keywords.") path.add_option("--clear-keywords", action="store_true", dest="clear_keywords", default = False, help="Remove all keywords.") path.add_option("--recursive", action="store_true", dest="recursive", default = False, help="Set modifications to all subdirs.") path.add_option("--description", action="store", type="string", dest="description", default = False, help="Remove parent.") parser.add_option_group(path) return parser.parse_args()
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
action="store", type="string", dest="keywords_to_del", default = None,
action="store", type="string", dest="keywords_to_del", default=None,
def mod_path_parse_arguments(app, configuration): usage_text = "\n\t%s path [--path=]<fichier_ou_repertoire> [--add-keywords=<kw1[,kw1,…]>] [--del-keywords=<kw1[,kw1,…]>]\n" % stylize(ST_APPNAME, "%prog") \ + "\t\t[--clear-keywords] [--recursive]" parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group(common_behaviour_group(app, parser, 'mod_path')) path = OptionGroup(parser, stylize(ST_OPTION, "Modify keyword options ")) path.add_option("--path", action="store", type="string", dest="path", default = None, help="specify path of the file/directory to tag (%s)." % stylize(ST_IMPORTANT, "required")) path.add_option("--add-keywords", action="store", type="string", dest="keywords_to_add", default = None, help="Add keywords.") path.add_option("--del-keywords", action="store", type="string", dest="keywords_to_del", default = None, help="Remove keywords.") path.add_option("--clear-keywords", action="store_true", dest="clear_keywords", default = False, help="Remove all keywords.") path.add_option("--recursive", action="store_true", dest="recursive", default = False, help="Set modifications to all subdirs.") path.add_option("--description", action="store", type="string", dest="description", default = False, help="Remove parent.") parser.add_option_group(path) return parser.parse_args()
461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py
gid = self.groups.name_to_gid(group)
if self.groups.is_standard_group(group): raise exceptions.BadArgumentError( '''The group %s(%s) is not a system group. It cannot be ''' '''added as primary group of a profile.''' % ( styles.stylize(styles.ST_NAME, group), styles.stylize(styles.ST_UGID, self.groups.name_to_gid(group)))) else: gid = self.groups.name_to_gid(group)
def AddProfile(self, name, group, profileQuota=1024, groups=[], description='', profileShell=None, profileSkel=None, force_existing=False): """ Add a user profile (self.groups is an instance of GroupsController and is needed to create the profile group). """
14304804713bfaefbd5bd11c22f6ccd4c702822f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/14304804713bfaefbd5bd11c22f6ccd4c702822f/profiles.py
elif e.errno == 2: pass
def initialize(self, enabled=True): """ try to start it without any tests (it should work if it's installed) and become available. If that fails, try to guess a little and help user resolving issue. else, just fail miserably.
df37e418bf74a1016e5c335ec4af16ad5f43f84c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/df37e418bf74a1016e5c335ec4af16ad5f43f84c/ldap_backend.py
logging.warning("Home dir %s does not exist, can't delete it !" % styles.stylize(styles.ST_PATH, homedir)) if not no_archive :
logging.warning("Problem deleting home dir %s (was: %s)" % (styles.stylize(styles.ST_PATH, homedir), e)) else :
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False) : """ Delete a user """ if login is None and uid is None : raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
55b760bbba476b4a6e2a2fd7dd54edfa4103196c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/55b760bbba476b4a6e2a2fd7dd54edfa4103196c/users.py
user_archive_dir = "%s/%s.deleted.%s" % (UsersController.configuration.home_archive_dir, login, strftime("%Y%m%d-%H%M%S", gmtime()))
user_archive_dir = "%s/%s.deleted.%s" % (UsersController.configuration.home_archive_dir, login, strftime("%Y%m%d-%H%M%S", gmtime()))
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False) : """ Delete a user """ if login is None and uid is None : raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
55b760bbba476b4a6e2a2fd7dd54edfa4103196c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/55b760bbba476b4a6e2a2fd7dd54edfa4103196c/users.py
logging.info(logging.SYSU_ARCHIVED_USER % (homedir, styles.stylize(styles.ST_PATH, user_archive_dir)))
logging.info(logging.SYSU_ARCHIVED_USER % (homedir, styles.stylize(styles.ST_PATH, user_archive_dir)))
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False) : """ Delete a user """ if login is None and uid is None : raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
55b760bbba476b4a6e2a2fd7dd54edfa4103196c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/55b760bbba476b4a6e2a2fd7dd54edfa4103196c/users.py
logging.warning("Home dir %s does not exist, can't archive it !" % styles.stylize(styles.ST_PATH, homedir))
logging.warning("Home dir %s doesn't exist, thus not archived." % styles.stylize(styles.ST_PATH, homedir))
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False) : """ Delete a user """ if login is None and uid is None : raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
55b760bbba476b4a6e2a2fd7dd54edfa4103196c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/55b760bbba476b4a6e2a2fd7dd54edfa4103196c/users.py
del(UsersController.login_cache[login]) del(UsersController.users[uid]) logging.info(logging.SYSU_DELETED_USER % styles.stylize(styles.ST_LOGIN, login)) if not batch : self.WriteConf()
def DeleteUser(self, login=None, no_archive=False, uid=None, batch=False) : """ Delete a user """ if login is None and uid is None : raise exceptions.BadArgumentError(logging.SYSU_SPECIFY_LGN_OR_UID)
55b760bbba476b4a6e2a2fd7dd54edfa4103196c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/55b760bbba476b4a6e2a2fd7dd54edfa4103196c/users.py
"The profile '%s' already exists." % group)
'''The group '%s' is already taken by another profile (%s). ''' '''Please choose another one.''' % ( group, self.group_to_name(group)))
def AddProfile(self, name, group, profileQuota=1024, groups=[], description='', profileShell=None, profileSkel=None, force_existing=False): """ Add a user profile (self.groups is an instance of GroupsController and is needed to create the profile group). """
2a986f26a804f983a85ba00976c80ad42eca427e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2a986f26a804f983a85ba00976c80ad42eca427e/profiles.py
if system and self.is_system_gid(existing_gid):
if system and self.is_system_gid(existing_gid) \ or not system and self.is_standard_gid(existing_gid):
def __add_group(self, name, system, manual_gid=None, description = "", groupSkel = "", batch=False, force=False): """ Add a POSIX group, write the system data files. Return the gid of the group created."""
19f24f68276c8be10c2bb309ef6575c7d4f758a1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/19f24f68276c8be10c2bb309ef6575c7d4f758a1/groups.py
f = self.send_head() if f: f.close()
try: f = self.send_head() if f: f.close() except socket.error, e: logging.warning('%s: harmless exception in do_HEAD(): %s. ' 'Full traceback follows:' % ( current_thread().name, str(e).splitlines()[0]))
def do_HEAD(self): f = self.send_head() if f: f.close()
26616824ce153098ffae97adf6f74e20cabfd843 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/26616824ce153098ffae97adf6f74e20cabfd843/wmi.py
f = self.send_head() if f: if type(f) in (type(""), type(u'')): self.wfile.write(f) else: buf = f.read(LMC.configuration.licornd.buffer_size) while buf: self.wfile.write(buf)
try: f = self.send_head() if f: if type(f) in (type(""), type(u'')): self.wfile.write(f) else:
def do_GET(self): f = self.send_head() if f: if type(f) in (type(""), type(u'')): self.wfile.write(f) else: buf = f.read(LMC.configuration.licornd.buffer_size) while buf: self.wfile.write(buf) buf = f.read(LMC.configuration.licornd.buffer_size) f.close()
26616824ce153098ffae97adf6f74e20cabfd843 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/26616824ce153098ffae97adf6f74e20cabfd843/wmi.py
f.close()
while buf: self.wfile.write(buf) buf = f.read(LMC.configuration.licornd.buffer_size) f.close() except socket.error, e: logging.warning('%s: harmless exception in do_GET(): %s. ' 'Full traceback follows:' % ( current_thread().name, str(e).splitlines()[0]))
def do_GET(self): f = self.send_head() if f: if type(f) in (type(""), type(u'')): self.wfile.write(f) else: buf = f.read(LMC.configuration.licornd.buffer_size) while buf: self.wfile.write(buf) buf = f.read(LMC.configuration.licornd.buffer_size) f.close()
26616824ce153098ffae97adf6f74e20cabfd843 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/26616824ce153098ffae97adf6f74e20cabfd843/wmi.py
for member in groups.groups[g]['members']: if member == entry[0]:
for member in groups.groups[g]['memberUid']: if member == temp_user_dict['login']:
def account_lock(value, tmp_entry=temp_user_dict): try: # get around an error where password is not base64 encoded. password = decodestring(value.split('}',1)[1]) except Exception: password = value
7a870bda1ec1fa555d3a08eb79997dba442878dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/7a870bda1ec1fa555d3a08eb79997dba442878dd/ldap_backend.py
for line in posix1e.ACL( file='%s/%s' % (GroupsController.configuration.defaults.home_base_path,
for line in posix1e.ACL( file='%s/%s' % ( GroupsController.configuration.defaults.home_base_path,
def GetHiddenState(self): """ See if /home/groups is readable or not. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
- 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators
- 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators
def Select(self, filter_string): """ Filter group accounts on different criteria: - 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators The criteria values are defined in /etc/{login.defs,adduser.conf} """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
self.filtered_groups = filter(self.is_standard_gid, GroupsController.groups.keys())
self.filtered_groups = filter(self.is_standard_gid, GroupsController.groups.keys())
def Select(self, filter_string): """ Filter group accounts on different criteria: - 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators The criteria values are defined in /etc/{login.defs,adduser.conf} """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
self.filtered_groups = filter(self.is_system_gid, GroupsController.groups.keys())
self.filtered_groups = filter(self.is_system_gid, GroupsController.groups.keys())
def Select(self, filter_string): """ Filter group accounts on different criteria: - 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators The criteria values are defined in /etc/{login.defs,adduser.conf} """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
for name in GroupsController.configuration.groups.privileges_whitelist:
for name in \ GroupsController.configuration.groups.privileges_whitelist:
def Select(self, filter_string): """ Filter group accounts on different criteria: - 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators The criteria values are defined in /etc/{login.defs,adduser.conf} """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
if GroupsController.groups[gid]['name'].startswith(GroupsController.configuration.groups.guest_prefix):
if GroupsController.groups[gid]['name'].startswith( GroupsController.configuration.groups.guest_prefix):
def Select(self, filter_string): """ Filter group accounts on different criteria: - 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators The criteria values are defined in /etc/{login.defs,adduser.conf} """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
if GroupsController.groups[gid]['name'].startswith(GroupsController.configuration.groups.resp_prefix):
if GroupsController.groups[gid]['name'].startswith( GroupsController.configuration.groups.resp_prefix):
def Select(self, filter_string): """ Filter group accounts on different criteria: - 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators The criteria values are defined in /etc/{login.defs,adduser.conf} """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
self.filtered_groups = filter(self.is_empty_gid, GroupsController.groups.keys())
self.filtered_groups = filter(self.is_empty_gid, GroupsController.groups.keys())
def Select(self, filter_string): """ Filter group accounts on different criteria: - 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators The criteria values are defined in /etc/{login.defs,adduser.conf} """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
""" Export the groups list to human readable (= « get group ») form. """
""" Export the groups list to human readable (= « get group ») form. """
def ExportCLI(self, long): """ Export the groups list to human readable (= « get group ») form. """ if self.filter_applied: gids = self.filtered_groups else: gids = GroupsController.groups.keys() gids.sort()
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
""" Export groups the way UNIX get does, separating fields with ":" """
""" Export groups the way UNIX get does, separating with ":" """
def ExportOneGroupFromGid(gid, mygroups = GroupsController.groups): """ Export groups the way UNIX get does, separating fields with ":" """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def ExportOneGroupFromGid(gid, mygroups = GroupsController.groups): """ Export groups the way UNIX get does, separating fields with ":" """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
data += " <group>\n" \ + " <name>" + group['name'] + "</name>\n" \ + " <userPassword>" + group['userPassword'] + "</userPassword>\n" \ + " <gid>" + str(gid) + "</gid>\n" \ + " <description>" + group['description'] + "</description>\n" if not self.is_system_gid(gid): data += " <groupSkel>" + group['groupSkel'] + "</groupSkel>\n" if group['permissive'] is None: data += " <permissive>[unknown]</permissive>\n" else: data += " <permissive>" + str(group['permissive']) + "</permissive>\n" if group['memberUid'] != set(): data += " <memberUid>" + ", ".join(group['memberUid']) + "</memberUid>\n" if long: data += " <backend>%s</backend>\n" % group['backend'] data += " </group>\n"
data += ''' <group> <name>%s</name> <gid>%s</gid>%s%s <permissive>%s</permissive>\n%s%s%s</group>\n''' % ( group['name'], str(gid), '\n <userPassword>%s</userPassword>' % group['userPassword'] \ if group.has_key('userPassword') else '', '\n <description>%s</description>' % group['description'] \ if group.has_key('description') else '', 'unknown' if group['permissive'] is None \ else str(group['permissive']), '' if self.is_system_gid(gid) \ else ' <groupSkel>%s</groupSkel>\n' % group['groupSkel'], ' <memberUid>%s</memberUid>\n' % \ ", ".join(group['memberUid']) if group['memberUid'] != set() \ else '', " <backend>%s</backend>\n" % group['backend'] if long else '' )
def ExportXML(self, long): """ Export the groups list to XML. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def AddGroup(self, name, gid=None, description="", groupSkel="", system=False, permissive=False, batch=False, force=False): """ Add a Licorn group (the group + the guest/responsible group + the shared dir + permissions (ACL)). """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def AddGroup(self, name, gid=None, description="", groupSkel="", system=False, permissive=False, batch=False, force=False): """ Add a Licorn group (the group + the guest/responsible group + the shared dir + permissions (ACL)). """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def AddGroup(self, name, gid=None, description="", groupSkel="", system=False, permissive=False, batch=False, force=False): """ Add a Licorn group (the group + the guest/responsible group + the shared dir + permissions (ACL)). """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def AddGroup(self, name, gid=None, description="", groupSkel="", system=False, permissive=False, batch=False, force=False): """ Add a Licorn group (the group + the guest/responsible group + the shared dir + permissions (ACL)). """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def __add_group(self, name, system, manual_gid=None, description = "", groupSkel = "", batch=False, force=False): """ Add a POSIX group, write the system data files. Return the gid of the group created."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def DeleteGroup(self, name, del_users, no_archive, bygid = None, batch=False):
def DeleteGroup(self, name, del_users, no_archive, bygid=None, batch=False):
def DeleteGroup(self, name, del_users, no_archive, bygid = None, batch=False): """ Delete an Licorn group """ if name is None and bygid is None: raise exceptions.BadArgumentError, "You must specify a name or a GID."
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
raise exceptions.BadArgumentError, "You must specify a name or a GID."
raise exceptions.BadArgumentError( "You must specify a name or a GID.")
def DeleteGroup(self, name, del_users, no_archive, bygid = None, batch=False): """ Delete an Licorn group """ if name is None and bygid is None: raise exceptions.BadArgumentError, "You must specify a name or a GID."
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
if not del_users: if prim_memb != set(): raise exceptions.BadArgumentError, "The group still has members. You must delete them first, or force their automatic deletion with an option." home = '%s/%s/%s' % (GroupsController.configuration.defaults.home_base_path, GroupsController.configuration.groups.names['plural'], name)
if prim_memb != set() and not del_users: raise exceptions.BadArgumentError('''The group still has ''' '''members. You must delete them first, or force their ''' '''automatic deletion with the --del-users option. WARNING: ''' '''this is a bad idea, use with caution.''') home = '%s/%s/%s' % ( GroupsController.configuration.defaults.home_base_path, GroupsController.configuration.groups.names['plural'], name)
def DeleteGroup(self, name, del_users, no_archive, bygid = None, batch=False): """ Delete an Licorn group """ if name is None and bygid is None: raise exceptions.BadArgumentError, "You must specify a name or a GID."
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
raise NotImplementedError("This function is disabled, it is not yet complete.")
raise NotImplementedError( "This function is disabled, it is not yet complete.")
def RenameGroup(self, profilelist, name, new_name): """ Modify the name of a group."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
except exceptions.LicornRuntimeException:
except exceptions.LicornRuntimeException:
def RenameGroup(self, profilelist, name, new_name): """ Modify the name of a group."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
home = "%s/%s/%s" % (GroupsController.configuration.defaults.home_base_path, GroupsController.configuration.groups.names['plural'], GroupsController.groups[gid]['name']) new_home = "%s/%s/%s" % (GroupsController.configuration.defaults.home_base_path, GroupsController.configuration.groups.names['plural'], new_name)
home = "%s/%s/%s" % ( GroupsController.configuration.defaults.home_base_path, GroupsController.configuration.groups.names['plural'], GroupsController.groups[gid]['name']) new_home = "%s/%s/%s" % ( GroupsController.configuration.defaults.home_base_path, GroupsController.configuration.groups.names['plural'], new_name)
def RenameGroup(self, profilelist, name, new_name): """ Modify the name of a group."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
tmpname = GroupsController.configuration.groups.resp_prefix + name
tmpname = GroupsController.configuration.groups.resp_prefix \ + name
def RenameGroup(self, profilelist, name, new_name): """ Modify the name of a group."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
tmpname = GroupsController.configuration.groups.guest_prefix + name
tmpname = GroupsController.configuration.groups.guest_prefix \ + name
def RenameGroup(self, profilelist, name, new_name): """ Modify the name of a group."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
except ValueError: pass
except ValueError: pass
def RenameGroup(self, profilelist, name, new_name): """ Modify the name of a group."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def RenameGroup(self, profilelist, name, new_name): """ Modify the name of a group."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
raise exceptions.AlreadyExistsError("the new name you have choosen, %s, is already taken by another group !" % styles.stylize(styles.ST_NAME, new_name))
raise exceptions.AlreadyExistsError( '''the new name you have choosen, %s, is already taken by ''' '''another group !''' % \ styles.stylize(styles.ST_NAME, new_name))
def RenameGroup(self, profilelist, name, new_name): """ Modify the name of a group."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
raise exceptions.BadArgumentError("The skel you specified doesn't exist on this system. Valid skels are: %s." % str(GroupsController.configuration.users.skels))
raise exceptions.BadArgumentError('''The skel you specified ''' '''doesn't exist on this system. Valid skels are: %s.''' % \ str(GroupsController.configuration.users.skels))
def ChangeGroupSkel(self, name, groupSkel): """ Change the description of a group """ if name is None: raise exceptions.BadArgumentError, "You must specify a name" if groupSkel is None: raise exceptions.BadArgumentError, "You must specify a groupSkel"
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
raise exceptions.BadArgumentError, "You must specify a group name to add."
raise exceptions.BadArgumentError( 'You must specify a group name to add.')
def AddGrantedProfiles(self, users, profiles, name): """ Allow the users of the profiles given to access to the shared dir Warning: Don't give [] for profiles, but [""] """ if name is None: raise exceptions.BadArgumentError, "You must specify a group name to add."
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
logging.progress("Group %s already in the list of profile %s." % ( styles.stylize(styles.ST_NAME, name), styles.stylize(styles.ST_NAME, p)) )
logging.progress( "Group %s already in the list of profile %s." % ( styles.stylize(styles.ST_NAME, name), styles.stylize(styles.ST_NAME, p)))
def AddGrantedProfiles(self, users, profiles, name): """ Allow the users of the profiles given to access to the shared dir Warning: Don't give [] for profiles, but [""] """ if name is None: raise exceptions.BadArgumentError, "You must specify a group name to add."
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
logging.info("Added group %s in the groups list of profile %s." % ( styles.stylize(styles.ST_NAME, name), styles.stylize(styles.ST_NAME, p)) )
logging.info( "Added group %s in the groups list of profile %s." % ( styles.stylize(styles.ST_NAME, name), styles.stylize(styles.ST_NAME, p)))
def AddGrantedProfiles(self, users, profiles, name): """ Allow the users of the profiles given to access to the shared dir Warning: Don't give [] for profiles, but [""] """ if name is None: raise exceptions.BadArgumentError, "You must specify a group name to add."
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
_users_to_add = self.__find_group_members(users, GroupsController.profiles[p]['groupName'])
_users_to_add = self.__find_group_members(users, GroupsController.profiles[p]['groupName'])
def AddGrantedProfiles(self, users, profiles, name): """ Allow the users of the profiles given to access to the shared dir Warning: Don't give [] for profiles, but [""] """ if name is None: raise exceptions.BadArgumentError, "You must specify a group name to add."
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
logging.warning("Profile %s doesn't exist, ignored." % styles.stylize(styles.ST_NAME, p))
logging.warning("Profile %s doesn't exist, ignored." % styles.stylize(styles.ST_NAME, p))
def AddGrantedProfiles(self, users, profiles, name): """ Allow the users of the profiles given to access to the shared dir Warning: Don't give [] for profiles, but [""] """ if name is None: raise exceptions.BadArgumentError, "You must specify a group name to add."
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
""" Disallow the users of the profiles given to access to the shared dir. """
""" Disallow the users of the profiles given to access to the shared dir. """
def DeleteGrantedProfiles(self, users, profiles, name): """ Disallow the users of the profiles given to access to the shared dir. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
raise exceptions.BadArgumentError, "You must specify a name"
raise exceptions.BadArgumentError,("You must specify a name")
def DeleteGrantedProfiles(self, users, profiles, name): """ Disallow the users of the profiles given to access to the shared dir. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
if p in profiles.profiles: if name in profiles.profiles[p]['memberGid']: print "Delete group '" + name + "' from the groups list of the profile '" + p + "'" profiles.DeleteGroupsFromProfile([name]) _users_to_del = self.__find_group_members(users, profiles.profiles[p]['groupName']) self.RemoveUsersFromGroup(name, _users_to_del, users) else: print "The group '" + name + "' is not present in groups list of the profile '" + p + "'"
if name in profiles.profiles[p]['memberGid']: logging.notice("Deleting group '%s' from the profile '%s'." % ( styles.stylize(styles.ST_NAME, name), styles.stylize(styles.ST_NAME, p))) profiles.DeleteGroupsFromProfile([name]) _users_to_del = self.__find_group_members(users, profiles[p]['groupName']) self.RemoveUsersFromGroup(name, _users_to_del, users)
def DeleteGrantedProfiles(self, users, profiles, name): """ Disallow the users of the profiles given to access to the shared dir. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
print "Profile '" + str(p) + "' doesn't exist, it's ignored"
logging.info('Group %s already absent from profile %s.' % ( styles.stylize(styles.ST_NAME, name), styles.stylize(styles.ST_NAME, p)))
def DeleteGrantedProfiles(self, users, profiles, name): """ Disallow the users of the profiles given to access to the shared dir. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
logging.progress("User %s is already a member of %s, skipped." % ( styles.stylize(styles.ST_LOGIN, u), styles.stylize(styles.ST_NAME, name)))
logging.progress( "User %s is already a member of %s, skipped." % ( styles.stylize(styles.ST_LOGIN, u), styles.stylize(styles.ST_NAME, name)))
def AddUsersInGroup(self, name, users_to_add, batch = False): """ Add a user list in the group 'name'. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
styles.stylize(styles.ST_LOGIN, u), styles.stylize(styles.ST_NAME, name)) )
styles.stylize(styles.ST_LOGIN, u), styles.stylize(styles.ST_NAME, name)))
def AddUsersInGroup(self, name, users_to_add, batch = False): """ Add a user list in the group 'name'. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def AddUsersInGroup(self, name, users_to_add, batch = False): """ Add a user list in the group 'name'. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
elif name.startswith(GroupsController.configuration.groups.resp_prefix):
elif name.startswith( GroupsController.configuration.groups.resp_prefix):
def AddUsersInGroup(self, name, users_to_add, batch = False): """ Add a user list in the group 'name'. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
link_basename = GroupsController.groups[gid]['name'].replace( GroupsController.configuration.groups.resp_prefix, "", 1) elif name.startswith(GroupsController.configuration.groups.guest_prefix): link_basename = GroupsController.groups[gid]['name'].replace( GroupsController.configuration.groups.guest_prefix, "", 1)
link_basename = \ GroupsController.groups[gid]['name'].replace( GroupsController.configuration.groups.resp_prefix, "", 1) elif name.startswith( GroupsController.configuration.groups.guest_prefix): link_basename = \ GroupsController.groups[gid]['name'].replace( GroupsController.configuration.groups.guest_prefix, "", 1)
def AddUsersInGroup(self, name, users_to_add, batch = False): """ Add a user list in the group 'name'. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
link_src = os.path.join(GroupsController.configuration.defaults.home_base_path, GroupsController.configuration.groups.names['plural'], link_basename) link_dst = os.path.join(GroupsController.users.users[uid]['homeDirectory'],
link_src = os.path.join( GroupsController.configuration.defaults.home_base_path, GroupsController.configuration.groups.names['plural'], link_basename) link_dst = os.path.join( GroupsController.users.users[uid]['homeDirectory'],
def AddUsersInGroup(self, name, users_to_add, batch = False): """ Add a user list in the group 'name'. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
GroupsController.users.users[GroupsController.users.login_to_uid(u)]['groups'].remove(name)
GroupsController.users.users[ GroupsController.users.login_to_uid(u) ]['groups'].remove(name)
def RemoveUsersFromGroup(self, name, users_to_remove, batch=False): """ Delete a users list in the group 'name'. """ if name is None: raise exceptions.BadArgumentError, "You must specify a name" if users_to_remove is None: raise exceptions.BadArgumentError, "You must specify a users list"
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def RemoveUsersFromGroup(self, name, users_to_remove, batch=False): """ Delete a users list in the group 'name'. """ if name is None: raise exceptions.BadArgumentError, "You must specify a name" if users_to_remove is None: raise exceptions.BadArgumentError, "You must specify a users list"
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def RemoveUsersFromGroup(self, name, users_to_remove, batch=False): """ Delete a users list in the group 'name'. """ if name is None: raise exceptions.BadArgumentError, "You must specify a name" if users_to_remove is None: raise exceptions.BadArgumentError, "You must specify a users list"
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
link_src = os.path.join(GroupsController.configuration.defaults.home_base_path, GroupsController.configuration.groups.names['plural'], GroupsController.groups[gid]['name']) for link in fsapi.minifind(GroupsController.users.users[uid]['homeDirectory'], maxdepth = 2, type = stat.S_IFLNK):
link_src = os.path.join( GroupsController.configuration.defaults.home_base_path, GroupsController.configuration.groups.names['plural'], GroupsController.groups[gid]['name']) for link in fsapi.minifind( GroupsController.users.users[uid]['homeDirectory'], maxdepth = 2, type = stat.S_IFLNK):
def RemoveUsersFromGroup(self, name, users_to_remove, batch=False): """ Delete a users list in the group 'name'. """ if name is None: raise exceptions.BadArgumentError, "You must specify a name" if users_to_remove is None: raise exceptions.BadArgumentError, "You must specify a users list"
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
logging.info("Deleted symlink %s." % styles.stylize(styles.ST_LINK, link) )
logging.info("Deleted symlink %s." % styles.stylize(styles.ST_LINK, link))
def RemoveUsersFromGroup(self, name, users_to_remove, batch=False): """ Delete a users list in the group 'name'. """ if name is None: raise exceptions.BadArgumentError, "You must specify a name" if users_to_remove is None: raise exceptions.BadArgumentError, "You must specify a users list"
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
raise exceptions.LicornRuntimeError("Unable to delete symlink %s (was: %s)." % (styles.stylize(styles.ST_LINK, link), str(e)) ) logging.info("Removed user %s from members of %s." % (styles.stylize(styles.ST_LOGIN, u), styles.stylize(styles.ST_NAME, name)) )
raise exceptions.LicornRuntimeError( "Unable to delete symlink %s (was: %s)." % ( styles.stylize(styles.ST_LINK, link), str(e)) ) logging.info("Removed user %s from members of %s." % ( styles.stylize(styles.ST_LOGIN, u), styles.stylize(styles.ST_NAME, name)))
def RemoveUsersFromGroup(self, name, users_to_remove, batch=False): """ Delete a users list in the group 'name'. """ if name is None: raise exceptions.BadArgumentError, "You must specify a name" if users_to_remove is None: raise exceptions.BadArgumentError, "You must specify a users list"
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
logging.progress("User %s is already not a member of %s, skipped." % (styles.stylize(styles.ST_LOGIN, u), styles.stylize(styles.ST_NAME, name)))
logging.info( "User %s is already not a member of %s, skipped." % ( styles.stylize(styles.ST_LOGIN, u), styles.stylize(styles.ST_NAME, name)))
def RemoveUsersFromGroup(self, name, users_to_remove, batch=False): """ Delete a users list in the group 'name'. """ if name is None: raise exceptions.BadArgumentError, "You must specify a name" if users_to_remove is None: raise exceptions.BadArgumentError, "You must specify a users list"
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def BuildGroupACL(self, gid, path = ""): """ Return an ACL triolet (a dict) that will be used to check something in the group shared dir. path must be the name of a file/dir, relative from group_home (this will help affining the ACL). EG: path in [ 'toto.odt', 'somedir', 'public_html/images/logo.img' ], etc. the "@GE" and "@UE" strings will be later replaced by individual execution bits of certain files which must be kept executable.
def BuildGroupACL(self, gid, path=""): """ Return an ACL triolet (a dict) that will be used to check something in the group shared dir. path must be the name of a file/dir, relative from group_home (this will help affining the ACL). EG: path \ in [ 'toto.odt', 'somedir', 'public_html/images/logo.img' ]. the "@GE" and "@UE" strings will be later replaced by individual execution bits of certain files which must be kept executable.
def BuildGroupACL(self, gid, path = ""): """ Return an ACL triolet (a dict) that will be used to check something in the group shared dir. path must be the name of a file/dir, relative from group_home (this will help affining the ACL). EG: path in [ 'toto.odt', 'somedir', 'public_html/images/logo.img' ], etc.
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
file_acl_base = "u::rw@UE,g::---,o:---,g:%s:rw@GE,g:%s:r-@GE,g:%s:rw@GE" \
file_acl_base = \ "u::rw@UE,g::---,o:---,g:%s:rw@GE,g:%s:r-@GE,g:%s:rw@GE" \
def BuildGroupACL(self, gid, path = ""): """ Return an ACL triolet (a dict) that will be used to check something in the group shared dir. path must be the name of a file/dir, relative from group_home (this will help affining the ACL). EG: path in [ 'toto.odt', 'somedir', 'public_html/images/logo.img' ], etc.
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
'access_acl': "%s,g:%s:rwx,g:www-data:r-x,%s" % (acl_base, group, acl_mask), 'default_acl': "%s,g:%s:%s,g:www-data:r-x,%s" % (acl_base, group, group_default_acl, acl_mask), 'content_acl': "%s,g:%s:%s,g:www-data:r--,%s" % (file_acl_base, group, group_file_acl, file_acl_mask),
'access_acl': "%s,g:%s:rwx,g:www-data:r-x,%s" % ( acl_base, group, acl_mask), 'default_acl': "%s,g:%s:%s,g:www-data:r-x,%s" % ( acl_base, group, group_default_acl, acl_mask), 'content_acl': "%s,g:%s:%s,g:www-data:r--,%s" % ( file_acl_base, group, group_file_acl, file_acl_mask),
def BuildGroupACL(self, gid, path = ""): """ Return an ACL triolet (a dict) that will be used to check something in the group shared dir. path must be the name of a file/dir, relative from group_home (this will help affining the ACL). EG: path in [ 'toto.odt', 'somedir', 'public_html/images/logo.img' ], etc.
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
'access_acl': "%s,g:%s:rwx,g:www-data:--x,%s" % (acl_base, group, acl_mask), 'default_acl': "%s,g:%s:%s,%s" % (acl_base, group, group_default_acl, acl_mask), 'content_acl': "%s,g:%s:%s,%s" % (file_acl_base, group, group_file_acl, file_acl_mask),
'access_acl': "%s,g:%s:rwx,g:www-data:--x,%s" % ( acl_base, group, acl_mask), 'default_acl': "%s,g:%s:%s,%s" % ( acl_base, group, group_default_acl, acl_mask), 'content_acl': "%s,g:%s:%s,%s" % ( file_acl_base, group, group_file_acl, file_acl_mask),
def BuildGroupACL(self, gid, path = ""): """ Return an ACL triolet (a dict) that will be used to check something in the group shared dir. path must be the name of a file/dir, relative from group_home (this will help affining the ACL). EG: path in [ 'toto.odt', 'somedir', 'public_html/images/logo.img' ], etc.
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
"""Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs.
"""Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs.
def CheckAssociatedSystemGroups(self, group, minimal=True, batch=False, auto_answer=None, force=False): """Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
for (prefix, title) in ( ( GroupsController.configuration.groups.resp_prefix, "responsibles" ), ( GroupsController.configuration.groups.guest_prefix, "guests" ) ):
for (prefix, title) in ( (GroupsController.configuration.groups.resp_prefix, "responsibles" ), (GroupsController.configuration.groups.guest_prefix, "guests") ):
def CheckAssociatedSystemGroups(self, group, minimal=True, batch=False, auto_answer=None, force=False): """Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
logging.progress("Checking system group %s..." % styles.stylize(styles.ST_NAME, group_name))
logging.progress("Checking system group %s..." % styles.stylize(styles.ST_NAME, group_name))
def CheckAssociatedSystemGroups(self, group, minimal=True, batch=False, auto_answer=None, force=False): """Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def CheckAssociatedSystemGroups(self, group, minimal=True, batch=False, auto_answer=None, force=False): """Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
warn_message = logging.SYSG_SYSTEM_GROUP_REQUIRED % (styles.stylize(styles.ST_NAME, group_name), styles.stylize(styles.ST_NAME, group))
warn_message = logging.SYSG_SYSTEM_GROUP_REQUIRED % ( styles.stylize(styles.ST_NAME, group_name), styles.stylize(styles.ST_NAME, group))
def CheckAssociatedSystemGroups(self, group, minimal=True, batch=False, auto_answer=None, force=False): """Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
GroupsController.name_cache[ prefix[0] + group ] = temp_gid
GroupsController.name_cache[prefix[0]+group] = temp_gid
def CheckAssociatedSystemGroups(self, group, minimal=True, batch=False, auto_answer=None, force=False): """Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
logging.info("Created system group %s." % styles.stylize(styles.ST_NAME, group_name))
logging.info("Created system group %s." % styles.stylize(styles.ST_NAME, group_name))
def CheckAssociatedSystemGroups(self, group, minimal=True, batch=False, auto_answer=None, force=False): """Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
def CheckAssociatedSystemGroups(self, group, minimal=True, batch=False, auto_answer=None, force=False): """Check the system groups that a standard group need to fuction flawlessly. For example, a group "toto" need 2 system groups "resp-toto" and "guest-toto" for its ACLs. """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
logging.progress("Checking group %s..." % styles.stylize(styles.ST_NAME, group)) all_went_ok &= self.CheckAssociatedSystemGroups(group, minimal, batch, auto_answer) group_home = "%s/%s/%s" % (GroupsController.configuration.defaults.home_base_path,
logging.progress("Checking group %s..." % styles.stylize(styles.ST_NAME, group)) all_went_ok &= self.CheckAssociatedSystemGroups( group, minimal, batch, auto_answer) group_home = "%s/%s/%s" % ( GroupsController.configuration.defaults.home_base_path,
def __check_group(self, group, minimal=True, batch=False, auto_answer=None, force=False):
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py