Project

General

Profile

Actions

User story #5795

closed

Make Categories API accessible

Added by Florian Heigl over 9 years ago. Updated almost 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

Also available in: Atom PDF