User Tools

Site Tools


informatica:weblogic:wlst:comandos

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
informatica:weblogic:wlst:comandos [2017/07/20 13:40] joseinformatica:weblogic:wlst:comandos [2017/09/18 15:46] (current) jose
Line 61: Line 61:
   for v_linea in v_lista:   for v_linea in v_lista:
     print v_linea     print v_linea
 +
 +===== Sacar una cadena =====
 +import re es Regular Expression
 +  import re
 +  cadena="Proxy for osb_cluster: Name=osb_cluster, Type=Cluster"
 +  m = re.search('=(\w+),', str(cadena))
 +  print m.group(1)
 +Otra forma
 +  print(cadena).split('Name=')[1].split(',')[0]
 +  
 +  print(str(get('Target')[0])
 +  
 +En el caso del Target:
 +  get('Target')
 +  array(weblogic.management.configuration.TargetMBean,[Proxy for osb_cluster: Name=osb_cluster, Type=Cluster]) 
 +Lo sacamos:
 +  print(str(get('Target')[0]).split('Name=')[1].split(',')[0])
 +  osb_cluster
 +  
 +  
 +===== Sacar listado targets =====
 +<code>
 +cd('/AppDeployment')
 +v_lista=ls(returnMap='true')
 +
 +for v_linea in v_lista:
 +  cd('/AppDeployment/' + v_linea)
 +  if get('Target') != None:
 +    v_targets=list()
 +    for v_target in get('Target'):
 +      v_targets.append(str(v_target).split('Name=')[1].split(',')[0])
 +    v_total=v_linea+"\t"+",".join(v_targets)
 +  else:
 +    v_total=v_linea+"\tN/A"
 +  print(v_total)
 +</code>  
 +
 +
 +===== RCU =====
 +/u01/mid12212/oracle_common/bin/rcu -silent -dropRepository -connectString 172.17.0.1:1521:DEV -dbUser sys -dbRole SYSDBA -schemaPrefix BPEL12C -selectDependentsForComponents true -component IAU -component MDS -component IAU_APPEND -component IAU_VIEWER -component OPSS -component STB -component WLS -component UCSUMS -component SOAINFRA -component ESS < /u01/pogramas/passwordfile.txt
 +
 +
 +===== Bucle =====
 +<code>
 +v_estat="desconnectat"
 +while v_estat != "connectat":
 +  try:
 +    nmConnect(username='weblogic', password='weblogic01',domainName='osb', host='127.0.0.1',port='5556', nmType='plain')
 +    v_estat = "connectat"
 +  except:
 +    print "No esta connectat"
 +    time.sleep(10)
 +</code>
 +
 +===== Borrar cluster Coherence =====
 +Sin target:
 +  cd('/')
 +  delete('defaultCoherenceCluster','CoherenceClusterSystemResource')
 +
  
informatica/weblogic/wlst/comandos.1500558017.txt.gz · Last modified: 2017/07/20 13:40 by jose