Skip to content

nik-hil/ODL-REST-PythonSDK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ODL-REST-PythonSDK

Python SDK for OpenDaylight Controller Rest API.

All REST api are collected from https://wiki.opendaylight.org/view/OpenDaylight_Controller:REST_Reference_and_Authentication

This SDK requires 'requests'. Install it by using 'pip install requests'

This is easy to use,

#Intialize controller ip-address
collection = CollectionApi(ipaddress='192.168.56.101')
#Pass the parameter at URL
url_params = {'containerName':'default'}
#collect the result from REST api
result = collection.statistics_get_all_node(url_params)
print result.json()

My Blog is [http://net-ed.blogspot.in/] 1

I am looking for help to come up with good method names. Ping me if you have any suggestions

Little More Details

CollectionApi has ipaddress, port, username, password, http for initialization. After initialization call method. Method internally calls REST api and returns response object.

Parameters for each method are, url_params and flow

  • url_params inside a raw url for e.g /controller/nb/v2/topology/{containerName}/userLinks You have to specify containerName in dict format {'containerName':'default'}.
  • flow If request type is put/post and some places delete, you have to specify json parameter. flow type is dict. Internally flow is converted to json.

About

Python SDK for OpenDaylight Controller Rest API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages