$schema: http://support.riverbed.com/apis/service_def/2.2
description: 'REST API for storage monitor service

  '
id: http://support.riverbed.com/apis/npm.data_manager/2.1
name: npm.data_manager
provider: riverbed
resources:
  data_area:
    additionalProperties: false
    description: Data Area specification for a data module
    links:
      get:
        method: GET
        response:
          $ref: '#/resources/data_area'
      self:
        path: $/data_areas/items/{data_module_name}/{data_section_id}
    properties:
      available:
        description: 'True if the data area is available for use

          '
        type: boolean
      data_module_name:
        description: The name of the data module owning this data area
        readOnly: true
        type: string
      data_section_id:
        description: The ID of the data section this data area belongs to
        readOnly: true
        type: string
      elastic:
        description: 'If true, this data area will automatically resize to accomodate
          changes in data areas on the same volume Only one data area belonging to
          each data section may have this flag set to true

          '
        readOnly: true
        type: boolean
      enabled:
        default: true
        description: Enabled status of the data area
        readOnly: true
        type: boolean
      hidden:
        description: Hidden from user views
        readOnly: true
        type: boolean
      index:
        description: 'The index of the data area within its data section or parent
          data area

          '
        readOnly: true
        type: integer
      locked:
        description: 'True if the lock is held by either the client or the system

          '
        type: boolean
      parent_data_module:
        description: 'If not the empty string, this data area is considered part of
          the named data area on the same data section

          '
        readOnly: true
        type: string
      path:
        description: The path on disk where data is stored
        readOnly: true
        type: string
      quota_size_mb:
        description: Size (in MB) of allocated space
        minimum: 0
        readOnly: true
        type: integer
      status:
        $merge:
          source:
            $ref: '#/types/data_area_status'
          with:
            readOnly: true
      status_reason:
        description: Reason for the current status, if available
        readOnly: true
        type: string
      system:
        description: Is the catch-all system data area
        readOnly: true
        type: boolean
      used_space_mb:
        description: Size (in MB) of stored data
        minimum: 0
        readOnly: true
        type: integer
    relations:
      data_module:
        resource: '#/resources/data_module'
        vars:
          name: 0/data_module_name
      data_section:
        resource: '#/resources/data_section'
        vars:
          id: 0/data_section_id
      instances:
        resource: '#/resources/data_areas'
      parent:
        resource: '#/resources/data_area'
        vars:
          data_module_name: 0/parent_name
          data_section_id: 0/data_section_id
    required:
    - data_module_name
    - data_section_id
    - quota_size_mb
    type: object
  data_area_event:
    additionalProperties: false
    description: Signals a change to a data area's presence or status
    links:
      get:
        method: GET
        response:
          $ref: '#/resources/data_area_event'
      self:
        path:
          template: $/event_queues/data_area_events/{id}
          vars:
            id: 0/hdr/id
    properties:
      data_module:
        description: Name of the affected data module
        type: string
      data_section_id:
        description: Data section id
        type: string
      hdr:
        $ref: /apis/mgmt.types.events/1.0#/types/event_header
      quota_size_mb:
        description: Quota size
        type: integer
      status:
        description: Data area status
        type: string
      status_reason:
        description: Data area status reason
        type: string
      used_mb:
        description: Amount of data (in MB) currently used
        type: integer
    relations:
      instances:
        resource: '#/resources/data_area_events'
    required:
    - data_module
    - quota_size_mb
    - data_section_id
    - status
    type: object
  data_area_events:
    additionalProperties: false
    description: Collection of data area events stored
    links:
      create:
        method: POST
        request:
          $ref: '#/resources/data_area_event'
        response:
          $ref: '#/resources/data_area_event'
      get:
        method: GET
        response:
          $ref: '#/resources/data_area_events'
      self:
        path:
          template: $/event_queues/data_area_events
          vars:
            limit:
              description: When specified at most 'limit' events will be returned
              type: integer
            since_id:
              description: When specified only events with ids greater than 'since_id'
                will be returned
              type: integer
    properties:
      items:
        items:
          $ref: '#/resources/data_area_event'
        type: array
    type: object
  data_areas:
    additionalProperties: false
    description: Collection of data areas
    links:
      create:
        method: POST
        request:
          $ref: '#/resources/data_area'
        response:
          $ref: '#/resources/data_area'
      get:
        method: GET
        response:
          $ref: '#/resources/data_areas'
      self:
        path:
          template: $/data_areas{?data_module_name,data_section_id,status}
          vars:
            data_module_name:
              type: string
            data_section_id:
              $ref: '#/types/data_section_id'
            parent_data_module:
              type: string
            status:
              type: string
    properties:
      items:
        items:
          $ref: '#/resources/data_area'
        type: array
    relations:
      data_module:
        resource: '#/resources/data_area'
        vars:
          name: 0/data_module
    type: object
  data_module:
    additionalProperties: false
    description: 'A description of the storage requirements of a component that stores
      data on the system

      '
    links:
      get:
        method: GET
        response:
          $ref: '#/resources/data_module'
      self:
        path: $/data_modules/items/{name}
    properties:
      data_areas_max:
        description: Maximum number of data areas supported by module
        readOnly: true
        type: integer
      data_areas_min:
        description: Minimum number of data areas supported by module
        readOnly: true
        type: integer
      expands:
        description: Whether data areas for this data module expand to fill empty
          space automatically
        readOnly: true
        type: boolean
      granularity_mb:
        description: Allowed granularity of quota value
        readOnly: true
        type: integer
      hidden:
        description: True if this should be excluded from user views.
        readOnly: true
        type: boolean
      index:
        description: Display order index
        readOnly: true
        type: integer
      name:
        description: Name of the component
        readOnly: true
        type: string
      parent_data_module:
        description: Name of the parent data module, or the empty string
        readOnly: true
        type: string
      quota_max_mb:
        description: Minimum space that can be allocated to the data module
        readOnly: true
        type: integer
      quota_min_mb:
        description: Maximum size allocatable to this data module
        readOnly: true
        type: integer
      relocatable_data:
        description: 'Whether data for this module can be relocated without data loss

          '
        readOnly: true
        type: boolean
      required_role:
        description: The role a data section must have to host a data area for this
          module
        readOnly: true
        type: string
      resizable:
        description: True if data module's data areas can be resized
        readOnly: true
        type: boolean
    relations:
      data_areas:
        resource: '#/resources/data_areas'
        vars:
          data_module_name: 0/name
      instances:
        resource: '#/resources/data_modules'
    type: object
  data_modules:
    additionalProperties: false
    description: 'The collection of all defined data modules, describing the storage
      requirements of components that store data on the system

      '
    links:
      get:
        method: GET
        response:
          $ref: '#/resources/data_modules'
      self:
        path: $/data_modules
    properties:
      items:
        items:
          $ref: '#/resources/data_module'
        type: array
    type: object
  data_section:
    additionalProperties: false
    description: 'A description of a data section, where data areas may be assigned
      a quota to store data produced by data modules

      '
    links:
      get:
        method: GET
        response:
          $ref: '#/resources/data_section'
      import:
        description: 'Mark a foreign data section for use on this system Foreign data
          sections cannot be used until they have been imported

          '
        method: POST
        path:
          template: $/data_sections/items/{id}/import
          vars:
            id: 0/id
      self:
        path: $/data_sections/items/{id}
    properties:
      default_mode:
        description: 'Default RAID mode for the volume.

          '
        readOnly: true
        type: string
      device:
        description: Internal device name
        type: string
      encrypted:
        description: True if data section is encrypted.
        readOnly: true
        type: boolean
      id:
        $ref: '#/types/data_section_id'
      label:
        description: Human readable name
        type: string
      mode:
        description: Name of currently configured storage mode
        type: string
      mountpoint:
        description: Internal mountpoint
        type: string
      primary:
        description: A list of roles for which this data section should be used first
        items:
          type: string
        type: array
      reinitializable:
        description: Whether this data section can be reinitialized
        readOnly: true
        type: boolean
      roles:
        description: A list of data roles supported by this data section
        items:
          type: string
        type: array
      size_mb:
        description: Total usable space on the data section, in MiB
        type: integer
      status:
        $ref: '#/types/data_section_status'
      status_reason:
        description: Reason for the current status, if available
        type: string
      storage_unit:
        description: If implemented by a storage unit, the serial number of that SU
        type: string
      supported_modes:
        description: 'A listing of supported data section mode names and their associated
          volume sizes

          '
        items:
          additionalProperties: false
          properties:
            name:
              type: string
            volume_size_mb:
              type: integer
          type: object
        type: array
      supports_encryption:
        description: True if data section supports encryption features.
        readOnly: true
        type: boolean
      total_space_mb:
        description: Total expected usable space on the data section, in MiB.
        type: integer
    relations:
      data_areas:
        resource: '#/resources/data_areas'
        vars:
          data_section_id: 0/id
      disabled_data_areas:
        resource: '#/resources/disabled_data_areas'
        vars:
          data_section_id: 0/id
      instances:
        resource: '#/resources/data_sections'
    type: object
  data_section_event:
    additionalProperties: false
    description: Signals a change in a data section's presence or status
    links:
      get:
        method: GET
        response:
          $ref: '#/resources/data_section_event'
      self:
        path:
          template: $/event_queues/data_section_events/{id}
          vars:
            id: 0/hdr/id
    properties:
      data_section_id:
        description: Data section id
        type: string
      hdr:
        $ref: /apis/mgmt.types.events/1.0#/types/event_header
      status:
        description: Data section status
        type: string
      status_reason:
        description: Data section status reason
        type: string
    relations:
      instances:
        resource: '#/resources/data_section_events'
    required:
    - data_section_id
    - status
    type: object
  data_section_events:
    additionalProperties: false
    description: Collection of all data section events
    links:
      create:
        method: POST
        request:
          $ref: '#/resources/data_section_event'
        response:
          $ref: '#/resources/data_section_event'
      get:
        method: GET
        response:
          $ref: '#/resources/data_section_events'
      self:
        path:
          template: $/event_queues/data_section_events
          vars:
            limit:
              description: When specified at most 'limit' events will be returned
              type: integer
            since_id:
              description: When specified only events with ids greater than 'since_id'
                will be returned
              type: integer
    properties:
      items:
        items:
          $ref: '#/resources/data_section_event'
        type: array
    type: object
  data_sections:
    additionalProperties: false
    description: A collection of all data section information
    links:
      get:
        method: GET
        response:
          $ref: '#/resources/data_sections'
      rescan:
        description: Refresh the internal list of data sections
        method: POST
        path: $/data_sections/rescan
      self:
        path:
          template: $/data_sections{?id,roles,primary}
          vars:
            id:
              type: string
            primary:
              type: string
            roles:
              type: string
    properties:
      items:
        items:
          $ref: '#/resources/data_section'
        type: array
    type: object
  disabled_data_areas:
    additionalProperties: false
    description: 'Collection of disabled data areas, which are normally filtered out
      of the data_areas collection

      '
    links:
      get:
        method: GET
        response:
          $ref: '#/resources/disabled_data_areas'
      self:
        path:
          template: $/disabled_data_areas{?data_module_name,data_section_id,status}
          vars:
            data_module_name:
              type: string
            data_section_id:
              $ref: '#/types/data_section_id'
            status:
              type: string
    properties:
      items:
        items:
          $ref: '#/resources/data_area'
        type: array
    relations:
      data_module:
        resource: '#/resources/data_area'
        vars:
          name: 0/data_module
    type: object
  encryption_key:
    links:
      generate:
        method: POST
        path: $/encryption_key/generate
        request:
          properties:
            length:
              default: 16
              maximum: 32
              minimum: 8
              type: integer
          required: []
          type: object
        response:
          properties:
            encryption_key:
              description: Randomly generated encryption key
              type: string
          required:
          - encryption_key
          type: object
      get:
        method: GET
        response:
          $ref: '#/resources/encryption_key'
      self:
        path: $/encryption_key
      set:
        method: PUT
        request:
          $ref: '#/resources/encryption_key'
        response:
          $ref: '#/resources/encryption_key'
      unset:
        method: POST
        path: $/encryption_key/unset
        response:
          $ref: '#/resources/encryption_key'
    properties:
      encryption_key_set:
        readOnly: true
        type: boolean
      new_encryption_key:
        type: string
      old_encryption_key:
        type: string
    required:
    - encryption_key_set
    type: object
  layout:
    additionalProperties: false
    description: 'A layout definition, describing how data areas are assigned

      '
    links:
      get:
        method: GET
        response:
          $ref: '#/resources/layout'
      self:
        path: $/layouts/items/{name}
    properties:
      available:
        description: 'True if the mode can be selected from the current state, otherwise
          it is not possible to transition to this layout from the current one

          '
        type: boolean
      configurable:
        description: 'True if the layout can be configured

          '
        readOnly: true
        type: boolean
      description:
        description: An explanation of the data area layout
        type: string
      label:
        description: Human-readable layout name
        type: string
      name:
        description: Layout identifier
        type: string
      requires_data_section:
        default: false
        description: 'If true, a data section must be specified as a default target
          for the layout

          '
        type: boolean
      valid_data_sections:
        description: 'A list of data sections valid for the layout in the current
          configuration

          '
        items:
          type: string
        type: array
    relations:
      instances:
        resource: '#/resources/layouts'
    type: object
  layout_event:
    additionalProperties: false
    description: Signals a change in the storage layout
    links:
      get:
        method: GET
        response:
          $ref: '#/resources/layout_event'
      self:
        path:
          template: $/event_queues/layout_events/{id}
          vars:
            id: 0/hdr/id
    properties:
      hdr:
        $ref: /apis/mgmt.types.events/1.0#/types/event_header
      name:
        description: Current or target layout name
        type: string
      status:
        description: Layout manager status
        type: string
    relations:
      instances:
        resource: '#/resources/layout_events'
    required:
    - name
    - status
    type: object
  layout_events:
    additionalProperties: false
    description: Collection of all data section events
    links:
      create:
        method: POST
        request:
          $ref: '#/resources/layout_event'
        response:
          $ref: '#/resources/layout_event'
      get:
        method: GET
        response:
          $ref: '#/resources/layout_events'
      self:
        path:
          template: $/event_queues/layout_events
          vars:
            limit:
              description: When specified at most 'limit' events will be returned
              type: integer
            since_id:
              description: When specified only events with ids greater than 'since_id'
                will be returned
              type: integer
    properties:
      items:
        items:
          $ref: '#/resources/layout_event'
        type: array
    type: object
  layout_status:
    additionalProperties: false
    description: 'The layout of data areas to enable. Changing this option begins
      a reconfiguration procedure that will require rebooting

      '
    links:
      compare:
        description: 'Compare the proposed layout configuration to the current configuration,
          returning a description of the changes that would be made

          '
        method: POST
        path: $/layout/compare
        request:
          $ref: '#/resources/layout_status'
        response:
          $ref: '#/types/layout_diff'
      get:
        method: GET
        response:
          $ref: '#/resources/layout_status'
      self:
        path: $/layout
      set:
        method: PUT
        request:
          $ref: '#/resources/layout_status'
        response:
          $ref: '#/resources/layout_status'
      validate:
        description: 'Checks whether the proposed layout status change is possible
          given the current layout configuration

          '
        method: POST
        path: $/layout/validate
        request:
          $ref: '#/resources/layout_status'
        response:
          $ref: '#/types/layout_configuration_result'
    properties:
      configurable:
        description: If true, the configuration may be changed
        readOnly: true
        type: boolean
      configuration:
        $ref: '#/types/layout_configuration'
      customized:
        description: 'If true, the named layout has been customized and no longer
          matches defaults.

          '
        readOnly: true
        type: boolean
      data_section:
        default: ''
        description: Data section targeted by this layout, empty if none required
        type: string
      name:
        type: string
      progress:
        description: Percentage of operation progress as an integer
        readOnly: true
        type: integer
      status:
        description: The current status of the layout configuration
        enum:
        - idle
        - pending
        - reconfiguring
        - failed
        - reboot_required
        readOnly: true
        type: string
    relations:
      layout:
        resource: '#/resources/layout'
        vars:
          name: 0/name
    required:
    - name
    type: object
  layouts:
    additionalProperties: false
    description: The collection of all supported storage layouts
    links:
      get:
        method: GET
        response:
          $ref: '#/resources/layouts'
      self:
        path: $/layouts
    properties:
      items:
        items:
          $ref: '#/resources/layout'
        type: array
    type: object
title: Data Module Manager
types:
  data_area_key:
    additionalProperties: false
    description: 'The pair of Data Module name and Data Section ID that uniquely identifies
      a data area

      '
    properties:
      data_module:
        type: string
      data_section:
        type: string
    type: object
  data_area_status:
    description: 'Status of a data area ''active'' indicates a working and available
      area, ''disabled'' indicates that the data area is disabled ''failed'' indicates
      a failure due to the data section''s availability might not be fixable without
      data loss ''unconfigured'' indicates a repairable failure ''moving'' indicates
      that the data area is currently being relocated

      '
    enum:
    - active
    - moving
    - resizing
    - failed
    - disabled
    type: string
  data_section_id:
    description: A data section identifier
    type: string
  data_section_mode:
    additionalProperties: false
    description: Data about a data section's mode
    properties:
      name:
        type: string
      volume_size_mb:
        type: integer
    type: object
  data_section_status:
    description: The possible statuses of a data section
    enum:
    - active
    - missing
    - failed
    - invalid
    - initializing
    - uninitialized
    - unconfigured
    - unmounted
    - foreign
    type: string
  layout_configuration:
    additionalProperties: false
    description: Customizable parameters for the selected layout
    properties:
      data_areas:
        description: 'A list of all (top-level) data areas assigned to data sections

          '
        items:
          additionalProperties: false
          properties:
            can_disable:
              description: 'If true, this data area can be disabled Its size when
                disabled will reset to 0

                '
              type: boolean
            data_module_name:
              readOnly: true
              type: string
            data_section_id:
              type: string
            elastic:
              description: 'If true, this data area resizes  automatically to adjust
                for changes in other data areas on the same volume

                '
              type: boolean
            enabled:
              description: 'If false, this data area is not available for use

                '
              type: boolean
            hidden:
              description: 'If true, this is an internal data area for system use.

                '
              type: boolean
            index:
              description: 'The index/ordering of the data area on its data section

                '
              type: integer
            label:
              description: 'Human-readable name of the data module

                '
              type: string
            max_size_mb:
              description: Maximum available size of the data area
              readOnly: true
              type: integer
            min_size_mb:
              description: Minimum allowed size of the data area
              readOnly: true
              type: integer
            parent_data_module:
              description: 'If not the empty string, this data area is considered
                part of the named data area on the same data section

                '
              readOnly: true
              type: string
            quota_size_mb:
              description: 'The amount of space allocated for this data area

                '
              type: integer
            relocatable:
              description: 'Whether the data area can be relocated

                '
              type: boolean
            resizable:
              description: 'True if this data area''s quota can be changed

                '
              readOnly: true
              type: boolean
            resizable_data:
              description: 'If false, resizing this data section will result in complete
                loss of data stored here.

                '
              type: boolean
            size_locked:
              description: 'A list of data sections whose data areas for the same
                data module must be kept the same size.

                '
              items:
                type: string
              type: array
            used_space_mb:
              readOnly: true
              type: integer
            valid_data_sections:
              description: 'A list of data sections that this data area may be reassigned
                to TBD: do we offer min/max size here for UI to use? What is the default
                size after relocation? If this list is empty, the data area cannot
                be relocated Relocation may be prevented due to data area status or
                internal settings

                '
              items:
                type: string
              type: array
          type: object
        type: array
      data_sections:
        description: Configuration of data sections used in this layout
        items:
          additionalProperties: false
          description: Data Section identifier
          properties:
            default_mode:
              description: 'Default RAID mode for the volume.

                '
              readOnly: true
              type: string
            encrypted:
              description: True if encryption is enabled.
              readOnly: true
              type: boolean
            id:
              description: Data Section identifier
              readOnly: true
              type: string
            label:
              description: Data Section name
              readOnly: true
              type: string
            mode:
              description: Name of the current storage mode for the data section
              type: string
            model:
              description: Model of storage unit (if applicable)
              readOnly: true
              type: string
            primary:
              description: Roles for which this data section is primary
              items:
                type: string
              readOnly: true
              type: array
            reinitializable:
              description: Whether this data section can be reinitialized
              readOnly: true
              type: boolean
            reinitialize:
              default: false
              description: '(Write-only) If true, the data section will be reinitialized
                into the mode being set

                '
              type: boolean
            roles:
              description: Roles supported by the data section
              items:
                type: string
              readOnly: true
              type: array
            status:
              $ref: '#/types/data_section_status'
            storage_unit:
              description: Storage unit name (if applicable)
              readOnly: true
              type: string
            supported_modes:
              description: 'Modes supported by the data section for reinitialization

                '
              items:
                $ref: '#/types/data_section_mode'
              readOnly: true
              type: array
            supports_encryption:
              description: True if supports encryption features.
              readOnly: true
              type: boolean
            total_space_mb:
              description: Size of the data section in this mode
              readOnly: true
              type: integer
          required:
          - id
          - mode
          type: object
        type: array
      encrypt_storage_units:
        description: Encrypt all storage units
        type: boolean
      encryption_available:
        description: Whether encryption is possible for attached Storage Units.
        type: boolean
      encryption_supported:
        description: Whether encryption is supported in the current configuration.
        type: boolean
      session_id:
        description: Unique identifier for the configured layout
        type: string
      valid_data_sections:
        description: List of valid data section targets
        items:
          type: string
        type: array
    type: object
  layout_configuration_result:
    additionalProperties: false
    properties:
      changes:
        description: 'Differences (expressed as actions to be taken) between the current
          and proposed layout

          '
        items:
          $ref: '#/types/layout_diff'
        type: array
      configuration:
        $ref: '#/types/layout_configuration'
      customized:
        description: 'If true, the validated settings customize the layout.

          '
        readOnly: true
        type: boolean
      messages:
        description: A list of errors or notice(s) that the user should be aware of
        items:
          additionalProperties: false
          properties:
            description:
              type: string
            severity:
              description: 'How severe each message is for the user "info" described
                a simple fact, "notice" warns the user about something they should
                be aware of, "error" describes something preventing successful configuration

                '
              enum:
              - info
              - notice
              - error
              type: string
          type: object
        type: array
      move_conflict:
        description: 'If present, gives information about conflicting move operations.

          '
        properties:
          conflicting_data_section:
            description: 'The data section involved in the conflict.

              '
            type: string
          moving_from:
            description: 'Data modules being moved from the conflict data section.

              '
            items:
              type: string
            type: array
          moving_to:
            description: 'Data modules being moved to the conflict data section.

              '
            items:
              type: string
            type: array
        required:
        - conflicting_data_section
        - moving_to
        - moving_from
        type: object
      valid:
        description: False if proposed configuration is invalid
        type: boolean
    required:
    - valid
    - changes
    - configuration
    - messages
    type: object
  layout_diff:
    additionalProperties: false
    description: 'A collection of data areas that must be operated on in order to
      convert one storage layout to another. The order in which those operations take
      place is additionally specified in the ordering list

      '
    properties:
      create:
        items:
          additionalProperties: false
          properties:
            data_area:
              $ref: '#/types/data_area_key'
            enabled:
              type: boolean
            quota_size_mb:
              type: integer
          type: object
        type: array
      delete:
        items:
          additionalProperties: false
          properties:
            data_area:
              $ref: '#/types/data_area_key'
          type: object
        type: array
      disable:
        items:
          additionalProperties: false
          properties:
            data_area:
              $ref: '#/types/data_area_key'
          type: object
        type: array
      enable:
        items:
          additionalProperties: false
          properties:
            data_area:
              $ref: '#/types/data_area_key'
          type: object
        type: array
      grow:
        items:
          additionalProperties: false
          properties:
            data_area:
              $ref: '#/types/data_area_key'
            quota_size_mb:
              type: integer
          type: object
        type: array
      move:
        items:
          additionalProperties: false
          properties:
            data_area:
              $ref: '#/types/data_area_key'
            data_section:
              type: string
          type: object
        type: array
      ordering:
        description: "A list of the property names on this object, in the order in\
          \ which those operations will be performed. \n"
        items:
          type: string
        type: array
      reinitialize:
        description: 'The list of data sections, and the target modes, that will be
          reinitialized

          '
        items:
          additionalProperties: false
          properties:
            id:
              type: string
            mode:
              type: string
          type: object
        type: array
      shrink:
        items:
          additionalProperties: false
          properties:
            data_area:
              $ref: '#/types/data_area_key'
            quota_size_mb:
              type: integer
          type: object
        type: array
    type: object
version: '2.1'
