def __init__(self, pbm_wsdl_loc, protocol='https', host='localhost'): """Constructs a PBM client object. :param pbm_wsdl_loc: PBM WSDL file location :param protocol: http or https :param host: server IP address[:port] or host name[:port] """ self._url = vim_util.get_soap_url(protocol, host, 'pbm') self._pbm_client = suds.client.Client(pbm_wsdl_loc, location=self._url) self._pbm_service_content = None
def __init__(self, protocol='https', host='localhost', wsdl_loc=None): """Create communication interfaces for initiating SOAP transactions. :param protocol: http or https :param host: server IP address[:port] or host name[:port] :param wsdl_loc: WSDL file location :raises: VimException, VimFaultException, VimAttributeException, VimSessionOverLoadException, VimConnectionException """ if not wsdl_loc: wsdl_loc = Vim._get_wsdl_loc(protocol, host) soap_url = vim_util.get_soap_url(protocol, host) self._client = suds.client.Client(wsdl_loc, location=soap_url, plugins=[VimMessagePlugin()]) self._service_content = self.RetrieveServiceContent('ServiceInstance')