mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix ValueError for template in AppsV1beta1DeploymentSpec
Instantiating AppsV1beta1DeploymentSpec without specifying a template will raise: ValueError: Invalid value for `template`, must not be `None` Therefore directly specifying the template when instantiating AppsV1beta1DeploymentSpec and use '' as default template. This fixes the test_create_deployments test case (fixes #46329). Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
This commit is contained in:
parent
a0716643e4
commit
5008c53c44
1 changed files with 1 additions and 1 deletions
|
@ -1461,7 +1461,7 @@ def __dict_to_deployment_spec(spec):
|
|||
'''
|
||||
Converts a dictionary into kubernetes AppsV1beta1DeploymentSpec instance.
|
||||
'''
|
||||
spec_obj = AppsV1beta1DeploymentSpec()
|
||||
spec_obj = AppsV1beta1DeploymentSpec(template=spec.get('template', ''))
|
||||
for key, value in iteritems(spec):
|
||||
if hasattr(spec_obj, key):
|
||||
setattr(spec_obj, key, value)
|
||||
|
|
Loading…
Add table
Reference in a new issue