Metadata definition properties

1. set_namespace(namespace_id)

Before using Image Metadata Definition Properties, Objects and Tags, one should set namespace first before performing other functions.

Parameters:

Name Type Description
namespace_id string target namespace id

Return value: None

2. properties()

Show the properties.

Parameters:

Name Type Description
id string when you specify it, you get exactly one instance of Property

Return value: Property Instance

Return value example:

istack/image/v2/Property Property
type : string
name : pythonHo
title : Python Test
enum : [
    "xen",
    "qemu",
    "kvm",
    "lxc",
    "uml",
    "vmware",
    "hyperv"
]

3. create_property(**attrs)

Create a property.

Parameters:

Name Type Description
title string The title of the property.
type string The property type.
additionalItems (Optional) string Describes extra items, if you use tuple typing. If the value of items is an array (tuple typing) and the instance is longer than the list of schemas in items, the additional items are described by the schema in this property. If this value is false, the instance cannot be longer than the list of schemas in items. If this value is true, that is equivalent to the empty schema (anything goes).
description (Optional) string Detailed description of the property.
default (Optional) string Default property description.
items (Optional) string Schema for the items in an array.
operators (Optional) string Operators property description.
enum array Enumerated list of property values.
maximum (Optional) string Maximum allowed numerical value.
minItems (Optional) string Minimum length of an array.
readonly (Optional) boolean Indicates whether this is a read-only property.
minimum (Optional) string Minimum allowed numerical value.
maxItems (Optional) string Maximum length of an array.
maxLength (Optional) string Maximum allowed string length.
uniqueItems (Optional) string Indicates whether all values in the array must be distinct.
pattern (Optional) string A regular expression ( ECMA 262 ) that a string value must match.
minLength (Optional) string Minimum allowed string length.

Parameter example:

cloud.image.create_property(name="pythonHo", title="Python Test", type="string")

Return value: Property Object

Return value example:

istack/image/v2/Property Property
type : string
name : pythonHo
title : Python Test
enum : [
    "xen",
    "qemu",
    "kvm",
    "lxc",
    "uml",
    "vmware",
    "hyperv"
]

4. update_property(property, **attrs).

Update a property

Parameters:

Name Type Description
id string(inside Property param) at least specified inside property instace
enum(optional) List Enumerated list of property values.

Return value: Property Object

Return value example:

istack/image/v2/Property Property
type : string
name : pythonHo
title : Python Test
enum : [
    "xen",
    "qemu",
    "kvm",
    "lxc",
    "uml",
    "vmware",
    "hyperv"
]

5. delete_property(property)

Delete a property.

Parameters:

Name Type Description
id string specified in property instance

Return value: None

results matching ""

    No results matching ""