Adding Metadef Tag support

Bug #1403848 reported by OpenStack Infra
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-api-site
Fix Released
Medium
Diane Fleming

Bug Description

https://review.openstack.org/133874
commit c7fa300cc54b4b72d7922c017e95320236526b40
Author: Wayne Okuma <email address hidden>
Date: Tue Nov 11 14:13:51 2014 -0800

    Adding Metadef Tag support

    Adding rest api and db support for CRUD operations on the new
    metadef_tags table.

    Implements: https://blueprints.launchpad.net/glance/+spec/metadefs-tags
    DocImpact

    Change-Id: Icfa40555280ce69766381b0abe7ef399b806f6a0

Tags: glance
Tom Fifield (fifieldt)
affects: openstack-manuals → openstack-api-site
Revision history for this message
Anne Gentle (annegentle) wrote :

More info here: http://specs.openstack.org/openstack/glance-specs/specs/juno/metadata-schema-catalog.html

This review should have also had an APIImpact tag.

Revision history for this message
Anne Gentle (annegentle) wrote :
Download full text (12.6 KiB)

In the REST API everything is referred by namespace and name rather than synthetic IDs. This helps to achieve portability (import / export using JSON).

APIs should allow coarse grain and fine grain access to information in order to control data transfer bandwidth requirements.

Working with Namespaces Basic interaction is:

Get list of namespaces with overview info based on the desired filters. (e.g. key / values for images).
Get objects
Common Response Codes

Create Success: 201 Created
Modify Success: 200 OK
Delete Success: 204 No Content
Failure: 400 Bad Request with details.
Forbidden: 403 Forbidden
Not found: 404 Not found e.g. if specific entity not found
Not found: 405 Not allowed e.g. if trying to delete on a list resource
Not found: 501 Not Implemented e.g. HEAD not implemented
API Version

All URLS will be under the v2 Glance API. If it is not explicitly specified assume /v2/<url>

Create a namespace:
POST /metadefs/namespaces/
Namespace may optionally contain the following in addition to basic fields.

resource_type_associations
properties
objects
tags (future release)
Example Body (with no resource types, properties, objects, or tags):

{
  "namespace": "MyNamespace",
  "display_name": "My User Friendly Namespace",
  "description": "My description",
  "visibility": "public",
  "protected": true
}
Replace a namespace definition (not including properties, objects, or tags):
PUT /metadefs/namespaces/{namespace}
List Namespaces: Returns just the list of namespaces without any objects
properties, or tags.
GET /metadefs/namespaces/
Example Body:

{
    "namespaces": [
        {namespace1Here},
        {namespace2Here}
    ],
    "first": "/v2/metadefs/namespaces?limit=2",
    "next": "/v2/metadefs/namespaces?marker=namespace2Here&limit=2",
    "schema": "/v2/schemas/metadefs/namespaces"
}

With example namespace:

{
    "first": "/v2/metadefs/namespaces?sort_key=created_at&sort_dir=asc",
    "namespaces": [
        {
            "namespace": "OS::Compute::Quota",
            "display_name": "Flavor Quota",
            "description": "Compute drivers may enable quotas on...",
            "visibility": "public",
            "protected": true,
            "owner": "admin",
            "resource_type_associations": [
                {
                    "name": "OS::Nova::Flavor",
                    "created_at": "2014-08-28T17:13:06Z",
                    "updated_at": "2014-08-28T17:13:06Z"
                }
            ],
            "created_at": "2014-08-28T17:13:06Z",
            "updated_at": "2014-08-28T17:13:06Z",
            "self": "/v2/metadefs/namespaces/OS::Compute::Quota",
            "schema": "/v2/schemas/metadefs/namespace"
        },
        {
            "namespace": "OS::Compute::VirtCPUTopology",
            "display_name": "Virtual CPU Topology",
            "description": "This provides the preferred...",
            "visibility": "public",
            "protected": true,
            "owner": "admin",
            "resource_type_associations": [
                {
                    "name": "OS::Glance::Image",
                    "prefix": "hw_",
                    "created_at": "2014-08-28T17:13:06Z",
           ...

Changed in openstack-api-site:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Diane Fleming (diane-fleming) wrote :

These changes were already completed through other patches.

Changed in openstack-api-site:
milestone: none → liberty
status: Confirmed → Fix Released
assignee: nobody → Diane Fleming (diane-fleming)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.