Merge properties in Neutron::Port before init
Merge both properties schemas in OS::Neutron::Port before init in case of correctly documentation generating. Change-Id: I0092cf9d3c7a9ab1077cad6d33ac94325bf4c12c Closes-bug: #1544535
This commit is contained in:
parent
4686c5d2f2
commit
09f6bcadc5
|
@ -261,6 +261,12 @@ class Port(neutron.NeutronResource):
|
|||
),
|
||||
}
|
||||
|
||||
# Need to update properties_schema with other properties before
|
||||
# initialisation, because resource should contain all properties before
|
||||
# creating. Also, documentation should correctly resolves resource
|
||||
# properties schema.
|
||||
properties_schema.update(extra_properties_schema)
|
||||
|
||||
attributes_schema = {
|
||||
ADMIN_STATE_UP_ATTR: attributes.Schema(
|
||||
_("The administrative state of this port."),
|
||||
|
@ -323,11 +329,6 @@ class Port(neutron.NeutronResource):
|
|||
),
|
||||
}
|
||||
|
||||
def __init__(self, name, definition, stack):
|
||||
"""Overloaded init in case of merging two schemas to one."""
|
||||
self.properties_schema.update(self.extra_properties_schema)
|
||||
super(Port, self).__init__(name, definition, stack)
|
||||
|
||||
def translation_rules(self, props):
|
||||
return [
|
||||
translation.TranslationRule(
|
||||
|
|
Loading…
Reference in New Issue