5 import ietf-inet-types { prefix inet; }
6 import ietf-yang-types { prefix yang; }
7 import yang-ext { prefix ext; }
8 import opendaylight-inventory {prefix inv;}
9 import opendaylight-l2-types { prefix l2types; }
11 revision "2013-09-25" {
12 description "Initial revision of affinity model to be reviewed";
16 //**************************************************
17 // Switch + port. Access port on a physical switch.
18 //**************************************************
19 grouping switch_endpoint {
21 type inv:node-connector-id;
25 //**************************************************
26 // Affinity address domain: This represents a domain (i.e, set) of one or
27 // more addresses. An affinity address may not always have a corresponding
28 // endpoint on the network, for example, an address domain representing
29 // external addresses, or north-south traffic in a data center). Here the
30 // IP address domain representing such external addresses does not map to
31 // endpoints or node connectors on the network.
33 // Affinity address domains specify one or more of the following:
34 // layer 2 address (vlan + mac range)
35 // layer 3 address (IP prefix)
36 //**************************************************
38 // xxx -- Includes access port on a hypervisor ovswitch to which a VM is connected.
39 grouping host_endpoint {
45 type yang:mac-address;
49 // l3-domain-address is IPv4 prefix
51 type inet:ipv4-prefix;
56 type instance-identifier;
60 type instance-identifier;
63 //**************************************************
65 //**************************************************
76 //**************************************************
77 // Affinity link connects one group (from group) to another (to
78 // group). It represents a set of flows that start from the source group
79 // and end in the destination group. An affinity link has attributes
80 // (policies) attached to it that represent how these flows must be
81 // handled. An affinity link also has directionality associated with
82 // it. A bidirectional affinity link is equivalent to two unidirectional
83 // affinity links, one in each direction.
84 //**************************************************
100 //**************************************************
101 // Affinity attribute. Each is expanded in their own grouping construct below.
102 //**************************************************
103 // Various types of affinity topologies. Used in union 'attribute'.
105 // Affinity attribute. xxx add case statements for each type later.
107 leaf attribute-type {
108 description "affinity attribute";
113 // Main container that represents the complete set of affinity
114 // groups and links. Each set is represented as a YANG list with 'id'
115 // as the key. List contains affinity group and affinity link objects
120 ext:context-instance "group-context";
125 ext:context-instance "link-context";
130 //******************************
131 // RPCs to create affinity groups, add endpoints and address domains.
132 //******************************
165 rpc get-stats-per-link;
167 //**************************************************
169 //**************************************************
170 notification new-endpoint;
171 notification new-domain;
172 notification modify-attribute;