-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the visible todos from the lsm docs. (PR #7201)
# Description add docs/ remove todos follow-up ticket: 1. https://app.zenhub.com/workspaces/core-5a7c152b04a1652024289b7b/issues/gh/inmanta/inmanta-core/7202 2. https://app.zenhub.com/workspaces/core-5a7c152b04a1652024289b7b/issues/gh/inmanta/std/504 3. https://app.zenhub.com/workspaces/core-5a7c152b04a1652024289b7b/issues/gh/inmanta/apt/281 closes #7134 # Self Check: Strike through any lines that are not applicable (`~~line~~`) then check the box - [x] Attached issue to pull request - [ ] Changelog entry - [ ] Type annotations are present - [ ] Code is clear and sufficiently documented - [ ] No (preventable) type errors (check using make mypy or make mypy-diff) - [ ] Sufficient test cases (reproduces the bug/tests the requested feature) - [ ] Correct, in line with design - [x] End user documentation is included or an issue is created for end-user documentation (add ref to issue here: ) - [ ] If this PR fixes a race condition in the test suite, also push the fix to the relevant stable branche(s) (see [test-fixes](https://internal.inmanta.com/development/core/tasks/build-master.html#test-fixes) for more info)
- Loading branch information
Showing
4 changed files
with
78 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
description: Remove the visible todos from the lsm docs. | ||
change-type: patch | ||
destination-branches: | ||
- master | ||
- iso7 | ||
- iso6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import lsm | ||
import lsm::fsm | ||
import ip | ||
|
||
entity InterfaceIPAssignment extends lsm::ServiceEntity: | ||
""" | ||
Interface details. | ||
|
||
:attr service_id: A unique ID for this service. | ||
|
||
:attr router_ip: The IP address of the SR linux router that should be configured. | ||
:attr router_name: The name of the SR linux router that should be configured. | ||
:attr interface_name: The name of the interface of the router that should be configured. | ||
:attr address: The IP-address to assign to the given interface. | ||
""" | ||
string service_id | ||
|
||
string router_ip | ||
string router_name | ||
string interface_name | ||
|
||
string address | ||
lsm::attribute_modifier address__modifier="rw+" | ||
|
||
end | ||
|
||
index InterfaceIPAssignment(service_id) | ||
|
||
implement InterfaceIPAssignment using parents | ||
|
||
binding = lsm::ServiceEntityBindingV2( | ||
service_entity="__config__::InterfaceIPAssignment", | ||
lifecycle=lsm::fsm::service, | ||
service_entity_name="service_simple", | ||
) | ||
|
||
for instance in lsm::all(binding): | ||
InterfaceIPAssignment( | ||
instance_id=instance["id"], | ||
entity_binding=binding, | ||
**instance["attributes"], | ||
) | ||
end |