Пример #1
0
 def list():
     list_command.do(
         ipa_find_command='host-find',
         field_configs=HOST_LIST_FIELD_CONFIGS,
         sort_key='Host name',
         blacklist_key='serverhostname',
         blacklist_val_array=HOST_BLACKLIST,
     )
Пример #2
0
 def list():
     list_command.do(
         ipa_find_command='user-find',
         field_configs=USER_LIST_FIELD_CONFIGS,
         sort_key='UID',
         generate_additional_data=_additional_data_for_list,
         blacklist_key='User login',
         blacklist_val_array=USER_BLACKLIST
     )
Пример #3
0
 def list():
     list_command.do(
         ipa_find_command='group-find',
         all_fields=False,
         field_configs=GROUP_LIST_FIELD_CONFIGS,
         sort_key='Group name',
         blacklist_key='Group name',
         blacklist_val_array=GROUP_BLACKLIST
     )
Пример #4
0
 def list():
     list_command.do(
         ipa_find_command='hostgroup-find',
         all_fields=False,
         field_configs=HOSTGROUP_LIST_FIELD_CONFIGS,
         sort_key='Host-group',
         blacklist_key='Host-group',
         blacklist_val_array=HOSTGROUP_BLACKLIST,
     )
Пример #5
0
 def show(hostgroup_name):
     _validate_blacklist_hostgroups(hostgroup_name)
     hostgroup_find_args = ['--hostgroup-name={}'.format(hostgroup_name)]
     try:
         list_command.do(ipa_find_command='hostgroup-find',
                         ipa_find_args=hostgroup_find_args,
                         field_configs=HOSTGROUP_SHOW_FIELD_CONFIGS,
                         display=list_command.list_displayer)
     except IpaRunError:
         #no hostgroup by that name found
         error = '{}: group not found'.format(hostgroup_name)
         raise click.ClickException(error)
Пример #6
0
 def show(hostname):
     _validate_blacklist_hosts(hostname)
     host_find_args = ['--hostname={}'.format(hostname)]
     try:
         list_command.do(ipa_find_command='host-find',
                         ipa_find_args=host_find_args,
                         field_configs=HOST_SHOW_FIELD_CONFIGS,
                         display=list_command.list_displayer)
     except IpaRunError:
         # No matching host found; for consistency raise error with similar
         # format to IPA errors.
         error = '{}: host not found'.format(hostname)
         raise click.ClickException(error)
Пример #7
0
 def show(group_name):
     _validate_blacklist_groups(group_name)
     group_find_args = ['--group-name={}'.format(group_name)]
     try:
         list_command.do(
             ipa_find_command='group-find',
             ipa_find_args=group_find_args,
             field_configs=GROUP_SHOW_FIELD_CONFIGS,
             display=list_command.list_displayer
         )
     except IpaRunError:
         # No matching group found
         error = '{}: group not found'.format(group_name)
         raise click.ClickException(error)
Пример #8
0
 def show(login):
     _validate_blacklist_users(login)
     user_find_args = ['--login={}'.format(login)]
     try:
         list_command.do(
             ipa_find_command='user-find',
             ipa_find_args=user_find_args,
             field_configs=USER_SHOW_FIELD_CONFIGS,
             generate_additional_data=_additional_data_for_show,
             display=list_command.list_displayer
         )
     except IpaRunError:
         # No matching user found; for consistency raise error with similar
         # format to IPA errors.
         error = '{}: user not found'.format(login)
         raise click.ClickException(error)