Hello,
We have multiple microsites each with 2-4 assets being monitored. Our structure is a larger parent group, All-Microsites. Inside All-Microsites is a child group, named for the site. We'll call the first Microsite-1 for the example, and increment as such.
I have already built python that creates the group Microsite-1 and creates the 2-4 notes for the parent group. However, I cannot figure out what the invoke verb and variables would be to assign Microsite-1 to the already existing All-Microsites group.
Anyone have a sample on how to do this or a link to the documentation that I have been unable to find?
Here is my current code snippet that doesn't work:
Note that "parent_group_object" is referring to the group Microsite-1 in the example.
The issue is I'm just guessing on the swis.invoke line for whole_group_create, no clue what shape the data should be in.
whole_group_name = "All-Microsites"
whole_group_object = _get_group_by_name(swis, whole_group_name)
whole_group_id = parent_group_object['ContainerID']
properties = [
whole_group_id,
{
'Name': parent_group_name,
'Definition': parent_group_object['Uri']
},
]
whole_group_create = swis.invoke('Orion.Container', "AddDefinition",
whole_group_id,
{
'Name': parent_group_name,
'Definition': parent_group_object['Uri']
}
)