Closed zerxen closed 6 years ago
Hi @zerxen
The reason is because NetwMacroGroup and NetworkMacro do not form parent->child relationship, but rather form a container. Thus, assign
method should be used instead of create_child
.
For instance a snippet from my lib shows how its done:
group_obj.assign(existing_children + [child_obj], getattr(vspk, child_vspk_name))
Ok.... how would one know that looking at the documentation ? https://nuagenetworks.github.io/vspkdoc/v5_0/nunetworkmacrogroup.html
Since NUEnterpriseNetwork is listed as Children's list item ?
PS/EDIT: Yep worked now as "macro_group.assign([macro],vsdk.NUEnterpriseNetwork)"
I was confused myself when I first met this behavior. And VSPK doc shows no difference, you're right. What helps is to watch real API flow via Chrome/FF developer console when you do the operation in the Architect.
Additionally, this block here in the API specification shows that the relationship is of "member" type. A regular child would have relationship child
instead of member
.
Hi, I am working on (quick&dirty CLI interface to Nuage) using vspk and some other APIs for automating our LAB and I hit a roadblock that I cannot get a network macro (NUEnterpriseNetwork ) registered as a child for NUNetworkMacroGroup to finish an ACL section
Any reason for "Method Not Allowed" ?
I tried both as Enterprise admin and csproot, I am using v4_0 still from vspk 5.1.2 (from pip repo)