glance md-resource-type-associate could not work properly

Bug #1555483 reported by Rust Shen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
New
Undecided
Niall Bunting

Bug Description

OpenStack Version: Liberty
GlanceClient version: 1.1.0

the parameters this command follows appears <unavailable> in docs.

when using this command follows with namespace and resource_type_name or JSON like dict , I got errors like:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/glanceclient/shell.py", line 699, in main
    args.func(client, args)
  File "/usr/lib/python2.7/dist-packages/glanceclient/v2/shell.py", line 567, in do_md_resource_type_associate
    **fields)
  File "/usr/lib/python2.7/dist-packages/glanceclient/v2/metadefs.py", line 195, in associate
    raise TypeError(utils.exception_to_str(e))
TypeError: u'name' is a required property

Failed validating u'required' in schema:
    {u'additionalProperties': False,
     u'name': u'resource_type_association',
     u'properties': {u'created_at': {u'description': u'Date and time of resource type association (READ-ONLY)',
                                     u'format': u'date-time',
                                     u'type': u'string'},
                     u'name': {u'description': u'Resource type names should be aligned with Heat resource types whenever possible: http://docs.openstack.org/developer/heat/template_guide/openstack.html',
                               u'maxLength': 80,
                               u'type': u'string'},
                     u'prefix': {u'description': u'Specifies the prefix to use for the given resource type. Any properties in the namespace should be prefixed with this prefix when being applied to the specified resource type. Must include prefix separator (e.g. a colon :).',
                                 u'maxLength': 80,
                                 u'type': u'string'},
                     u'properties_target': {u'description': u'Some resource types allow more than one key / value pair per instance. For example, Cinder allows user and image metadata on volumes. Only the image properties metadata is evaluated by Nova (scheduling or drivers). This property allows a namespace target to remove the ambiguity.',
                                            u'maxLength': 80,
                                            u'type': u'string'},
                     u'updated_at': {u'description': u'Date and time of the last resource type association modification (READ-ONLY)',
                                     u'format': u'date-time',
                                     u'type': u'string'}},
     u'required': [u'name']}

On instance:
    {}
u'name' is a required property

I'm not really sure wether it's a bug or not, has anyone used this command successfully?

Rust Shen (rustinpeace)
description: updated
Revision history for this message
Niall Bunting (niall-bunting) wrote :

What is the command and parameters are you using?

Changed in python-glanceclient:
assignee: nobody → Niall Bunting (niall-bunting)
Revision history for this message
Rust Shen (rustinpeace) wrote :

I tried glance md-resource-type-associate <namespace> <resource_type> like:
 glance md-resource-type-associate OS::Compute::AggregateDiskFilter OS::Cinder::Volume

and <namespace> <dict> like:
glance md-resource-type-associate OS::Compute::Quota '{'name':'a'}'

and some other testing dict.

all got the errors.

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.