Hostgroups in differents Locations/Organizations

I noticed that it is not possible to create hostgroups with the same name even with those hostgroups being in differents locations/organizations.

What do you think about making the location/organization option a kind of namespace for creating hostgroups?

In this way hostgroups of different location/organization are completely isolated from each other.

This is the case for all resources within Foreman, I guess it’s a limitation of current organizations and locations model. We could remove the validations and drop unique index from DB but I’m not sure whether we don’t rely on uniqueness of some resource attribute, e.g. mac address.

A problem with your approach is that currently admins change and share resources (such as hostgroups) between organizations very often. If we namespace host groups by orgs/locs, sharing objects with the same name would become quite confusing in my opinion.

But what are the resources that are shared between locations/organizations?

It seems to me that, regarding hostgroups, no data is shared between locations/organizations.

Then the constraints of the data model adopted by Foreman limit there is only unique names for resources within the Foreman?

I’m thinking of studying a way to collaborate on the Foreman development code to make it possible to have more than one hostgroup with the same name but located in different locations/organizations.

Do you collaborators in the development of the Foreman find this type of implementation viable or this would be extremely difficult?