import network-topology { prefix nt; revision-date 2013-10-21; }
import opendaylight-l2-types { prefix l2-types; revision-date "2013-08-27"; }
import ietf-yang-types { prefix yang-types; revision-date "2013-07-15"; }
+ import ietf-inet-types { prefix "inet-types"; }
description
"This module is a baseline for the group-based policy vpp renderer model.";
}
}
- container config {
- list vpp-endpoint {
- description "Renderer creates/removes interface on VPP node based on given parameters.";
-
- key "context-type context-id address-type address";
- uses base-ep:address-endpoint-key;
-
- leaf vpp-node-path {
- description "Path to a node representing mount-point to VPP instance.";
- mandatory true;
- type instance-identifier;
- }
- leaf vpp-interface-name {
- description "Name of interface for the endpoint on VPP";
- mandatory true;
- type string;
+ grouping bridge-domain-base-attributes {
+ leaf id {
+ description "Same as in VBD.";
+ type string;
+ }
+ leaf description {
+ type string;
+ }
+ list physical-location-ref {
+ description
+ "Refers to physical interfaces on vpp nodes through which external
+ nodes belonging to the same bridge-domain can be reached.";
+ key "node-id";
+ leaf node-id {
+ description "Refers to a VPP node.";
+ type nt:node-id;
}
- leaf description {
- description "Additional description of the vpp-endpoint";
+ leaf-list interface {
+ description "Physical interface on the VPP node.";
type string;
}
- choice interface-type-choice {
- case vhost-user-case {
- leaf socket {
- description "Identifier of a vhost user";
- type string {
- length 1..255;
- }
+ }
+ }
+
+ grouping interface-attributes {
+ uses vpp-renderer:interface-location;
+ leaf description {
+ description "Additional description of the vpp-endpoint";
+ type string;
+ }
+ choice interface-type-choice {
+ mandatory true;
+ case vhost-user-case {
+ leaf socket {
+ description "Identifier of a vhost user";
+ type string {
+ length 1..255;
}
}
- case tap-case {
- leaf name {
- description "Identifier of a tap port";
- mandatory true;
- type string {
- length 1..255;
- }
- }
- leaf physical-address {
- description "MAC address of a tap port";
- type yang-types:phys-address;
+ }
+ case tap-case {
+ leaf name {
+ description "Identifier of a tap port";
+ mandatory true;
+ type string {
+ length 1..255;
}
}
+ leaf physical-address {
+ description "MAC address of a tap port";
+ type yang-types:phys-address;
+ }
}
+ case loopback-case {
+ leaf phys-address {
+ description "MAC address of a loopback interface";
+ type yang-types:phys-address;
+ }
+ leaf ip-address {
+ description "Ip address of a loopback interface";
+ type inet-types:ip-address;
+ }
+ leaf ip-prefix {
+ description "Ip address prefix of a loopback interface";
+ type inet-types:ip-prefix;
+ }
+ leaf bvi {
+ description "Enable/disable BVI for loopback interface";
+ type boolean;
+ }
+ }
+ }
+ }
+
+ grouping interface-location {
+ leaf vpp-node-path {
+ description "Path to a node representing mount-point to VPP instance.";
+ mandatory true;
+ type instance-identifier;
+ }
+ leaf vpp-interface-name {
+ description "Name of interface for the endpoint on VPP";
+ mandatory true;
+ type string;
+ }
+ }
+
+ container config {
+ list vpp-endpoint {
+ description "Renderer creates/removes interface on VPP node based on given parameters.";
+
+ key "context-type context-id address-type address";
+ uses base-ep:address-endpoint-key;
+
+ uses interface-attributes;
}
- list bridge-domain {
+ list gbp-bridge-domain {
key "id";
- leaf id {
- description "Same as in VBD.";
- type string;
- }
- leaf description {
- type string;
- }
+ uses bridge-domain-base-attributes;
leaf type {
mandatory true;
type network-type;
when "type = 'vlan-network'";
type l2-types:vlan-id;
}
- list physical-location-ref {
- description
- "Refers to physical interfaces on vpp nodes through which external
- nodes belonging to the same bridge-domain can be reached.";
- key "node-id";
- leaf node-id {
- description "Refers to a VPP node.";
- type nt:node-id;
- }
- leaf-list interface {
- description "Physical interface on the VPP node.";
- type string;
- }
- }
}
}
}