-
Notifications
You must be signed in to change notification settings - Fork 13
Missing tags for insert points in print rule
#32
Comments
This would be possible, the primary reason it isn't done that way by default is that the 'tag' field is part of the rule payload and using that in the REPR will require an additional fetch per rule. Realistically that is probably not a big deal since printing would be assumed to be a debug operation anyways. Just to iterate my point, take this example:
By default the SMC api will return meta data about the element on the fetch (in this case a collection). Exposing the tag in the repr will just require an additional fetch per rule. It was originally suppressed by default for that reason. |
Maybe SMC should've returned the human-equivalent of "uniquely identifiable information"? I mean, It is also "interesting" that guessing the tag of the |
I agree, but I do suspect this is already being done by using the 'name' field that correlates to the rule itself. If the rule does not have a name, then the rule tag is used. Similar to what you see in the SMC.
The SMC UI shows: Also note if you are just iterating through the rules and want tags, you can always get them by printing them, just like the repr would:
|
Just an addendum - some of the comments above might be more relevant to normal rules but the same sort of logic applies to templates with respects to printing out with the tag:
|
On the FirewallTemplatePolicy docstring, there is the example:
I tried to print from a policy template in-the-making, which had only 2 insert points; the latter of which was manually filled. My output was:
I couldn't see the inherited Insert Point place; neither did I know how to add "Insert Points" to replace the latter insert point. Also, simply from that output, I didn't know how to add rules "before/after" said insert points. I agree I could use the strings ... but I would guess using the tags would be better.
I would propose:
Note that:
The text was updated successfully, but these errors were encountered: