summaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-network-instance-policy.yang
blob: afbcacdaa22e80792fe508d0ae0a2fe6e70c02e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
module openconfig-network-instance-policy {

  yang-version "1";

  // namespace
  namespace "http://openconfig.net/yang/network-instance/policy";

  prefix "oc-ni-pol";

  // import some basic types
  import openconfig-extensions { prefix oc-ext; }
  import openconfig-routing-policy { prefix oc-rpol; }
  import openconfig-policy-types { prefix oc-pol-types; }


  // meta
  organization "OpenConfig working group";

  contact
    "OpenConfig working group
    www.openconfig.net";

  description
    "This module defines routing policy statements (conditions and
    actions) for the network instance model.  These statements are
    generally added to the routing policy model.";

  oc-ext:openconfig-version "0.1.0";

  revision "2017-02-15" {
    description
      "Initial revision";
    reference "0.1.0";
  }

  // grouping statements

  grouping protocol-instance-policy-config {
    description
      "Configuration data for policy matching on protocol instance";

      leaf protocol-identifier {
        type identityref {
          base oc-pol-types:INSTALL_PROTOCOL_TYPE;
        }
        description
          "The identifier (protocol type) of the
          protocol instance to match on in the local network
          instance.";
      }

      leaf protocol-name {
        type string;
        description
          "The name of the protocol instance to match
          on in the local network instance";
      }
  }

  grouping protocol-instance-policy-state {
    description
      "Operational state data for policy matching on protocol
      instance";
  }

  grouping protocol-instance-policy-top {
    description
      "Top-level grouping for policy matching on protocol instance";

    container match-protocol-instance {
      description
        "Top-level container for protocol instance match condition
        in policy statements.  The protocol instance is referenced
        by an identifier and name";

      container config {
        description
          "Configuration data for policy matching on protocol
          instance";

        uses protocol-instance-policy-config;
      }

      container state {

        config false;

        description
          "Operational state data for policy matching on protocol instance";

        uses protocol-instance-policy-config;
        uses protocol-instance-policy-state;
      }
    }
  }

  // data definition statements

  // augment statements

  augment "/oc-rpol:routing-policy/oc-rpol:policy-definitions/" +
    "oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/" +
    "oc-rpol:conditions" {
    description
      "Add match conditions for protocol instances to the routing
      policy model.";

    uses protocol-instance-policy-top;
  }

  // rpc statements

  // notification statements

}