Explorar el Código

Merge "Validate attributes schema"

tags/13.0.0.0rc1
Zuul Gerrit Code Review hace 1 año
padre
commit
5bafd120bf
Se han modificado 2 ficheros con 11 adiciones y 5 borrados
  1. +5
    -5
      heat/engine/attributes.py
  2. +6
    -0
      releasenotes/notes/attribute-schema-validation-db615003e577f8dd.yaml

+ 5
- 5
heat/engine/attributes.py Ver fichero

@@ -48,19 +48,19 @@ class Schema(constr.Schema):
)

TYPES = (
STRING, MAP, LIST, INTEGER, BOOLEAN
UNKNOWN, STRING, MAP, LIST, INTEGER, BOOLEAN
) = (
'String', 'Map', 'List', 'Integer', 'Boolean'
None, 'String', 'Map', 'List', 'Integer', 'Boolean'
)

def __init__(self, description=None,
support_status=support.SupportStatus(),
cache_mode=CACHE_LOCAL,
type=None):
self.description = description
type=UNKNOWN):
super(Schema, self).__init__(type, description)
self.support_status = support_status
self.cache_mode = cache_mode
self.type = type
self.validate()

def __getitem__(self, key):
if key == self.DESCRIPTION:


+ 6
- 0
releasenotes/notes/attribute-schema-validation-db615003e577f8dd.yaml Ver fichero

@@ -0,0 +1,6 @@
---
upgrade:
- |
When loading a Resource plugin, the attribute schema is now validated in
the same way that the properties schema is. Third-party resource plugins
should be tested to check that they still comply.

Cargando…
Cancelar
Guardar