[ONOS-6199] Huawei driver create and instance delete.
Change-Id: I61e1a8518e9bd2a1a5ed9430052a3e6d3233f148
diff --git a/drivers/huawei/yangmodel/src/main/yang/ne-bgpcomm-type.yang b/drivers/huawei/yangmodel/src/main/yang/ne-bgpcomm-type.yang
new file mode 100644
index 0000000..28f98e4
--- /dev/null
+++ b/drivers/huawei/yangmodel/src/main/yang/ne-bgpcomm-type.yang
@@ -0,0 +1,115 @@
+/*
+WARNING:
+This yang model is just for fuction ONOS opensource project demo purpose only,
+And is subject to change in future, Huawei does not commit provide compatibilty
+in commercial product.
+*/
+module ne-bgpcomm-type {
+ namespace "ne-bgpcomm-type";
+ prefix bgpcomm-type;
+ organization "Huawei Technologies Co., Ltd";
+ contact "Huawei Industrial Base
+ Bantian, Longgang
+ Shenzhen 518129
+ People's Republic of China
+ Website: http://www.huawei.com
+ Email: support@huawei.com";
+ description "ne-bgpcomm-type yang";
+ revision "2014-12-25" {
+ description "Initial version";
+ }
+ typedef bgpcommImRouteProtocol {
+ type enumeration {
+ enum "direct" {
+ value 0;
+ description "direct:";
+ }
+ enum "ospf" {
+ value 1;
+ description "ospf:";
+ }
+ enum "isis" {
+ value 2;
+ description "isis:";
+ }
+ enum "static" {
+ value 3;
+ description "static:";
+ }
+ enum "rip" {
+ value 4;
+ description "rip:";
+ }
+ enum "ospfv3" {
+ value 5;
+ description "ospfv3:";
+ }
+ enum "ripng" {
+ value 6;
+ description "ripng:";
+ }
+ enum "unr" {
+ value 7;
+ description "unr:";
+ }
+ enum "op-route" {
+ value 8;
+ description "op-route:";
+ }
+ }
+ description "";
+ }
+ typedef bgpcommPrefixType {
+ type enumeration {
+ enum "ipv4uni" {
+ value 0;
+ description "ipv4uni:";
+ }
+ enum "ipv4multi" {
+ value 1;
+ description "ipv4multi:";
+ }
+ enum "ipv4vpn" {
+ value 2;
+ description "ipv4vpn:";
+ }
+ enum "ipv6uni" {
+ value 3;
+ description "ipv6uni:";
+ }
+ enum "ipv6vpn" {
+ value 4;
+ description "ipv6vpn:";
+ }
+ enum "ipv4flow" {
+ value 5;
+ description "ipv4flow:";
+ }
+ enum "l2vpnad" {
+ value 6;
+ description "l2vpnad:";
+ }
+ enum "mvpn" {
+ value 7;
+ description "mvpn:";
+ }
+ enum "evpn" {
+ value 8;
+ description "evpn:";
+ }
+ enum "ipv4vpnmcast" {
+ value 9;
+ description "ipv4vpnmcast:";
+ }
+ enum "ls" {
+ value 10;
+ description "ls:";
+ }
+ enum "mdt" {
+ value 11;
+ description "mdt:";
+ }
+ }
+ description "";
+ }
+}
diff --git a/drivers/huawei/yangmodel/src/main/yang/ne-bgpcomm.yang b/drivers/huawei/yangmodel/src/main/yang/ne-bgpcomm.yang
new file mode 100644
index 0000000..b0bb113
--- /dev/null
+++ b/drivers/huawei/yangmodel/src/main/yang/ne-bgpcomm.yang
@@ -0,0 +1,77 @@
+/*
+WARNING:
+This yang model is just for fuction ONOS opensource project demo purpose only,
+And is subject to change in future, Huawei does not commit provide compatibilty
+in commercial product.
+*/
+module ne-bgpcomm {
+ namespace "ne-bgpcomm";
+ prefix bgpcomm;
+ import ne-bgpcomm-type {
+ prefix bgpcomm-type;
+ }
+ organization "Huawei Technologies Co., Ltd";
+ contact "Huawei Industrial Base
+ Bantian, Longgang
+ Shenzhen 518129
+ People's Republic of China
+ Website: http://www.huawei.com
+ Email: support@huawei.com";
+ description "ne-bgpcomm yang";
+ revision "2014-12-25" {
+ description "Initial version";
+ }
+
+ container devices {
+ list device {
+ key deviceid;
+ leaf deviceid {
+ type string;
+ }
+ container bgp {
+ container bgpcomm {
+ description "";
+ container bgpVrfs {
+ description "";
+ list bgpVrf {
+ key "vrfName";
+ description "BGP instance class";
+ leaf vrfName {
+ description "Specifies the name of the VPN in stance.
+ It is a string of 1 to 31 case-sensitive characters.";
+ type string;
+ }
+ container bgpVrfAFs {
+ description "";
+ list bgpVrfAF {
+ key "afType";
+ description "IPv4 unicast Address family class for
+ BGP instance";
+ leaf afType {
+ type "bgpcomm-type:bgpcommPrefixType";
+ description "Address family";
+ }
+ container importRoutes {
+ description "";
+ list importRoute {
+ key "importProtocol importProcessId";
+ description "Import route class";
+ leaf importProtocol {
+ type "bgpcomm-type:bgpcommImRouteProtocol";
+ description "Specifies the protocol from
+ which routes are imported.";
+ }
+ leaf importProcessId {
+ type "string";
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/drivers/huawei/yangmodel/src/main/yang/ne-l3vpn-api.yang b/drivers/huawei/yangmodel/src/main/yang/ne-l3vpn-api.yang
new file mode 100644
index 0000000..5b0181c
--- /dev/null
+++ b/drivers/huawei/yangmodel/src/main/yang/ne-l3vpn-api.yang
@@ -0,0 +1,82 @@
+/*
+WARNING:
+This yang model is just for fuction ONOS opensource project demo purpose only,
+And is subject to change in future, Huawei does not commit provide compatibilty
+in commercial product.
+*/
+module ne-l3vpn-api {
+ namespace "ne-l3vpn-api";
+ prefix l3vpn-api;
+ import ne-l3vpncomm-type {
+ prefix l3vpncomm-type;
+ }
+ import ne-l3vpncomm {
+ prefix l3vpncomm;
+ }
+ organization "Huawei Technologies Co., Ltd";
+ contact "Huawei Industrial Base
+ Bantian, Longgang
+ Shenzhen 518129
+ People's Republic of China
+ Website: http://www.huawei.com
+ Email: support@huawei.com";
+ description "VRP V800R010 Schema";
+ revision "2014-12-25" {
+ reference "Huawei VRPV8 Schema";
+ }
+ container devices {
+ list device {
+ key deviceid;
+ leaf deviceid {
+ type string;
+ }
+ container l3vpn {
+ container l3vpncomm {
+ container l3vpnInstances {
+ description "";
+ list l3vpnInstance {
+ key "vrfName";
+ leaf vrfName {
+ type string;
+ }
+ leaf vrfDescription {
+ type string;
+ }
+ uses l3vpncomm:l3vpnIfs;
+ container vpnInstAFs {
+ description "";
+ list vpnInstAF {
+ key "afType";
+ description "Address family";
+ leaf afType {
+ type "l3vpncomm-type:l3vpncommonL3vpnPrefixType";
+ description "Address family";
+ }
+ leaf vrfRD {
+ when "vrfName != '_public_'";
+ type "string";
+ description "route-distinguisher.";
+ }
+ container vpnTargets {
+ description "";
+ list vpnTarget {
+ must "vrfName != '_public_' and vpnTarget = '0'";
+ key "vrfRTValue vrfRTType";
+ description "L3vpn vpntarget configure class";
+ leaf vrfRTValue {
+ type "string";
+ }
+ leaf vrfRTType {
+ type "l3vpncomm-type:l3vpncommonVrfRtType";
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/drivers/huawei/yangmodel/src/main/yang/ne-l3vpncomm-type.yang b/drivers/huawei/yangmodel/src/main/yang/ne-l3vpncomm-type.yang
new file mode 100644
index 0000000..3e4e10c
--- /dev/null
+++ b/drivers/huawei/yangmodel/src/main/yang/ne-l3vpncomm-type.yang
@@ -0,0 +1,54 @@
+/*
+WARNING:
+This yang model is just for fuction ONOS opensource project demo purpose only,
+And is subject to change in future, Huawei does not commit provide compatibilty
+in commercial product.
+*/
+module ne-l3vpncomm-type {
+ namespace "l3vpn-comm-type";
+ prefix l3vpncomm-type;
+ organization "Huawei Technologies Co., Ltd";
+ contact "Huawei Industrial Base
+ Bantian, Longgang
+ Shenzhen 518129
+ People's Republic of China
+ Website: http://www.huawei.com
+ Email: support@huawei.com";
+ description "";
+ revision "2014-12-25" {
+ description "Initial version";
+ }
+ typedef l3vpncommonL3vpnPrefixType {
+ type enumeration {
+ enum "ipv4uni" {
+ value 0;
+ description "ipv4uni:";
+ }
+ enum "ipv6uni" {
+ value 1;
+ description "ipv6uni:";
+ }
+ }
+ description "";
+ }
+ typedef l3vpncommonVrfRtType {
+ type enumeration {
+ enum "export_extcommunity" {
+ value 0;
+ description "export-extcommunity:";
+ }
+ enum "import_extcommunity" {
+ value 1;
+ description "import-extcommunity:";
+ }
+ }
+ description "";
+ }
+ typedef ipv4Address {
+ type string {
+ length "0..255";
+ pattern "((([1-9]?[0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}
+ ([1-9]?[0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))";
+ }
+ }
+}
diff --git a/drivers/huawei/yangmodel/src/main/yang/ne-l3vpncomm.yang b/drivers/huawei/yangmodel/src/main/yang/ne-l3vpncomm.yang
new file mode 100644
index 0000000..b03c382
--- /dev/null
+++ b/drivers/huawei/yangmodel/src/main/yang/ne-l3vpncomm.yang
@@ -0,0 +1,49 @@
+/*
+WARNING:
+This yang model is just for fuction ONOS opensource project demo purpose only,
+And is subject to change in future, Huawei does not commit provide compatibilty
+in commercial product.
+*/
+module ne-l3vpncomm {
+ namespace "ne-l3vpn-comm";
+ prefix "l3vpncomm";
+ import ne-l3vpncomm-type {
+ prefix l3vpncomm-type;
+ }
+ organization "Huawei Technologies Co., Ltd";
+ contact "Huawei Industrial Base
+ Bantian, Longgang
+ Shenzhen 518129
+ People's Republic of China
+ Website: http://www.huawei.com
+ Email: support@huawei.com";
+ description "";
+ revision "2014-12-25" {
+ description "Initial version";
+ }
+ grouping l3vpnIfs {
+ container l3vpnIfs {
+ description "";
+ list l3vpnIf {
+ key "ifName";
+ description "interface Name.";
+ leaf ifName {
+ type string;
+ description "interface Name";
+ }
+ leaf ipv4Addr {
+ when "subnetMask != null";
+ mandatory "true";
+ type "l3vpncomm-type:ipv4Address";
+ description "Interface Address.";
+ }
+ leaf subnetMask {
+ when "ipv4Addr != null";
+ mandatory "true";
+ type "l3vpncomm-type:ipv4Address";
+ description "Interface address mask.";
+ }
+ }
+ }
+ }
+}