Skip to content

Commit 1ac4f76

Browse files
committed
docs: start yaml examples with our style
We use --- to start our YAML file so in the docs start them the same way.
1 parent dac93e8 commit 1ac4f76

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

docs/design-guide/flavors.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ Flavor definitions are YAML files validated against `schema/flavor.schema.json`.
5757
### Example: Generic Flavor
5858

5959
```yaml
60+
---
6061
# yaml-language-server: $schema=https://rackerlabs.github.io/understack/flavor.schema.json
6162
name: m1.small
6263
resource_class: m1.small
@@ -67,6 +68,7 @@ This matches all Ironic nodes with `resource_class=m1.small`, regardless of trai
6768
### Example: Trait-Specific Flavor
6869

6970
```yaml
71+
---
7072
# yaml-language-server: $schema=https://rackerlabs.github.io/understack/flavor.schema.json
7173
name: m1.small.nicX
7274
resource_class: m1.small
@@ -80,6 +82,7 @@ This matches only nodes with `resource_class=m1.small` AND the `CUSTOM_NICX` tra
8082
### Example: Exclusion Flavor
8183

8284
```yaml
85+
---
8386
# yaml-language-server: $schema=https://rackerlabs.github.io/understack/flavor.schema.json
8487
name: m1.small.no-gpu
8588
resource_class: m1.small
@@ -200,6 +203,7 @@ And extra_specs for scheduling:
200203
Create flavors that match any hardware in a resource class:
201204

202205
```yaml
206+
---
203207
name: compute.standard
204208
resource_class: m1.medium
205209
```
@@ -211,6 +215,7 @@ Users get any available `m1.medium` server, providing flexibility and maximizing
211215
Create flavors for specific hardware capabilities:
212216

213217
```yaml
218+
---
214219
name: compute.gpu
215220
resource_class: m1.large
216221
traits:
@@ -225,6 +230,7 @@ Guarantees instances get hardware with GPU capabilities while using the `m1.larg
225230
Require specific hardware while excluding others:
226231

227232
```yaml
233+
---
228234
name: m1.small.mellanox-cx5
229235
resource_class: m1.small
230236
traits:
@@ -239,10 +245,11 @@ Guarantees instances get nodes with Mellanox ConnectX-5 network cards.
239245
Define multiple flavors for the same resource class with different trait requirements:
240246

241247
```yaml
248+
---
242249
# Generic flavor
243250
name: m1.small
244251
resource_class: m1.small
245-
252+
---
246253
# Specialized variant
247254
name: m1.small.nvme
248255
resource_class: m1.small
@@ -341,6 +348,7 @@ Each flavor's `resource_class` must match a resource class defined in a device-t
341348
**Device-Type Definition** (`dell-poweredge-r7615.yaml`):
342349

343350
```yaml
351+
---
344352
class: server
345353
manufacturer: Dell
346354
model: PowerEdge R7615
@@ -360,6 +368,7 @@ resource_class:
360368
**Flavor Definition** (`m1.small.yaml`):
361369

362370
```yaml
371+
---
363372
name: m1.small
364373
resource_class: m1.small # Links to device-type resource class
365374
```
@@ -373,17 +382,18 @@ The flavor-matcher looks up `m1.small` in device-type definitions to find the CP
373382
A single device-type resource class supports multiple flavors with different trait filters:
374383

375384
```yaml
385+
---
376386
# Generic: matches all m1.small nodes
377387
name: m1.small
378388
resource_class: m1.small
379-
389+
---
380390
# Specialized: only nodes with NICX trait
381391
name: m1.small.nicX
382392
resource_class: m1.small
383393
traits:
384394
- trait: NICX
385395
requirement: required
386-
396+
---
387397
# Exclusion: nodes without GPU
388398
name: m1.small.no-gpu
389399
resource_class: m1.small

docs/operator-guide/device-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ matching during hardware enrollment and accurate Nova flavor creation.
335335
interfaces, specific switch ports)
336336
* Mark management interfaces with `mgmt_only: true`
337337
* Follow standard interface type naming (e.g., `1000base-t`, `10gbase-x-sfp+`,
338-
`25gbase-x-sfp28`)
338+
`25gbase-x-sfp28`) - see [Nautobot interface types](https://docs.nautobot.com/projects/core/en/stable/user-guide/core-data-model/dcim/interface/#interface-type) for available values
339339
* Use `nic_count` in resource classes to specify minimum user-usable network
340340
ports (not tied to specific named interfaces)
341341

0 commit comments

Comments
 (0)