ODL中notification开发过程

本文记录了ODL控制器中Notification的开发过程

1. Yang文件的编写

  首先在api目录构建自己的yang文件:packetsend.yang


     在yang文件里边编写notification服务

// Contents of "packetsend"

module packetsend {

    namespace "urn:opendaylight:packetsend";

    prefix "packetsend";

 

    revision 2018-05-12 {

        description "Initial revision";

    }

    notification send-packet{

    leaf name{

    type string;

    }

    leaf content{

    type string;

    }

    }

    notification news{

    leaf content{

    type string;

    }

    }

}通过notification关键字来创建notification服务

  编写完成后保存会自动问我们生成binding接口

 

      每一个notification会对应一

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值