Bacon, Benjamin wrote:
> Hi
> I was wondering if anyone has used the function
> OVwDbListObjectsByFieldValue in a program to list objects by field
> values. Specifically I am trying to write a script that would list all
> the objects that have an IP Status that is not normal. The the field is
> IP Status and the value is not normal. If anyone has had experience
> writing scripts for Net View please let me know. Any help would be
> appreciated. Also if anyone knows where to find more documentation or
> examples about the functions for Net View please let me know.
>
> Thanks
> Benjamin Bacon
hope this helps:
buildOVwDevList(List<unsigned long> *devLst, OVwFieldBindList *bind)
{
int i = 0;
OVwObjectIdList *objidlist;
OVwFieldBinding *field = &bind->fields[0];
objidlist= OVwDbListObjectsByFieldValue(field);
if (objidlist== (OVwObjectIdList *)NULL)
{
OVuLog(ERROR, NULL, 0, 0,"OVwListObjectsByFieldVal failed\n");
return(PdnFAILURE);
}
//build a list of OVwObjectIds
for(i = 0 ;i < objidlist->count; i++)
devLst->put(objidlist->object_ids[i]);
(void)OVwDbFreeObjectIdList(objidlist);
return(PdnSUCCESS);
}
reha
|