aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-access-points.yang
blob: 76658146707900c42df5a6f5c5ff95713e556bf1 (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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
module openconfig-access-points {

  yang-version "1";

  // namespace
  namespace "http://openconfig.net/yang/wifi/access-points";

  // Assign this module a prefix to be used by other modules, when imported.
  prefix "access-points";

  // Imports
  import openconfig-extensions { prefix oc-ext; }
  import openconfig-inet-types { prefix oc-inet; }
  import openconfig-wifi-phy { prefix wifi-phy; }
  import openconfig-wifi-mac { prefix wifi-mac; }
  import openconfig-system { prefix oc-sys; }

  // Meta
  organization "OpenConfig working group";

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

  description
    "This module defines the top level WiFi Configurations for a list of
    Access Points.";

  oc-ext:openconfig-version "0.1.0";

  revision "2018-02-14" {
    description
      "Initial version";
    reference "0.1.0";
  }

  grouping assigned-ap-managers-config {
    description
      "AP Manager(s) an AP may join. If cloud manager, this will be
      the cloud instance(s). This is often referred to as 'Controller'.";

    leaf id {
      type string;
      description
        "The unique reference for the AP manager described in the list entry.";
      }

    leaf fqdn {
      type oc-inet:domain-name;
      description
        "The FQDN of a manager this AP is assigned to. The list should be
        ordered, according to priority. eg Primary first,
        Secondary second, Tertiary third etc.";
    }

    leaf ap-manager-ipv4-address {
      type oc-inet:ipv4-address;
      description
        "IPv4 address of a manager for this AP. The list should be
        ordered, according to priority. eg. Primary first, Secondary second,
        Tertiary third etc.";
    }

    leaf-list ap-manager-ipv6-address {
      type oc-inet:ipv6-address;
      description
        "IPv6 address of a manager for this AP. The list should be
        ordered, according to priority. eg. Primary first, Secondary second,
        Tertiary third etc.";
    }
  }

  grouping assigned-ap-managers-state {
    description
      "Manager(s) an AP may join. If cloud manager, this will be
      the cloud instance(s).";

    leaf joined {
      type boolean;
      description
        "True only if this AP is currently joined to a manager. If this AP
        is configured to join manager(s), however is not currently joined
        to any manager, this MUST return False.";
    }
  }

  grouping manager-ap-parameters-top {
    description
      "Top-level grouping for assigning AP's to manager(s).";

    container assigned-ap-managers {
      description
        "Wireless manager(s) this AP is assigned to. eg. Primary
        Secondary, Tertiary etc.";

      list ap-manager {
        key "id";
        description
          "Manager(s) this AP is assinged to, referenced by id.";

        leaf id {
          type leafref {
            path "../config/id";
          }
          description
            "id serves as a reference point to the [1-n] manager(s) this AP
            is assigned to.";
        }

        container config {
          description
            "Config. container for assigning APs to managers.";

          uses assigned-ap-managers-config;
        }

        container state {
          config false;
          description
            "State container for APs assigned to managers.";

          uses assigned-ap-managers-config;
          uses assigned-ap-managers-state;
        }
      }
    }
  }

  grouping access-points-top {
    description
      "Top-level grouping for AP configuration & state data.";

    container access-points {
      description
        "Top most container for configuration and state data for Access
        Points.";

      list access-point {
        key "hostname";
        description
          "Configuration and state data for the access point referenced in the
          list entry.";

        leaf hostname {
          type oc-inet:domain-name;
          description
            "AP FQDN";
        }

        uses wifi-phy:radio-top;
        uses wifi-mac:ssid-top;
        uses wifi-mac:bssid-counters-top;
        uses oc-sys:system-top;
        uses manager-ap-parameters-top;
      }
    }
  }
  uses access-points-top;

  // hostname is set using openconfig-wifi-aps model.
  deviation /oc-sys:system/oc-sys:config/oc-sys:hostname {
    deviate not-supported;
  }

  deviation /oc-sys:system/oc-sys:state/oc-sys:hostname {
    deviate not-supported;
  }
}