def countnodes(args):
- """ Count the number of nodes in a chunk of JSON.
+ """Count the number of nodes in a chunk of JSON.
Because json blobs come in multiple forms, use node, subnode or
category to assist in defining what to count.
def fieldcount(pobject, field):
- """ Helper-func - use countnodes to count the occurences of field in pobject
+ """Helper-func - use countnodes to count the occurences of field in pobject
example
count the occurences of domainid in this single record...
def subnodecount(pobject, subnode):
- """ Helper-func - use countnodes to count subnode in pobject
+ """Helper-func - use countnodes to count subnode in pobject
example
count the occurences of domainid in this json.
def nodecount(pobject, category, node):
- """ Helper-func - use countnodes function to count node of a category type
+ """Helper-func - use countnodes function to count node of a category type
example
count the domainid in these properly formatted json blobs...
def get_id_by_name(args):
- """ Get an ID by the Name field.
+ """Get an ID by the Name field.
Go through the json given, and pull out all ids that are identified
by the corresponding name argument.
def get_attribute_by_id(args):
- """ Get an attribute by the id field.
+ """Get an attribute by the id field.
Each json record in the json blob has a unique ID, return
the corresponding attribute field from that record. Could be
def get_role_id_by_rolename(pobject, rolename, number_nodes):
- """ Helper-func - use get_id_by_name to obtain role-ids for a role-name
+ """Helper-func - use get_id_by_name to obtain role-ids for a role-name
sample record...
"roles": [ {
def get_role_name_by_roleid(pobject, roleid, number_nodes):
- """ Helper-func - use get_attribute_by_id to get role-name for a role-id
+ """Helper-func - use get_attribute_by_id to get role-name for a role-id
sample record...
"roles": [ {
def get_role_description_by_roleid(pobject, roleid, number_nodes):
- """ Helper-func - get role-description for a role-id
+ """Helper-func - get role-description for a role-id
sample record...
"roles": [ {
def get_domain_id_by_domainname(pobject, domainname, number_nodes):
- """ Helper-func - get all domain-ids corresponding to domain-name
+ """Helper-func - get all domain-ids corresponding to domain-name
sample record...
"domains": [ {
def get_domain_name_by_domainid(pobject, domainid, number_nodes):
- """ Helper-func - get domain-name for a particular domainid
+ """Helper-func - get domain-name for a particular domainid
sample record...
"domains": [ {
def get_domain_description_by_domainid(pobject, domainid, number_nodes):
- """ Helper-func - get the domaind descripton for a particular domainid
+ """Helper-func - get the domaind descripton for a particular domainid
sample record...
"domains": [ {
def get_domain_state_by_domainid(pobject, domainid, number_nodes):
- """ Helper-func - get domain state field for a particular domainid
+ """Helper-func - get domain state field for a particular domainid
sample record...
"domains": [ {
def get_user_id_by_username(pobject, username, number_nodes):
- """ Helper-func - get user-ids corresponding to username
+ """Helper-func - get user-ids corresponding to username
sample record...
"users": [ {
def get_user_password_by_userid(pobject, userid, number_nodes):
- """ Helper-func - get user password field for a particular userid
+ """Helper-func - get user password field for a particular userid
sample record...
"users": [ {
def get_user_name_by_userid(pobject, userid, number_nodes):
- """ Helper-func - get the username field for a particular userid
+ """Helper-func - get the username field for a particular userid
sample record...
"users": [ {
def get_user_state_by_userid(pobject, userid, number_nodes):
- """ Helper-func - get user state field for a particular userid
+ """Helper-func - get user state field for a particular userid
sample record...
"users": [ {
def get_user_email_by_userid(pobject, userid, number_nodes):
- """ Helper-func - get user email field for a particular userid
+ """Helper-func - get user email field for a particular userid
sample record...
"users": [ {
def get_user_description_by_userid(pobject, userid, number_nodes):
- """ Helper-func - get user description field for a particular userid
+ """Helper-func - get user description field for a particular userid
sample record...
"users": [ {