You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/06/01 19:32:31 UTC
[GitHub] mrutkows opened a new issue #949: Add support for the scalar-unit
'size' and types
mrutkows opened a new issue #949: Add support for the scalar-unit 'size' and types
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/949
```scalar-unit`` types are convenience types for declaring common scalars that have an associated unit. For example, “10 msec.”, “2 Gb”, etc.).
**Grammar**:
```<scalar> <unit>```
In the above grammar, the pseudo values that appear in angle brackets have the following meaning:
• scalar: is a required scalar value (e.g., integer).
• unit: is a required unit value. The unit value MUST be type-compatible with the scalar value.
**Examples**:
```
inputs:
max_storage_size:
type: scalar-unit.size
default: 10 GB
archive_period:
type: scalar-unit.time
default: 30 d
```
**Requirements**
• Whitespace: any number of spaces (including zero or none) SHALL be allowed between the scalar value and the unit value.
• It SHALL be considered an error if either the scalar or unit portion is missing on a property or attribute declaration derived from any scalar-unit type.
**Recognized units for sizes** (i.e., scalar-unit.size)
Unit | Description
-- | --
B | byte
kB | kilobyte (1000 bytes)
MB | megabyte (1000000 bytes)
GB | gigabyte (1000000000 bytes)
TB[MR1] | terabyte (1000000000000 bytes)
**Recognized units for times** (i.e., scalar-unit.time)
Unit | Description
-- | --
d | days
h | hours
m | minutes
s | seconds
ms | milliseconds
us [MR1] | microseconds
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services