Schedules creation

Heiko W.Rupp hrupp at redhat.com
Mon Feb 6 08:51:34 UTC 2012


Hi,

I am playing with some stuff and creating resources from existing types that have metrics

   Resource res = new Resource(resourceKey,name,resType);

        res.setUuid(resourceKey);
        res.setAgent(parent.getAgent());
        res.setParentResource(parent);
        res.setInventoryStatus(InventoryStatus.COMMITTED);
        res.setDescription(resType.getDescription());

        try {
            resMgr.createResource(caller,res,parent.getId());

This works all nicely,  but no schedules are created. The only hint about potential failure is in 
ResourceManagerBean#createResource():

        // TODO: jshaughn - This fails for resource types without metric definitions
        int[] resourceIds = new int[] { resource.getId() };
        measurementScheduleManager.findSchedulesForResourceAndItsDescendants(resourceIds, false);


Does anyone has an idea what may go wrong? 



-- 
Reg. Adresse: Red Hat GmbH, Technopark II, Haus C, 
Werner-von-Siemens-Ring 14, D-85630 Grasbrunn
Handelsregister: Amtsgericht München HRB 153243
Geschaeftsführer:  Mark Hegarty, Charlie Peters, Michael Cunningham, Charles Cachera



More information about the rhq-devel mailing list