~ubuntu-branches/ubuntu/raring/eucalyptus/raring

« back to all changes in this revision

Viewing changes to clc/modules/configuration/conf/scripts/describe_nodes.groovy

  • Committer: Package Import Robot
  • Author(s): Brian Thomason
  • Date: 2011-11-29 13:17:52 UTC
  • mfrom: (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 185.
  • Revision ID: package-import@ubuntu.com-20111129131752-rq31al3ntutv2vvl
Tags: upstream-3.0.999beta1
ImportĀ upstreamĀ versionĀ 3.0.999beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
import com.eucalyptus.cluster.Clusters;
5
5
import com.google.common.collect.Lists;
6
6
 
7
 
import com.eucalyptus.cluster.VmInstance;
8
 
import com.eucalyptus.cluster.VmInstances;
9
 
import edu.ucsb.eucalyptus.msgs.NodeComponentInfoType;
 
7
import com.eucalyptus.config.NodeComponentInfoType;
 
8
import com.eucalyptus.scripting.Groovyness;
 
9
import com.eucalyptus.vm.VmInstance;
 
10
import com.eucalyptus.vm.VmInstances;
10
11
 
11
12
List<NodeComponentInfoType> nodeInfoList = Lists.newArrayList( );
12
13
for( Cluster c : Clusters.getInstance( ).listValues( ) ) {
13
14
  for( String nodeTag : c.getNodeTags( ) ) {
14
15
    NodeComponentInfoType nodeInfo = new NodeComponentInfoType( new URL(nodeTag).getHost( ), c.getName() );
15
 
    for( VmInstance vm : VmInstances.getInstance( ).listValues( ) ) {
 
16
    for( VmInstance vm : VmInstances.list( ) ) {
 
17
      vm = Groovyness.expandoMetaClass(vm);
16
18
      if( nodeTag.equals( vm.getServiceTag() ) ) {
17
19
        nodeInfo.getInstances().add( vm.getInstanceId() );
18
20
      }