diff options
Diffstat (limited to 'src/plugins/yang/openconfig/openconfig-ap-manager.yang')
-rw-r--r-- | src/plugins/yang/openconfig/openconfig-ap-manager.yang | 220 |
1 files changed, 220 insertions, 0 deletions
diff --git a/src/plugins/yang/openconfig/openconfig-ap-manager.yang b/src/plugins/yang/openconfig/openconfig-ap-manager.yang new file mode 100644 index 0000000..6fb3f8f --- /dev/null +++ b/src/plugins/yang/openconfig/openconfig-ap-manager.yang @@ -0,0 +1,220 @@ +module openconfig-ap-manager { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/wifi/ap-manager"; + + // Assign this module a prefix to be used by other modules, when imported. + prefix "ap-manager"; + + // Imports + import openconfig-extensions { prefix oc-ext; } + import openconfig-yang-types { prefix oc-yang; } + import openconfig-inet-types { prefix oc-inet; } + import openconfig-wifi-types { prefix oc-wifi; } + + // Meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module defines the top level configuration and state data for a + system which manages Access Points."; + + oc-ext:openconfig-version "0.1.0"; + + revision "2018-02-14" { + description + "Initial version"; + reference "0.1.0"; + } + + grouping provision-aps-config { + description + "Assignment of hostname to an Access Point."; + + leaf mac { + type oc-yang:mac-address; + description + "MAC address of the AP primary Ethernet interface. If AP + has multiple Ethernet interfaces, this would be the MAC printed + on the unit label and referenced within the management system. + Vendors MUST reject attempts to configure this leaf."; + } + + leaf hostname { + type oc-inet:domain-name; + description + "Hostname of the Access Point."; + } + + leaf country-code { + type string { + pattern '[A-Z]{2}'; + } + description + "Country code where the AP operates in ISO 3166-1 alpha-2 + format."; + } + } + + grouping controller-aps-system-state { + description + "Grouping for a Controller & AP system state data."; + + leaf mac { + type oc-yang:mac-address; + description + "MAC address of the AP primary Ethernet interface. If AP + has multiple Ethernet interfaces, this would be the MAC printed + on the unit label and referenced within the management system. + Vendors MUST reject attempts to configure this leaf."; + } + + leaf hostname { + type oc-inet:domain-name; + description + "Hostname of the Access Point."; + } + + leaf opstate { + type identityref { + base oc-wifi:AP_STATE; + } + description + "The current operational state of the AP."; + } + + leaf uptime { + type uint32; + units seconds; + description + "Seconds this AP has been in the op-state of 'UP'."; + } + + leaf enabled { + type boolean; + description + "Wheather the AP is enabled or disabled."; + } + + leaf serial { + type string; + description + "Serial number of the Access Point."; + } + + leaf model { + type string; + description + "Model number of the Access Point."; + } + + leaf ipv4 { + type oc-inet:ipv4-address; + description + "The IPv4 address of the Access Point."; + } + + leaf ipv6 { + type oc-inet:ipv6-address; + description + "The IPv6 address of the Access Point."; + } + + leaf power-source { + type enumeration { + enum AT { + description "Powered using 802.3at."; + } + enum AF { + description "Powered using 802.3af."; + } + enum PLUG { + description "Powered using local source, not PoE."; + } + } + description + "Enumerate how the AP is being powered."; + } + } + + grouping provision-ap-top { + description + "Top-level grouping for assigning hostnames to APs."; + + container provision-aps { + description + "Top most container for assigning hostnames to APs."; + + list provision-ap { + key "mac"; + description + "List of MAC addresses that will have hostnames assigned."; + + leaf mac { + type leafref { + path "../config/mac"; + } + description + "Reference to the MAC address list key. This leaf is a reference + only and not to be configured."; + } + + container config { + description + "Config container for assigning hostnames to APs."; + + uses provision-aps-config; + } + + container state { + config false; + description + "State container for assigning hostnames to APs."; + + uses provision-aps-config; + } + } + } + } + + grouping joined-aps-top { + description + "Top-level grouping for APs assigned to controller(s)."; + + container joined-aps { + description + "Top most container for joined-aps."; + + list joined-ap { + key "hostname"; + config false; + description + "List of access points that have joined the controller."; + + leaf hostname { + type leafref { + path "../state/hostname"; + } + description + "Reference to the MAC address list key."; + } + + container state { + config false; + description + "State container for Joined APs."; + + uses controller-aps-system-state; + } + } + } + } + uses provision-ap-top; + uses joined-aps-top; +} |