Added range type to subject-feature-definition/parameter
[groupbasedpolicy.git] / renderers / oc / src / main / yang / oc.yang
1 /*
2  * Copyright (c) 2015 Juniper Networks, Inc.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 module oc {
10     yang-version 1;
11
12     namespace "urn:opendaylight:groupbasedpolicy:oc";
13     prefix "oc";
14
15     import ietf-inet-types { prefix "inet"; revision-date 2010-09-24; }
16
17     import yang-ext {prefix ext; revision-date "2013-07-09";}
18
19     import endpoint {prefix endpoint;}
20
21     description
22         "This module defines the group-based policy oc renderer model.";
23
24     revision "2014-05-28" {
25         description
26             "Initial revision.";
27     }
28
29     // ******************
30     // Configuration Data
31     // ******************
32     container oc-config {
33         description
34             "Configuration for the OC renderer";
35         config true;
36
37            leaf learning-mode {
38             description
39                 "Selects how and whether we learn endpoints";
40             type enumeration {
41                 enum orchestrated {
42                     description
43                         "An external orchestration system will provide
44                          information about all endpoints, and no
45                          direct learning will occur.";
46                 }
47             }
48         }
49     }
50
51     grouping endpoint-location {
52         description
53             "The location for this endpoint in the overlay network";
54
55         leaf location-type {
56             default internal;
57
58             type enumeration {
59                 enum internal {
60                     description
61                     "The endpoint is located on a port that is part of
62                      the network.  You must include the node
63                      ID and port number for this endpoint.";
64                 }
65                 enum external {
66                     description "This endpoint is not inside the network.";
67                 }
68             }
69         }
70         leaf port-id {
71             description
72                 "The port where the endpoint is located.";
73             type string;
74         }
75     }
76
77     augment "/endpoint:endpoints/endpoint:endpoint" {
78         ext:augment-identifier "oc-context";
79         uses endpoint-location;
80     }
81
82     augment "/endpoint:register-endpoint/endpoint:input" {
83         ext:augment-identifier "oc-context-input";
84         uses endpoint-location;
85     }
86 }