Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting work on uuid based services #116

Closed
wants to merge 38 commits into from
Closed

Starting work on uuid based services #116

wants to merge 38 commits into from

Conversation

shinmog
Copy link
Collaborator

@shinmog shinmog commented Apr 2, 2024

There are multiple things that differ with this implementation than the address object implementation.

[Within Location]

  • The Location.Xpath() function takes three params instead of two; the third parameter being a UUID to use for XPATH purposes instead of the name.

[Within Entry]

  • The Entry.Field() shows how an implementation of retrieving a field from a sub-struct could look like.
  • The Entry.SpecMatches() shows how an implementation of sub-struct matching could look like.
  • Entry.DisableServerResponseInspection is a flat param with other params but in the XPATH is actually nested within an Options section in the XML.
  • There are both ordered and unordered lists of strings in the normalized object.
  • The LogEnd param requires a custom UnmarshalXML, and the generator needs to be able to do this.
  • The Entry.DisableInspect param should result in a second versioned object when this output from the generator.
  • The Entry.Targets is a unique type that any rule in the Policy section will have, so we'll need the generator to be able to handle this param type.

[Within service.go]

  • There are new functions here that do things by UUID, as well as the standard functions that work off of name.
  • Besides the "...ById" functions mentioned above, there are three other functions intended to be used by group style resources: Service.ReadGroup() / Service.ConfigureGroup() / Service.DeleteGroup().
  • Future Enhancement? - I think the logic implemented for rule movement in ConfigureGroup() can be improved to minimize the number of moves needed to end at the desired configuration. Note that only rules in the group given should be moved so as not to cause configuration drift of other group resources.
  • Also for ConfigureGroup() - it does two multi-config commands currently, at most: one to update the rule specs themselves and one to do the rule movements. It should be technically possible to combine this into a single multi-config, but it will require careful attention to later parts of the code if the listing will be updated in place.
  • Audit comments are only applied if the rule spec has to be changed, not if the rule is renamed or if the rule is moved. Should it be applied if the rule is renamed..?

I might be missing some other callouts, and this is still missing stuff, such as rule hit count handling, so it's not completely finalized, but it's worth checking out where things stand so far.

@shinmog
Copy link
Collaborator Author

shinmog commented Apr 2, 2024

wrong branch

@shinmog shinmog closed this Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant