Merge "Copy environment before decrypting"

This commit is contained in:
Jenkins 2015-06-11 01:32:11 +00:00 committed by Gerrit Code Review
commit ec97870ad4
1 changed files with 3 additions and 0 deletions

View File

@ -17,6 +17,8 @@
RawTemplate object
"""
import copy
from oslo_config import cfg
from oslo_utils import encodeutils
from oslo_versionedobjects import base
@ -46,6 +48,7 @@ class RawTemplate(
for field in tpl.fields:
tpl[field] = db_tpl[field]
tpl.environment = copy.deepcopy(tpl.environment)
# If any of the parameters were encrypted, then decrypt them
if env_fmt.ENCRYPTED_PARAM_NAMES in tpl.environment:
parameters = tpl.environment[env_fmt.PARAMETERS]