Re: [Ryu-devel] How to get the data from mySQL database in Ryu SDN controller application?
Brought to you by:
nz_gizmoguy
|
From: Matthew H. <mat...@ho...> - 2017-10-04 09:02:16
|
Hi, Another database option that works well with Python is MongoDB, although it is NoSQL rather than SQL type. For an example of the use of MongoDB with Python and Ryu, check out the nmeta reactive SDN project at https://github.com/mattjhayes/nmeta I suspect however that the answer that Arslan needs is to either write a program in Python and run it with ryu-manager, as per the tutorial at http://ryu.readthedocs.io/en/latest/writing_ryu_app.html, or interface using the REST API. Regards, Matt. ________________________________ From: Iwase Yusuke <iwa...@gm...> Sent: Tuesday, 3 October 2017 11:58 p.m. To: ars...@di... Cc: ryu...@li... Subject: Re: [Ryu-devel] How to get the data from mySQL database in Ryu SDN controller application? Hi Arslan, The features for connecting to Databases, MySQL(as you said), PostogreSQL and SQLite for example, are out of scope of Ryu SDN framework, I guess. On the other word, Ryu user can use their own favorite libraries, frameworks or ORM (Object Relational Mapper) for connecting to Databases. FYI, for getting started with Databases using Python, I recommend you to use ORMs. Django Models(a part of Django web framework) seems to be most famous in Python, but SQLAlchemy is adopted to OpenStack (also Ryu is using SQLAlchemy to implement optional feature). How about trying them? https://docs.djangoproject.com/en/dev/topics/db/models/ http://docs.sqlalchemy.org/en/latest/orm/tutorial.html Object Relational Tutorial — SQLAlchemy 1.2 Documentation<http://docs.sqlalchemy.org/en/latest/orm/tutorial.html> docs.sqlalchemy.org Object Relational Tutorial¶ The SQLAlchemy Object Relational Mapper presents a method of associating user-defined Python classes with database tables, and instances ... Thanks, Iwase On 2017年10月04日 00:51, Arslan wrote: > Dear All, > > I am a beginner in the domain of Software Defined Networks and python. I want to get some data from > the mySQL database in the Ryu SDN controller application (written in Python) in order to perform > some control actions on the basis of that data. > > I am not sure if it is possible to do it because the Ryu controller documents and Ryu controller > book does not provide any information in this regard. I am wondering how can I get the data from a > mySQL database in the Ryu controller application. Any help in this regard will be highly appreciated. > > Regards, > > Arslan > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Ryu-devel mailing list > Ryu...@li... > https://lists.sourceforge.net/lists/listinfo/ryu-devel ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Ryu-devel mailing list Ryu...@li... https://lists.sourceforge.net/lists/listinfo/ryu-devel |