datacenter / acitoolkit

A basic toolkit for accessing the Cisco APIC
Other
348 stars 266 forks source link

how to receive all imported contracts for tenant with reference to original contract? #166

Open snatch2013 opened 8 years ago

snatch2013 commented 8 years ago

Hello, could you please suggest how to get ContractInterface with reference to the original contract? If I use acitoolkit.acitoolkit.ContractInterface.get(session,tenant) , then I received list of imported contracts, but without children, so it's not possible to find original contract. The same if I use Search().

I've also tried to use tenant.get_children(). It returns many objects - contracts, bridge domains, epgs, apps, etc, but not contract interfaces.

There is a get_deep() function, but there is no information how to use it for any object accept tenant. get_deep(full_data, working_data, parent=None, limit_to=(), subtree='full', config_only=False) What's the full_data, working_data?

michsmit99 commented 8 years ago

ContractInterface support for get_deep() wasn't there and has been added recently https://github.com/datacenter/acitoolkit/commit/54d163f3ef4808be4341b4feea43f93f3a64625c

get_deep() is really meant to be called from the Tenant class. The full_data and working_data contains the JSON that is used in the recursive processing of get_deep().