Don't pass disk config as None. Fix for bug 980119
Change-Id: Iebf920114454eaae9d250df51e4a4c219786fcda
diff --git a/tempest/services/nova/json/servers_client.py b/tempest/services/nova/json/servers_client.py
index 7d2a1cb..3596add 100644
--- a/tempest/services/nova/json/servers_client.py
+++ b/tempest/services/nova/json/servers_client.py
@@ -53,10 +53,12 @@
'accessIPv4': kwargs.get('accessIPv4'),
'accessIPv6': kwargs.get('accessIPv6'),
'min_count': kwargs.get('min_count'),
- 'max_count': kwargs.get('max_count'),
- 'OS-DCF:diskConfig': kwargs.get('disk_config')
+ 'max_count': kwargs.get('max_count')
}
+ disk_config = kwargs.get('disk_config')
+ if disk_config != None:
+ post_body['OS-DCF:diskConfig'] = disk_config
post_body = json.dumps({'server': post_body})
resp, body = self.client.post('servers', post_body, self.headers)