Is it possible to define ports in a stereotype to apply them to elements?

I want to create a library of equipment as reusable templates, for example, a hydraulic cylinder with predefined attributes and ports.

The goal is to be able to instantiate these equipment models, assigning specific values to their attributes, while keeping the initial template as a reference.

I considered using a stereotype, but this might not be the best approach. My main issue is that I don’t know how to include ports in the stereotype so that they are automatically added when an element applies this stereotype, just like attributes are.

My questions:

  1. Is it possible to add ports to a stereotype, so that they are automatically created on elements that apply this stereotype?

  2. Is there a better approach to efficiently manage these equipment templates in Catia Magic?