Skip to content

Issue appending to object groups #6

Description

@imatrycode

hello again,

Still using this and again its ace so thak you , just wondernig if there is an easy way to add to a group.

for example a user group has 2 members, if I set the members attribute on the group to add the additional it replaces the 2 with the 1 so it replaces instead of appends.

Any help on this would be appreicated

E.g. this creates the group with the member

t.print_data (t.create(['cmdb', 'user', 'group'], data={'name':'VLAN-'+(vlan)+'-GRP','group-type':'firewall','member':[{'name':(username)}]}),verbose=True)

Editing it's member attribute to say:

member':[{'name':(username), {'name':("SOMETHING")}]} replaces it with these 2

Bit If I do

ember':[{'name':("SOMETHING")}]}

it replaces all the members with the new one, wonder if there is an append method.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions