# (C) Copyright 2014 Riverbed Technology, Inc.
# All rights reserved.

name: sh.blade
version: "1.0"
title: 'SteelHead General Blade Setting Service'
description: 'REST API for the general blade setting service.'
defaultAuthorization: 'required'
$schema: 'http://support.riverbed.com/apis/service_def/2.2'
id: 'http://support.riverbed.com/apis/sh.blade/1.0'
provider: 'riverbed'

###############################################################################
#
# Types
#
###############################################################################

types:
    int32_max:
        description: 'A signed 32-bit integer with maximum bound.'
        type: integer
        maximum: 2147483647

resources:
    lan_default_settings:
        description: 'The LAN side default settings.'
        type: object
        additionalProperties: false
        properties:
            socket_send_buf_size:
                $merge:
                    source:
                       $ref: '#/types/int32_max'
                    with:
                        minimum: 4096
                        description: >
                            The buffer size that sends data out of the LAN.
                            This setting is a model driven parameter, and its default
                            is set accordingly per the model matrix.
                            Typically, there is no need to change the default settings
                            on LAN buffers, because by default, LAN buffers auto-tune
                            to the appropriate size to provide the best throughput.

            socket_recv_buf_size:
                $merge:
                    source:
                       $ref: '#/types/int32_max'
                    with:
                        minimum: 4096
                        description: >
                            The buffer size that receives data from the LAN.
                            This setting is a model driven parameter, and its default
                            is set accordingly per the model matrix.
                            Typically, there is no need to change the default settings
                            on LAN buffers, because by default, LAN buffers auto-tune
                            to the appropriate size to provide the best throughput.

            # More parameters to come

        links:
            self:
                path: '$/lan_default_settings'

            get:
                description: 'Retrieves the LAN default setting instance.'
                method: GET
                response:
                    $ref: '#/resources/lan_default_settings'

            set:
                description: 'Updates the LAN default setting instance.'
                method: PUT
                request:
                    $ref: '#/resources/lan_default_settings'
                response:
                    $ref: '#/resources/lan_default_settings'

    wan_default_settings:
        description: 'The WAN side default global settings.'
        type: object
        additionalProperties: false
        properties:
            socket_send_buf_size:
                $merge:
                    source:
                       $ref: '#/types/int32_max'
                    with:
                        minimum: 16384
                        description: >
                            The default buffer size that sends data out of the WAN.
                            This setting is a model driven parameter, and its default
                            is set accordingly per the model matrix.
                            In all data protection scenarios, set the SteelHead
                            WAN buffers to at least 2 x BDP, where
                            bandwidth-delay product (BDP) is the product of the
                            WAN bandwidth and round-trip latency between locations.

            socket_recv_buf_size:
                $merge:
                    source:
                       $ref: '#/types/int32_max'
                    with:
                        minimum: 16384
                        description: >
                            The default buffer size that receives data from the WAN.
                            This setting is a model driven parameter, and its default
                            is set accordingly per the model matrix.
                            In all data protection scenarios, set the SteelHead
                            WAN buffers to at least 2 x BDP, where
                            bandwidth-delay product (BDP) is the product of the
                            WAN bandwidth and round-trip latency between locations.

            # More parameters to come

        links:
            self:
                path: '$/wan_default_settings'

            get:
                description: 'Retrieves the WAN default setting instance.'
                method: GET
                response:
                    $ref: '#/resources/wan_default_settings'

            set:
                description: 'Updates the WAN default setting instance.'
                method: PUT
                request:
                    $ref: '#/resources/wan_default_settings'
                response:
                    $ref: '#/resources/wan_default_settings'
