Added range type to subject-feature-definition/parameter
[groupbasedpolicy.git] / groupbasedpolicy / src / main / yang / renderer / oc / 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 gbp-common {prefix gbp-common;}
20     import endpoint {prefix endpoint;}
21
22     description
23         "This module defines the group-based policy oc renderer model.";
24
25     revision "2014-05-28" {
26         description
27             "Initial revision.";
28     }
29
30     // ******************
31     // Configuration Data
32     // ******************
33     container oc-config {
34         description
35             "Configuration for the OC renderer";
36         config true;
37
38            leaf learning-mode {
39             description
40                 "Selects how and whether we learn endpoints";
41             type enumeration {
42                 enum orchestrated {
43                     description
44                         "An external orchestration system will provide
45                          information about all endpoints, and no
46                          direct learning will occur.";
47                 }
48             }
49         }
50     }
51
52     grouping endpoint-location {
53         description
54             "The location for this endpoint in the overlay network";
55
56         leaf location-type {
57             default internal;
58
59             type enumeration {
60                 enum internal {
61                     description
62                     "The endpoint is located on a port that is part of
63                      the network.  You must include the node
64                      ID and port number for this endpoint.";
65                 }
66                 enum external {
67                     description "This endpoint is not inside the network.";
68                 }
69             }
70         }
71         leaf port-id {
72             description
73                 "The port where the endpoint is located.";
74             type string;
75         }
76     }
77
78     augment "/endpoint:endpoints/endpoint:endpoint" {
79         ext:augment-identifier "oc-context";
80         uses endpoint-location;
81     }
82
83     augment "/endpoint:register-endpoint/endpoint:input" {
84         ext:augment-identifier "oc-context-input";
85         uses endpoint-location;
86     }
87 }