aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-pf-interfaces.yang
blob: 41ba545e0c7ad82f7ad76610db6bd5c062ab4bfb (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
116
117
118
119
120
121
submodule openconfig-pf-interfaces {
  belongs-to openconfig-policy-forwarding {
    prefix "oc-pf";
  }

  import openconfig-extensions { prefix "oc-ext"; }
  import openconfig-interfaces { prefix "oc-if"; }

  include openconfig-pf-forwarding-policies;

  organization
    "OpenConfig working group";

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

  description
    "This submodule contains groupings related to the association
    between interfaces and policy forwarding rules.";

  oc-ext:openconfig-version "0.2.0";

  revision "2017-06-21" {
    description
      "Amend policy forwarding model based on ACL changes.";
    reference "0.2.0";
  }

  revision "2017-02-28" {
    description
      "Initial public release of policy forwarding.";
    reference "0.1.0";
  }

  revision "2016-11-08" {
    description
      "Initial revision";
    reference "0.0.1";
  }


  grouping pf-interfaces-structural {
    description
      "Structural grouping for interface to forwarding policy bindings
      within the policy-forwarding model.";

    container interfaces {
      description
        "Configuration and operational state relating policy
        forwarding on interfaces.";

      list interface {
        key "interface-id";

        description
          "Configuration and operationals state relating to the
          relationship between interfaces and policy-based forwarding
          rules.";

        leaf interface-id {
          type leafref {
            path "../config/interface-id";
          }
          description
            "A reference to the unique identifier for the interface
            being referenced by the policy.";
        }

        container config {
          description
            "Configuration parameters relating to an interface to
            policy forwarding rule binding.";

          uses pf-interface-config;
        }

        container state {
          config false;
          description
            "Operational state parameters relating to an interface to
            policy forwarding rule binding.";

          uses pf-interface-config;
        }

        uses oc-if:interface-ref;
      }
    }
  }

  grouping pf-interface-config {
    description
      "Configuration parameters relating to an interface to policy
      forwarding rule binding.";

    leaf interface-id {
      type oc-if:interface-id;
      description
        "A unique identifier for the interface.";
    }

    leaf apply-forwarding-policy {
      type leafref {
        // We are at /network-instances/network-instance/
        // policy-forwarding/interfaces/interface/config/
        // apply-forwarding-policy
        path "../../../../policies/policy/" +
             "config/policy-id";
      }
      description
        "The policy to be applied on the interface. Packets ingress on
        the referenced interface should be compared to the match
        criteria within the specified policy, and in the case that
        these criteria are met, the forwarding actions specified
        applied. These policies should be applied following quality of
        service classification, and ACL actions if such entities are
        referenced by the corresponding interface.";
    }
  }
}