packet lib: bgp: fix reversibility about json
packet lib: bgp: fix reversibility about json

although BGP is using internal classes, no class is registered into '_class_prefixes'.
therefore, from_jsondict() does not work correctly.
this patch makes from_jsondict() to work correctly by registering internal classes into '_class_prefixes'.

examination code:

    from ryu.lib.packet import bgp
    msg1 = bgp.BGPUpdate(withdrawn_routes=[bgp.BGPWithdrawnRoute(length=0, addr='192.168.0.1')])
    print msg1
    jsondict = msg1.to_jsondict()
    msg2 = bgp.BGPUpdate.from_jsondict(jsondict['BGPUpdate'])
    print msg2
    print str(msg1) == str(msg2)

before applying this patch:

    BGPUpdate(len=None,marker='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff',nlri=[],path_attributes=[],total_path_attribute_len=None,type=2,withdrawn_routes=[BGPWithdrawnRoute(addr='192.168.0.1',length=0)],withdrawn_routes_len=None)
    BGPUpdate(len=None,marker='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff',nlri=[],path_attributes=[],total_path_attribute_len=None,type=2,withdrawn_routes=[{'BGPWithdrawnRoute': {'length': 0, 'addr': '192.168.0.1'}}],withdrawn_routes_len=None)
    False

after applying this patch:

    BGPUpdate(len=None,marker='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff',nlri=[],path_attributes=[],total_path_attribute_len=None,type=2,withdrawn_routes=[BGPWithdrawnRoute(addr='192.168.0.1',length=0)],withdrawn_routes_len=None)
    BGPUpdate(len=None,marker='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff',nlri=[],path_attributes=[],total_path_attribute_len=None,type=2,withdrawn_routes=[BGPWithdrawnRoute(addr='192.168.0.1',length=0)],withdrawn_routes_len=None)
    True

Signed-off-by: Yuichi Ito <7a83edf5b53f0b21d4182a3da7518164ce03dc3a@gmail.com>
Signed-off-by: FUJITA Tomonori <93dac1fe9c4b2a3957982200319981492ad4976e@lab.ntt.co.jp>

Tesi-Luca-Davide/ryu,habibiefaried/ryu,ntts-clo/ryu,OpenState-SDN/ryu,fkakuma/ryu,lsqtongxin/ryu,jalilm/ryu,lzppp/mylearning,elahejalalpour/ELRyu,osrg/ryu,Tejas-Subramanya/RYU_MEC,ttsubo/ryu,jalilm/ryu,shinpeimuraoka/ryu,yamt/ryu,castroflavio/ryu,OpenState-SDN/ryu,muzixing/ryu,haniehrajabi/ryu,darjus-amzn/ryu,takahashiminoru/ryu,lzppp/mylearning,Tejas-Subramanya/RYU_MEC,elahejalalpour/ELRyu,sivaramakrishnansr/ryu,hisaharu/ryu,torufuru/OFPatchPanel,fkakuma/ryu,StephenKing/summerschool-2015-ryu,iwaseyusuke/ryu,jalilm/ryu,shinpeimuraoka/ryu,alyosha1879/ryu,iwaseyusuke/ryu,haniehrajabi/ryu,alanquillin/ryu,lsqtongxin/ryu,diogommartins/ryu,hisaharu/ryu,sivaramakrishnansr/ryu,sivaramakrishnansr/ryu,muzixing/ryu,TakeshiTseng/ryu,alanquillin/ryu,ntts-clo/ryu,gareging/SDN_Framework,Tesi-Luca-Davide/ryu,iwaseyusuke/ryu,gopchandani/ryu,yamt/ryu,darjus-amzn/ryu,OpenState-SDN/ryu,lagopus/ryu-lagopus-ext,zyq001/ryu,fkakuma/ryu,zyq001/ryu,pichuang/ryu,StephenKing/summerschool-2015-ryu,alanquillin/ryu,pichuang/ryu,ysywh/ryu,StephenKing/summerschool-2015-ryu,evanscottgray/ryu,alanquillin/ryu,muzixing/ryu,alanquillin/ryu,yamada-h/ryu,ntts-clo/mld-ryu,yamt/ryu,jazzmes/ryu,alyosha1879/ryu,alyosha1879/ryu,ttsubo/ryu,mikhaelharswanto/ryu,iwaseyusuke/ryu,openvapour/ryu,fujita/ryu,shinpeimuraoka/ryu,gareging/SDN_Framework,OpenState-SDN/ryu,gopchandani/ryu,zangree/ryu,Zouyiran/ryu,fujita/ryu,John-Lin/ryu,shinpeimuraoka/ryu,hisaharu/ryu,lagopus/ryu-lagopus-ext,StephenKing/summerschool-2015-ryu,haniehrajabi/ryu,hisaharu/ryu,openvapour/ryu,openvapour/ryu,takahashiminoru/ryu,pichuang/ryu,hisaharu/ryu,ysywh/ryu,jalilm/ryu,elahejalalpour/ELRyu,lagopus/ryu-lagopus-ext,habibiefaried/ryu,StephenKing/ryu,ynkjm/ryu,lagopus/ryu-lagopus-ext,lzppp/mylearning,Zouyiran/ryu,ynkjm/ryu,gareging/SDN_Framework,ysywh/ryu,StephenKing/ryu,haniehrajabi/ryu,zyq001/ryu,ttsubo/ryu,yamt/ryu,osrg/ryu,openvapour/ryu,elahejalalpour/ELRyu,ysywh/ryu,gareging/SDN_Framework,torufuru/oolhackathon,zangree/ryu,zangree/ryu,pichuang/ryu,Zouyiran/ryu,ysywh/ryu,fujita/ryu,lzppp/mylearning,lzppp/mylearning,alyosha1879/ryu,diogommartins/ryu,castroflavio/ryu,pichuang/ryu,ttsubo/ryu,Zouyiran/ryu,osrg/ryu,jalilm/ryu,umkcdcrg01/ryu_openflow,gareging/SDN_Framework,osrg/ryu,jazzmes/ryu,takahashiminoru/ryu,Tejas-Subramanya/RYU_MEC,umkcdcrg01/ryu_openflow,John-Lin/ryu,John-Lin/ryu,Zouyiran/ryu,osrg/ryu,ntts-clo/mld-ryu,takahashiminoru/ryu,OpenState-SDN/ryu,darjus-amzn/ryu,lsqtongxin/ryu,habibiefaried/ryu,sivaramakrishnansr/ryu,jazzmes/ryu,mikhaelharswanto/ryu,muzixing/ryu,umkcdcrg01/ryu_openflow,zyq001/ryu,StephenKing/ryu,zangree/ryu,fujita/ryu,umkcdcrg01/ryu_openflow,gopchandani/ryu,darjus-amzn/ryu,yamada-h/ryu,ttsubo/ryu,muzixing/ryu,StephenKing/ryu,zangree/ryu,jkoelker/ryu,ynkjm/ryu,haniehrajabi/ryu,TakeshiTseng/ryu,gopchandani/ryu,torufuru/oolhackathon,evanscottgray/ryu,diogommartins/ryu,lsqtongxin/ryu,Tesi-Luca-Davide/ryu,Tesi-Luca-Davide/ryu,fkakuma/ryu,lagopus/ryu-lagopus-ext,John-Lin/ryu,openvapour/ryu,fkakuma/ryu,jkoelker/ryu,ynkjm/ryu,sivaramakrishnansr/ryu,Tesi-Luca-Davide/ryu,evanscottgray/ryu,torufuru/OFPatchPanel,habibiefaried/ryu,gopchandani/ryu,torufuru/oolhackathon,StephenKing/summerschool-2015-ryu,shinpeimuraoka/ryu,o3project/ryu-oe,o3project/ryu-oe,zyq001/ryu,John-Lin/ryu,yamt/ryu,Tejas-Subramanya/RYU_MEC,StephenKing/ryu,Tejas-Subramanya/RYU_MEC,darjus-amzn/ryu,diogommartins/ryu,umkcdcrg01/ryu_openflow,diogommartins/ryu,castroflavio/ryu,ynkjm/ryu,lsqtongxin/ryu,TakeshiTseng/ryu,elahejalalpour/ELRyu,iwaseyusuke/ryu,fujita/ryu,jkoelker/ryu,TakeshiTseng/ryu,TakeshiTseng/ryu,habibiefaried/ryu,takahashiminoru/ryu