Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1374467

Summary: [RFE] Add an 'AND' operator to the matcher conditionals
Product: Red Hat Satellite Reporter: Camry Fedei <cfedei>
Component: Docs Host Configuration GuideAssignee: Stephen Wadeley <swadeley>
Status: CLOSED CURRENTRELEASE QA Contact: Lucie Jirakova <ljirakov>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1.9CC: bbuckingham, bkearney, jcallaha, orabin, riehecky, swadeley
Target Milestone: UnspecifiedKeywords: FutureFeature
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-07 14:07:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
error message screenshot none

Comment 1 Pat Riehecky 2016-09-20 13:58:48 UTC
As an update, I'm comfortable with changing out AND for an actual operator (&& or something else based on the development constraints)

Comment 2 Pat Riehecky 2016-09-26 21:35:52 UTC
Additional example from my actual workflow.

Project 'Dune' has systems in Lifecycle Production and Lifecycle Integration.

Integration systems are in a hostgroup ".../Dune/Integration", where Dune is a parent host group
Production systems are in a hostgroup ".../Dune/Production", where Dune is a parent host group

All hosts use the same content view.

I wish to set a class parameter for all Integration systems for Dune.

I cannot base it on Lifecycle, as that would catch other projects.
I cannot base it on Content View, as that would also catch production
I cannot base it on Host group, as only the top most group is captured (in this case Integration or Production).

Comment 3 Pat Riehecky 2016-09-26 21:39:36 UTC
From a UI vs parsing out operators (did the user literally mean && or?) perhaps adding a + to the end of the line to add an additional matcher box under the current one prefixed by an i18n *and* would provide a clean interface and avoid strange parsing behavior.

Comment 5 orabin 2016-10-05 06:47:48 UTC
This already exists, it's possible to create a matcher like: 

fqdn, osmajorrelease
with the value:
host.example.com, 7

and that will create what you requested.
The comma creates an AND condition.

Comment 6 Bryan Kearney 2016-10-05 12:04:59 UTC
Per comment 5, moving to ON_QA for verification and testing.

Comment 7 Pat Riehecky 2016-10-05 13:49:07 UTC
fqdn, osmajorrelease = host.example.com, 7

does not appear to function in my environment.  Is there some other syntax that should be used in place of '='?

Comment 8 orabin 2016-10-05 15:40:18 UTC
In the order put: fqdn, osmajorrelease
then the matcher:
fqdn = host.example.com, osmajorrelease = 7
and the value you wanted.

Comment 9 Pat Riehecky 2016-10-05 16:05:45 UTC
Use of:

fqdn = host.example.com, domain = example.com

Produces the following error:

fqdn=host.example.com,domain=example.com does not match an existing host


Where host.example.com is a host that is attached to Sat6 and example.com is a valid domain.

Individually, fqdn = host.example.com and domain = example.com can both be set as matchers without error.

Screenshot attached

Comment 10 Pat Riehecky 2016-10-05 16:06:11 UTC
Created attachment 1207644 [details]
error message screenshot

Comment 11 orabin 2016-10-06 11:10:10 UTC
The error is a bug that is already fixed in 6.2.

Change the order and put domain first so it would be: domain = example.com, 
fqdn = host.example.com.

Also, in the screenshot it looks like the order does not contain: domain,fqdn which should be there to work.
It's not enough to have each of them in the order, you need to add them together.

Comment 12 Pat Riehecky 2016-10-06 14:23:32 UTC
I'll see about getting a 6.2 update on my schedule.

fqdn and domain are separately in the Order list.  I take it from your comment a line with the exact text "domain,fqdn" needs to be added.

I wasn't able to find any of this information in the official doc.

Comment 13 orabin 2016-10-13 08:39:52 UTC
Yes the exact text needs to be added.
The docs might need an example for multiple matchers.
Does this work for you?

Comment 14 Pat Riehecky 2016-10-13 13:25:49 UTC
The behavior I need is present once the listed changes are deployed.

Can we get a high priority doc update in motion?  This behavior is super handy.