How to use the cobra.model.fv.RsPathAtt function in cobra

To help you get started, we’ve selected a few cobra examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CiscoDevNet / aci-learning-labs-code-samples / sbx-intermediate-aci / sbx-intermediate-aci-mission0_build-a-tenant / evolution_x_SOLUTION.py View on Github external
fvRsDomAtt5 = cobra.model.fv.RsDomAtt(fvAEPg5, tDn=u'uni/phys-SnV_phys')
fvRsBd5 = cobra.model.fv.RsBd(fvAEPg5, tnFvBDName=u'antigravity')
fvRsProv5 = cobra.model.fv.RsProv(fvAEPg5, tnVzBrCPName=u'message-broker')
fvAEPg6 = cobra.model.fv.AEPg(fvAp, name=u'User-Data')
fvRsCons11 = cobra.model.fv.RsCons(fvAEPg6, tnVzBrCPName=u'message-broker')
fvRsCons12 = cobra.model.fv.RsCons(fvAEPg6, tnVzBrCPName=u'logging')
fvRsPathAtt11 = cobra.model.fv.RsPathAtt(fvAEPg6, tDn=u'topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1B]', encap=u'vlan-115')
fvRsPathAtt12 = cobra.model.fv.RsPathAtt(fvAEPg6, tDn=u'topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1A]', encap=u'vlan-115')
fvRsDomAtt6 = cobra.model.fv.RsDomAtt(fvAEPg6, tDn=u'uni/phys-SnV_phys')
fvRsBd6 = cobra.model.fv.RsBd(fvAEPg6, tnFvBDName=u'antigravity')
fvRsProv6 = cobra.model.fv.RsProv(fvAEPg6, tnVzBrCPName=u'user-data')
fvAEPg7 = cobra.model.fv.AEPg(fvAp, name=u'Analytics')
fvRsCons13 = cobra.model.fv.RsCons(fvAEPg7, tnVzBrCPName=u'message-broker')
fvRsCons14 = cobra.model.fv.RsCons(fvAEPg7, tnVzBrCPName=u'logging')
fvRsPathAtt13 = cobra.model.fv.RsPathAtt(fvAEPg7, tDn=u'topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1B]', encap=u'vlan-116')
fvRsPathAtt14 = cobra.model.fv.RsPathAtt(fvAEPg7, tDn=u'topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1A]', encap=u'vlan-116')
fvRsDomAtt7 = cobra.model.fv.RsDomAtt(fvAEPg7, tDn=u'uni/phys-SnV_phys')
fvRsBd7 = cobra.model.fv.RsBd(fvAEPg7, tnFvBDName=u'antigravity')
fvRsProv7 = cobra.model.fv.RsProv(fvAEPg7, tnVzBrCPName=u'analytics')


# commit the generated code to APIC
print toXMLStr(topMo)
c = cobra.mit.request.ConfigRequest()
c.addMo(fvTenant)
md.commit(c)
github CiscoDevNet / aci-learning-labs-code-samples / sbx-intermediate-aci / sbx-intermediate-aci-00_webarya / add_application_SOLUTION.py View on Github external
fvRsPathAtt2 = cobra.model.fv.RsPathAtt(fvAEPg, tDn=u'topology/pod-1/protpaths-101-102/pathep-[Heroes_FI-2A]', instrImedcy=u'lazy', encap=vlan1, descr=u'', mode=u'regular')
fvRsDomAtt = cobra.model.fv.RsDomAtt(fvAEPg, instrImedcy=u'lazy', resImedcy=u'lazy', encap=u'unknown', tDn=u'uni/phys-Heroes_phys')
fvRsCustQosPol = cobra.model.fv.RsCustQosPol(fvAEPg, tnQosCustomPolName=u'')
fvRsBd = cobra.model.fv.RsBd(fvAEPg, tnFvBDName=bridge_domain)
fvRsProv = cobra.model.fv.RsProv(fvAEPg, tnVzBrCPName=u'power_up', matchT=u'AtleastOne', prio=u'unspecified')
fvAEPg2 = cobra.model.fv.AEPg(fvAp, isAttrBasedEPg=u'no', matchT=u'AtleastOne', prio=u'unspecified', name=u'db', descr=u'')
fvRsPathAtt3 = cobra.model.fv.RsPathAtt(fvAEPg2, tDn=u'topology/pod-1/protpaths-101-102/pathep-[Heroes_FI-2B]', instrImedcy=u'lazy', encap=vlan2, descr=u'', mode=u'regular')
fvRsPathAtt4 = cobra.model.fv.RsPathAtt(fvAEPg2, tDn=u'topology/pod-1/protpaths-101-102/pathep-[Heroes_FI-2A]', instrImedcy=u'lazy', encap=vlan2, descr=u'', mode=u'regular')
fvRsDomAtt2 = cobra.model.fv.RsDomAtt(fvAEPg2, instrImedcy=u'lazy', resImedcy=u'lazy', encap=u'unknown', tDn=u'uni/phys-Heroes_phys')
fvRsCustQosPol2 = cobra.model.fv.RsCustQosPol(fvAEPg2, tnQosCustomPolName=u'')
fvRsBd2 = cobra.model.fv.RsBd(fvAEPg2, tnFvBDName=bridge_domain)
fvRsProv2 = cobra.model.fv.RsProv(fvAEPg2, tnVzBrCPName=u'sql', matchT=u'AtleastOne', prio=u'unspecified')
fvAEPg3 = cobra.model.fv.AEPg(fvAp, isAttrBasedEPg=u'no', matchT=u'AtleastOne', prio=u'unspecified', name=u'web', descr=u'')
fvRsCons2 = cobra.model.fv.RsCons(fvAEPg3, tnVzBrCPName=u'sql', prio=u'unspecified')
fvRsPathAtt5 = cobra.model.fv.RsPathAtt(fvAEPg3, tDn=u'topology/pod-1/protpaths-101-102/pathep-[Heroes_FI-2B]', instrImedcy=u'lazy', encap=vlan3, descr=u'', mode=u'regular')
fvRsPathAtt6 = cobra.model.fv.RsPathAtt(fvAEPg3, tDn=u'topology/pod-1/protpaths-101-102/pathep-[Heroes_FI-2A]', instrImedcy=u'lazy', encap=vlan3, descr=u'', mode=u'regular')
fvRsDomAtt3 = cobra.model.fv.RsDomAtt(fvAEPg3, instrImedcy=u'lazy', resImedcy=u'lazy', encap=u'unknown', tDn=u'uni/phys-Heroes_phys')
fvRsCustQosPol3 = cobra.model.fv.RsCustQosPol(fvAEPg3, tnQosCustomPolName=u'')
fvRsBd3 = cobra.model.fv.RsBd(fvAEPg3, tnFvBDName=bridge_domain)
fvRsProv3 = cobra.model.fv.RsProv(fvAEPg3, tnVzBrCPName=u'web', matchT=u'AtleastOne', prio=u'unspecified')


# commit the generated code to APIC
print(toXMLStr(fvTenant))
c = cobra.mit.request.ConfigRequest()
c.addMo(fvTenant)
md.commit(c)
github CiscoDevNet / aci-learning-labs-code-samples / sbx-intermediate-aci / sbx-intermediate-aci-00_webarya / add_application_SOLUTION.py View on Github external
fvRsPathAtt = cobra.model.fv.RsPathAtt(fvAEPg, tDn=u'topology/pod-1/protpaths-101-102/pathep-[Heroes_FI-2B]', instrImedcy=u'lazy', encap=vlan1, descr=u'', mode=u'regular')
fvRsPathAtt2 = cobra.model.fv.RsPathAtt(fvAEPg, tDn=u'topology/pod-1/protpaths-101-102/pathep-[Heroes_FI-2A]', instrImedcy=u'lazy', encap=vlan1, descr=u'', mode=u'regular')
fvRsDomAtt = cobra.model.fv.RsDomAtt(fvAEPg, instrImedcy=u'lazy', resImedcy=u'lazy', encap=u'unknown', tDn=u'uni/phys-Heroes_phys')
fvRsCustQosPol = cobra.model.fv.RsCustQosPol(fvAEPg, tnQosCustomPolName=u'')
fvRsBd = cobra.model.fv.RsBd(fvAEPg, tnFvBDName=bridge_domain)
fvRsProv = cobra.model.fv.RsProv(fvAEPg, tnVzBrCPName=u'power_up', matchT=u'AtleastOne', prio=u'unspecified')
fvAEPg2 = cobra.model.fv.AEPg(fvAp, isAttrBasedEPg=u'no', matchT=u'AtleastOne', prio=u'unspecified', name=u'db', descr=u'')
fvRsPathAtt3 = cobra.model.fv.RsPathAtt(fvAEPg2, tDn=u'topology/pod-1/protpaths-101-102/pathep-[Heroes_FI-2B]', instrImedcy=u'lazy', encap=vlan2, descr=u'', mode=u'regular')
fvRsPathAtt4 = cobra.model.fv.RsPathAtt(fvAEPg2, tDn=u'topology/pod-1/protpaths-101-102/pathep-[Heroes_FI-2A]', instrImedcy=u'lazy', encap=vlan2, descr=u'', mode=u'regular')
fvRsDomAtt2 = cobra.model.fv.RsDomAtt(fvAEPg2, instrImedcy=u'lazy', resImedcy=u'lazy', encap=u'unknown', tDn=u'uni/phys-Heroes_phys')
fvRsCustQosPol2 = cobra.model.fv.RsCustQosPol(fvAEPg2, tnQosCustomPolName=u'')
fvRsBd2 = cobra.model.fv.RsBd(fvAEPg2, tnFvBDName=bridge_domain)
fvRsProv2 = cobra.model.fv.RsProv(fvAEPg2, tnVzBrCPName=u'sql', matchT=u'AtleastOne', prio=u'unspecified')
fvAEPg3 = cobra.model.fv.AEPg(fvAp, isAttrBasedEPg=u'no', matchT=u'AtleastOne', prio=u'unspecified', name=u'web', descr=u'')
fvRsCons2 = cobra.model.fv.RsCons(fvAEPg3, tnVzBrCPName=u'sql', prio=u'unspecified')
fvRsPathAtt5 = cobra.model.fv.RsPathAtt(fvAEPg3, tDn=u'topology/pod-1/protpaths-101-102/pathep-[Heroes_FI-2B]', instrImedcy=u'lazy', encap=vlan3, descr=u'', mode=u'regular')
fvRsPathAtt6 = cobra.model.fv.RsPathAtt(fvAEPg3, tDn=u'topology/pod-1/protpaths-101-102/pathep-[Heroes_FI-2A]', instrImedcy=u'lazy', encap=vlan3, descr=u'', mode=u'regular')
fvRsDomAtt3 = cobra.model.fv.RsDomAtt(fvAEPg3, instrImedcy=u'lazy', resImedcy=u'lazy', encap=u'unknown', tDn=u'uni/phys-Heroes_phys')
fvRsCustQosPol3 = cobra.model.fv.RsCustQosPol(fvAEPg3, tnQosCustomPolName=u'')
fvRsBd3 = cobra.model.fv.RsBd(fvAEPg3, tnFvBDName=bridge_domain)
fvRsProv3 = cobra.model.fv.RsProv(fvAEPg3, tnVzBrCPName=u'web', matchT=u'AtleastOne', prio=u'unspecified')


# commit the generated code to APIC
print(toXMLStr(fvTenant))
c = cobra.mit.request.ConfigRequest()
c.addMo(fvTenant)
md.commit(c)
github CiscoDevNet / aci-learning-labs-code-samples / apic_fabric_setup / create_snv_apps.py View on Github external
app = cobra.model.fv.Ap(tenant_obj, app_name)

	epg_web = cobra.model.fv.AEPg(app, 'Web')
	epg_web_bd = cobra.model.fv.RsBd(epg_web, tnFvBDName='antigravity')
	epg_web_phys_domain = cobra.model.fv.RsDomAtt(epg_web, tDn='uni/phys-SnV_phys')
	epg_web_path_a = cobra.model.fv.RsPathAtt(epg_web, tDn='topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1B]', encap=vlan_web)
	epg_web_path_b = cobra.model.fv.RsPathAtt(epg_web, tDn='topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1A]', encap=vlan_web)
	epg_web_path_c = cobra.model.fv.RsPathAtt(epg_web, tDn='topology/pod-1/paths-101/pathep-[eth1/10]', encap=vlan_web)
	epg_web_provided = cobra.model.fv.RsProv(epg_web, tnVzBrCPName='web')
	epg_web_consumed = cobra.model.fv.RsCons(epg_web, tnVzBrCPName='database')

	epg_db = cobra.model.fv.AEPg(app, 'Database')
	epg_db_bd = cobra.model.fv.RsBd(epg_db, tnFvBDName='antigravity')
	epg_db_phys_domain = cobra.model.fv.RsDomAtt(epg_db, tDn='uni/phys-SnV_phys')
	epg_db_path_a = cobra.model.fv.RsPathAtt(epg_db, tDn='topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1B]', encap=vlan_db)
	epg_db_path_b = cobra.model.fv.RsPathAtt(epg_db, tDn='topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1A]', encap=vlan_db)
	epg_db_provided = cobra.model.fv.RsProv(epg_db, tnVzBrCPName='database')
github CiscoDevNet / aci-learning-labs-code-samples / apic_fabric_setup / create_snv_apps.py View on Github external
def create_app(tenant_obj, app_name, bd_object, vlan_web, vlan_db):
	app = cobra.model.fv.Ap(tenant_obj, app_name)

	epg_web = cobra.model.fv.AEPg(app, 'Web')
	epg_web_bd = cobra.model.fv.RsBd(epg_web, tnFvBDName='antigravity')
	epg_web_phys_domain = cobra.model.fv.RsDomAtt(epg_web, tDn='uni/phys-SnV_phys')
	epg_web_path_a = cobra.model.fv.RsPathAtt(epg_web, tDn='topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1B]', encap=vlan_web)
	epg_web_path_b = cobra.model.fv.RsPathAtt(epg_web, tDn='topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1A]', encap=vlan_web)
	epg_web_path_c = cobra.model.fv.RsPathAtt(epg_web, tDn='topology/pod-1/paths-101/pathep-[eth1/10]', encap=vlan_web)
	epg_web_provided = cobra.model.fv.RsProv(epg_web, tnVzBrCPName='web')
	epg_web_consumed = cobra.model.fv.RsCons(epg_web, tnVzBrCPName='database')

	epg_db = cobra.model.fv.AEPg(app, 'Database')
	epg_db_bd = cobra.model.fv.RsBd(epg_db, tnFvBDName='antigravity')
	epg_db_phys_domain = cobra.model.fv.RsDomAtt(epg_db, tDn='uni/phys-SnV_phys')
	epg_db_path_a = cobra.model.fv.RsPathAtt(epg_db, tDn='topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1B]', encap=vlan_db)
	epg_db_path_b = cobra.model.fv.RsPathAtt(epg_db, tDn='topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1A]', encap=vlan_db)
	epg_db_provided = cobra.model.fv.RsProv(epg_db, tnVzBrCPName='database')
github CiscoDevNet / aci-learning-labs-code-samples / apic_fabric_setup / create_snv_apps.py View on Github external
def create_app(tenant_obj, app_name, bd_object, vlan_web, vlan_db):
	app = cobra.model.fv.Ap(tenant_obj, app_name)

	epg_web = cobra.model.fv.AEPg(app, 'Web')
	epg_web_bd = cobra.model.fv.RsBd(epg_web, tnFvBDName='antigravity')
	epg_web_phys_domain = cobra.model.fv.RsDomAtt(epg_web, tDn='uni/phys-SnV_phys')
	epg_web_path_a = cobra.model.fv.RsPathAtt(epg_web, tDn='topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1B]', encap=vlan_web)
	epg_web_path_b = cobra.model.fv.RsPathAtt(epg_web, tDn='topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1A]', encap=vlan_web)
	epg_web_path_c = cobra.model.fv.RsPathAtt(epg_web, tDn='topology/pod-1/paths-101/pathep-[eth1/10]', encap=vlan_web)
	epg_web_provided = cobra.model.fv.RsProv(epg_web, tnVzBrCPName='web')
	epg_web_consumed = cobra.model.fv.RsCons(epg_web, tnVzBrCPName='database')

	epg_db = cobra.model.fv.AEPg(app, 'Database')
	epg_db_bd = cobra.model.fv.RsBd(epg_db, tnFvBDName='antigravity')
	epg_db_phys_domain = cobra.model.fv.RsDomAtt(epg_db, tDn='uni/phys-SnV_phys')
	epg_db_path_a = cobra.model.fv.RsPathAtt(epg_db, tDn='topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1B]', encap=vlan_db)
	epg_db_path_b = cobra.model.fv.RsPathAtt(epg_db, tDn='topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1A]', encap=vlan_db)
	epg_db_provided = cobra.model.fv.RsProv(epg_db, tnVzBrCPName='database')
github CiscoDevNet / aci-learning-labs-code-samples / apic_fabric_setup / create_snv_apps.py View on Github external
def create_app(tenant_obj, app_name, bd_object, vlan_web, vlan_db):
	app = cobra.model.fv.Ap(tenant_obj, app_name)

	epg_web = cobra.model.fv.AEPg(app, 'Web')
	epg_web_bd = cobra.model.fv.RsBd(epg_web, tnFvBDName='antigravity')
	epg_web_phys_domain = cobra.model.fv.RsDomAtt(epg_web, tDn='uni/phys-SnV_phys')
	epg_web_path_a = cobra.model.fv.RsPathAtt(epg_web, tDn='topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1B]', encap=vlan_web)
	epg_web_path_b = cobra.model.fv.RsPathAtt(epg_web, tDn='topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1A]', encap=vlan_web)
	epg_web_path_c = cobra.model.fv.RsPathAtt(epg_web, tDn='topology/pod-1/paths-101/pathep-[eth1/10]', encap=vlan_web)
	epg_web_provided = cobra.model.fv.RsProv(epg_web, tnVzBrCPName='web')
	epg_web_consumed = cobra.model.fv.RsCons(epg_web, tnVzBrCPName='database')

	epg_db = cobra.model.fv.AEPg(app, 'Database')
	epg_db_bd = cobra.model.fv.RsBd(epg_db, tnFvBDName='antigravity')
	epg_db_phys_domain = cobra.model.fv.RsDomAtt(epg_db, tDn='uni/phys-SnV_phys')
	epg_db_path_a = cobra.model.fv.RsPathAtt(epg_db, tDn='topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1B]', encap=vlan_db)
	epg_db_path_b = cobra.model.fv.RsPathAtt(epg_db, tDn='topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1A]', encap=vlan_db)
	epg_db_provided = cobra.model.fv.RsProv(epg_db, tnVzBrCPName='database')
github CiscoDevNet / aci-learning-labs-code-samples / sbx-intermediate-aci / sbx-intermediate-aci-00_webarya / add_application_SOLUTION.py View on Github external
vlan3 = 'vlan-210'

# log into an APIC and create a directory object
ls = cobra.mit.session.LoginSession(URL, LOGIN, PASSWORD)
md = cobra.mit.access.MoDirectory(ls)
md.login()

# the top level object on which operations will be made
polUni = cobra.model.pol.Uni('')
fvTenant = cobra.model.fv.Tenant(polUni, tenant)

# build the request using cobra syntax
fvAp = cobra.model.fv.Ap(fvTenant, ownerKey=u'', name=application, prio=u'unspecified', ownerTag=u'', descr=u'')
fvAEPg = cobra.model.fv.AEPg(fvAp, isAttrBasedEPg=u'no', matchT=u'AtleastOne', prio=u'unspecified', name=u'app', descr=u'')
fvRsCons = cobra.model.fv.RsCons(fvAEPg, tnVzBrCPName=u'sql', prio=u'unspecified')
fvRsPathAtt = cobra.model.fv.RsPathAtt(fvAEPg, tDn=u'topology/pod-1/protpaths-101-102/pathep-[Heroes_FI-2B]', instrImedcy=u'lazy', encap=vlan1, descr=u'', mode=u'regular')
fvRsPathAtt2 = cobra.model.fv.RsPathAtt(fvAEPg, tDn=u'topology/pod-1/protpaths-101-102/pathep-[Heroes_FI-2A]', instrImedcy=u'lazy', encap=vlan1, descr=u'', mode=u'regular')
fvRsDomAtt = cobra.model.fv.RsDomAtt(fvAEPg, instrImedcy=u'lazy', resImedcy=u'lazy', encap=u'unknown', tDn=u'uni/phys-Heroes_phys')
fvRsCustQosPol = cobra.model.fv.RsCustQosPol(fvAEPg, tnQosCustomPolName=u'')
fvRsBd = cobra.model.fv.RsBd(fvAEPg, tnFvBDName=bridge_domain)
fvRsProv = cobra.model.fv.RsProv(fvAEPg, tnVzBrCPName=u'power_up', matchT=u'AtleastOne', prio=u'unspecified')
fvAEPg2 = cobra.model.fv.AEPg(fvAp, isAttrBasedEPg=u'no', matchT=u'AtleastOne', prio=u'unspecified', name=u'db', descr=u'')
fvRsPathAtt3 = cobra.model.fv.RsPathAtt(fvAEPg2, tDn=u'topology/pod-1/protpaths-101-102/pathep-[Heroes_FI-2B]', instrImedcy=u'lazy', encap=vlan2, descr=u'', mode=u'regular')
fvRsPathAtt4 = cobra.model.fv.RsPathAtt(fvAEPg2, tDn=u'topology/pod-1/protpaths-101-102/pathep-[Heroes_FI-2A]', instrImedcy=u'lazy', encap=vlan2, descr=u'', mode=u'regular')
fvRsDomAtt2 = cobra.model.fv.RsDomAtt(fvAEPg2, instrImedcy=u'lazy', resImedcy=u'lazy', encap=u'unknown', tDn=u'uni/phys-Heroes_phys')
fvRsCustQosPol2 = cobra.model.fv.RsCustQosPol(fvAEPg2, tnQosCustomPolName=u'')
fvRsBd2 = cobra.model.fv.RsBd(fvAEPg2, tnFvBDName=bridge_domain)
fvRsProv2 = cobra.model.fv.RsProv(fvAEPg2, tnVzBrCPName=u'sql', matchT=u'AtleastOne', prio=u'unspecified')
fvAEPg3 = cobra.model.fv.AEPg(fvAp, isAttrBasedEPg=u'no', matchT=u'AtleastOne', prio=u'unspecified', name=u'web', descr=u'')
fvRsCons2 = cobra.model.fv.RsCons(fvAEPg3, tnVzBrCPName=u'sql', prio=u'unspecified')
fvRsPathAtt5 = cobra.model.fv.RsPathAtt(fvAEPg3, tDn=u'topology/pod-1/protpaths-101-102/pathep-[Heroes_FI-2B]', instrImedcy=u'lazy', encap=vlan3, descr=u'', mode=u'regular')
fvRsPathAtt6 = cobra.model.fv.RsPathAtt(fvAEPg3, tDn=u'topology/pod-1/protpaths-101-102/pathep-[Heroes_FI-2A]', instrImedcy=u'lazy', encap=vlan3, descr=u'', mode=u'regular')
github datacenter / ACI / configuration-python / generic_code / apicPython / createApplicationEpg.py View on Github external
if is_valid_key(args, 'associated_domain_profile'):
        for profile in args['associated_domain_profile']:
            fv_rsdomatt = RsDomAtt(fv_aepg, 'uni/phys-' + profile['domain_profile'],
                           instrImedcy=get_value(profile, 'deployment_immediacy', DEFAULT_IMMEDIACY),
                           resImedcy=get_value(profile, 'resolution_immediacy', DEFAULT_IMMEDIACY))

    if is_valid_key(args, 'statically_link') and args['statically_link']:
        if is_valid_key(args, 'leaf') and is_valid_key(args['leaf'], 'node_id', ban=['None']):
            fv_rsnodeatt = RsNodeAtt(fv_aepg, 'topology/pod-1/node-' + str(args['leaf']['node_id']),
                                     encap=args['leaf']['encap'],
                                     mode=get_value(args['leaf'], 'mode', DEFAULT_MODE),
                                     instrImedcy=get_value(args['leaf'], 'deployment_immediacy', DEFAULT_IMMEDIACY))

        if is_valid_key(args, 'path') and is_valid_key(args['path'], 'node_id', ban=['None']):
            fv_rsnodeatt = RsPathAtt(fv_aepg, 'topology/pod-1/paths-' + str(args['path']['node_id']) + '/pathep-[eth' + args['path']['eth'] + ']',
                                     encap=args['path']['encap'],
                                     mode=get_value(args['path'], 'mode', DEFAULT_MODE),
                                     instrImedcy=get_value(args['path'], 'deployment_immediacy', DEFAULT_IMMEDIACY))

    return fv_aepg
github CiscoDevNet / aci-learning-labs-code-samples / sbx-intermediate-aci / sbx-intermediate-aci-mission0_build-a-tenant / evolution_x_SOLUTION.py View on Github external
fvRsProv4 = cobra.model.fv.RsProv(fvAEPg4, tnVzBrCPName=u'logging')
fvAEPg5 = cobra.model.fv.AEPg(fvAp, name=u'Message-Broker')
fvRsCons7 = cobra.model.fv.RsCons(fvAEPg5, tnVzBrCPName=u'api-gateway')
fvRsCons8 = cobra.model.fv.RsCons(fvAEPg5, tnVzBrCPName=u'user-data')
fvRsCons9 = cobra.model.fv.RsCons(fvAEPg5, tnVzBrCPName=u'analytics')
fvRsCons10 = cobra.model.fv.RsCons(fvAEPg5, tnVzBrCPName=u'logging')
fvRsPathAtt9 = cobra.model.fv.RsPathAtt(fvAEPg5, tDn=u'topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1B]', encap=u'vlan-114')
fvRsPathAtt10 = cobra.model.fv.RsPathAtt(fvAEPg5, tDn=u'topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1A]', encap=u'vlan-114')
fvRsDomAtt5 = cobra.model.fv.RsDomAtt(fvAEPg5, tDn=u'uni/phys-SnV_phys')
fvRsBd5 = cobra.model.fv.RsBd(fvAEPg5, tnFvBDName=u'antigravity')
fvRsProv5 = cobra.model.fv.RsProv(fvAEPg5, tnVzBrCPName=u'message-broker')
fvAEPg6 = cobra.model.fv.AEPg(fvAp, name=u'User-Data')
fvRsCons11 = cobra.model.fv.RsCons(fvAEPg6, tnVzBrCPName=u'message-broker')
fvRsCons12 = cobra.model.fv.RsCons(fvAEPg6, tnVzBrCPName=u'logging')
fvRsPathAtt11 = cobra.model.fv.RsPathAtt(fvAEPg6, tDn=u'topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1B]', encap=u'vlan-115')
fvRsPathAtt12 = cobra.model.fv.RsPathAtt(fvAEPg6, tDn=u'topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1A]', encap=u'vlan-115')
fvRsDomAtt6 = cobra.model.fv.RsDomAtt(fvAEPg6, tDn=u'uni/phys-SnV_phys')
fvRsBd6 = cobra.model.fv.RsBd(fvAEPg6, tnFvBDName=u'antigravity')
fvRsProv6 = cobra.model.fv.RsProv(fvAEPg6, tnVzBrCPName=u'user-data')
fvAEPg7 = cobra.model.fv.AEPg(fvAp, name=u'Analytics')
fvRsCons13 = cobra.model.fv.RsCons(fvAEPg7, tnVzBrCPName=u'message-broker')
fvRsCons14 = cobra.model.fv.RsCons(fvAEPg7, tnVzBrCPName=u'logging')
fvRsPathAtt13 = cobra.model.fv.RsPathAtt(fvAEPg7, tDn=u'topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1B]', encap=u'vlan-116')
fvRsPathAtt14 = cobra.model.fv.RsPathAtt(fvAEPg7, tDn=u'topology/pod-1/protpaths-101-102/pathep-[SnV_FI-1A]', encap=u'vlan-116')
fvRsDomAtt7 = cobra.model.fv.RsDomAtt(fvAEPg7, tDn=u'uni/phys-SnV_phys')
fvRsBd7 = cobra.model.fv.RsBd(fvAEPg7, tnFvBDName=u'antigravity')
fvRsProv7 = cobra.model.fv.RsProv(fvAEPg7, tnVzBrCPName=u'analytics')


# commit the generated code to APIC
print toXMLStr(topMo)
c = cobra.mit.request.ConfigRequest()