-
Notifications
You must be signed in to change notification settings - Fork 26
Add NumberPool Documentation #6577
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
base: release-1.3
Are you sure you want to change the base?
Add NumberPool Documentation #6577
Conversation
- New topic page
- Updated model schemas and initial data loading of demo data
- Automated screenshots
CodSpeed Performance ReportMerging #6577 will not alter performanceComparing Summary
|
@@ -16,6 +16,12 @@ generics: | |||
label: Name | |||
optional: false | |||
order_weight: 1 | |||
- name: service_identifier | |||
kind: NumberPool | |||
read_only: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now as the read_only
attribute defaults to False
in the models I'm not sure we can do that. If we look at models for the schema generation we could change it so that it would default to None
and get changed to False
if no choice has been made.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do agree that it would be nice to have this type of attribute (and computed attribtute) to be read-only by default.
If it is not possible to do it today, or if it is to involved the we should open an issue/feature request in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be part of INFP-234
where we somewhere add a note that we want this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know if you can put a label or HFID on that one? would look nicer I guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ogenstad Do you have info on this? I believe the number pool is generated behind the scenes, but not sure how the name can be constructed by a user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What we're seeing here is the actual name of the pool. There is a uniqueness constraint on the name and the idea is to ensure that the name doesn't conflict with anything else. Instead of just using the uuid of the pool I added the kind and attribute name as help.
Currently it would be possible for a user to rename the pool to something else after it has been created. Potentially we could provide a name within the schema but that could also introduce complexity if the name already exists etc.
Any preference around this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we give the user the option to specify the name, then we could get into the issue again where someone renames the pool name in Infrahub and then it is out of sync with what we defined in the schema file. So I would not implement that.
The whole point of the feature is that we abstract the fact that there is a pool attached to the attribute. So I think it should be ok with the current name.
|
||
<Tabs> | ||
<TabItem value="Number"> | ||
| Parameter | Default | Required | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the required column really be here? Will have a parameter that will ever be required? To me it feels like they will always be optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove the column from the template for this.
docs/docs/topics/schema.mdx
Outdated
@@ -155,6 +158,12 @@ The `kind` of a model is generated by concatenating the `namespace` and the `nam | |||
|
|||
</details> | |||
|
|||
#### Attribute Parameters | |||
|
|||
There are some attribute kinds that allow `parameters` to be passed to control the behavior of the attribute. Below are the attribute kinds and their accepted parameters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that allow optional parameters