AVI: Difference between revisions

Content added Content deleted
Line 224: Line 224:
= Using AVI SDK =
= Using AVI SDK =


cat pool_vs.py
nano pool_vs.py
nano pool_vs.py
python pool_vs.py -u admin -p Admin@123 -c 10.10.26.40 -t admin -vs test_aman -v 10.91.0.6 -po test_pool_aman


<syntaxhighlight lang="python">
<syntaxhighlight lang="python">
Line 277: Line 275:
vs_obj = {'name': vs, 'vip' : [ {'ip_address': {'addr': vip, 'type': 'V4'}}], 'services': services_obj, 'pool_ref': pool_ref}
vs_obj = {'name': vs, 'vip' : [ {'ip_address': {'addr': vip, 'type': 'V4'}}], 'services': services_obj, 'pool_ref': pool_ref}


#POsting VS OBJ
#Posting VS OBJ
resp = api.post('virtualservice', data=vs_obj)
resp = api.post('virtualservice', data=vs_obj)


print resp.json()
print resp.json()
</syntaxhighlight>
</syntaxhighlight>

python pool_vs.py -u admin -p Admin@123 -c 10.10.26.40 -t admin -vs test_aman -v 10.91.0.6 -po test_pool_aman


<br />
<br />