Solved // CLI: Agent info incomplete

Ian Springer ian.springer at redhat.com
Tue Aug 2 21:52:01 UTC 2011


On 08/02/2011 05:35 PM, Ondr(ej Z(iz(ka wrote:
> Speaking of that, I'd also welcome if the criteria would allow to 
> search for any InventoryState (or what's the name) - I mean,
> InventoryState.ALL would act like InventoryState.NEW + ...COMMITTED + 
> UNINVENTORIZED - is that possible?
> And also, it would be the default value. Currently it seems to be be 
> InventoryState.NEW after creating new Criteria().

Are you talking about ResourceCriteria? If so, I think you could do:

criteria.addFilterInventoryStatus(null);

to not filter by status at all.

There's  currently no way to filter by more than one, though it could be 
added if you have a good use case for it.

By default it filters status by COMMITTED.

>
> Also, the names could be "setNameFilter()" and such instead of 
> "addNameFilter()". But I guess that won't change for back compat reasons.

Yeah, that's not going to change at this point. I suspect there was some 
technical reason for the decision to use add*.

>
> Ondra
>
>
>
> Ian Springer pís(e v Út 02. 08. 2011 v 11:03 -0400:
>> It might be useful, especially for CLI purposes, if we added a
>> fetchAll() method to our criteria objects.
>>
>> On 08/02/2011 08:59 AM, Jay Shaughnessy wrote:
>> >  Yes, we supply Criteria fetch for most everything now. But for
>> >  performance we don't fetch any data with 'lazy fetch' semantics, unless
>> >  specifically asked for with a fetchXXX(true). Note also that the
>> >  optionally fetched object (the XXX in this example) will not provide any
>> >  of its lazy fetched data. If you need that then you would need to make
>> >  another Criteria call to gather the data you need.
>> >
>> >  On 8/1/2011 8:59 PM, Ondr(ej Z(iz(ka wrote:
>> >>  Got it - criteria.fetchAgent(true);
>> >>
>> >>
>> >>
>> >>  Ondr(ej Z(iz(ka pís(e v Út 02. 08. 2011 v 00:42 +0200:
>> >>>  Hi,
>> >>>
>> >>>  I wanted to filter discovered JBoss AS' by hostname.
>> >>>  Using resource's name seems unreliable, so I wanted to use
>> >>>  resource.agent.server
>> >>>  But that's never filled:
>> >>>
>> >>>  rhqadmin at stacks1.mw.lab.eng.bos.redhat.com  <mailto:rhqadmin at stacks1.mw.lab.eng.bos.redhat.com>:7080$ as.agent
>> >>>  Agent:
>> >>>  address:
>> >>>  affinityGroup:
>> >>>  agentToken:
>> >>>  backFilled: false
>> >>>  createdTime: 1312237924605
>> >>>  id: 10111
>> >>>  lastAvailabilityReport:
>> >>>  modifiedTime: 1312237924605
>> >>>  name:
>> >>>  port: 0
>> >>>  remoteEndpoint:
>> >>>  server:
>> >>>  status: 0
>> >>>  statusMessages: []
>> >>>
>> >>>  Is there some technical reason for that, or can it be fixed?
>> >>>
>> >>>  Thanks,
>> >>>  Ondra
>> >>>  _______________________________________________
>> >>>  rhq-devel mailing list
>> >>>  rhq-devel at lists.fedorahosted.org  <mailto:rhq-devel at lists.fedorahosted.org><mailto:rhq-devel at lists.fedorahosted.org>
>> >>>  https://fedorahosted.org/mailman/listinfo/rhq-devel
>> >>
>> >>  _______________________________________________
>> >>  rhq-devel mailing list
>> >>  rhq-devel at lists.fedorahosted.org  <mailto:rhq-devel at lists.fedorahosted.org>
>> >>  https://fedorahosted.org/mailman/listinfo/rhq-devel
>> >  _______________________________________________
>> >  rhq-devel mailing list
>> >  rhq-devel at lists.fedorahosted.org  <mailto:rhq-devel at lists.fedorahosted.org>
>> >  https://fedorahosted.org/mailman/listinfo/rhq-devel
>>
>>
>
>
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/rhq-devel


-- 
Ian Springer
Principal Software Developer
JBoss Operations Network
Red Hat
ian.springer at redhat.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://fedorahosted.org/pipermail/rhq-devel/attachments/20110802/7c75dde3/attachment.html 


More information about the rhq-devel mailing list