Set Up MFE Connection with WLST Commands

  1. Log in to the Admin Node and navigate to the <Domain_Home>/bin directory.
  2. Load the domain environmental variables.
    . ./setDomainEnv.sh
  3. Save the following script to your system and modify the parameters to be appropriate to your environment.
    try:
        connect("<username>", "<password>", "t3://<adminserver_ip>:<port>")
        edit()
        startEdit()
        cd('/CustomResources/IntelligentMediaConnector')
        ms = cmo.getResource()
        name = '<name_of_mfe>' 
        mfe = ms.lookupMediaFlowEngine(name)
        if mfe is None:
            print 'Creating MediaFlowEngine:', name
            mfe = ms.createMediaFlowEngine(name)
            mfe.setManagementIP('<mfe_ip>')
            mfe.setManagementPort(<management_port>)
            mfe.setSecondaryPort(<secondary_port>)
            mfe.setSslEnabled(<true_or_false>)
        else:
            print 'MediaFlowEngine already exists:', name
        save()
        activate(block="true")
        print 'res:1'
    except Exception, e:
        print e
        dumpStack()
        print 'res:0'
    print 'End of script...'
    disconnect('true')
    exit('true')
  4. Run the WLST script.
    java weblogic.WLST /path/to/file.py