tempest/services/baremetal/v1/client_xml.py
def json_to_xml(self, object_type, object_dict):
        """
        Brainlessly converts a specification of an object to XML string.

        :param object_type: Kind of the object.
        :param object_dict: Specification of the object attributes as a dict.
        :return: An XML string that corresponds to the specification.

        """
        root = xml.Element(object_type)

        for attr_name, value in object_dict:
            # Handle nested dictionaries
            if isinstance(value, dict):
                value = self.json_to_xml(attr_name, value)

            root.append(xml.Element(attr_name, value))

        return str(xml.Document(root))

        Brainlessly converts a specification of an object to XML string.

        :param object_type: Kind of the object.
        :param object_dict: Specification of the object attributes as a dict.
        :return: An XML string that corresponds to the specification.

        
Brainlessly converts a specification of an object to XML string.
Brainlessly converts a specification of an object to XML string .
def json_to_xml(self, object_type, object_dict):
        root = xml.Element(object_type)
        for attr_name, value in object_dict:
            if isinstance(value, dict):
                value = self.json_to_xml(attr_name, value)
            root.append(xml.Element(attr_name, value))
        return str(xml.Document(root))
def json_to_xml ( self , object_type , object_dict ) : root = xml . Element ( object_type ) for attr_name , value in object_dict : if isinstance ( value , dict ) : value = self . json_to_xml ( attr_name , value ) root . append ( xml . Element ( attr_name , value ) ) return str ( xml . Document ( root ) )
Brainlessly converts a specification of an object to XML string.
Brainlessly converts a specification of an object to XML string .
"""
        Brainlessly converts a specification of an object to XML string.

        :param object_type: Kind of the object.
        :param object_dict: Specification of the object attributes as a dict.
        :return: An XML string that corresponds to the specification.

        """ # Handle nested dictionaries
An XML string that corresponds to the specification.
An XML string that corresponds to the specification .
self
object_type
Kind of the object.
Kind of the object .
object_dict
Specification of the object attributes as a dict.
Specification of the object attributes as a dict .