UNSOLVED

isabellecda

updated

16 years ago

0

1010

April 19th, 2010 06:00

Dynamic model count devices by type

Hello!

I've defined a "Site" class using dynamic model and I'm using the following code to count the number of devices in the site (using ConsistsOf relationship):

interface Site:ICIM_Collection

"Site where a group of devices is located."
{

     computed attribute unsigned short NumberOfDevices

     "Total number of devices in the site."

     = | ConsistsOf |;

}

So, I was wondering, is it possible to count the number of devices by type? For example, I was looking to count the number of Routers in the Site.

interface Site:ICIM_Collection
"Site where a group of devices is located."

     computed attribute unsigned short NumberOfRouters

     "Total number of router in the site."

     //= ???;

}

Any help would be appreciated.

Thank you for your time.

Isabelle.