def parse_descriptor(ovf_descriptor):
    ovf_manager = s._do_service_content.OvfManager
    request = VI.ParseDescriptorRequestMsg()
    _this = request.new__this(ovf_manager)
    _this.set_attribute_type(ovf_manager.get_attribute_type())
    request.set_element__this(_this)
    request.set_element_ovfDescriptor(ovf_descriptor)
    pdp = request.new_pdp()
    pdp.set_element_locale("")
    pdp.set_element_deploymentOption("")
    request.set_element_pdp(pdp)
    return s._proxy.ParseDescriptor(request)._returnval
Beispiel #2
0
def parse_descriptor(ovf_descriptor, server):
    u"""Exploding Data in OVF file.

    @param ovf_descriptor Data in OVF file.
    @param server         Instance of VIServer

    @return Data in OVF File
    """
    # Import
    from pysphere.resources import VimService_services as VI

    ovf_manager = server._do_service_content.OvfManager
    request = VI.ParseDescriptorRequestMsg()
    _this = request.new__this(ovf_manager)
    _this.set_attribute_type(ovf_manager.get_attribute_type())
    request.set_element__this(_this)
    request.set_element_ovfDescriptor(ovf_descriptor)
    pdp = request.new_pdp()
    pdp.set_element_locale("")
    pdp.set_element_deploymentOption("")
    request.set_element_pdp(pdp)
    return server._proxy.ParseDescriptor(request)._returnval