HashMap Module REST API

type Service

Type describing a service.

A service is directly mapped to the usage key, the collected service.

Data samples:

Json
{
    "name": "compute",
    "service_id": "a733d0e1-1ec9-4800-8df8-671e4affd017"
}
XML
b'<value>\n  <service_id>a733d0e1-1ec9-4800-8df8-671e4affd017</service_id>\n  <name>compute</name>\n</value>'
name

Name of the service.

service_id

UUID of the service.

type ServiceCollection

Type describing a list of services.

Data samples:

Json
{
    "services": [
        {
            "name": "compute",
            "service_id": "a733d0e1-1ec9-4800-8df8-671e4affd017"
        }
    ]
}
XML
b'<value>\n  <services>\n    <item>\n      <service_id>a733d0e1-1ec9-4800-8df8-671e4affd017</service_id>\n      <name>compute</name>\n    </item>\n  </services>\n</value>'
services

List of services.

type Field

Type describing a field.

A field is mapping a value of the ‘desc’ dict of the CloudKitty data. It’s used to map the name of a metadata.

Data samples:

Json
{
    "field_id": "ac55b000-a05b-4832-b2ff-265a034886ab",
    "name": "image_id",
    "service_id": "a733d0e1-1ec9-4800-8df8-671e4affd017"
}
XML
b'<value>\n  <field_id>ac55b000-a05b-4832-b2ff-265a034886ab</field_id>\n  <name>image_id</name>\n  <service_id>a733d0e1-1ec9-4800-8df8-671e4affd017</service_id>\n</value>'
field_id

UUID of the field.

name

Name of the field.

service_id

UUID of the parent service.

type FieldCollection

Type describing a list of fields.

Data samples:

Json
{
    "fields": [
        {
            "field_id": "ac55b000-a05b-4832-b2ff-265a034886ab",
            "name": "image_id",
            "service_id": "a733d0e1-1ec9-4800-8df8-671e4affd017"
        }
    ]
}
XML
b'<value>\n  <fields>\n    <item>\n      <field_id>ac55b000-a05b-4832-b2ff-265a034886ab</field_id>\n      <name>image_id</name>\n      <service_id>a733d0e1-1ec9-4800-8df8-671e4affd017</service_id>\n    </item>\n  </fields>\n</value>'
fields

List of fields.

type Mapping

Type describing a Mapping.

A mapping is used to apply rating rules based on a value, if the parent is a field then it’s check the value of a metadata. If it’s a service then it directly apply the rate to the volume.

Data samples:

Json
{
    "cost": "4.2",
    "field_id": "ac55b000-a05b-4832-b2ff-265a034886ab",
    "mapping_id": "39dbd39d-f663-4444-a795-fb19d81af136",
    "tenant_id": "7977999e-2e25-11e6-a8b2-df30b233ffcb",
    "type": "flat",
    "value": "m1.micro"
}
XML
b'<value>\n  <mapping_id>39dbd39d-f663-4444-a795-fb19d81af136</mapping_id>\n  <value>m1.micro</value>\n  <type>flat</type>\n  <cost>4.2</cost>\n  <field_id>ac55b000-a05b-4832-b2ff-265a034886ab</field_id>\n  <tenant_id>7977999e-2e25-11e6-a8b2-df30b233ffcb</tenant_id>\n</value>'
cost

Value of the mapping.

field_id

UUID of the field.

group_id

UUID of the hashmap group.

map_type

Type of the mapping.

mapping_id

UUID of the mapping.

service_id

UUID of the service.

tenant_id

ID of the hashmap tenant.

value

Key of the mapping.

type MappingCollection

Type describing a list of mappings.

Data samples:

Json
{
    "mappings": [
        {
            "cost": "4.2",
            "field_id": "ac55b000-a05b-4832-b2ff-265a034886ab",
            "mapping_id": "39dbd39d-f663-4444-a795-fb19d81af136",
            "tenant_id": "7977999e-2e25-11e6-a8b2-df30b233ffcb",
            "type": "flat",
            "value": "m1.micro"
        }
    ]
}
XML
b'<value>\n  <mappings>\n    <item>\n      <mapping_id>39dbd39d-f663-4444-a795-fb19d81af136</mapping_id>\n      <value>m1.micro</value>\n      <type>flat</type>\n      <cost>4.2</cost>\n      <field_id>ac55b000-a05b-4832-b2ff-265a034886ab</field_id>\n      <tenant_id>7977999e-2e25-11e6-a8b2-df30b233ffcb</tenant_id>\n    </item>\n  </mappings>\n</value>'
mappings

List of mappings.

type Threshold

Type describing a Threshold.

A threshold is used to apply rating rules based on a level, if the parent is a field then the level is checked against a metadata. If it’s a service then it’s the quantity of the resource that is checked.

Data samples:

Json
{
    "cost": "4.2",
    "field_id": "ac55b000-a05b-4832-b2ff-265a034886ab",
    "level": "1024",
    "tenant_id": "7977999e-2e25-11e6-a8b2-df30b233ffcb",
    "threshold_id": "39dbd39d-f663-4444-a795-fb19d81af136",
    "type": "flat"
}
XML
b'<value>\n  <threshold_id>39dbd39d-f663-4444-a795-fb19d81af136</threshold_id>\n  <level>1024</level>\n  <type>flat</type>\n  <cost>4.2</cost>\n  <field_id>ac55b000-a05b-4832-b2ff-265a034886ab</field_id>\n  <tenant_id>7977999e-2e25-11e6-a8b2-df30b233ffcb</tenant_id>\n</value>'
cost

Value of the threshold.

field_id

UUID of the field.

group_id

UUID of the hashmap group.

level

Level of the threshold.

map_type

Type of the threshold.

service_id

UUID of the service.

tenant_id

ID of the hashmap tenant.

threshold_id

UUID of the threshold.

type ThresholdCollection

Type describing a list of mappings.

Data samples:

Json
{
    "thresholds": [
        {
            "cost": "4.2",
            "field_id": "ac55b000-a05b-4832-b2ff-265a034886ab",
            "level": "1024",
            "tenant_id": "7977999e-2e25-11e6-a8b2-df30b233ffcb",
            "threshold_id": "39dbd39d-f663-4444-a795-fb19d81af136",
            "type": "flat"
        }
    ]
}
XML
b'<value>\n  <thresholds>\n    <item>\n      <threshold_id>39dbd39d-f663-4444-a795-fb19d81af136</threshold_id>\n      <level>1024</level>\n      <type>flat</type>\n      <cost>4.2</cost>\n      <field_id>ac55b000-a05b-4832-b2ff-265a034886ab</field_id>\n      <tenant_id>7977999e-2e25-11e6-a8b2-df30b233ffcb</tenant_id>\n    </item>\n  </thresholds>\n</value>'
thresholds

List of thresholds.

type Group

Type describing a group.

A group is used to divide calculations. It can be used to create a group for the instance rating (flavor) and one if we have premium images (image_id). So you can take into account multiple parameters during the rating.

Data samples:

Json
{
    "group_id": "afe898cb-86d8-4557-ad67-f4f01891bbee",
    "name": "instance_rating"
}
XML
b'<value>\n  <group_id>afe898cb-86d8-4557-ad67-f4f01891bbee</group_id>\n  <name>instance_rating</name>\n</value>'
group_id

UUID of the group.

name

Name of the group.

type GroupCollection

Type describing a list of groups.

Data samples:

Json
{
    "groups": [
        {
            "group_id": "afe898cb-86d8-4557-ad67-f4f01891bbee",
            "name": "instance_rating"
        }
    ]
}
XML
b'<value>\n  <groups>\n    <item>\n      <group_id>afe898cb-86d8-4557-ad67-f4f01891bbee</group_id>\n      <name>instance_rating</name>\n    </item>\n  </groups>\n</value>'
groups

List of groups.