Fix XML formatting for create server personality.
This fixes generating the XML of personality attribute in create_server() Change-Id: I375304964f564866447d32f3560985c434378c4d Signed-off-by: Matthew Treinish <treinish@linux.vnet.ibm.com>
This commit is contained in:
parent
bc3bd240cc
commit
2dfc282dc2
@ -168,7 +168,13 @@ class ServersClientXML(RestClientXML):
|
||||
meta.append(Text(v))
|
||||
metadata.append(meta)
|
||||
|
||||
server.append(Element("personality"))
|
||||
if 'personality' in kwargs:
|
||||
personality = Element('personality')
|
||||
server.append(personality)
|
||||
for k in kwargs['personality']:
|
||||
temp = Element('file', path=k['path'])
|
||||
temp.append(Text(k['contents']))
|
||||
personality.append(temp)
|
||||
|
||||
resp, body = self.post('servers', str(Document(server)), self.headers)
|
||||
server = self._parse_server(etree.fromstring(body))
|
||||
|
Loading…
Reference in New Issue
Block a user