/** Adds old style drbddisk service in the heartbeat and graph. */
public void addDrbdDisk(final FilesystemRaInfo fi, final Host dcHost, final String drbdId, final Application.RunMode runMode) {
final Point2D p = null;
final CrmGraph crmg = getBrowser().getCrmGraph();
final DrbddiskInfo di =
(DrbddiskInfo) getBrowser().getServicesInfo().addServicePanel(getBrowser().getCrmXml().getDrbddiskResourceAgent(),
p,
true,
drbdId,
null,
runMode);
di.setGroupInfo(fi.getGroupInfo());
getBrowser().addToHeartbeatIdList(di);
fi.setDrbddiskInfo(di);
final GroupInfo giFi = fi.getGroupInfo();
if (giFi == null) {
crmg.addColocation(null, fi, di);
crmg.addOrder(null, di, fi);
} else {
crmg.addColocation(null, giFi, di);
crmg.addOrder(null, di, giFi);
}
di.waitForInfoPanel();
di.getWidget("1", null).setValueAndWait(new StringValue(getDrbdResourceInfo().getName()));
di.apply(dcHost, runMode);
di.getResource().setNew(false);
application.invokeInEdt(new Runnable() {
@Override
public void run() {
di.setApplyButtons(null, di.getParametersFromXML());
}
});
}