Skip to content

Commit 3c725ee

Browse files
committed
fixed document style
1 parent 42a4ce5 commit 3c725ee

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This website is built using [Docusaurus](https://docusaurus.io/), a modern stati
88
$ yarn
99
```
1010

11-
## Local Development
11+
## Local development
1212

1313
```console
1414
$ yarn start

docs/docs/adapters/aci.mdx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ title: Cisco ACI adapter
33
---
44
import ReferenceLink from "../../src/components/Card";
55

6+
<!-- vale off -->
67
## What is Cisco ACI?
8+
<!-- vale on -->
79

810
The *Cisco ACI* is a software-defined networking (SDN) solution that provides a policy-based, application-centric approach to managing and orchestrating network infrastructure. It is commonly used in data centers for scalable, policy-driven networking.
911

@@ -17,7 +19,7 @@ Currently, the Cisco ACI adapter supports only **one-way synchronization** from
1719

1820
## Configuration
1921

20-
The adapter reads connection settings from the sync config and can be overridden by environment variables. Credentials should be provided from a secret manager or environment variables in production.
22+
The adapter reads connection settings from the synchronization configuration and can be overridden by environment variables. Credentials should be provided via a secret manager or environment variables in production.
2123

2224
### Configuration parameters
2325

@@ -123,14 +125,14 @@ transforms:
123125
This transform:
124126

125127
1. Extracts the node ID from the ACI Distinguished Name (DN)
126-
2. Removes the `"node-"` prefix (e.g., `"node-102"` → `"102"`)
128+
2. Removes the `"node-"` prefix (for example: `"node-102"` `"102"`)
127129
3. Uses the `aci_device_name` filter to resolve the node ID to the actual device name
128130

129131
**How it works:**
130132

131-
- The adapter automatically queries ACI's `fabricNode` class during initialization
133+
- The adapter automatically queries the ACI `fabricNode` class during initialization
132134
- Builds a mapping of node IDs to device names
133-
- The filter performs a simple lookup with fallback to the original node ID if not found
135+
- The filter performs a lookup with a fallback to the original node ID if not found
134136

135137
## Generating the models
136138

@@ -152,12 +154,12 @@ poetry run infrahub-sync generate --name from-cisco-aci --directory examples/
152154
- **Interface-device relationship errors**: If you see "Unable to locate the node device" errors, ensure:
153155
- The `DcimPhysicalDevice` mapping runs before `DcimPhysicalInterface` in the `order` configuration
154156
- The device transform uses the `aci_device_name` filter correctly: `{{ node_id | aci_device_name }}`
155-
- The ACI fabricNode query is successful (check logs for "Built ACI device mapping" messages)
157+
- The ACI fabric node query succeeds (check logs for "Built ACI device mapping" messages)
156158

157159
### Jinja filter issues
158160

159161
- **`aci_device_name` filter not found**: Ensure you're using the ACI adapter and the filter is correctly spelled
160-
- **Filter returns node ID instead of device name**: Check that the fabricNode query was successful during adapter initialization
162+
- **Filter returns node ID instead of device name**: Check that the fabric node query succeeded during adapter initialization
161163
- **Transform expression errors**: Verify the DN parsing logic extracts the correct node ID:
162164

163165
```yaml

docs/docs/adapters/local-adapters.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class MyCustomModel(DiffSyncModelMixin, DiffSyncModel):
119119

120120
#### Setting up filter data
121121

122-
If your filters need data (like mappings, lookups, etc.), initialize it in your adapter:
122+
If your filters need data (like mappings, lookup values, etc.), initialize it in your adapter:
123123

124124
```python
125125
class MyCustomAdapter(DiffSyncMixin, Adapter):
@@ -161,10 +161,10 @@ schema_mapping:
161161
162162
#### Filter implementation guidelines
163163
164-
1. **Keep filters simple**: Each filter should do one specific transformation
164+
1. **Keep filters focused**: Each filter should do one specific transformation
165165
2. **Handle edge cases**: Always provide fallback values for missing data
166166
3. **Use class variables**: Store filter data as class variables for efficient access
167-
4. **Document your filters**: Add docstrings explaining what each filter does
167+
4. **Document your filters**: Add Python documentation strings explaining what each filter does
168168
5. **Test thoroughly**: Ensure filters work with various input types and edge cases
169169
170170
#### Real-world example: ACI device name filter

0 commit comments

Comments
 (0)