← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1341919] Re: Aggreate's update need validate for metadata

 

for v2:
see from api code of aggregate-update , there is validation of updates keys. it only accept name of availability_zone, so we can not update metadata:

        for key in updates.keys():
            if key not in ["name", "availability_zone"]:
                raise exc.HTTPBadRequest()

for v3:
there is schema to validation the api input, we can't update metadata neither.

update = {
    'type': 'object',
    'properties': {
        'type': 'object',
        'aggregate': {
            'type': 'object',
            'properties': {
                'name': parameter_types.name,
                'availability_zone': parameter_types.name
            },
            'additionalProperties': False,
            'anyOf': [
                {'required': ['name']},
                {'required': ['availability_zone']}
            ]
        },
    },
    'required': ['aggregate'],
    'additionalProperties': False,
}

** Changed in: nova
       Status: Confirmed => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1341919

Title:
  Aggreate's update need validate for metadata

Status in OpenStack Compute (Nova):
  Invalid

Bug description:
  This patch https://review.openstack.org/#/c/79529/17 tightened the
  input validation of set_metadata action.  But user also can use
  aggreate's update for metadata, but there isn't any input validation
  for metadata in update action.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1341919/+subscriptions


References