<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns="http://netconfcentral.org/ns/yuma-nacm"
  targetNamespace="http://netconfcentral.org/ns/yuma-nacm"
  elementFormDefault="qualified" attributeFormDefault="unqualified"
  xml:lang="en" version="2012-01-13"
  xmlns:ncx="http://netconfcentral.org/ns/yuma-ncx"
  xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
  xmlns:yang="urn:ietf:params:xml:ns:yang:ietf-yang-types">
  <xs:annotation>
    <xs:documentation>Converted from YANG file 'yuma-nacm.yang' by yangdump version 2.2.1737
      
      Module: yuma-nacm
      Organization: Netconf Central
      Version: 2012-01-13
      Contact: Andy Bierman &lt;andy@netconfcentral.org&gt;.</xs:documentation>
    <xs:documentation>NETCONF Server Access Control Model</xs:documentation>
    <xs:appinfo>
      <ncx:source>/usr/share/yuma/modules/netconfcentral/yuma-nacm.yang</ncx:source>
      <ncx:organization>Netconf Central</ncx:organization>
      <ncx:contact>Andy Bierman &lt;andy@netconfcentral.org&gt;.</ncx:contact>
    </xs:appinfo>
    <xs:appinfo>
      <ncx:revision>
        <ncx:version>2012-01-13</ncx:version>
        <ncx:description>Add ncx:user-write restriction to prevent user deletion
          of the nacm container</ncx:description>
      </ncx:revision>
      <ncx:revision>
        <ncx:version>2010-02-21</ncx:version>
        <ncx:description>Initial version (work-in-progress).</ncx:description>
      </ncx:revision>
    </xs:appinfo>
  </xs:annotation>
  <xs:simpleType name="nacm-user-name">
    <xs:annotation>
      <xs:documentation>General Purpose User Name string.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern value="[a-z,A-Z,_][a-z,A-Z,0-9,\-,_,@,.]{0,63}"/>
      <xs:minLength value="1"/>
      <xs:maxLength value="64"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="nacm-rights">
    <xs:annotation>
      <xs:documentation>NETCONF Access Rights</xs:documentation>
    </xs:annotation>
    <xs:list>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="read">
            <xs:annotation>
              <xs:documentation>Read access allowed to all specified data.
                Any protocol operation or notification that
                returns data to an application is a read
                operation.</xs:documentation>
              <xs:appinfo>
                <ncx:position>0</ncx:position>
              </xs:appinfo>
            </xs:annotation>
          </xs:enumeration>
          <xs:enumeration value="write">
            <xs:annotation>
              <xs:documentation>Write access allowed to all specified data.
                Any protocol operation that alters a database
                is a write operation.</xs:documentation>
              <xs:appinfo>
                <ncx:position>1</ncx:position>
              </xs:appinfo>
            </xs:annotation>
          </xs:enumeration>
          <xs:enumeration value="exec">
            <xs:annotation>
              <xs:documentation>Execution access to the specified RPC operation.
                Any RPC operation invocation is an exec operation.</xs:documentation>
              <xs:appinfo>
                <ncx:position>2</ncx:position>
              </xs:appinfo>
            </xs:annotation>
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
    </xs:list>
  </xs:simpleType>
  <xs:simpleType name="nacm-group">
    <xs:annotation>
      <xs:documentation>Type of administrative group that can be
        assigned to the user, and specified in
        an access control rule.
        
        The identityref data type is used to allow as
        many groups to be added as needed.  There are
        no standard semantics for each identity.
        It simply represents a unique group name.</xs:documentation>
    </xs:annotation>
  </xs:simpleType>
  <xs:simpleType name="nacm-action">
    <xs:annotation>
      <xs:documentation>Action taken by the server when a particular
        rule matches.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="permit">
        <xs:annotation>
          <xs:documentation>Requested action is permitted.</xs:documentation>
          <xs:appinfo>
            <ncx:value>0</ncx:value>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="deny">
        <xs:annotation>
          <xs:documentation>Requested action is denied.</xs:documentation>
          <xs:appinfo>
            <ncx:value>1</ncx:value>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="schema-instance-identifier">
    <xs:annotation>
      <xs:documentation>Path expression used to represent a special
        schema-instance identifier string.
        
        A schema-instance-identifier value string is an
        unrestricted YANG instance-identifier expression.
        All the same rules as an instance-identifier apply
        except predicates for keys are optional.  If a key
        predicate is missing, then the schema-instance-identifier
        represents all possible server instances for that key.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:element name="nacm">
    <xs:annotation>
      <xs:documentation>Parameters for NETCONF Access Control Model.</xs:documentation>
      <xs:appinfo>
        <ncx:config>true</ncx:config>
        <ncx:presence>An empty nacm container indicates that the
          NACM service is running, and possibly using
          all default parameters.</ncx:presence>
        <ncx:user-write>
          <ncx:exceptions>update</ncx:exceptions>
        </ncx:user-write>
        <very-secure/>
      </xs:appinfo>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="enable-nacm" type="xs:boolean" default="true"
          minOccurs="0">
          <xs:annotation>
            <xs:documentation>Enable or disable all NETCONF access control
              enforcement.  If 'true', then enforcement
              is enabled.  If 'false', then enforcement
              is disabled.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="read-default" type="nacm-action"
          default="permit" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Controls whether read access is granted if
              no appropriate rule is found for a
              particular read request.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="write-default" type="nacm-action"
          default="deny" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Controls whether write access is granted if
              no appropriate rule is found for a
              particular write request.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="exec-default" type="nacm-action"
          default="permit" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Controls whether exec access is granted if
              no appropriate rule is found for a
              particular RPC operation request.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="denied-rpcs" type="yang:zero-based-counter32"
          default="0" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Number of times an RPC operation request was denied</xs:documentation>
            <xs:appinfo>
              <ncx:config>false</ncx:config>
            </xs:appinfo>
          </xs:annotation>
        </xs:element>
        <xs:element name="denied-data-writes"
          type="yang:zero-based-counter32" default="0" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Number of times a request to alter a data node
              was denied.</xs:documentation>
            <xs:appinfo>
              <ncx:config>false</ncx:config>
            </xs:appinfo>
          </xs:annotation>
        </xs:element>
        <xs:element name="groups">
          <xs:annotation>
            <xs:documentation>NACM Group Table</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="group" minOccurs="0"
                maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation>One NACM Group Entry</xs:documentation>
                  <xs:appinfo>
                    <ncx:ordered-by>system</ncx:ordered-by>
                  </xs:appinfo>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="group-identity" type="nacm-group">
                      <xs:annotation>
                        <xs:documentation>Group identity associated with this entry.</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="user-name" type="nacm-user-name"
                      minOccurs="0" maxOccurs="unbounded">
                      <xs:annotation>
                        <xs:documentation>Each entry identifies the user name of
                          a member of the group associated with
                          this entry.</xs:documentation>
                        <xs:appinfo>
                          <ncx:ordered-by>system</ncx:ordered-by>
                        </xs:appinfo>
                      </xs:annotation>
                    </xs:element>
                    <xs:any minOccurs="0" maxOccurs="unbounded"
                      namespace="##other" processContents="lax"/>
                  </xs:sequence>
                </xs:complexType>
                <xs:key name="groupkey157">
                  <xs:selector xpath="."/>
                  <xs:field xpath="group-identity"/>
                </xs:key>
              </xs:element>
              <xs:any minOccurs="0" maxOccurs="unbounded"
                namespace="##other" processContents="lax"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="rules">
          <xs:annotation>
            <xs:documentation>NETCONF Access Control Rules.</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="module-rule" minOccurs="0"
                maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation>One Module Access Rule.
                    Rules are processed in user-defined order.
                    A module rule is considered a match if
                    the XML namespace for the specified module
                    name matches the XML namespace used within
                    a NETCONF PDU, and the administrative group
                    associated with the requesting session is
                    specified in the 'allowed-group' leaf-list.</xs:documentation>
                  <xs:appinfo>
                    <ncx:ordered-by>user</ncx:ordered-by>
                  </xs:appinfo>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="module-name">
                      <xs:annotation>
                        <xs:documentation>Name of the module associated with
                          this rule.</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:minLength value="1"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="rule-name">
                      <xs:annotation>
                        <xs:documentation>Arbitrary name assigned to the
                          access control rule.</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:minLength value="1"/>
                          <xs:maxLength value="1023"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="allowed-rights"
                      type="nacm-rights">
                      <xs:annotation>
                        <xs:documentation>List of access rights granted to
                          specified administrative groups for the
                          content specified by the associated path.</xs:documentation>
                        <xs:appinfo>
                          <ncx:mandatory>true</ncx:mandatory>
                        </xs:appinfo>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="allowed-group" type="nacm-group"
                      minOccurs="1" maxOccurs="unbounded">
                      <xs:annotation>
                        <xs:documentation>List of administrative groups which will be
                          assigned the associated access rights
                          for the content specified by the associated
                          path.</xs:documentation>
                        <xs:appinfo>
                          <ncx:ordered-by>system</ncx:ordered-by>
                        </xs:appinfo>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="comment" minOccurs="0">
                      <xs:annotation>
                        <xs:documentation>A textual description of the access rule.</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:maxLength value="4095"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:any minOccurs="0" maxOccurs="unbounded"
                      namespace="##other" processContents="lax"/>
                  </xs:sequence>
                </xs:complexType>
                <xs:key name="module-rulekey158">
                  <xs:selector xpath="."/>
                  <xs:field xpath="module-name"/>
                  <xs:field xpath="rule-name"/>
                </xs:key>
              </xs:element>
              <xs:element name="rpc-rule" minOccurs="0"
                maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation>One RPC Operation Access Rule.
                    Rules are processed in user-defined order.
                    An RPC rule is considered a match if
                    the module name of the requested RPC
                    operation matches 'rpc-module-name',
                    the requested RPC operation matches
                    'rpc-name', and an administrative group
                    associated with the session user
                    is listed in the 'allowed-group'
                    leaf-list</xs:documentation>
                  <xs:appinfo>
                    <ncx:ordered-by>user</ncx:ordered-by>
                  </xs:appinfo>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="rpc-module-name">
                      <xs:annotation>
                        <xs:documentation>Name of the module defining this
                          RPC operation.</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:minLength value="1"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="rpc-name">
                      <xs:annotation>
                        <xs:documentation>Name of the RPC operation.</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:minLength value="1"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="rule-name">
                      <xs:annotation>
                        <xs:documentation>Arbitrary name assigned to the
                          access control rule.</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:minLength value="1"/>
                          <xs:maxLength value="1023"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="allowed-rights"
                      type="nacm-rights">
                      <xs:annotation>
                        <xs:documentation>List of access rights granted to
                          specified administrative groups for the
                          content specified by the associated path.</xs:documentation>
                        <xs:appinfo>
                          <ncx:mandatory>true</ncx:mandatory>
                        </xs:appinfo>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="allowed-group" type="nacm-group"
                      minOccurs="1" maxOccurs="unbounded">
                      <xs:annotation>
                        <xs:documentation>List of administrative groups which will be
                          assigned the associated access rights
                          for the content specified by the associated
                          path.</xs:documentation>
                        <xs:appinfo>
                          <ncx:ordered-by>system</ncx:ordered-by>
                        </xs:appinfo>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="comment" minOccurs="0">
                      <xs:annotation>
                        <xs:documentation>A textual description of the access rule.</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:maxLength value="4095"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:any minOccurs="0" maxOccurs="unbounded"
                      namespace="##other" processContents="lax"/>
                  </xs:sequence>
                </xs:complexType>
                <xs:key name="rpc-rulekey159">
                  <xs:selector xpath="."/>
                  <xs:field xpath="rpc-module-name"/>
                  <xs:field xpath="rpc-name"/>
                  <xs:field xpath="rule-name"/>
                </xs:key>
              </xs:element>
              <xs:element name="data-rule" minOccurs="0"
                maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation>One Data Access Control Rule.
                    Rules are processed in user-defined order.
                    A data rule is considered to match when
                    the path expression identifies
                    the same node that is being accessed
                    in the NETCONF database, and the administrative
                    group associated with the session is identified
                    in the 'allowed-group' leaf-list.</xs:documentation>
                  <xs:appinfo>
                    <ncx:ordered-by>user</ncx:ordered-by>
                  </xs:appinfo>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="rule-name">
                      <xs:annotation>
                        <xs:documentation>Arbitrary name assigned to the
                          access control rule.</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:minLength value="1"/>
                          <xs:maxLength value="1023"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="path"
                      type="schema-instance-identifier">
                      <xs:annotation>
                        <xs:documentation>Schema Instance Identifier associated with
                          the data node controlled by this rule.
                          
                          Configuration data or state data
                          instance identifiers start with
                          a top-level data node.
                          A complete instance identifier is
                          required for this type of path value.
                          
                          The special value '/' refers to all
                          possible database contents.</xs:documentation>
                        <xs:appinfo>
                          <ncx:mandatory>true</ncx:mandatory>
                        </xs:appinfo>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="allowed-rights"
                      type="nacm-rights">
                      <xs:annotation>
                        <xs:documentation>List of access rights granted to
                          specified administrative groups for the
                          content specified by the associated path.</xs:documentation>
                        <xs:appinfo>
                          <ncx:mandatory>true</ncx:mandatory>
                        </xs:appinfo>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="allowed-group" type="nacm-group"
                      minOccurs="1" maxOccurs="unbounded">
                      <xs:annotation>
                        <xs:documentation>List of administrative groups which will be
                          assigned the associated access rights
                          for the content specified by the associated
                          path.</xs:documentation>
                        <xs:appinfo>
                          <ncx:ordered-by>system</ncx:ordered-by>
                        </xs:appinfo>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="comment" minOccurs="0">
                      <xs:annotation>
                        <xs:documentation>A textual description of the access rule.</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:maxLength value="4095"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:any minOccurs="0" maxOccurs="unbounded"
                      namespace="##other" processContents="lax"/>
                  </xs:sequence>
                </xs:complexType>
                <xs:key name="data-rulekey160">
                  <xs:selector xpath="."/>
                  <xs:field xpath="rule-name"/>
                </xs:key>
              </xs:element>
              <xs:element name="notification-rule" minOccurs="0"
                maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation>One Notification Access Rule.
                    A notification is considered a match if
                    the module name of the requested
                    event type matches 'notification-module-name',
                    the requested event type matches the
                    'notification-name', and the administrative group
                    associated with the requesting session
                    is listed in the 'allowed-group' leaf-list.</xs:documentation>
                  <xs:appinfo>
                    <ncx:ordered-by>user</ncx:ordered-by>
                  </xs:appinfo>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="notification-module-name">
                      <xs:annotation>
                        <xs:documentation>Name of the module defining this
                          notification event type.</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:minLength value="1"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="notification-name">
                      <xs:annotation>
                        <xs:documentation>Name of the notification event.</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:minLength value="1"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="rule-name">
                      <xs:annotation>
                        <xs:documentation>Arbitrary name assigned to the
                          access control rule.</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:minLength value="1"/>
                          <xs:maxLength value="1023"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="allowed-rights"
                      type="nacm-rights">
                      <xs:annotation>
                        <xs:documentation>List of access rights granted to
                          specified administrative groups for the
                          content specified by the associated path.</xs:documentation>
                        <xs:appinfo>
                          <ncx:mandatory>true</ncx:mandatory>
                        </xs:appinfo>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="allowed-group" type="nacm-group"
                      minOccurs="1" maxOccurs="unbounded">
                      <xs:annotation>
                        <xs:documentation>List of administrative groups which will be
                          assigned the associated access rights
                          for the content specified by the associated
                          path.</xs:documentation>
                        <xs:appinfo>
                          <ncx:ordered-by>system</ncx:ordered-by>
                        </xs:appinfo>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="comment" minOccurs="0">
                      <xs:annotation>
                        <xs:documentation>A textual description of the access rule.</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:maxLength value="4095"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:any minOccurs="0" maxOccurs="unbounded"
                      namespace="##other" processContents="lax"/>
                  </xs:sequence>
                </xs:complexType>
                <xs:key name="notification-rulekey161">
                  <xs:selector xpath="."/>
                  <xs:field xpath="notification-module-name"/>
                  <xs:field xpath="notification-name"/>
                  <xs:field xpath="rule-name"/>
                </xs:key>
              </xs:element>
              <xs:any minOccurs="0" maxOccurs="unbounded"
                namespace="##other" processContents="lax"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"
          processContents="lax"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

