<?xml version="1.0" encoding="UTF-8"?>
<!--
  TR-140 StorageService: 1.3 Service Object definition
 
  Copyright (c) 2017, Broadband Forum

  The undersigned members have elected to grant the copyright to
  their contributed material used in this software:
    Copyright (c) 2017 ARRIS Enterprises, LLC.
  
  Redistribution and use in source and binary forms, with or
  without modification, are permitted provided that the following
  conditions are met:
  
  1. Redistributions of source code must retain the above copyright
     notice, this list of conditions and the following disclaimer.
  
  2. Redistributions in binary form must reproduce the above
     copyright notice, this list of conditions and the following
     disclaimer in the documentation and/or other materials
     provided with the distribution.
  
  3. Neither the name of the copyright holder nor the names of its
     contributors may be used to endorse or promote products
     derived from this software without specific prior written
     permission.
  
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
  The above license is used as a license under copyright only.
  Please reference the Forum IPR Policy for patent licensing terms
  <https://www.broadband-forum.org/ipr-policy>.
  
  Any moral rights which are necessary to exercise under the above
  license grant are also deemed granted under this license.
  
  Summary:
    TR-140 StorageService: 1.3 Service Object update.
 
  Editor:
    * Steve Nicolai, Arris

  Broadband User Services Work Area Directors:
    * Jason Walls, QA Cafe
    * John Blackford, Arris

  Issue History (Filename: Approval Date: Publication Date: Changes):
    * tr-140-1-0-2.xml: April 2010: April 2010: corresponds to TR-140 Issue 1, Corrigendum 2
    * tr-140-1-1-0.xml: April 2010: April 2010: corresponds to TR-140 Issue 1, Amendment 1
    * tr-140-1-2-0.xml: July 2011: July 2011: corresponds to TR-140 Issue 1, Amendment 2
    * tr-140-1-3-0.xml: 8 May 2017: 9 June 2017: corresponds to TR-140 Amendment 3.
 
 
-->
<dm:document xmlns:dm="urn:broadband-forum-org:cwmp:datamodel-1-4"
             xmlns:dmr="urn:broadband-forum-org:cwmp:datamodel-report-0-1"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="urn:broadband-forum-org:cwmp:datamodel-1-4
             http://www.broadband-forum.org/cwmp/cwmp-datamodel-1-4.xsd
             urn:broadband-forum-org:cwmp:datamodel-report-0-1
             http://www.broadband-forum.org/cwmp/cwmp-datamodel-report.xsd"
             spec="urn:broadband-forum-org:tr-140-1-3-0" file="tr-140-1-3-0.xml">
            
  <description>
    {{docname|StorageService:1.3 Service Object Definition}}
    {{appdate|May 2017}}
    {{trname|TR-140a3}}
    Update file system and connection enumerations
    Added ''SMART'' data model
  </description>
  
  <import file="tr-069-biblio.xml"/>
  <import file="tr-140-1-2.xml" spec="urn:broadband-forum-org:tr-140-1-2">
    <model name="StorageService:1.2"/>
  </import>
  
  <!-- Model -->
  <model name="StorageService:1.3" base="StorageService:1.2" isService="true">
    
    <object base="StorageService.{i}.Capabilities." access="readOnly" minEntries="1" maxEntries="1">
      <parameter base="SupportedFileSystemTypes" access="readOnly">
        <syntax>
          <list/>
          <string>
            <enumeration value="FAT16"/>
            <enumeration value="FAT32"/>
            <enumeration value="NTFS"/>
            <enumeration value="ReFs">
              <description>Resilient File System - Microsoft</description>
            </enumeration>
            <enumeration value="HFS">
              <description action="append">Mac OS Standard format</description>
            </enumeration>
            <enumeration value="HFS+">
              <description action="append">Mac OS Extended format</description>
            </enumeration>
            <enumeration value="HSFJ">
              <description action="replace">Journaled Mac OS Extended format</description>
            </enumeration>
            <enumeration value="ext2"/>
            <enumeration value="ext3"/>
            <enumeration value="ext4"/>
            <enumeration value="XFS"/>
            <enumeration value="REISER">
              <description action="append">ReiserFS</description>
            </enumeration>
            <enumeration value="Reiser4">
              <description/>
            </enumeration>
            <enumeration value="btrfs"/>
            <enumeration value="ZFS">
              <description>Zetta File System</description>
            </enumeration>
            <enumeration value="EncFs">
              <description>Encrypted File System</description>
            </enumeration>
            <enumeration value="exFAT">
              <description>Extended File Allocation Table for Flash memory</description>
            </enumeration>
          </string>
        </syntax>
      </parameter>
    </object>
    
    <object base="StorageService.{i}.PhysicalMedium.{i}." access="readOnly" numEntriesParameter="PhysicalMediumNumberOfEntries" minEntries="0" maxEntries="unbounded">
      <parameter base="ConnectionType" access="readOnly">
        <syntax>
          <string>
            <enumeration value="USB 1.1"/>
            <enumeration value="USB 2.0"/>
            <enumeration value="USB 3.0"/>
            <enumeration value="USB 3.1"/>
            <enumeration value="IEEE1394"/>
            <enumeration value="IEEE1394b"/>
            <enumeration value="IDE"/>
            <enumeration value="EIDE"/>
            <enumeration value="ATA/33"/>
            <enumeration value="ATA/66"/>
            <enumeration value="ATA/100"/>
            <enumeration value="ATA/133"/>
            <enumeration value="SATA/150"/>
            <enumeration value="SATA/300">
              <description action="append">SATA 3.0 Gbit/s</description>
            </enumeration>
            <enumeration value="SATA/600">
              <description>SATA 6.0 Gbit/s</description>
            </enumeration>
            <enumeration value="SATA/1969">
              <description>SATA 16.0 Gbit/s</description>
            </enumeration>
            <enumeration value="SCSI-1"/>
            <enumeration value="Fast SCSI"/>
            <enumeration value="Fast-Wide SCSI"/>
            <enumeration value="Ultra SCSI"/>
            <enumeration value="Ultra Wide SCSI"/>
            <enumeration value="Ultra2 SCSI"/>
            <enumeration value="Ultra2 Wide SCSI"/>
            <enumeration value="Ultra3 SCSI"/>
            <enumeration value="Ultra-320 SCSI"/>
            <enumeration value="Ultra-640 SCSI"/>
            <enumeration value="SAS-1">
              <description>serial attached SCSI 3.0 Gbit/s</description>
            </enumeration>
            <enumeration value="SAS-2">
              <description>serial attached SCSI 6.0 Gbit/s</description>
            </enumeration>
            <enumeration value="SAS-3">
              <description>serial attached SCSI 12.0 Gbit/s</description>
            </enumeration>
            <enumeration value="SAS-4">
              <description>serial attached SCSI 22.5 Gbit/s</description>
            </enumeration>
            <enumeration value="SSA"/>
            <enumeration value="SSA-40"/>
            <enumeration value="Fibre Channel"/>
          </string>
        </syntax>
      </parameter>
      <parameter name="Type" access="readOnly">
        <description>Specifies the type of the physical medium</description>
        <syntax>
          <string>
            <enumeration value="HDD"/>
            <enumeration value="SSD"/>
            <enumeration value="SSHD">
              <description>Hybrid Drive</description>
            </enumeration>
          </string>
        </syntax>
      </parameter>
    </object>
    
    <object name="StorageService.{i}.PhysicalMedium.{i}.SMART." access="readOnly" minEntries="1" maxEntries="1">
      <description>
        This object provides SMART data information about the physical medium.  SMART attributes are not standardized, but many vendors provide the data below.
      </description>
      <parameter name="ReallocatedSectorsCount" access="readOnly">
        <description>
        Count of reallocated sectors. When the hard drive finds a read/write/verification error, it marks this sector as "reallocated" and transfers data to a special reserved area (spare area). 
        This process is also known as remapping, and "reallocated" sectors are called remaps. However, as the number of reallocated sectors increases, the read/write speed tends to decrease. 
        The raw value represents a count of the number of bad sectors that have been found and remapped. Thus, the higher the attribute value, the more sectors the drive has had to reallocate.
        </description>
        <syntax>
          <unsignedInt/>
        </syntax>
      </parameter>
      <parameter name="PowerOnHours" access="readOnly">
        <description>
        Count of hours in power-on state. It shows total count of {{units}} in power-on state.
        </description>
        <syntax>
          <unsignedInt>
            <units value="hours"/>
          </unsignedInt>
        </syntax>
      </parameter>
      <parameter name="SpinRetryCount" access="readOnly">
        <description>
        Count of retry of spin start attempts. This attribute stores a total count of the spin start attempts to reach the fully operational speed (under the condition that the first attempt was unsuccessful). An increase of this attribute value is a sign of problems in the hard disk mechanical subsystem.
        </description>
        <syntax>
          <unsignedInt/>
        </syntax>
      </parameter>
      <parameter name="PowerCycleCount" access="readOnly">
        <description>
        The count of full hard disk power on/off cycles.
        </description>
        <syntax>
          <unsignedInt/>
        </syntax>
      </parameter>
      <parameter name="Temperature" access="readOnly">
        <description>
        Current internal temperature in {{units}}.
        </description>
        <syntax>
          <unsignedInt>
            <units value="degrees C"/>
          </unsignedInt>
        </syntax>
      </parameter>
      <parameter name="ReallocationEventCount" access="readOnly">
        <description>
        Count of remap operations. The raw value of this attribute shows the total count of attempts to transfer data from reallocated sectors to a spare area.
        Both successful and unsuccessful attempts are counted.
        </description>
        <syntax>
          <unsignedInt/>
        </syntax>
      </parameter>
      <parameter name="CurrentPendingSectorCount" access="readOnly">
        <description>
        Count of "unstable" sectors (waiting to be remapped, because of unrecoverable read errors). If an unstable sector is subsequently read successfully, the sector is remapped and this value is decreased.
        </description>
        <syntax>
          <unsignedInt/>
        </syntax>
      </parameter>
      <parameter name="UncorrectableSectorCount" access="readOnly">
        <description>
        The total number of uncorrectable errors when reading/writing a sector.
        A rise in the value of this attribute indicates defects of the disk surface and/or problems in the mechanical subsystem.
        </description>
        <syntax>
          <unsignedInt/>
        </syntax>
      </parameter>
      <parameter name="ReadErrors" access="readOnly">
        <description>
        Total number of unrecoverable read errors.
        </description>
        <syntax>
          <unsignedInt/>
        </syntax>
      </parameter>
      <parameter name="SoftReadErrors" access="readOnly">
        <description>
        Total number of off-track errors.
        </description>
        <syntax>
          <unsignedInt/>
        </syntax>
      </parameter>
      <parameter name="WriteErrors" access="readOnly">
        <description>
        Total number of errors when writing a sector.
        </description>
        <syntax>
          <unsignedInt/>
        </syntax>
      </parameter>
      <parameter name="SparesRemaining" access="readOnly">
        <description>
        Percentage of the spare sectors that can be used for reallocations remaining.
        </description>
        <syntax>
          <unsignedInt>
            <range minInclusive="0" maxInclusive="100"/>
          </unsignedInt>
        </syntax>
      </parameter>
      <parameter name="PredictedFailure" access="readOnly">
        <description>
        Estimated number of {{units}} until the failure model in the device predicts the drive will fail.  -1 means the failure model is unable to make a prediction.
        </description>
        <syntax>
          <int>
            <units value="days"/>
          </int>
        </syntax>
      </parameter>
    </object>
  </model>
  
</dm:document>
