YAML rendering for config contexts with overlapping nested dictionary is incorrect #3318

Closed
opened 2025-12-29 18:27:39 +01:00 by adam · 2 comments
Owner

Originally created by @vsvetlov on GitHub (Feb 12, 2020).

Originally assigned to: @hSaria on GitHub.

Environment

  • Python version: 3.7.3
  • NetBox version: 2.7.4

Steps to Reproduce

  1. Create config context region1
{
    "attributes": {
        "key10": "value10"
    }
}
  1. Create config context site1
{
    "attributes": {
        "key20": "value20"
    }
}
  1. These config contexts should be applied to the same device

Expected rendered context

attributes:
  key10: value10
  key20: value20

Observed rendered context

attributes: !!python/object/apply:collections.OrderedDict
- - - key10
    - value10
  - - key20
    - value20
Originally created by @vsvetlov on GitHub (Feb 12, 2020). Originally assigned to: @hSaria on GitHub. ### Environment * Python version: 3.7.3 * NetBox version: 2.7.4 ### Steps to Reproduce 1. Create config context region1 ``` { "attributes": { "key10": "value10" } } ``` 2. Create config context site1 ``` { "attributes": { "key20": "value20" } } ``` 3. These config contexts should be applied to the same device <!-- What did you expect to happen? --> ### Expected rendered context ``` attributes: key10: value10 key20: value20 ``` <!-- What happened instead? --> ### Observed rendered context ``` attributes: !!python/object/apply:collections.OrderedDict - - - key10 - value10 - - key20 - value20 ```
adam added the type: bugstatus: accepted labels 2025-12-29 18:27:39 +01:00
adam closed this issue 2025-12-29 18:27:39 +01:00
Author
Owner

@DanSheps commented on GitHub (Feb 12, 2020):

@hSaria I believe you did the YAML formatting, is this something you could look at?

@DanSheps commented on GitHub (Feb 12, 2020): @hSaria I believe you did the YAML formatting, is this something you could look at?
Author
Owner

@hSaria commented on GitHub (Feb 12, 2020):

Sure thing. I’ll take care of it.

On 12 Feb 2020, at 17:58, Daniel Sheppard notifications@github.com wrote:


@hSaria I believe you did the YAML formatting, is this something you could look at?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

@hSaria commented on GitHub (Feb 12, 2020): Sure thing. I’ll take care of it. > On 12 Feb 2020, at 17:58, Daniel Sheppard <notifications@github.com> wrote: > >  > @hSaria I believe you did the YAML formatting, is this something you could look at? > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub, or unsubscribe.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3318