def CredUrlWBEM(cimom_url): # Example: urlWbem = "http://192.168.0.17:5989" if False: hostname = cimom_url[7:] node_wbem = lib_util.UrlPortalWbem(cimom_url) return node_wbem else: import lib_wbem the_cimom = lib_credentials.key_url_cgi_encode(cimom_url) node_wbem = lib_wbem.WbemAllNamespacesUrl(the_cimom) return node_wbem
def AddDefaultScripts(grph, rootNode, entity_host): sys.stderr.write("AddDefaultScripts entity_host=%s\n" % entity_host) nodeObjTypes = lib_common.NodeUrl(lib_util.uriRoot + '/objtypes.py') grph.add((rootNode, pc.property_rdf_data_nolist2, nodeObjTypes)) # Gives a general access to WBEM servers. In fact we might iterate on several servers, or none. nodePortalWbem = lib_util.UrlPortalWbem(entity_host) grph.add((rootNode, pc.property_rdf_data_nolist2, nodePortalWbem)) # Gives a general access to WMI servers. nodePortalWmi = lib_util.UrlPortalWmi(entity_host) grph.add((rootNode, pc.property_rdf_data_nolist2, nodePortalWmi))
def _add_default_scripts(grph, root_node, entity_host): logging.debug("_add_default_scripts entity_host=%s", entity_host) node_obj_types = lib_common.NodeUrl(lib_util.uriRoot + '/objtypes.py') grph.add((root_node, pc.property_rdf_data_nolist2, node_obj_types)) # Gives a general access to WBEM servers. In fact we might iterate on several servers, or none. node_portal_wbem = lib_util.UrlPortalWbem(entity_host) grph.add((root_node, pc.property_rdf_data_nolist2, node_portal_wbem)) # Gives a general access to WMI servers. node_portal_wmi = lib_util.UrlPortalWmi(entity_host) grph.add((root_node, pc.property_rdf_data_nolist2, node_portal_wmi))