I have one question about ruamel.yaml, There is my code as below,
sriov_seg_type = ["flat"]
for port in sriov_port:
port_dict = OrderedDict()
port_dict["name"] = port
port_dict["mtu"] = 9000
port_dict["networkType"] = sriov_seg_type
my expect result is
- name: P1
mtu: 9000
networkType:
- flat
- name: P2
mtu: 9000
networkType:
- flat
- name: P3
mtu: 9000
networkType:
- flat
- name: P4
mtu: 9000
networkType:
- flat
but I got the format below, that contains anchor and aliases. How can I make it not create an anchor and aliases?
- name: P1
mtu: 9000
networkType: &id001
- flat
- name: P2
mtu: 9000
networkType: *id001
- name: P3
mtu: 9000
networkType: *id001
- name: P4
mtu: 9000
networkType: *id001