Open jouvin opened 7 years ago
Normally because they are used as dict keys and they also cannot start with a digit.
You can always prefix them with 'room' or _
At least this should be stated clearly in the online help text... I have the feeling that ideally it should be the internal business of Aquilon to transform the value in a valid identifier internally (like we do with escape() in templates).
should fix that in pan also (and also get rid of escape while we're at it 😁 ). why can't pan dict keys start with a digit anyway? (i understand why they can't be only digits)
@stdweird I mentioned pan just an example of converting the user value to an internally acceptable one. I don't want to push the same approach. Let's avoid to discuss panc here (despite you are right, I think there is no more problem with a pan dict key starting with a digit). My point is only that for me a good product should not impose restriction to values meaningful for a user because of internal constraints: it should do/manage the mapping.
wrt pan dict keys: https://github.com/quattor/pan/issues/156
Discussed at RAL workshop. Aquilon is doing the right thing while PAN enforces this so will keep open until quattor/pan#156 is fixed and then revisit.
For reference, the current error message is...
Bad Request: '42' is not a valid value for Building.
Identifiers are also used as template names so in addition to quattor/pan#156 we also need to check that PAN allows template names to start with a digit.
Update: confirms that a template called "42.pan" works correctly. The issue (at the moment) with using a templates called features/42.pan with aquilon is that is then incompatible with feature parameters since /system/features/42
is not a valid PAN path (and will continue not to be a valid one even after pan#156 is fixed).
Object names like rooms, buildings... are not allowed to start with a digit. Is there a good reason for this restriction? A typical naming of rooms at our site is like
206-1-001
meaning the room 001 on the first floor of building 206. It would good if we could enter this "standard" name rather than rewrite it for Aquilon.