« Previous - Version 3/5 (diff) - Next » - Current version
Nikos Skalkotos, 05/10/2012 04:56 pm


Personality OS Parameter

This parameter is an extension of the Server Personality notation proposed by the OpenStack Compute API v1.1 and defines a list of files to be injected into the image filesystem.

Format

The format of this parameter is a JSON array of objects. Each object in the array supports the following keys:

  • path: The absolute path of the file (string)
  • contents: The content of the file encoded as a base64 string (string)
  • owner: The user ownership of the file (string)
  • group: The group ownership of the file (string)
  • mode: The permission mode of the file (number)

The first two (path, contents) are mandatory. The others (owner, group, mode) are optional and their default value is root, root and 0440 respectively.

Example

The JSON string below defines two files (/tmp/test1, /tmp/test2) whose content is test1\n and test2\n, they are both owned by root:root and their permissions are -rw-r--r-- and -r-------- respectively.

[
    {
        "path": "/tmp/test1",
        "contents": "dGVzdDENCg==",
        "owner": "root",
        "group": "root",
        "mode": 0644
    },
    {
        "path": "/tmp/test2",
        "contents": "dGVzdDINCg==",
        "owner": "root",
        "group": "root",
        "mode": 0400
    }
]