+++ /dev/null
-module nfchain {
- namespace "urn:opendaylight:affinity:nfchain";
- prefix nfchain;
-
- import ietf-inet-types { prefix inet; }
- import ietf-yang-types { prefix yang; }
- import yang-ext { prefix ext; }
- import opendaylight-inventory {prefix inv;}
- import opendaylight-l2-types { prefix l2types; }
- import opendaylight-flow-types { prefix flow-types; }
-
- revision "2013-10-20" {
- description "Initial revision of affinity model to be reviewed";
- }
-
- //**************************************************
- // Gateway hosting the network function.
- //**************************************************
- grouping gateway {
- leaf id {
- type string;
- }
- // xxx address is an IP prefix.
- leaf location {
- description "Inet address";
- type inet:ipv4-prefix;
- }
- }
-
- // Each nf chain has an id, a flowspec and a list of gateways.
- grouping chain {
- leaf name {
- type string;
- }
-
- list flow {
- uses flow-types:flow;
- }
-
- list gateway {
- key id;
- ext:context-instance "gateway-context";
- uses gateway;
- }
- }
-
- // Container for all nf_chain objects
- container nfdb {
- list chain {
- key id;
- ext:context-instance "chain-context";
- uses chain;
- }
- }
-
- identity gateway-context;
-
- typedef gateway-ref {
- type instance-identifier;
- }
-
- // nf chain reference.
- typedef chain-ref {
- type instance-identifier;
- }
- identity chain-context;
-
- //**************************************************
- // Add a chain to the service.
- //**************************************************
- rpc addchain {
- input {
- container chain {
- uses chain;
- }
- }
- }
-
- rpc enablechain {
- input {
- leaf chain {
- type chain-ref;
- }
- }
- }
-
-}