<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"
  targetNamespace="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"
  elementFormDefault="qualified" attributeFormDefault="unqualified"
  xml:lang="en" version="2011-12-23"
  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 'ietf-netconf-acm.yang' by yangdump version 2.2.1732
      
      Module: ietf-netconf-acm
      Organization: IETF NETCONF (Network Configuration) Working Group
      Version: 2011-12-23
      Contact: WG Web:   &lt;http://tools.ietf.org/wg/netconf/&gt;
      WG List:  &lt;mailto:netconf@ietf.org&gt;
      
      WG Chair: Mehmet Ersue
      	  &lt;mailto:mehmet.ersue@nsn.com&gt;
      
      WG Chair: Bert Wijnen
      	  &lt;mailto:bertietf@bwijnen.net&gt;
      
      Editor:   Andy Bierman
      	  &lt;mailto:andy@netconfcentral.org&gt;
      
      Editor:   Martin Bjorklund
      	  &lt;mailto:mbj@tail-f.com&gt;</xs:documentation>
    <xs:documentation>NETCONF Access Control Model.
      
      Copyright (c) 2011 IETF Trust and the persons identified as
      authors of the code. All rights reserved.
      
      Redistribution and use in source and binary forms, with or
      without modification, is permitted pursuant to, and subject
      to the license terms contained in, the Simplified BSD
      License set forth in Section 4.c of the IETF Trust's
      Legal Provisions Relating to IETF Documents
      (http://trustee.ietf.org/license-info).
      
      This version of this YANG module is part of RFC XXXX; see
      the RFC itself for full legal notices.</xs:documentation>
    <xs:appinfo>
      <ncx:source>/usr/share/yuma/modules/ietf/ietf-netconf-acm.yang</ncx:source>
      <ncx:organization>IETF NETCONF (Network Configuration) Working Group</ncx:organization>
      <ncx:contact>WG Web:   &lt;http://tools.ietf.org/wg/netconf/&gt;
        WG List:  &lt;mailto:netconf@ietf.org&gt;
        
        WG Chair: Mehmet Ersue
        	  &lt;mailto:mehmet.ersue@nsn.com&gt;
        
        WG Chair: Bert Wijnen
        	  &lt;mailto:bertietf@bwijnen.net&gt;
        
        Editor:   Andy Bierman
        	  &lt;mailto:andy@netconfcentral.org&gt;
        
        Editor:   Martin Bjorklund
        	  &lt;mailto:mbj@tail-f.com&gt;</ncx:contact>
    </xs:appinfo>
    <xs:appinfo>
      <ncx:revision>
        <ncx:version>2011-12-23</ncx:version>
        <ncx:description>Initial version</ncx:description>
      </ncx:revision>
    </xs:appinfo>
  </xs:annotation>
  <xs:simpleType name="user-name-type">
    <xs:annotation>
      <xs:documentation>General Purpose User Name string.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="matchall-string-type">
    <xs:annotation>
      <xs:documentation>The string containing a single asterisk '*' is used
        to conceptually represent all possible values
        for the particular leaf using this data type.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern value="\*"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="access-operations-type">
    <xs:annotation>
      <xs:documentation>NETCONF Access Operation.</xs:documentation>
    </xs:annotation>
    <xs:list>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="create">
            <xs:annotation>
              <xs:documentation>Any protocol operation that creates a
                new data node.</xs:documentation>
              <xs:appinfo>
                <ncx:position>0</ncx:position>
              </xs:appinfo>
            </xs:annotation>
          </xs:enumeration>
          <xs:enumeration value="read">
            <xs:annotation>
              <xs:documentation>Any protocol operation or notification that
                returns the value of a data node.</xs:documentation>
              <xs:appinfo>
                <ncx:position>1</ncx:position>
              </xs:appinfo>
            </xs:annotation>
          </xs:enumeration>
          <xs:enumeration value="update">
            <xs:annotation>
              <xs:documentation>Any protocol operation that alters an existing
                data node.</xs:documentation>
              <xs:appinfo>
                <ncx:position>2</ncx:position>
              </xs:appinfo>
            </xs:annotation>
          </xs:enumeration>
          <xs:enumeration value="delete">
            <xs:annotation>
              <xs:documentation>Any protocol operation that removes a data node.</xs:documentation>
              <xs:appinfo>
                <ncx:position>3</ncx:position>
              </xs:appinfo>
            </xs:annotation>
          </xs:enumeration>
          <xs:enumeration value="exec">
            <xs:annotation>
              <xs:documentation>Execution access to the specified protocol operation.</xs:documentation>
              <xs:appinfo>
                <ncx:position>4</ncx:position>
              </xs:appinfo>
            </xs:annotation>
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
    </xs:list>
  </xs:simpleType>
  <xs:simpleType name="group-name-type">
    <xs:annotation>
      <xs:documentation>Name of administrative group to which
        users can be assigned.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern value="[^\*].*"/>
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="action-type">
    <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="node-instance-identifier">
    <xs:annotation>
      <xs:documentation>Path expression used to represent a special
        data node instance identifier string.
        
        A node-instance-identifier value 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 node-instance-identifier
        represents all possible server instances for that key.
        
        This XPath expression is evaluated in the following context:
        
          o  The set of namespace declarations are those in scope on
             the leaf element where this type is used.
        
          o  The set of variable bindings contains one variable,
             'USER', which contains the name of user of the current
              session.
        
          o  The function library is the core function library, but
             note that due to the syntax restrictions of an
             instance-identifier, no functions are allowed.
        
        
          o  The context node is the root node in the data tree.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="yang:xpath1.0"/>
  </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>
        <default-deny-all/>
      </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="action-type"
          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="action-type"
          default="deny" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Controls whether create, update, or delete 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="action-type"
          default="permit" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Controls whether exec access is granted if no appropriate
              rule is found for a particular protocol operation request.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="enable-external-groups" type="xs:boolean"
          default="true" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Controls whether the server uses the groups reported by the
              NETCONF transport layer when it assigns the user to a set of
              NACM groups.  If this leaf has the value 'false', any group
              names reported by the transport layer are ignored by the
              server.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="denied-operations"
          type="yang:zero-based-counter32" default="0">
          <xs:annotation>
            <xs:documentation>Number of times a protocol operation request was denied
              since the server last restarted.</xs:documentation>
            <xs:appinfo>
              <ncx:config>false</ncx:config>
              <ncx:mandatory>true</ncx:mandatory>
            </xs:appinfo>
          </xs:annotation>
        </xs:element>
        <xs:element name="denied-data-writes"
          type="yang:zero-based-counter32" default="0">
          <xs:annotation>
            <xs:documentation>Number of times a protocol operation request to alter
              a configuration datastore was denied, since the
              server last restarted.</xs:documentation>
            <xs:appinfo>
              <ncx:config>false</ncx:config>
              <ncx:mandatory>true</ncx:mandatory>
            </xs:appinfo>
          </xs:annotation>
        </xs:element>
        <xs:element name="denied-notifications"
          type="yang:zero-based-counter32" default="0">
          <xs:annotation>
            <xs:documentation>Number of times a notification was dropped
              for a subscription because access to
              the event type was denied, since the server
              last restarted.</xs:documentation>
            <xs:appinfo>
              <ncx:config>false</ncx:config>
              <ncx:mandatory>true</ncx:mandatory>
            </xs:appinfo>
          </xs:annotation>
        </xs:element>
        <xs:element name="groups">
          <xs:annotation>
            <xs:documentation>NETCONF Access Control Groups.</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="group" minOccurs="0"
                maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation>One NACM Group Entry.  This list will only contain
                    configured entries, not any entries learned from
                    any transport protocols.</xs:documentation>
                  <xs:appinfo>
                    <ncx:ordered-by>system</ncx:ordered-by>
                  </xs:appinfo>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="name" type="group-name-type">
                      <xs:annotation>
                        <xs:documentation>Group name associated with this entry.</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="user-name" type="user-name-type"
                      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="groupkey27">
                  <xs:selector xpath="."/>
                  <xs:field xpath="name"/>
                </xs:key>
              </xs:element>
              <xs:any minOccurs="0" maxOccurs="unbounded"
                namespace="##other" processContents="lax"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="rule-list" minOccurs="0"
          maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation>An ordered collection of access control rules.</xs:documentation>
            <xs:appinfo>
              <ncx:ordered-by>user</ncx:ordered-by>
            </xs:appinfo>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="name">
                <xs:annotation>
                  <xs:documentation>Arbitrary name assigned to the rule-list.</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:minLength value="1"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="group" minOccurs="0"
                maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation>List of administrative groups that will be
                    assigned the associated access rights
                    defined by the 'rule' list.
                    
                    The string '*' indicates that all groups apply to the
                    entry.</xs:documentation>
                  <xs:appinfo>
                    <ncx:ordered-by>system</ncx:ordered-by>
                  </xs:appinfo>
                </xs:annotation>
                <xs:simpleType>
                  <xs:union
                    memberTypes="matchall-string-type&#32;group-name-type"/>
                </xs:simpleType>
              </xs:element>
              <xs:element name="rule" minOccurs="0"
                maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation>One access control rule.
                    
                    Rules are processed in user-defined order until a match is
                    found.  A rule matches if 'module-name', 'rule-type', and
                    'access-operations' matches the request.  If a rule
                    matches, the 'action' leaf determines if access is granted
                    or not.</xs:documentation>
                  <xs:appinfo>
                    <ncx:ordered-by>user</ncx:ordered-by>
                  </xs:appinfo>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="name">
                      <xs:annotation>
                        <xs:documentation>Arbitrary name assigned to the 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="module-name" default="*"
                      minOccurs="0">
                      <xs:annotation>
                        <xs:documentation>Name of the module associated with this rule.
                          
                          This leaf matches if it has the value '*', or if the
                          object being accessed is defined in the module with the
                          specified module name.</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:union>
                          <xs:simpleType>
                            <xs:restriction base="matchall-string-type"/>
                          </xs:simpleType>
                          <xs:simpleType>
                            <xs:restriction base="xs:string"/>
                          </xs:simpleType>
                        </xs:union>
                      </xs:simpleType>
                    </xs:element>
                    <xs:choice>
                      <xs:annotation>
                        <xs:documentation>This choice matches if all leafs present in the rule
                          matches the request.  If no leafs are present, the
                          choice matches all requests.</xs:documentation>
                        <xs:appinfo>
                          <ncx:choice-name>rule-type</ncx:choice-name>
                        </xs:appinfo>
                      </xs:annotation>
                      <xs:sequence>
                        <xs:annotation>
                          <xs:appinfo>
                            <ncx:case-name>protocol-operation</ncx:case-name>
                          </xs:appinfo>
                        </xs:annotation>
                        <xs:element name="rpc-name" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>This leaf matches if it has the value '*', or if
                              its value equals the requested protocol operation
                              name.</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:union>
                              <xs:simpleType>
                                <xs:restriction
                                  base="matchall-string-type"/>
                              </xs:simpleType>
                              <xs:simpleType>
                                <xs:restriction base="xs:string"/>
                              </xs:simpleType>
                            </xs:union>
                          </xs:simpleType>
                        </xs:element>
                        <xs:any minOccurs="0" maxOccurs="unbounded"
                          namespace="##other" processContents="lax"/>
                      </xs:sequence>
                      <xs:sequence>
                        <xs:annotation>
                          <xs:appinfo>
                            <ncx:case-name>notification</ncx:case-name>
                          </xs:appinfo>
                        </xs:annotation>
                        <xs:element name="notification-name"
                          minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>This leaf matches if it has the value '*', or if its
                              value equals the requested notification name.</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:union>
                              <xs:simpleType>
                                <xs:restriction
                                  base="matchall-string-type"/>
                              </xs:simpleType>
                              <xs:simpleType>
                                <xs:restriction base="xs:string"/>
                              </xs:simpleType>
                            </xs:union>
                          </xs:simpleType>
                        </xs:element>
                        <xs:any minOccurs="0" maxOccurs="unbounded"
                          namespace="##other" processContents="lax"/>
                      </xs:sequence>
                      <xs:sequence>
                        <xs:annotation>
                          <xs:appinfo>
                            <ncx:case-name>data-node</ncx:case-name>
                          </xs:appinfo>
                        </xs:annotation>
                        <xs:element name="path"
                          type="node-instance-identifier">
                          <xs:annotation>
                            <xs:documentation>Data Node 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 data
                              store contents.</xs:documentation>
                            <xs:appinfo>
                              <ncx:mandatory>true</ncx:mandatory>
                            </xs:appinfo>
                          </xs:annotation>
                        </xs:element>
                        <xs:any minOccurs="0" maxOccurs="unbounded"
                          namespace="##other" processContents="lax"/>
                      </xs:sequence>
                      <xs:any minOccurs="0" maxOccurs="unbounded"
                        namespace="##other" processContents="lax"/>
                    </xs:choice>
                    <xs:element name="access-operations" default="*"
                      minOccurs="0">
                      <xs:annotation>
                        <xs:documentation>Access operations associated with this rule.
                          
                          This leaf matches if it has the value '*', or if the
                          bit corresponding to the requested operation is set.</xs:documentation>
                      </xs:annotation>
                      <xs:simpleType>
                        <xs:union
                          memberTypes="matchall-string-type&#32;access-operations-type"/>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="action" type="action-type">
                      <xs:annotation>
                        <xs:documentation>The access control action associated with the
                          rule.  If a rule is determined to match a
                          particular request, then this object is used
                          to determine whether to permit or deny the
                          request.</xs:documentation>
                        <xs:appinfo>
                          <ncx:mandatory>true</ncx:mandatory>
                        </xs:appinfo>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="comment" type="xs:string"
                      minOccurs="0">
                      <xs:annotation>
                        <xs:documentation>A textual description of the access rule.</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:any minOccurs="0" maxOccurs="unbounded"
                      namespace="##other" processContents="lax"/>
                  </xs:sequence>
                </xs:complexType>
                <xs:key name="rulekey28">
                  <xs:selector xpath="."/>
                  <xs:field xpath="name"/>
                </xs:key>
              </xs:element>
              <xs:any minOccurs="0" maxOccurs="unbounded"
                namespace="##other" processContents="lax"/>
            </xs:sequence>
          </xs:complexType>
          <xs:key name="rule-listkey29">
            <xs:selector xpath="."/>
            <xs:field xpath="name"/>
          </xs:key>
        </xs:element>
        <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"
          processContents="lax"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

