} else {
//nothing to do here
}
} else {
if (vmOmapiRegister) {
throw new MissingCLIArgumentException("omapihost is required when omapiregister is enabled");
}
}
//Omapi Port : default 9991
String omapiPortString=cmdLine.getOptionValue("omapiport");
if (omapiPortString!=null) {
try {
this.omapiPort=Integer.parseInt(omapiPortString);
} catch (NumberFormatException ex) {
throw new InvalidCLIArgumentSyntaxException("omapiport must be an integer");
}
} else {
JVsphereControl.logger.debug("no omapiport is given, using default value of "+omapiPort+" for omapiport");
}
omapiKeyName=cmdLine.getOptionValue("omapikeyname");
omapiKeyValue=cmdLine.getOptionValue("omapikeyvalue");
if (vmOmapiRegister) {
if (omapiKeyName==null) {
throw new MissingCLIArgumentException("omapikeyname is required when omapiregister is enabled");
}
if (omapiKeyValue==null) {
throw new MissingCLIArgumentException("omapikeyvalue is required when omapiregister is enabled");
}
}
//Omapi Overwrite
String omapiOverWriteString=cmdLine.getOptionValue("omapioverwrite");