-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathREADME
41 lines (27 loc) · 1.28 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
acidipy
Cisco ACI Python API : ACI Developing Interface for PYthon
1. Install
1.1 From GIT
$ python setup.py build
$ python setup.py install
1.2 From PIP
$ pip install acidipy
2. Example
import acidipy
controller = acidipy.Controller('xxx.xxx.xxx.xxx', 'admin', 'password') # Get controller connection
tenant = controller.Tenant.create(name='example-tenant') # Create tenant
bd = tenant.BridgeDomain.create(name='example-bd') # Create bridge domain
ap = tenant.AppProfile.create(name='example-ap') # Create application profile
epg = ap.EPG.create(name='example-epg') # Create endpoint group
epg.relate(bd) # Relate endpoint group to bridge domain
print controller.Tenant.list() # Retrive list of tenant
print tenant.AppProfile('example-ap').EPG.list() # Retrive list of endpoint group about tenant created
print ap.EPG('example-epg') # Retrive endpoing group by name
print ap.parent() # Retrive example-ap's parent
print ap.children() # Retrive example-ap's children
print ap.detail() # Retrive example-ap's whole attributes
epg.delete() # Delete endpoint group
ap.delete() # Delete application profile
bd.delete() # Delete bridge domain
tenant.delete() # Delete tenant
controller.close() # Close controller connection