Exemple #1
0
def add_vmconfig(newVmConfig,images,nodeList,userList,clientDataList):
    vmconfigType = p_get_vmconfig_type(newVmConfig)
    if vmconfigType==VM_ENGINE.TYPE_111 or vmconfigType==VM_ENGINE.TYPE_110:
        vmEngine11.add_vmconfig(newVmConfig,images,nodeList,clientDataList)
    elif vmconfigType==VM_ENGINE.TYPE_001 or vmconfigType==VM_ENGINE.TYPE_000:
        vmEngine00.add_vmconfig(newVmConfig,images,userList,nodeList,clientDataList)
    return
Exemple #2
0
def p_init_client_info(vmConfigList, imageList, userList, nodeList, clientDataList):
    logger.debug('p_init_clientInfo  vmConfigList: %s' %str(vmConfigList))       
    for vmconfig in vmConfigList:
        vmconfigType = p_get_vmconfig_type(vmconfig)
        logger.debug('init_client_info vmtype: %s' %str(vmconfigType))         
        if vmconfigType==VM_ENGINE.TYPE_111 or vmconfigType==VM_ENGINE.TYPE_110:    #g_clientinfo_user            
            vmEngine11.add_vmconfig(vmconfig, imageList, nodeList, clientDataList)            
#    elif vmconfig.user!='any' and vmconfig.image_id=='any':
#        vmEngine10.p_get_clientInfo_from_vmconfig_set_user(vmConfigList,nodeList,clientDataList)
#    elif vmconfig.user=='any' and vmconfig.image_id!='any':
#        vmEngine01.p_get_clientInfo_from_vmconfig_set_image(vmConfigList,imageList,nodeList,clientDataList)    
        elif vmconfigType==VM_ENGINE.TYPE_001 or vmconfigType==VM_ENGINE.TYPE_000:
            logger.debug('init_client_info 00 vmconfig is: %s' %str(vmconfig)) 
            vmEngine00.add_vmconfig(vmconfig,imageList,userList,nodeList,clientDataList)
            logger.debug('init_client_info 00 clientDataList is: %s' %str(clientDataList))    
        else:
            pass