Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get encapsulation mode regular|trunk for each encapsulation in acitoolkit? #371

Open
nohir0 opened this issue Feb 25, 2021 · 0 comments

Comments

@nohir0
Copy link

nohir0 commented Feb 25, 2021

Hello,

since acitoolkit does not follow the ACI object hierachy exactly,
e.g. it directly maps endpoints under the EPG class as child objects

    #data = []
    #endpoints = acitk.Endpoint.get(session)
    #for ep in endpoints:
    #    epg = ep.get_parent()
    #    app_profile = epg.get_parent()
    #    tenant = app_profile.get_parent()
    #    data.append((ep.mac, ep.ip, ep.if_name, ep.encap,
    #                 tenant.name, app_profile.name, epg.name))

I wonder how to map the encapsulation mode "regular|trunk" to the example above since EPG static paths are not accessible directly via acitoolkit? Neither the Endpoint class nor the EPG class has methods for fetching Static Paths from Fabric which includes this information...

I do this in my code as such:

        self.url = "https://{}/api/node/mo/uni/tn-{}/ap-{}/epg-{}.json?query-target=children&target-subtree-class=fvRsPathAtt&challenge={}".format(
            self.ip,
            self.tenant,
            self.ap,
            self.epg,
            self.token)

Which returns the Static Path objects and the relevant information if this EPG encapsulation is tagged or not (access|regular or trunk):

{'annotation': '', 'childAction': '', 'descr': '', 'dn': 'uni/tn-TENANTNAME/ap-APNAME/epg-EPGNAME/rspathAtt-[topology/pod-1/paths-1203/pathep-[eth1/13]]', 'encap': 'vlan-666', 'extMngdBy': '', 'forceResolve': 'yes', 'instrImedcy': 'lazy', 'lcC': '', 'lcOwn': 'local', 'modTs': '2021-02-19T05:37:48.487+01:00', **'mode': 'regular'**, 'monPolDn': 'uni/tn-common/monepg-default', 'primaryEncap': 'unknown', 'rType': 'mo', 'state': 'unformed', 'stateQual': 'none', 'status': '', 'tCl': 'fabricPathEp', 'tDn': 'topology/pod-1/paths-1203/pathep-[eth1/13]', 'tType': 'mo', 'uid': '15519'}

Any help appreciated

@nohir0 nohir0 changed the title Get Static Paths for EPG and Phys, VMM Domains as well? How to get encapsulation mode regular|trunk for each encapsulation in acitoolkit? Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant