Skip to content

Commit

Permalink
Adapting VMWare drivers to new XML schema.
Browse files Browse the repository at this point in the history
Fixing VMWare minor driver bugs. Adding unregistering feature.

git-svn-id: http://svn.opennebula.org/one/trunk@662 3034c82b-c49b-4eb3-8279-a7acafdc01c0
  • Loading branch information
tinova committed Jul 7, 2009
1 parent 89699bf commit 34c3d06
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 19 deletions.
17 changes: 6 additions & 11 deletions src/im_mad/vmware/OneImVmware.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,7 @@ else if (action.equals("FINALIZE"))
hid_str = str_split[1];
hostToMonitor = str_split[2];

// Perform the action
if (action.equals("INIT"))
init();
else if (action.equals("FINALIZE"))
{
finalize_mad();
fin = true;
}
else if (action.equals("MONITOR"))
if (action.equals("MONITOR"))
{
// Let's gather data from the host

Expand All @@ -130,10 +122,13 @@ else if (action.equals("MONITOR"))
for(int i=0;i<arguments.length;i++)
{
argsWithHost[i] = arguments[i];
System.out.println(arguments[i]);
}

argsWithHost[arguments.length] = "--url";
argsWithHost[arguments.length + 1 ] = "https://" + hostToMonitor + ":443/sdk";
//argsWithHost[arguments.length + 1 ] = "https://" + hostToMonitor + ":443/sdk";

argsWithHost[arguments.length + 1 ] = "https://localhost:8008/sdk";
gP = new GetProperty(argsWithHost, "HostSystem", hostToMonitor);

// Now it's time to build the response gathering the properties needed
Expand Down Expand Up @@ -201,7 +196,7 @@ else if (action.equals("MONITOR"))
e.printStackTrace();

System.err.println("MONITOR FAILURE " + hid_str + " Failed monitoring host " +
hostToMonitor + ". Please check the VM log.");
hostToMonitor + ".");
} // catch
} // if (action.equals("MONITOR"))
} // else if (str_split.length != 4)
Expand Down
10 changes: 6 additions & 4 deletions src/vmm_mad/vmware/DeployVM.java
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,8 @@ private String getDataStoreName(int size) throws Exception{
}

argsWithHost[args.length] = "--url";
argsWithHost[args.length + 1 ] = "https://" + hostName + ":443/sdk";

//argsWithHost[args.length + 1 ] = "https://" + hostName + ":443/sdk";
argsWithHost[args.length + 1 ] = "https://localhost:8008/sdk";


cb = AppUtil.initialize("DeployVM", null, argsWithHost);
Expand Down Expand Up @@ -438,7 +438,9 @@ private String getDataStoreName(int size) throws Exception{
}

argsWithHost[args.length] = "--url";
argsWithHost[args.length + 1 ] = "https://" + hostName + ":443/sdk";
// argsWithHost[args.length + 1 ] = "https://" + hostName + ":443/sdk";

argsWithHost[args.length + 1 ] = "https://localhost:8008/sdk";


cb = AppUtil.initialize("DeployVM", null, argsWithHost);
Expand All @@ -461,4 +463,4 @@ private String getDataStoreName(int size) throws Exception{
}


}
}
6 changes: 4 additions & 2 deletions src/vmm_mad/vmware/OperationsOverVM.java
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,10 @@ private ManagedObjectReference traverseSnapshotInTree(
}

argsWithHost[args.length] = "--url";
argsWithHost[args.length + 1 ] = "https://" + hostName + ":443/sdk";
//argsWithHost[args.length + 1 ] = "https://" + hostName + ":443/sdk";

argsWithHost[args.length + 1 ] = "https://localhost:8008/sdk";


cb = AppUtil.initialize("DeployVM", null, argsWithHost);
cb.connect();
Expand All @@ -275,4 +277,4 @@ private ManagedObjectReference traverseSnapshotInTree(
datacenterName = "ha-datacenter";
}

}
}
6 changes: 4 additions & 2 deletions src/vmm_mad/vmware/install-vmware.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ echo -n "Installing VMWare drivers."

javac OneVmmVmware.java
cp *class $ONE_LOCATION/lib/mads
cp one_vmm_vmware $ONE_LOCATION/bin
cp one_vmm_vmware $ONE_LOCATION/lib/mads
chmod +x $ONE_LOCATION/lib/mads/one_vmm_vmware

cd ../../im_mad/vmware/
javac OneImVmware.java
cp *class $ONE_LOCATION/lib/mads
cp one_im_vmware $ONE_LOCATION/bin
cp one_im_vmware $ONE_LOCATION/lib/mads
chmod +x $ONE_LOCATION/lib/mads/one_im_vmware
cd -

cd ../../tm_mad/vmware
Expand Down

0 comments on commit 34c3d06

Please sign in to comment.