Project

General

Profile

Actions

User story #5795

closed

Make Categories API accessible

Added by Florian Heigl about 10 years ago. Updated over 9 years ago.

Status:
Rejected
Priority:
N/A
Category:
API
Target version:
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

Description

It's not possible to add a node group without knowing the ID of the category it should be assigned to.
But so far, you cannot query them.

The following hack shows how you currently would need a hardcoded uuid, found from metadata.xml

@
def get_group_cat(group):

cat_name  = "CM Testumgebung" 
cat_id = "9ab2f05c-8191-4da5-853f-8dcc19d2b5da"
return (cat_name, cat_id)

def create_group_obj(objname,arg_nodes):

if arg_nodes:
print "adding group with nodes"
nodeids = arg_nodes
else:
nodeids = []
print "adding group"
  1. erstmal fix, spaeter ueber name!
    cat_name, cat_id = get_group_cat(objname)
params = {
"nodeGroupCategory": cat_id,
"displayName" : objname,
"description" : "Group %s" % objname,
"dynamic" : 'false',
"nodeIds" : nodeids,
"reason" : "Automatically created in testing",
}
return params
@

When creating new objects, you should be able to

  • add categories
  • find the category ids to put the objects in the right place.
Workaround is to sync via LDAP (and it's a bad workaround)
Jonathan uttered words like
  • "LDAP"
  • "considered"
  • "internal"

Related issues 2 (0 open2 closed)

Is duplicate of Rudder - User story #6511: Add an API to manage Rule categoriesReleasedFrançois ARMAND2015-05-07Actions
Is duplicate of Rudder - User story #6512: Add an API to manage Group categoriesReleasedFrançois ARMAND2015-05-12Actions
Actions #1

Updated by François ARMAND about 10 years ago

  • Status changed from New to 8
  • Assignee set to François ARMAND
  • Target version set to 3.0.0~beta1

Thanks for both reporting and the proposed workaround.
We are going to add missing api call for all categories.

Actions #2

Updated by Florian Heigl about 10 years ago

Hi,

I have looked at this in some more detail.

To make this work:

  1. the ID needs to be included in the group details when querying a group
  2. An API call is needed to get categories incl. ID and create them.

I'm dumping them to ldif files using these queries:

ldapsearch -x -D cn=manager,cn=rudder-configuration -w $PW -b "techniqueCategoryId=Active Techniques,ou=Rudder,cn=rudder-configuration" objectClass=techniqueCategory
ldapsearch -x -D cn=manager,cn=rudder-configuration -w $PW -b "groupCategoryId=GroupRoot,ou=Rudder,cn=rudder-configuration" '(&(objectClass=groupCategory)
ldapsearch -x -D cn=manager,cn=rudder-configuration -w $PW -b "ruleCategoryId=rootRuleCategory,ou=Rudder,cn=rudder-configuration" objectClass=ruleCategory(isSystem=FALSE))'

Actions #3

Updated by Florian Heigl about 10 years ago

I'm not sure how much risk is inherited with excluding system groups (or with including them)

So far it appears to work as I described.

Actions #4

Updated by Jonathan CLARKE about 10 years ago

  • Target version changed from 3.0.0~beta1 to 3.1.0~beta1
Actions #5

Updated by Benoît PECCATTE over 9 years ago

  • Status changed from 8 to New
Actions #6

Updated by Vincent MEMBRÉ over 9 years ago

  • Target version changed from 3.1.0~beta1 to 3.1.0~rc1
Actions #7

Updated by Vincent MEMBRÉ over 9 years ago

  • Status changed from New to Rejected

Im closing this as duplicate of #6511 and #6512

Feel free to open it again if needed

Actions #8

Updated by Vincent MEMBRÉ over 9 years ago

Actions #9

Updated by Vincent MEMBRÉ over 9 years ago

Actions

Also available in: Atom PDF