[Openstack] Openstack NOVA and Metadata.

Trinath Somanchi trinath.somanchi at gmail.com
Fri Aug 31 09:52:18 UTC 2012


Hi-

While going through the source code of the Nova API, i came across the
following comments.

class CommonDeserializer(wsgi.MetadataXMLDeserializer):
    """
    Common deserializer to handle xml-formatted server create
    requests.

    Handles standard server attributes as well as optional metadata
    and personality attributes
    """

    metadata_deserializer = common.MetadataXMLDeserializer()

    def _extract_personality(self, server_node):
        """Marshal the personality attribute of a parsed request"""
        node = self.find_first_child_named(server_node, "personality")
        if node is not None:
            personality = []
            for file_node in self.find_children_named(node, "file"):
                item = {}
                if file_node.hasAttribute("path"):
                    item["path"] = file_node.getAttribute("path")
                item["contents"] = self.extract_text(file_node)
                personality.append(item)
            return personality
        else:
            return None


..............
.................

Just very interested to know, what kind of metadata is possible here and
what doest this PERSONALITY attribute mean.

Can any me help understand the role of METADATA and its attributes with an
example. Even When I brought up the instance, when I view the logs, haven't
found any information regarding the metadata.

Please help me in this regard.

Thanking you all.

-- 
Regards,
----------------------------------------------
Trinath Somanchi,
+91 9866 235 130
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120831/1bca9bd9/attachment.html>


More information about the Openstack mailing list