Skip to content
This repository has been archived by the owner on Jan 17, 2022. It is now read-only.

Pricing Files Syntax

hojo edited this page Sep 28, 2012 · 1 revision

The pricing configuration file is not required to operate libdroplet.

By default, all requests types are logged in $DPLDIR/profile.csv, and it is possible to generate and modify the pricing file at any time. All prices are computed in real-time against request log and pricing file.

Price by request type

Syntax for creating the price per type of request:

requests { 
         request_type:   price/quantity ;
         etc
}

Example:

requests {
         PUT:      $0.01/1000;
         COPY:     $0.01/1000;
         POST:     $0.01/1000;
         LIST:     $0.01/1000;
         GET:      $0.01/1000;
         *:        $0.01/10000;
}

'*' matches any requests

Price by data quantity

Syntax to create the price per data transfer/storage size:

data data_type { 
         less_than_size:   price/size/duration ;
         etc
}

Example:

data IN {
         *:        $0.100/1G/month;
}

data OUT {
         1G:       $0.000/1G/month;
         10T:      $0.150/1G/month;
         50T:      $0.110/1G/month;
         150T:     $0.090/1G/month;
         *:        $0.080/1G/month;
}

data STORAGE {
        50T:       $0.150/1G/month;
        100T:      $0.140/1G/month;
        500T:      $0.130/1G/month;
        1000T:     $0.080/1G/month;
        5000T:     $0.080/1G/month;
        *:         $0.055/1G/month;
}

'*' matches any quantity